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

Set last_scrape_error when an error occurs #237

Merged
merged 1 commit into from
Oct 18, 2017
Merged

Conversation

siavashs
Copy link
Contributor

Closes #216

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SuperQ SuperQ merged commit 811aec3 into prometheus:master Oct 18, 2017
@arvenil
Copy link
Contributor

arvenil commented Nov 17, 2017

@siavashs @SuperQ Just my curiosity, but isn't this and similar metrics prone to race conditions? Exporter can receive in theory 2 requests at the same time, as I understand it will process both requests in parallel, as so two Describe methods will update this metric in *Exporter at the same time? Or maybe default prometheus handler somehow queues requests?

@SuperQ
Copy link
Member

SuperQ commented Nov 17, 2017

Yes, I was just thinking about this yesterday and realized this isn't going to work. We should be doing this via a Const metric.

@siavashs
Copy link
Contributor Author

I think this should work fine since we create a new collector per request.

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

Successfully merging this pull request may close these issues.

3 participants