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

Delay init of http phase values #865

Merged
merged 1 commit into from Feb 17, 2022
Merged

Conversation

SuperQ
Copy link
Member

@SuperQ SuperQ commented Jan 22, 2022

Don't init http probe phase labels until we're ready to send the
request.

Avoids exposing 0 value samples for things we haven't started to
measure.

Fix http resolve timing to report lookup time even if it's an error
(ie not found).

Fixes: #579

Signed-off-by: SuperQ superq@gmail.com

@roidelapluie
Copy link
Member

Mmmmh that's an interesting PR, it means that averages etc will only work when a phase is executed, I am not sure we should do this.

@SuperQ
Copy link
Member Author

SuperQ commented Jan 24, 2022

@roidelapluie It's a difficult choice. The problem is we emit 0 for things we have explicitly not measured, which is what the original issue is about.

@roidelapluie
Copy link
Member

Why this is a problem: if you perform any analytics over those metrics (eg percentiles, or min) it would be skewed.

But if probe_success == 0 you should not run analytics over them either.

@zerkms
Copy link

zerkms commented Jan 24, 2022

@roidelapluie

But if probe_success == 0 you should not run analytics over them either.

how would you exclude those series that were obtained with an error

@roidelapluie
Copy link
Member

I've been thinking this further.

When HAProxy Exporter can not scrape HAProxy, it does not return zero-ed metrics. We should do the same here.

Don't init http probe phase labels until we're ready to send the
request.

Avoids exposing 0 value samples for things we haven't started to
measure.

Fix http resolve timing to report lookup time even if it's an error
(ie not found).

Fixes: #579

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ
Copy link
Member Author

SuperQ commented Jan 27, 2022

I also added a fix for the "resolve" phase. It now accounts for the resolve phase time even if the resolve result is a failure.

@roidelapluie roidelapluie merged commit 1b883bf into master Feb 17, 2022
@roidelapluie roidelapluie deleted the superq/delay_phase_values branch February 17, 2022 16:49
@roidelapluie
Copy link
Member

Thanks!

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.

[suggestion] Omitting metrics if not success
5 participants