Open amadragonfire opened 1 week ago
Hello @amadragonfire .
Are you referring to passing traceparent
when triggering a build through Jenkins APIs?
Hi @cyrille-leclerc thanks for your response. I'm asking about triggering build using Jenkinsfile with multibranch pipeline. We need the plugin to read the traceparent available as environment variable from the pipeline.
@cyrille-leclerc Could you please suggest if there is any other way to pass traceparent from upstream to Opentelemetry plugin apart from passing in http header ?
We’ve pipelines getting triggered from Bitbucket via webhook and there is no way to modify the webhook header from Bitbucket side.
Please help me understand a point about using the TRACEPARENT
environment variable.
An environment variable applies to an entire process, so it would apply to the entire Jenkins Controller JVM.
Do you want all the traces emitted by this Jenkins Controller, pipeline traces as well as web page traces, to share the same traceparent
?
A scenario where this behavior would make sense to me would be for "One Shot Jenkins Controllers", Jenkins controllers created on demand to execute just one run. From what I remember, there was a Jenkins Community initiative to create a distribution of the Jenkins Controller to ease this use case but I couldn't find any reference.
We’ve pipelines getting triggered from Bitbucket via webhook and there is no way to modify the webhook header from Bitbucket side.
Can you please explain if and how you would see context propagation from BitBucket webhooks and Jenkins? Can BitBucket be instrumented with traces and produce a traceparent
?
We already have a feature flag to enable trace context propagation on Jenkins HTTP calls with otel.instrumentation.jenkins.remote.span.enabled
, it's restricted to propagating context on job build requests (URI ^(/[^/]+)?/job/([\w/-]+)/build(WithParameters)?$
), we could see if builds are triggered by SCM webhooks if we see that some SCMs can propagate traceparent
in their web hook invocations.
Let me elaborate objective here. We are looking to view lifespan of a service request flowing through bitbucket-> Jenkins pipeline as single TRACE(multiple spans)
Objective: Jenkins opentelemetry to append its pipeline spans to TRACEPARENT received from Bitbucket webhook.
On jenkins, we tried:
Observation: Jenkins opentelemetry generates its own root span each time and disregards what is received from Bitbucket or OS Env variable.
Expectation: jenkins plugin to honor TRACEPARENT from env variable OR build parameter as opentelemetry context. So that: Entire request of lifespan is shown properly with origin as BB span -> Jenkins pipelines spans (ALL having single TRACE_ID)
What feature do you want to see added?
Can this plugin use the TRACEPARENT available from upstream via environment variable and use it while creating root span. Right now, it's working by passing in header. Is there any alternative way ?
Upstream changes
No response
Are you interested in contributing this feature?
No response