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

Metric for response body size #508

Open
syd20 opened this issue Sep 8, 2023 · 3 comments
Open

Metric for response body size #508

syd20 opened this issue Sep 8, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@syd20
Copy link

syd20 commented Sep 8, 2023

I did't find anything in the document about a metric for response size? Can we have a metric for emitting the response body size? I have a use case where I would like to check the content length and configure alerting if it's below the threshold

@syd20 syd20 added the enhancement New feature or request label Sep 8, 2023
@manugarg
Copy link
Contributor

manugarg commented Sep 8, 2023

I think tracking individual use case like this is not going to work well. I'm trying to think of some generic approach to validators.

@syd20
Copy link
Author

syd20 commented Sep 9, 2023

Here I would not require a validator but just the response body size to be sent as a metric similar to those for latency and status codes. I do agree we would need some generic long term approach for validator especially where we need some dynamic comparison

@manugarg
Copy link
Contributor

manugarg commented Sep 9, 2023

Adding a new metric is expensive in the sense that it affects everyone automatically, so we don't do that unless it's something that applies to a lot of use cases, and there is a significant demand for it.

Validators are less invasive as you have to explicitly enable them. One thing we can add to validators is an option to mark probe as success even if that validator fails -- this will allow users to generate/use validator metrics without failing the probe.

Another option we've been thinking of for a while is to generate metrics from HTTP responses: #356
We can possibly utilize that option to generate metrics from headers as well.

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

No branches or pull requests

2 participants