-
Notifications
You must be signed in to change notification settings - Fork 101
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
adjust metrics content-type #1361
base: master
Are you sure you want to change the base?
Conversation
…pt header Signed-off-by: ilrudie <[email protected]>
😊 Welcome @ilrudie! This is either your first contribution to the Istio ztunnel repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
src/metrics/server.rs
Outdated
.to_lowercase() | ||
.split(";") | ||
.collect::<Vec<_>>() | ||
.first() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know that prometheus will always scrape with openmetrics as the first 'accept'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, that is likely not a safe invariant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally got back around to this. Got it reworked to support multiple Accept headers and added testing.
Signed-off-by: ilrudie <[email protected]>
26f0653
to
c70f5ee
Compare
Signed-off-by: ilrudie <[email protected]>
mostly serve metrics with text/plain unless given an openmetrics Accept header
fixes #1356