Particular / NServiceBus

Build, version, and monitor better microservices with the most powerful service platform for .NET
https://particular.net/nservicebus/
Other
2.09k stars 648 forks source link

OpenTelemetry Metrics tags currently don't account for multiple logical messages encompassed in a physical message #7127

Open lailabougria opened 3 months ago

lailabougria commented 3 months ago

Describe the suggested improvement

Is your improvement related to a problem? Please describe

Early versions of NServiceBus allowed multiple messages to be combined in a single physical payload sent over the wire. NServiceBus split the payload up and routed it to the correct message handler.

Currently, if you enable OTEL metrics, a metric is collected per physical message, not logical message. Therefore, the metric tags will contain values that pertain to the first logical message that was part of the physical message.

Currently supported versions of NServiceBus always generate a single logical message per payload. Therefore, we currently don't support emitting the metrics per logical message.

In case you're interested in such a case, please chime in here with your use case.

Additional Context

No response