Skip to content

[BUG]: Error in karafka.consume spans does not propagate to parent span #4655

@aaronsama

Description

@aaronsama

Tracer Version(s)

2.15.0

Ruby Version(s)

ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [aarch64-linux]

Relevent Library and Version(s)

No response

Bug Report

We recently upgraded the datadog gem to version 2.15.0 and switched from the Datadog integration provided by Karafka to the one provided by the gem.

We noticed that when a span with the karafka.consume operation encounters an error, it is not propagated to the parent span, like in the screenshot below. We correctly see one operation per Kafka message but the parent span with the worker.process operation looks like no error was detected.

Image

For comparison, this is how the same error used to appear with the integration provided by Karafka:

Image

Reproduction Code

No response

Configuration Block

Datadog.configure do |c|
  c.tracing.instrument :karafka, enabled: true, distributed_tracing: true
end

Error Logs

No response

Operating System

No response

How does Datadog help you?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugInvolves a bugcommunityWas opened by a community member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions