Skip to content

[FEATURE REQ] Messaging tracing: support disabling per-message tracing #43355

Open
@lmolkova

Description

@lmolkova

Library name

Azure.Messaging.EventHubs, Azure.Messaging.ServiceBus

Please describe the feature.

We had a several questions/issues from users who didn't like message+send spans. In case there is just one message in a batch, then having two spans does not bring any value.
Also, when batch size it huge, per-message tracing becomes too hard and might not make sense.

OTel semconv allow to create a span per message in a batch and a publish span OR create one publish span and reuse publish context on each message being published.

We can do the following:

  1. if user enabled per-message source, then we'll create span per message
    • if sender source is enabled, we'll also create a publish span - this existing path, no changes are expected
  2. if user didn't enable per-message source, we won't create a span per message
    • if sender source is enabled, we'll create a publish span:
      • if some message have pre-existing context provided by user, we won't update it and will link to it
      • otherwise, we'll inject publish span context into the message
      • this is the new feature
  • if sender source is not enabled - no tracing or context propagation happens - same as before.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Event HubsOpenTelemetryOpenTelemetry instrumentation (not Monitor-specific)Service Bus

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions