<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/ta-p/252223</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H2 class="lia-align-justify"&gt;Prerequisites&lt;/H2&gt;
&lt;UL class="lia-align-justify"&gt;
&lt;LI class="lia-align-justify"&gt;Jenkins as CI/CD tool&lt;/LI&gt;
&lt;LI class="lia-align-justify"&gt;OpenTelemetry plugin for Jenkins -&amp;nbsp;&lt;A href="https://plugins.jenkins.io/opentelemetry/" target="_blank" rel="noopener"&gt;https://plugins.jenkins.io/opentelemetry/&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="lia-align-justify"&gt;Generate API token in scopes:&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;openTelemetryTrace.ingest&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;metrics.ingest&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;logs.ingest&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;SPAN&gt;To illustrate, we’ll employ Podman as our container runtime and set up Jenkins within it.&lt;/SPAN&gt; For that, you could use the following command:&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;CODE&gt;podman run --name jenkins -d -e OTEL_LOGS_EXPORTER="otlp" -p 8080:8080 jenkins/jenkins:lts&lt;/CODE&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Once the container is up and running in your favorite browser, let's navigate to&amp;nbsp;&lt;A href="http://localhost:8080/" target="_blank" rel="noopener"&gt;http://localhost:8080/&lt;/A&gt;&amp;nbsp;and, follow the shown instruction and login into Jenkins.&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;As the second step, from the main Jenkins view &lt;STRONG&gt;Dashboard&lt;/STRONG&gt;, click on &lt;STRONG&gt;Manage Jenkins&lt;/STRONG&gt; and then on &lt;STRONG&gt;Plugins&lt;/STRONG&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_0-1722499394570.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21560iCF1B7D66375B2D51/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722499394570.png" alt="anton_konikov_0-1722499394570.png" /&gt;&lt;/span&gt;
&lt;P class="lia-align-justify"&gt;On this step, let's install OpenTelemetry plugin. Select &lt;STRONG&gt;Available&lt;/STRONG&gt; pugins and type &lt;STRONG&gt;OpenTelemetry&lt;/STRONG&gt; in the search bar. Select the &lt;A href="https://plugins.jenkins.io/opentelemetry/" target="_blank" rel="noopener"&gt;plugin&lt;/A&gt; and depending on the Jenkins version, press &lt;STRONG&gt;Install&lt;/STRONG&gt; button or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Install without restart&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722499731965.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21561i0843A942BBEDB51C/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722499731965.png" alt="anton_konikov_1-1722499731965.png" /&gt;&lt;/span&gt;
&lt;P class="lia-align-justify"&gt;After the installation is sucesfully finished, scroll down and select&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;Restart Jenkins when installation is complete and no jobs are running&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_2-1722501194250.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21562iDADFA246CD5A5408/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_2-1722501194250.png" alt="anton_konikov_2-1722501194250.png" /&gt;&lt;/span&gt;
&lt;H2 class="lia-align-justify"&gt;Configuration&lt;/H2&gt;
&lt;P&gt;Now let's go to Dynatrace UI and generate an API token&lt;/P&gt;
&lt;P&gt;From &lt;STRONG&gt;Manage Jenkins&lt;/STRONG&gt; view, navigate to &lt;STRONG&gt;System&lt;/STRONG&gt; configuration:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_0-1722501769762.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21564i2EC408DAD1004A83/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722501769762.png" alt="anton_konikov_0-1722501769762.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Scroll to the OpenTelemetry section and in the &lt;STRONG&gt;OTLP endpoint&lt;/STRONG&gt; sectrion specify your SaaS OTLP API endpoint, e.g.&amp;nbsp;&lt;CODE&gt;&lt;SPAN&gt;https://{your-environment-id}.live.dynatrace.com/api/v2/otlp&lt;/SPAN&gt;&lt;/CODE&gt;, in the &lt;STRONG&gt;Authentication &lt;/STRONG&gt;section, select &lt;STRONG&gt;Header Authetication&lt;/STRONG&gt; and type in the filed&amp;nbsp;&lt;STRONG&gt;Header Name&lt;/STRONG&gt;:&amp;nbsp;&lt;CODE&gt;&lt;SPAN&gt;Authorization&lt;/SPAN&gt;&lt;/CODE&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_2-1722502592528.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21567iA1E93D8D93785F88/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_2-1722502592528.png" alt="anton_konikov_2-1722502592528.png" /&gt;&lt;/span&gt;
&lt;P&gt;For the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Header Value&lt;/STRONG&gt;, create a new secret tocken by seceting&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Add&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Jenkins&lt;/STRONG&gt;. You’ll need to create a secret text with the following fields:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kind&lt;/STRONG&gt;, choose&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Secret text&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Secret&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;field&amp;nbsp;&lt;/SPAN&gt;should be in the follwoing format:&amp;nbsp;&lt;CODE&gt;Authorization: Api-Token dt.....&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Optional field ID can be left blank.&lt;/LI&gt;
&lt;LI&gt;Optionally add a description such as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Dynatrace API ingest token&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722502456738.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21566iF9ADCAC85763F8AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722502456738.png" alt="anton_konikov_1-1722502456738.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;Then scroll down to &lt;STRONG&gt;Advanced&lt;/STRONG&gt; configuration and expand it. In the&amp;nbsp;&lt;STRONG&gt;Configuration properties&lt;/STRONG&gt; filed paste:&amp;nbsp;&lt;CODE&gt;otel.exporter.otlp.protocol=http/protobuf&lt;/CODE&gt;, as &lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/opentelemetry/getting-started/otlp-export#otlp-details" target="_blank" rel="noopener"&gt;gRPC is not yet supported&lt;/A&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_3-1722504113885.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21568i030E252BCA877916/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_3-1722504113885.png" alt="anton_konikov_3-1722504113885.png" /&gt;&lt;/span&gt;
&lt;P&gt;Additionally you can configure visualisation backend to show the link between build and trace in Dynatrace:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_0-1722514523405.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21575i2A9F92D3D6794CD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722514523405.png" alt="anton_konikov_0-1722514523405.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Receiving Jenkins data in Dynatrace&lt;/H2&gt;
&lt;P&gt;Please make sure that &lt;STRONG&gt;OTLP Endpoint&lt;/STRONG&gt; set up earlier is accesible from Jenkins location. Let's create the first test pipeline and verify the monitoring data can be observed.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click on &lt;STRONG&gt;New Item&lt;/STRONG&gt; and create the &lt;STRONG&gt;Pipeline&lt;/STRONG&gt; job:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_2-1722515216483.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21577iC8D3150018D9A5E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_2-1722515216483.png" alt="anton_konikov_2-1722515216483.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722515145554.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21576i3666F6A46CE897F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722515145554.png" alt="anton_konikov_1-1722515145554.png" /&gt;&lt;/span&gt;
&lt;P&gt;Then scroll down to the &lt;STRONG&gt;Pipeline&lt;/STRONG&gt; configuration and select the &lt;STRONG&gt;Github+Maven&lt;/STRONG&gt; sample or paste the bellow snippet:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;pipeline {
    agent any
    tools {
        // Install the Maven version configured as "M3" and add it to the path.
        maven "M3"
    }
    stages {
        stage('Build') {
            steps {
                // Get some code from a GitHub repository
                git 'https://github.com/jglick/simple-maven-project-with-tests.git'

                // Run Maven on a Unix agent.
                sh "mvn -Dmaven.test.failure.ignore=true clean package"

                // To run Maven on a Windows agent, use
                // bat "mvn -Dmaven.test.failure.ignore=true clean package"
            }
            post {
                // If Maven was able to run the tests, even if some of the test
                // failed, record the test results and archive the jar file.
                success {
                    junit '**/target/surefire-reports/TEST-*.xml'
                    archiveArtifacts 'target/*.jar'
                }
            }
        }
    }
}
&lt;/LI-CODE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="anton_konikov_0-1722591158716.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21588i11424D1D6D83268E/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722591158716.png" alt="anton_konikov_0-1722591158716.png" /&gt;&lt;/span&gt;
&lt;P&gt;Note: the prerequisite is to install Maven, which requires defining Maven instance in the &lt;STRONG&gt;Mange Jenkins&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Tools&lt;/STRONG&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722591319581.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21589i22B5EDCBC6F64F0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722591319581.png" alt="anton_konikov_1-1722591319581.png" /&gt;&lt;/span&gt;
&lt;P class="lia-align-justify"&gt;After finishing the configuration of the pipeline job you can click on the &lt;STRONG&gt;Build Now&lt;/STRONG&gt; button which then trigger execution of the pipeline:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 11.40.01.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21594i9DA3B2C011528583/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 11.40.01.png" alt="Screenshot 2024-08-02 at 11.40.01.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;As it can be seen in the screenshot above, under &lt;STRONG&gt;OpenTelemetry&lt;/STRONG&gt; appeared a link navigating to the particular trace in Dynatrace UI. In the trace view you could see all logs from the Jenkins build by clicking on View logs for this trace or click on the particular trace sub-node/span and open &lt;STRONG&gt;Logs&lt;/STRONG&gt; tab:&lt;/DIV&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 11.56.31.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21595i50F4AB3225B73B77/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 11.56.31.png" alt="Screenshot 2024-08-02 at 11.56.31.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 12.00.22.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21596i20CA7B301DCFC78B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 12.00.22.png" alt="Screenshot 2024-08-02 at 12.00.22.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 12.01.47.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21597i6CABE00A70540BE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 12.01.47.png" alt="Screenshot 2024-08-02 at 12.01.47.png" /&gt;&lt;/span&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Additionally, we encourage you to watch this demo session &lt;SPAN&gt;&lt;A href="https://community.dynatrace.com/t5/Videos/Dynatrace-Tips-amp-Tricks-18-Jenkins-Pipeline-Analytics-with/td-p/225200" target="_self"&gt;Dynatrace Tips &amp;amp; Tricks #18 - Jenkins Pipeline Analytics with OpenTelemetry&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 27 Sep 2024 07:48:12 GMT</pubDate>
    <dc:creator>anton_konikov</dc:creator>
    <dc:date>2024-09-27T07:48:12Z</dc:date>
    <item>
      <title>Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/ta-p/252223</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;H2 class="lia-align-justify"&gt;Prerequisites&lt;/H2&gt;
