newrelic-dotnet-agent
newrelic-dotnet-agent copied to clipboard
Explore alternative MassTransit queue naming strategies
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.
https://new-relic.atlassian.net/browse/NR-179666