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

Duration as span attribute for Pipeline Step Span #940

Open
rangamani54 opened this issue Sep 6, 2024 · 7 comments
Open

Duration as span attribute for Pipeline Step Span #940

rangamani54 opened this issue Sep 6, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@rangamani54
Copy link

What feature do you want to see added?

Right now, we have a span attribute for Pipeline duration which is ci.pipeline.run.durationMillis, can we have a similar kind of attribute for pipeline step spans as well? I can see the duration of the span as metadata in tempo, but can we have it as a span attribute?

Upstream changes

No response

Are you interested in contributing this feature?

No response

@rangamani54 rangamani54 added the enhancement New feature or request label Sep 6, 2024
@cyrille-leclerc
Copy link
Contributor

Can you please share with us why you use the attribute ci.pipeline.run.durationMillis rather than the duration of the build span?

I forgot why we ci.pipeline.run.durationMillis instead of just relying on the duration of the BUILD - *** span. I'm wondering if there is somethign related to the time spent in the build queue.

@rangamani54
Copy link
Author

But the duration is not the span attribute, so that we can't use somewhere else like generating span metrics.

And also in the similar way ci.pipeline.rundurationMillis
We need it for child/step spans.

But anyway, I found to do with transform with context span to calculate span duration and set it as an attribute.

@mrh666
Copy link

mrh666 commented Sep 17, 2024

Hi @cyrille-leclerc , we badly need to have those trace attributes as a metrics in Dynatrace:
ci.pipeline.id
ci.pipeline.name
ci.pipeline.run.*
ci.pipeline.type

and we didn't find any way to pass those to Dynatrace. I can't define calculated metrics based on request attributes, because we have only trace attribute. And all existent ci.pipeline.run.* metrics are counters and doesn't have dimensions based on which I can visualize/notify/get metric event for Jenkins build.

I'll highly appreciate if you can tell me if it's doable or not? And point me to some doc or tell me if we can have those in Dynatrace.

@mrh666
Copy link

mrh666 commented Sep 18, 2024

@cyrille-leclerc I'll rephrase, on that page https://plugins.jenkins.io/opentelemetry/ there is a screenshot of kibana https://raw.githubusercontent.com/jenkinsci/opentelemetry-plugin/master/docs/images/kibana_jenkins_overview_dashboard.png with all graphs I need, e.g. job duration, failed steps, long steps, etc. How can we get those metrics exported to Dynatrace?

@rangamani54
Copy link
Author

I made a Jenkins Build Dashboard from span metrics generated from Tempo. I will soon publish that dashboard with an article

@mrh666
Copy link

mrh666 commented Sep 18, 2024

@rangamani54 Any chance you can point me to that Tempo doc?

@rangamani54
Copy link
Author

Metrics generator is a component in tempo, you can generate metrics from spans
https://grafana.com/docs/tempo/latest/metrics-generator/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants