Skip to content
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

Grafana visualization link does not work #829

Open
BbBaboo42 opened this issue Mar 31, 2024 · 1 comment
Open

Grafana visualization link does not work #829

BbBaboo42 opened this issue Mar 31, 2024 · 1 comment
Labels
backend/grafana bug Something isn't working

Comments

@BbBaboo42
Copy link

BbBaboo42 commented Mar 31, 2024

Jenkins and plugins versions report

Environment
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

@BbBaboo42 BbBaboo42 added the bug Something isn't working label Mar 31, 2024
@3213-cmd
Copy link

What helped for me was to use the data-source-id which grafana uses, instead of the name given to it.

You can find the id in the url when the data source i.e. https://grafana.com/connections/datasources/edit/

to me it looks like grafana resolves the name given to the data source and reload the page but then loses the trace-id which is queried

Perhaps Jenkins should just ask for the id?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/grafana bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants