jenkinsci / opentelemetry-plugin

Monitor and observe Jenkins with OpenTelemetry.
https://plugins.jenkins.io/opentelemetry/
Apache License 2.0
100 stars 53 forks source link

Split and link traces of triggered jobs #976

Open taro-yanagiya opened 3 weeks ago

taro-yanagiya commented 3 weeks ago

What feature do you want to see added?

I'm using Build Step inside a job to trigger another Jenkins jobs. This plugin generates one trace including both triggering job and triggered job. However, since I would like to focus on one job in most cases, I think those traces should be split. Instead using Span Link might be more appropriate to link these jobs.

Upstream changes

No response

Are you interested in contributing this feature?

No response

cyrille-leclerc commented 2 weeks ago

Thanks for your interest in the Jenkins OTel Plugin. Can you please help us understand your context:

@kuisathaverat did you ever consider linking upstream & downstream pipeline runs as "span link" rather than as parent/child spans? @christophe-kamphaus-jemmic do you know if the OTel CI/CD SIG put thoughts on this linking?

christophe-kamphaus-jemmic commented 2 weeks ago

OTel CICD SIG has not yet gotten that far that we think about span links between jobs. It is an interesting topic that I will put on our backlog.

In general OTel SemConv there have not yet been any conventions for span links defined. There is an open ticket for this: https://github.com/open-telemetry/semantic-conventions/issues/1057

taro-yanagiya commented 1 day ago

@cyrille-leclerc

In my case, many triggers are used and the traces become huge. Using span links looks more natural because my upstream jobs don't wait for the downstream jobs to complete and the span of the upstream job doesn't surround its downstream job span. But I also understand that the upstream job can wait for the downstream jobs and parent/child spans can be appropriate in this case.