craigatk / opentelemetry-gradle-plugin

Instrument your Gradle build with OpenTelemetry observability to find and eliminate bottlenecks in your build
Apache License 2.0
29 stars 9 forks source link

Same Trace gets over-written #161

Open ritesh-singh opened 3 months ago

ritesh-singh commented 3 months ago

I hooked up the plugin with our Observability Backend, and noticed one single trace is generated, and same trace gets modified in subsequent builds.

craigatk commented 3 months ago

Interesting! I haven't seen this behavior before, but brainstorming potential ways this might happen - I have a couple suggestions:

  1. Are the parent trace & span environment variables set, potentially to hardcoded values? That could cause the plugin to use the same trace ID for subsequent builds.

  2. What observability backend are the traces going into? And to try to rule out the backend as a potential cause, I recommend trying with a local Jaegar to see if it exhibits the same behavior. Instructions for running with a local Jaegar instance: https://github.com/craigatk/opentelemetry-gradle-plugin?tab=readme-ov-file#jaeger