Skip to content

How to use Stage/Job/Tasks data #87

@sitofabi

Description

@sitofabi

Hi all,

i have the exporter running with our azure devops server and the data is exported into prometheus. Now I would like to draw some diagrams out of it, e.g. how long was the duration of a stage yesterday, 1 week ago or one month ago. What is the trend by executing the stage. Is the needed time going down or up. When I look in the scraped data I see something like this (some labels removed for better representation)

# HELP azure_devops_build_stage Azure DevOps build stages
# TYPE azure_devops_build_stage gauge
azure_devops_build_stage{buildDefinitionID="11785"fault",projectID="32",result="succeeded",type="duration"} 3588.38
azure_devops_build_stage{buildDefinitionID="11785"fault",projectID="32",result="succeeded",type="errorCount"} 0
azure_devops_build_stage{buildDefinitionID="11785"fault",projectID="32",result="succeeded",type="finished"} 1.713345972e+09
azure_devops_build_stage{buildDefinitionID="11785"fault",projectID="32",result="succeeded",type="started"} 1.713342383e+09
azure_devops_build_stage{buildDefinitionID="11785"fault",projectID="32",result="succeeded",type="succeeded"} 1
azure_devops_build_stage{buildDefinitionID="11785"fault",projectID="32",result="succeeded",type="warningCount"} 0

How could I now write a query that takes the finished value as timestamp and the duration as value? As far as I know this is not possible in prometheus, isn't it? So what's the benefit of putting these data into the database then? What are valuable queries that could be performed on the data for stages, jobs, or tasks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions