-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Jenkins OpenTelemetry with Gradle OpenTelemetry #850
Comments
Sure, I'd be happy to update the OpenTelemetry Gradle plugin to more seamlessly integrate with the Jenkins OpenTelemetry plugin. Currently the Gradle plugin looks for the parent trace ID and parent span ID with environment variables (docs), and I can add the specific environment variable names this Jenkins plugin uses. For grabbing the parent trace ID and parent span ID in the Gradle plugin, is there documentation and/or code that lists what's in the TRACEPARENT and TRACESTATE environment variables published by the Jenkins plugin? |
Ahh I think I found it in the docs, looks like the Jenkins plugin is already exporting the same TRACE_ID and SPAN_ID environment variables that the Gradle plugin is looking for https://github.com/jenkinsci/opentelemetry-plugin/blob/main/docs/job-traces.md#environment-variables-for-trace-context-propagation-and-integrations So this may just be a documentation update, as you mentioned. |
Thanks Craig!
The Java code we use to parse TextMapGetter<Map<String, String>> toUpperCaseTextMapGetter = new ToUpperCaseTextMapGetter();
io.opentelemetry.context.Context context =
openTelemetrySdkService
.getPropagators()
.getTextMapPropagator()
.extract(
io.opentelemetry.context.Context.current(),
System.getenv(),
toUpperCaseTextMapGetter); You can find in many CI/CD tools that support |
pytest-otel also support it |
What feature do you want to see added?
Gradle supports OTel instrumentation through the https://github.com/craigatk/opentelemetry-gradle-plugin
We want the same OpenTelemetry integration of Gradle builds with Jenkins as we have with Maven builds.
Upstream changes
Hopefully no change if the OpenTelemetry Gradle Plugin supports context propagation making sense of the
TRACEPARENT
andTRACESTATE
environment variables.Hopefully it's just documentation.
Are you interested in contributing this feature?
Yes.
@craigatk would you be interested in this integration that may just be documentation?
The text was updated successfully, but these errors were encountered: