Particular / NServiceBus

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

Limit metric tag to concrete message type #7057

Closed lailabougria closed 3 months ago

lailabougria commented 4 months ago

related to https://github.com/Particular/NServiceBus/issues/7022

Currently, a metric tag containing the content of the EnclosedMessageTypes header is added to the Fetches, Failures, and Success metrics emitted through System.Diagnostics in Core.

However, the value of this header can be quite large, and doesn't provide as much value, as filtering makes most sense on the message type, not its entire hierarchy tree. This PR changes that value to be limited to the most concrete message type, and only includes the message type full name, and excludes assembly info.

The full contents of the header are still emitted as trace tags.