jenkinsci / opentelemetry-plugin

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

Grafana visualization link does not work #829

Open BbBaboo42 opened 2 months ago

BbBaboo42 commented 2 months ago

Jenkins and plugins versions report

Environment ```text Running on my machine: Dockerized jenkins 2.426.3 Dockerized Grafana v10.3.1 (00a22ff8b2) Dockerized grafana/tempo:2.3.1 Dockerized otel/opentelemetry-collector-contrib:0.96.0 Jenkins Opentelemetry plugin version: 3.1138.v80fc844ed246 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

My machine is ubuntu 20.04 but all of the softwares are on dockers

Reproduction steps

  1. I configured all the softwares to work together.
  2. I configured the opentelemetry plugin to work with the otel collector and added Grafana as visualization tool.
  3. I confirmed that my run trace appears in grafana by exploring my tempo datasource

Expected Results

When clicking on "View pipeline with Grafana", an explore dashboard showing the build trace will be opened.

Actual Results

Grafana browsing dashboard is opened with tempo as datasource, but with an empty TraceQL.

Generated link by the plugin:

http://<my-pc-ip>:3000/explore?orgId=1&left={"datasource":"tempo","queries":[{"refId":"A","datasource":{"type":"tempo","uid":"tempo"},"queryType":"traceql","query":"2ff062252dc2d5f968f6befd6b1d88c2"}],"range":{"from":"1711883663278","to":"1711884863278"}}

Grafana processes it to:

http://<my-pc-ip>:3000/explore?schemaVersion=1&panes={"AAr":{"datasource":"a7d93531-e206-4db5-8b30-46c2d38fd573","queries":[{"refId":"A","datasource":{"type":"tempo","uid":"a7d93531-e206-4db5-8b30-46c2d38fd573"},"queryType":"traceql","limit":20,"tableType":"traces"}],"range":{"from":"1711883663278","to":"1711884863278"}}}&orgId=1

When I browse the build trace manually, the grafana url is:

http://<my-pc-ip>:3000/explore?schemaVersion=1&panes={"4Qi":{"datasource":"a7d93531-e206-4db5-8b30-46c2d38fd573","queries":[{"refId":"A","datasource":{"type":"tempo","uid":"a7d93531-e206-4db5-8b30-46c2d38fd573"},"queryType":"traceql","limit":20,"tableType":"traces","query":"2ff062252dc2d5f968f6befd6b1d88c2"}],"range":{"from":"now-6h","to":"now"}}}&orgId=1

Anything else?

No response

Are you interested in contributing a fix?

No response