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

fix(inputs.prometheus): Set the timeout for slow running API endpoints correctly #12559

Merged

Conversation

ZPascal
Copy link
Contributor

@ZPascal ZPascal commented Jan 27, 2023

resolves #12485

Description:
The issue was related to a missed timeout configuration inside http client to establish a connection to an slow responsed Promtheus endpoint.

@ZPascal ZPascal force-pushed the ISSUE12485-fix-prometheus-timeout branch from 5412af9 to 3a4836c Compare January 27, 2023 10:49
@ZPascal ZPascal changed the title bug: Set the timeout for slow running API endpoints correctly fix: Set the timeout for slow running API endpoints correctly Jan 27, 2023
@ZPascal ZPascal force-pushed the ISSUE12485-fix-prometheus-timeout branch from 3a4836c to 746fb72 Compare January 27, 2023 11:09
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks for tracking this down and putting up a PR! Two comments inline

plugins/inputs/prometheus/prometheus_test.go Show resolved Hide resolved
plugins/inputs/prometheus/prometheus.go Outdated Show resolved Hide resolved
@powersj powersj added the waiting for response waiting for response from contributor label Jan 27, 2023
@ZPascal ZPascal force-pushed the ISSUE12485-fix-prometheus-timeout branch from c9fdcae to 4b1b74f Compare January 30, 2023 11:41
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the nice fix @ZPascal!

@srebhan srebhan changed the title fix: Set the timeout for slow running API endpoints correctly fix(inputs.prometheus): Set the timeout for slow running API endpoints correctly Jan 30, 2023
@srebhan srebhan added area/prometheus fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jan 30, 2023
@srebhan srebhan merged commit dc9eb02 into influxdata:master Jan 30, 2023
@ZPascal ZPascal deleted the ISSUE12485-fix-prometheus-timeout branch January 30, 2023 14:58
srebhan pushed a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inputs.prometheus] Error in plugin: Client.Timeout exceeded while awaiting headers)
3 participants