Using both NuGet package and auto instrumentation?

Hi all,

We are currently testing Elastic APM with .NET microservices (already using it in the Java environment) and we are a bit confused about the different integration options:

We started with the NuGet approach because we wanted to use the MongoDB instrumentation, which is available as NuGet package. Now, we want to also add the Kafka instrumentation which is - according to this documentation - only available as profiler auto instrumentation. But switching to this technique is not possible because MongoDB does not support it.

So, my question is: Is it possible to use the "best of both worlds" and use MongoDB NuGet package together with auto instrumentation for Kafka or what would you recommend?

Best regards

Kibana version: 8.7.0

Elasticsearch version: 8.7.0

APM Server version: 8.7.0

APM Agent language and version: .NET 1.22.0

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

Hey, sorry for the late reply.

Yes, that is supported. You can just add the Elastic.Apm.MongoDb package and configure it - but only do the config for MondoDb and do not enable the agent as a whole.

And then you can inject the agent via environment variables as described in the profiler related doc.

1 Like