Open ritesh-singh opened 3 months ago
Interesting! I haven't seen this behavior before, but brainstorming potential ways this might happen - I have a couple suggestions:
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.
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
I hooked up the plugin with our Observability Backend, and noticed one single trace is generated, and same trace gets modified in subsequent builds.