Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Kafka message keys/offsets as span attributes? #1937

Open
Ocramius opened this issue Feb 26, 2025 · 0 comments
Open

Multiple Kafka message keys/offsets as span attributes? #1937

Ocramius opened this issue Feb 26, 2025 · 0 comments

Comments

@Ocramius
Copy link

Area(s)

area:messaging

What's missing?

This is raised starting from open-telemetry/opentelemetry-go#6372

Context

I'm working on a messaging system that deals with message batches.

At pseudo-code level, messages are accumulated in a batch, then processed:

batcher := someBatcher(func(messages []Message, session KafkaSession) {
  handleBatch(messages) // I want to create a span around this

  for _, message := range messages {
    session.MarkProcessed(message)
  }
})

messageConsumer := makeConsumer(consumerGroupOptions, batcher); // this retrieves messages one-by-one, passes them to `batcher`

While trying to connect input messages and my processing, trace correlations get completely lost, because I may have thousands of input messages leading to a single trace, therefore diluting the concept of "one parent".

Describe the solution you'd like

Given a set of input Kafka messages with an identifier, we should be capable of starting a span that considers them some sort of "parent".

For example, RocketMQ has messaging.rocketmq.message.keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Need triage
Status: V1 - Stable Semantics
Development

No branches or pull requests

1 participant