&lt;UL class="lia-align-justify"&gt;
&lt;LI class="lia-align-justify"&gt;Jenkins as CI/CD tool&lt;/LI&gt;
&lt;LI class="lia-align-justify"&gt;OpenTelemetry plugin for Jenkins -&amp;nbsp;&lt;A href="https://plugins.jenkins.io/opentelemetry/" target="_blank" rel="noopener"&gt;https://plugins.jenkins.io/opentelemetry/&lt;/A&gt;&lt;/LI&gt;
&lt;LI class="lia-align-justify"&gt;Generate API token in scopes:&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;openTelemetryTrace.ingest&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;metrics.ingest&lt;/STRONG&gt;,&amp;nbsp;&lt;STRONG&gt;logs.ingest&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;SPAN&gt;To illustrate, we’ll employ Podman as our container runtime and set up Jenkins within it.&lt;/SPAN&gt; For that, you could use the following command:&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;&lt;CODE&gt;podman run --name jenkins -d -e OTEL_LOGS_EXPORTER="otlp" -p 8080:8080 jenkins/jenkins:lts&lt;/CODE&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Once the container is up and running in your favorite browser, let's navigate to&amp;nbsp;&lt;A href="http://localhost:8080/" target="_blank" rel="noopener"&gt;http://localhost:8080/&lt;/A&gt;&amp;nbsp;and, follow the shown instruction and login into Jenkins.&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;As the second step, from the main Jenkins view &lt;STRONG&gt;Dashboard&lt;/STRONG&gt;, click on &lt;STRONG&gt;Manage Jenkins&lt;/STRONG&gt; and then on &lt;STRONG&gt;Plugins&lt;/STRONG&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_0-1722499394570.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21560iCF1B7D66375B2D51/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722499394570.png" alt="anton_konikov_0-1722499394570.png" /&gt;&lt;/span&gt;
&lt;P class="lia-align-justify"&gt;On this step, let's install OpenTelemetry plugin. Select &lt;STRONG&gt;Available&lt;/STRONG&gt; pugins and type &lt;STRONG&gt;OpenTelemetry&lt;/STRONG&gt; in the search bar. Select the &lt;A href="https://plugins.jenkins.io/opentelemetry/" target="_blank" rel="noopener"&gt;plugin&lt;/A&gt; and depending on the Jenkins version, press &lt;STRONG&gt;Install&lt;/STRONG&gt; button or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Install without restart&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722499731965.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21561i0843A942BBEDB51C/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722499731965.png" alt="anton_konikov_1-1722499731965.png" /&gt;&lt;/span&gt;
&lt;P class="lia-align-justify"&gt;After the installation is sucesfully finished, scroll down and select&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;Restart Jenkins when installation is complete and no jobs are running&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_2-1722501194250.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21562iDADFA246CD5A5408/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_2-1722501194250.png" alt="anton_konikov_2-1722501194250.png" /&gt;&lt;/span&gt;
&lt;H2 class="lia-align-justify"&gt;Configuration&lt;/H2&gt;
&lt;P&gt;Now let's go to Dynatrace UI and generate an API token&lt;/P&gt;
&lt;P&gt;From &lt;STRONG&gt;Manage Jenkins&lt;/STRONG&gt; view, navigate to &lt;STRONG&gt;System&lt;/STRONG&gt; configuration:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_0-1722501769762.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21564i2EC408DAD1004A83/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722501769762.png" alt="anton_konikov_0-1722501769762.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Scroll to the OpenTelemetry section and in the &lt;STRONG&gt;OTLP endpoint&lt;/STRONG&gt; sectrion specify your SaaS OTLP API endpoint, e.g.&amp;nbsp;&lt;CODE&gt;&lt;SPAN&gt;https://{your-environment-id}.live.dynatrace.com/api/v2/otlp&lt;/SPAN&gt;&lt;/CODE&gt;, in the &lt;STRONG&gt;Authentication &lt;/STRONG&gt;section, select &lt;STRONG&gt;Header Authetication&lt;/STRONG&gt; and type in the filed&amp;nbsp;&lt;STRONG&gt;Header Name&lt;/STRONG&gt;:&amp;nbsp;&lt;CODE&gt;&lt;SPAN&gt;Authorization&lt;/SPAN&gt;&lt;/CODE&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_2-1722502592528.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21567iA1E93D8D93785F88/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_2-1722502592528.png" alt="anton_konikov_2-1722502592528.png" /&gt;&lt;/span&gt;
&lt;P&gt;For the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Header Value&lt;/STRONG&gt;, create a new secret tocken by seceting&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Add&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Jenkins&lt;/STRONG&gt;. You’ll need to create a secret text with the following fields:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Kind&lt;/STRONG&gt;, choose&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Secret text&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;LI&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Secret&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;field&amp;nbsp;&lt;/SPAN&gt;should be in the follwoing format:&amp;nbsp;&lt;CODE&gt;Authorization: Api-Token dt.....&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Optional field ID can be left blank.&lt;/LI&gt;
&lt;LI&gt;Optionally add a description such as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;Dynatrace API ingest token&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722502456738.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21566iF9ADCAC85763F8AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722502456738.png" alt="anton_konikov_1-1722502456738.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;Then scroll down to &lt;STRONG&gt;Advanced&lt;/STRONG&gt; configuration and expand it. In the&amp;nbsp;&lt;STRONG&gt;Configuration properties&lt;/STRONG&gt; filed paste:&amp;nbsp;&lt;CODE&gt;otel.exporter.otlp.protocol=http/protobuf&lt;/CODE&gt;, as &lt;A href="https://docs.dynatrace.com/docs/extend-dynatrace/opentelemetry/getting-started/otlp-export#otlp-details" target="_blank" rel="noopener"&gt;gRPC is not yet supported&lt;/A&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_3-1722504113885.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21568i030E252BCA877916/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_3-1722504113885.png" alt="anton_konikov_3-1722504113885.png" /&gt;&lt;/span&gt;
&lt;P&gt;Additionally you can configure visualisation backend to show the link between build and trace in Dynatrace:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_0-1722514523405.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21575i2A9F92D3D6794CD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722514523405.png" alt="anton_konikov_0-1722514523405.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Receiving Jenkins data in Dynatrace&lt;/H2&gt;
&lt;P&gt;Please make sure that &lt;STRONG&gt;OTLP Endpoint&lt;/STRONG&gt; set up earlier is accesible from Jenkins location. Let's create the first test pipeline and verify the monitoring data can be observed.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click on &lt;STRONG&gt;New Item&lt;/STRONG&gt; and create the &lt;STRONG&gt;Pipeline&lt;/STRONG&gt; job:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_2-1722515216483.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21577iC8D3150018D9A5E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_2-1722515216483.png" alt="anton_konikov_2-1722515216483.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722515145554.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21576i3666F6A46CE897F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722515145554.png" alt="anton_konikov_1-1722515145554.png" /&gt;&lt;/span&gt;
&lt;P&gt;Then scroll down to the &lt;STRONG&gt;Pipeline&lt;/STRONG&gt; configuration and select the &lt;STRONG&gt;Github+Maven&lt;/STRONG&gt; sample or paste the bellow snippet:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;pipeline {
    agent any
    tools {
        // Install the Maven version configured as "M3" and add it to the path.
        maven "M3"
    }
    stages {
        stage('Build') {
            steps {
                // Get some code from a GitHub repository
                git 'https://github.com/jglick/simple-maven-project-with-tests.git'

                // Run Maven on a Unix agent.
                sh "mvn -Dmaven.test.failure.ignore=true clean package"

                // To run Maven on a Windows agent, use
                // bat "mvn -Dmaven.test.failure.ignore=true clean package"
            }
            post {
                // If Maven was able to run the tests, even if some of the test
                // failed, record the test results and archive the jar file.
                success {
                    junit '**/target/surefire-reports/TEST-*.xml'
                    archiveArtifacts 'target/*.jar'
                }
            }
        }
    }
}
&lt;/LI-CODE&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="anton_konikov_0-1722591158716.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21588i11424D1D6D83268E/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_0-1722591158716.png" alt="anton_konikov_0-1722591158716.png" /&gt;&lt;/span&gt;
&lt;P&gt;Note: the prerequisite is to install Maven, which requires defining Maven instance in the &lt;STRONG&gt;Mange Jenkins&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Tools&lt;/STRONG&gt;:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anton_konikov_1-1722591319581.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21589i22B5EDCBC6F64F0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="anton_konikov_1-1722591319581.png" alt="anton_konikov_1-1722591319581.png" /&gt;&lt;/span&gt;
&lt;P class="lia-align-justify"&gt;After finishing the configuration of the pipeline job you can click on the &lt;STRONG&gt;Build Now&lt;/STRONG&gt; button which then trigger execution of the pipeline:&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 11.40.01.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21594i9DA3B2C011528583/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 11.40.01.png" alt="Screenshot 2024-08-02 at 11.40.01.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;As it can be seen in the screenshot above, under &lt;STRONG&gt;OpenTelemetry&lt;/STRONG&gt; appeared a link navigating to the particular trace in Dynatrace UI. In the trace view you could see all logs from the Jenkins build by clicking on View logs for this trace or click on the particular trace sub-node/span and open &lt;STRONG&gt;Logs&lt;/STRONG&gt; tab:&lt;/DIV&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 11.56.31.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21595i50F4AB3225B73B77/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 11.56.31.png" alt="Screenshot 2024-08-02 at 11.56.31.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;DIV class="lia-message-template-content-zone"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 12.00.22.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21596i20CA7B301DCFC78B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 12.00.22.png" alt="Screenshot 2024-08-02 at 12.00.22.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-08-02 at 12.01.47.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21597i6CABE00A70540BE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-08-02 at 12.01.47.png" alt="Screenshot 2024-08-02 at 12.01.47.png" /&gt;&lt;/span&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Additionally, we encourage you to watch this demo session &lt;SPAN&gt;&lt;A href="https://community.dynatrace.com/t5/Videos/Dynatrace-Tips-amp-Tricks-18-Jenkins-Pipeline-Analytics-with/td-p/225200" target="_self"&gt;Dynatrace Tips &amp;amp; Tricks #18 - Jenkins Pipeline Analytics with OpenTelemetry&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 27 Sep 2024 07:48:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/ta-p/252223</guid>
      <dc:creator>anton_konikov</dc:creator>
      <dc:date>2024-09-27T07:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/257845#M746</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/5153"&gt;@anton_konikov&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Can we use this solution on Managed environment with OTLP traces v1 api?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mizs_0-1727882482076.png" style="width: 1005px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/23132iC3E9B284033652F3/image-dimensions/1005x186?v=v2" width="1005" height="186" role="button" title="Mizs_0-1727882482076.png" alt="Mizs_0-1727882482076.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Best reagrads,&lt;/P&gt;&lt;P&gt;Mizső&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 15:23:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/257845#M746</guid>
      <dc:creator>Mizső</dc:creator>
      <dc:date>2024-10-02T15:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/257931#M751</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/47783"&gt;@Mizső&lt;/a&gt;&amp;nbsp;yes, you can.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 07:16:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/257931#M751</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2024-10-03T07:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/257937#M752</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/3364"&gt;@Julius_Loman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the confirmation.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Mizső&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 08:02:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/257937#M752</guid>
      <dc:creator>Mizső</dc:creator>
      <dc:date>2024-10-03T08:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/269027#M838</link>
      <description>&lt;P&gt;For those who get traces but no logs, we needed to add the following parameters to get the build logs.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;otel.exporter.otlp.protocol=http/protobuf
