{"slug": "jenkins-tracing", "title": "Jenkins Tracing", "summary": "SigNoz released a Jenkins integration using OpenTelemetry to monitor Jenkins jobs and pipelines as distributed traces. The setup involves installing the Jenkins OpenTelemetry plugin, configuring the OTLP endpoint and authentication headers, and visualizing traces in SigNoz. Custom spans and attributes can be added to Jenkins pipelines for enhanced observability.", "body_md": "Overview\n\nThis integration helps you to monitor and observe Jenkins with OpenTelemetry by visualizing jenkins jobs and pipelines executions as distributed traces in SigNoz To know more about tracing refer [here](https://signoz.io/docs/instrumentation/overview/)\n\nPrerequisites\n\n- Jenkins [>2.479.3]\n- Administrative access to Jenkins controller\n\nSetup\n\nStep 1: Install and Configure Jenkins OpenTelemetry plugin\n\n- For installing the plugin, please refer to\n[this documentation](https://plugins.jenkins.io/opentelemetry-agent-metrics/).\n\nStep 2: Set the OTLP Endpoint\n\nNavigate to Manage Jenkins -> System -> OpenTelemetry section\n\nIn the OTLP Endpoint section, add your SigNoz ingestion endpoint `ingest.<region>.signoz.cloud`\n\nSet the <region> to match your SigNoz Cloud [region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint).\n\nStep 3: Set the Authentication headers\n\nIn the same section click on Authentication and select **Header Authentication**\n\nAdd Header key as **signoz-ingestion-key** and create a Jenkins credential of type **Secret text** and store the SigNoz_Ingestion_Key\n\nNow, navigate to **Manage Jenkins** -> **System** -> **OpenTelemetry** section\n\nEnter the SigNoz self-hosted endpoint in the OTLP endpoint textbox and set **No Authentication**\n\nVisualize Traces in SigNoz\n\nIn your SigNoz UI, head over to the Traces Tab, and you should be able to see your traces. You can use the [trace explorer](https://signoz.io/docs/userguide/traces/) to filter and analyze your traces.\n\nCustom Spans in Jenkinsfile\n\nWith the OTel plugin installed, you can enhance your Jenkins pipelines with custom observability by adding span attributes, creating custom spans, and enriching trace data.\n\nAdding Custom Span Attributes\n\nThe following example shows how to add custom attributes to the current span within your Jenkins pipeline:\n\n```\n  pipeline {\n    agent any\n    stages {\n      stage('Add Custom Span Attribute') {\n          steps {\n            script {\n              withSpanAttribute(\n                  key: 'my-error-prone-span',\n                  value: 'new-traces',\n                  type: 'STRING',\n                  target: 'CURRENT_SPAN'\n              )\n              echo 'Custom span attribute added'\n            }\n          }\n        }\n    }\n  }\n```\n\nWhat this code does:\n\n- withSpanAttribute(): A Jenkins OTel plugin function that adds custom key-value metadata to spans\n- key: 'my-error-prone-span': The attribute name that will appear in your trace data\n- value: 'new-traces': The attribute value associated with the key\n- type: 'STRING': Specifies the data type of the attribute (can be STRING, LONG, DOUBLE, or BOOLEAN)\n- target: 'CURRENT_SPAN': Indicates that the attribute should be added to the currently active span (the stage span in this case)", "url": "https://wpnews.pro/news/jenkins-tracing", "canonical_source": "https://signoz.io/docs/cicd/jenkins/jenkins-tracing", "published_at": "2026-06-11 00:00:00+00:00", "updated_at": "2026-06-19 15:39:43.305785+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["SigNoz", "Jenkins", "OpenTelemetry"], "alternates": {"html": "https://wpnews.pro/news/jenkins-tracing", "markdown": "https://wpnews.pro/news/jenkins-tracing.md", "text": "https://wpnews.pro/news/jenkins-tracing.txt", "jsonld": "https://wpnews.pro/news/jenkins-tracing.jsonld"}}