Creating a traceparent header in the .net agent

I have some .net core APIs with APM enabled. They are taking requests and when making sub-calls to other APIs is attaching various trace data such as trace.id, transaction.id, transaction.span_count etc, but traceparent isn't one of them. This means that our services never get connected together in the service map, and we get duplication of items (e.g. a service in our services list is also shown as dependency - APM doesn't recognise them as the same thing)

We will often get transactions starting like this - with no UI being involved and an external system triggering an endpoint, so I need to find a way of creating traceparent items if they aren't provided and injecting to the APM settings somehow?

I'm on the lastest version of the .net core agent (1.22.0) and we're pushing to elastic cloud

Thanks!

Hi @csurfleet,

a few resources that may help:

this config enables you to control how the agent treats the incoming traceparent header: HTTP configuration options | APM .NET Agent Reference [1.x] | Elastic

And this is the API that enables you to take an incoming traceparent value as a string and apply it to a newly created transaction:

If the elastic APM agent is present in all the apps and they call each other via HTTP, this should work out-of-the-box.

To be honest I wasn't able to fully understand your use-case - but these 2 configs usually cover similar scenarios.

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