Is it possible to get a hold of the current process-group-instance-id from within dotnet code itself. We want to add it to some log-to-db system as a field. In a later stage the logs are processed by LogStash and pushed to Dynatrace LM2.0.
The flow already works but with the ID we could link it to the correct entity and management zone.
Solved! Go to Solution.
Yes, using the file open interface you are able to retrieve the process group instance ID and host ID as soon as there is OneAgent running on the host. Also if you want the trace id / span id, you can fetch them using either using OneAgent SDK for .NET or using OpenTelemetry.
Thanks Julius. Exactly what I was looking for. I saw it in OTEL context already and it's strange looking code but it works indeed 😉
Well, successfully reading a file that does not exist feels always strange 😁