newrelic-dotnet-agent icon indicating copy to clipboard operation
newrelic-dotnet-agent copied to clipboard

Automatic Instrumentation & Distributed Tracing for MassTransit

Open noahtrilling opened this issue 1 year ago • 4 comments

Our organization uses MassTransit over RabbitMQ extensively. New Relic does not automatically instrument MassTransit with Transactions or support distributed tracing between producers and consumers of messages.

Feature Description

We would like the New Relic .NET Agent to automatically instrument MassTransit producers and consumers and support distributed tracing between them. It looks like the New Relic .NET Agent already supports this feature for NServiceBus (another ESB implementation) so our use case is likely identical.

NServiceBus

Describe Alternatives

MassTransit recently added support for OpenTelemetry in Version 8. However, the New Relic Agent more easily correlates logs to trace spans without modification to our source code/logging mechanism. The .NET Agent may also be able to more easily support distributed tracing in older versions of MassTransit.

Priority

Must Have

noahtrilling avatar Oct 21 '22 15:10 noahtrilling

https://issues.newrelic.com/browse/NEWRELIC-4727

Jira CommentId: 100133 Commented by jcoleman:

Thanks for the feature request! AFAIK support for MassTransit isn't currently on our roadmap, but I'd like to gather some more details about your use case and hand this request off to our product management team for consideration. 

I did a cursory investigation of MassTransit version 8, and it looks like it uses RabbitMQ.Client internally (which we should instrument). Here are some questions to help us better understand your use cases:

  • Are you seeing any segments created from our existing RabbitMQ instrumentation? Do they contain distributed tracing information?
  • What version(s) of MassTransit are you using?
  • Are you using any transports other than RabbitMQ for MassTransit?
  • What features of MassTransit are you currently using?

 

Thanks for taking a look into this request and for the prompt reply.

  1. We also suspected that the RabbitMQ instrumentation should cover this use case, but as far as I know, we are not seeing any distributed tracing or segments being created from the RabbitMQ instrumentation. If these Release Notes establish the correct minimum versions for RMQ and the .NET Agent, we would expect to see at least some tracing, but we have not.

https://docs.newrelic.com/docs/release-notes/agent-release-notes/net-release-notes/net-agent-83700/

  1. We have many MassTransit applications here. I'd guess some are as old as Version 2 or Version 3 and some are as recent as the latest (Version 8)

  2. We also use AWS SNS/SQS as a transport.

  3. We use most of the API surface, but our immediate concern is distributed tracing for the basic messaging functions. Publish and Send for Producers. Receive for Consumers. We have some usage of the more advanced features of MassTransit, including Sagas, Scheduling, but instrumentation of those features would be a lower priority.

noahtrilling avatar Oct 21 '22 21:10 noahtrilling

Based on what you have posted, it does sound like our instrumentation should at least cover a bit of the calls from MassTransit going over RabbitMQ. Given this, I think it might be best if you file a support request so that this can be examined in more detail.

jaffinito avatar Oct 25 '22 20:10 jaffinito

This Issue has been marked stale after 90 days with no activity. It will be closed in 30 days if there is no activity.

github-actions[bot] avatar Apr 07 '23 19:04 github-actions[bot]

We have previously opened a support case with our account representatives on this subject and met with them in person today but they still could not provide us with a clear best path forward between OpenTelemetry and the New Relic .NET Agent for MassTransit monitoring. We have a very large number of APM installations for the New Relic Agent and a mass migration to OpenTelemetry would be complex and costly for our organization. On the other hand, the absence of automatically instrumented observability is a massive black hole in our observability stack that makes the OpenTelemetry agent an appealing option.

The ideal solution in the short term is for this feature to be implemented on the New Relic Agent so no migration to OpenTelemetry is necessary.

Will you please consider prioritizing this feature? MassTransit has a big user base in the .NET community. I doubt we are the only New Relic customers who would enormously benefit from automatic instrumentation of MassTransit.

noahtrilling avatar Jun 13 '23 22:06 noahtrilling

Jira CommentId: 218727 Commented by svengala:

We plan to look into mass transit support this year. We will continue to monitor for additional customer requests for this feature and prioritize it.

Thank you for considering this feature. I'm confident it will be an enormous help to many of New Relic's .NET customers.

noahtrilling avatar Jun 27 '23 20:06 noahtrilling

This has been implemented and will be released soon in agent version 10.19.0.

nr-ahemsath avatar Nov 07 '23 18:11 nr-ahemsath