Visualize coverage percentage

We have 18 projects, and each project has multiple jobs in a pipeline.
From one of the job log there is a code coverage percentage (for example: Coverage: 78.4%).
What I want to achieve
Parse the coverage percentage from each job log
Store or query it in a way Grafana can use
Visualize it in Grafana as:
Table panel → showing latest coverage per project/pipeline
Time series panel → showing coverage trend over time per pipeline

Project: project-A
Pipeline: pipeline-1
Coverage: 82.5%
Timestamp: 2024-01-10 12:30

Which data source is recommended for this use case?

Alloy
Prometheus
Loki
InfluxDB
Any other?
Should coverage be pushed as a metric or derived using log queries?
How should labels/tags be structured (project, pipeline, job)?
Are there example dashboards or queries for coverage visualization?
Current setup
CI/CD tool: (e.g., GitLab CI)
Logs stored in: (e.g., files )

Any guidance or examples would be appreciated.

Thanks,

what is the datasource of these projects itself?

Projects are in Gitlab CI, and currently we have using a custom py script to extract speciifc lines in to files with job_pipeline_name. We would like to push this data to garafana and Visualize it in as:
Table panel → showing latest coverage per project/pipeline
Time series panel → showing coverage trend over time per pipelin

Any reason why you cannot use the gitlab rest api? No need for custom py script, no need for pushing anything to a data stack.Keep it simple.

Is there a way we can get rest api url dynamically without any custom py script?

You could use the gitlab data source in grafana. It also comes with dashboards to get the needed metrics. But it needs an enterprise license.

As an alternative you could use infinity datasource and create the api calls manually.

1 Like

When using infinity datasource we need to manually define the end pipeline api url? Is there away we can get rest api url dynamically?

Yes there is by using variables