otel.instrumentation.jenkins.remote.span.enabled=true
otel.instrumentation.jenkins.agent.enabled=true
otel.logs.exporter=otlp
otel.logs.mirror_to_disk=true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 09:28:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/269027#M838</guid>
      <dc:creator>yniasreynders96</dc:creator>
      <dc:date>2025-02-03T09:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/270241#M851</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/47783"&gt;@Mizső&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Dynatrace Managed and did all the steps as mentioned here but still where I click on "openTelemetry" in Jenkins, it redirects me to our managed environment and shows "Trace Not Found".&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 17:16:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/270241#M851</guid>
      <dc:creator>hnimawat</dc:creator>
      <dc:date>2025-02-17T17:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/270271#M852</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/86839"&gt;@hnimawat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;We have not implemeted this soultion yet at our client. Sorry but I do not have further information about it.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;János&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 05:00:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/270271#M852</guid>
      <dc:creator>Mizső</dc:creator>
      <dc:date>2025-02-18T05:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Jenkins Pipeline Analytics using OpenTelemetry and Dynatrace</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/270290#M853</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/86839"&gt;@hnimawat&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Embedded OpenTelemetry knows the trace ID and substitutes it into the URL to your Managed. However, the trace was not exported to Dynatrace server.&lt;/P&gt;
&lt;P&gt;This can happen e.g. when OpenTelemetry doesn't trust your certificate of the endpoint, but the real issue you could see in the Jenkins logs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The preferable solution would be to add this certificate for Jenkins/OTLP or alternatively, you can use a &lt;A href="https://github.com/Dynatrace/dynatrace-otel-collector" target="_self"&gt;Dynatrace OTLP collector&lt;/A&gt; as the middle point of the architecture to aggregate all OTEL data. Then add the certificate from your Managed to this collector or add an option to &lt;A href="https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md#client-configuration" target="_self"&gt;skip TLS cert verify&lt;/A&gt; (as Dynatrace we recommend avoiding using this option).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 08:56:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Jenkins-Pipeline-Analytics-using-OpenTelemetry-and-Dynatrace/tac-p/270290#M853</guid>
      <dc:creator>anton_konikov</dc:creator>
      <dc:date>2025-02-18T08:56:08Z</dc:date>
    </item>
  </channel>
</rss>

