-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support for Retrieving Jenkins Build Duration Metrics via OpenTelemetry Plugin #972
Comments
Great suggestion! Longer term you are absolutely right, the Jenkins otel plugin should provide all the metrics needed by Jenkins admins and users. I'm on PTO at the moment, I'll follow up asap. |
The opentelemetry-plugin also supports sending build traces to a tracing backend (elasticsearch/jaeger). If you also want duration metrics for individual stages per-pipeline that is possible by adding In general it's not a good idea to have very specific metrics (ie. specific to a single job run) because of the cardinality issue some metric backends suffer from (eg. Prometheus). Usually metrics are used to aggregate data (counts, histograms, …) while traces/logs consider individual requests/events. I think #959 is a great addition to the opentelemetry-plugin. It is fine since it aggregates the individual job runs for a given pipeline and gives administrators control over which pipelines should be monitored specifically. In my experience if you want per-run metrics you are better of to query the traces. |
Please use the See documentation https://github.com/jenkinsci/opentelemetry-plugin/blob/main/docs/monitoring-metrics.md#build-duration I'm marking your enhancement request as solved. Please open new enhancement requests if needed. |
Thanks for addressing my enhancement request and providing the solution. I appreciate the prompt response and detailed guidance. |
You're welcome! |
Hello OpenTelemetry Development Team,
I have been working on integrating Jenkins with OpenTelemetry to collect build metrics. While I've made some progress, I've encountered challenges in retrieving certain metrics and would like to seek your assistance or guidance.
Objectives:
Retrieve Build Duration Metrics for Jobs:
I need to collect the build duration metrics for individual Jenkins jobs. This includes capturing the time each build takes to complete.
Calculate Average Build Duration for Specific Jobs:
I aim to compute the average build duration over time for specific jobs to analyze performance trends.
Challenges:
Unified Data Collection:
I wish to obtain all the metrics that the Jenkins Prometheus plugin provides but exclusively using the OpenTelemetry plugin. My goal is to avoid using multiple collectors and centralize all data collection through OpenTelemetry.
Plugin Support and Roadmap:
It appears that the current OpenTelemetry Jenkins plugin may not support some of these metrics out of the box. If that's the case, I am willing to contribute to the plugin's development. I would greatly appreciate a roadmap, guidelines, or any documentation that could assist me in extending the plugin to support these metrics.
Additional Goals:
Grafana Dashboard Integration:
Ultimately, I aim to create a Grafana dashboard that visualizes all the collected Jenkins metrics in one place, leveraging the data from OpenTelemetry.
Current Implementation:
I have created a repository with my current setup and attempts to achieve these objectives:
GitHub Repository: https://github.com/miraccan00/Jenkins-Otel-Grafana
This repository includes the configurations and code I've been working with, which may help in understanding the current state and the issues I'm facing.
Request:
Support and Guidance:
Could you please advise on whether the OpenTelemetry Jenkins plugin currently supports these metrics? If not, what would be the recommended approach to implement this functionality?
Collaboration Opportunity:
If development is needed to add this feature, I am eager to contribute. Guidance on how to proceed or whom to collaborate with would be highly appreciated.
Thank you for your time and consideration. I look forward to your response and the possibility of enhancing the Jenkins OpenTelemetry integration together.
Best regards,
The text was updated successfully, but these errors were encountered: