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

builds with status other then "completed" #94

Open
AlexMe99 opened this issue Jun 5, 2024 · 2 comments
Open

builds with status other then "completed" #94

AlexMe99 opened this issue Jun 5, 2024 · 2 comments

Comments

@AlexMe99
Copy link

AlexMe99 commented Jun 5, 2024

Hi together,

I really like your work for this exporter. It makes my life way easier currently! I'm using the exporter especially monitoring builds/pipeline runs in azure devops. After getting into the metrics and how they work, I get many information that I need.

Only one thing is currently missing for me and that is regarding running and non-completed builds. These are currently not scraped and after looking into the code, I saw that this is by design:

list, err := AzureDevopsClient.ListBuildHistoryWithStatus(project.Id, minTime, "completed")

[see here: https://github.com/webdevops/azure-devops-exporter/blob/main/metrics_build.go#L307C1-L307C93 ]

My question is, whether this is something, that HAS to be like this. Or whether it could be adjusted, so that not only completed, but also builds with other states can be scraped.

regards

@Breee
Copy link

Breee commented Jun 25, 2024

One of our usecases for this exporter is to monitor running builds and see early if certain jobs have failed, so adding this would be great.

Probably with something like that?

list, err := AzureDevopsClient.ListBuildHistoryWithStatus(project.Id, minTime, "all")
[...]
	 for _, timelineRecord := range timelineRecordList.List {
			if timelineRecord.Status != "completed" {
				continue
			}
[...]

Tracking if a Job is running might be more overhead and new logic to differ between running/finished buildjobs on a first glance when i'm looking at the code --> I would be fine if this expoter only fetches completed Build Jobs, as long as I can see them as soon as they are done

@Breee
Copy link

Breee commented Jul 22, 2024

Added some changes in #102 - for me that works fine

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

No branches or pull requests

2 participants