newrelic / newrelic-dotnet-agent

The New Relic .NET language agent.
Apache License 2.0
96 stars 57 forks source link

Explore alternative MassTransit queue naming strategies #2061

Open nr-ahemsath opened 10 months ago

nr-ahemsath commented 10 months ago

Describe the story, please be clear on scope of the story.

This story will be good for a tech debt/bug smash milestone.

In MassTransit instrumentation, we are currently using the SourceAddress property of the context data object to get the queue name. However, as seen in #2055, this property can be null in some scenarios.

In those same scenarios, there is a DestinationAddress property which is not null, and contains some properties/fields which look like they could make sensible queue names:

context.DestinationAddress
{rabbitmq://localhost/NoMTEnvelopeRepro:NoMTEnvelopeRepro}
    AbsolutePath: "/NoMTEnvelopeRepro:NoMTEnvelopeRepro"
    AbsoluteUri: "rabbitmq://localhost/NoMTEnvelopeRepro:NoMTEnvelopeRepro"
    LocalPath: "/NoMTEnvelopeRepro:NoMTEnvelopeRepro"
    OriginalString: "rabbitmq://localhost/NoMTEnvelopeRepro:NoMTEnvelopeRepro"
    PathAndQuery: "/NoMTEnvelopeRepro:NoMTEnvelopeRepro"

Some more testing would be needed to see if this property is always non-null and if the values are sensible in all scenarios we wish to support.

workato-integration[bot] commented 10 months ago

https://new-relic.atlassian.net/browse/NR-179666