-
Notifications
You must be signed in to change notification settings - Fork 386
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
feat: 1. support prom scrape_protocols, 2. support prom enable_compression #1719
feat: 1. support prom scrape_protocols, 2. support prom enable_compression #1719
Conversation
val += ";q=0." + std::to_string(weight--); | ||
tmpScrapeProtocol = val; | ||
} | ||
tmpScrapeProtocols.push_back("*/*;q=0." + ToString(weight)); |
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.
这个拼出来的字符串的含义是什么?会影响什么?
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.
这里是对不同的协议按照先后顺序设置权重,靠前的权重会高。会放到的请求头的 Accept 中。
比如text/plain;version=0.0.4;q=0.4,application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.3,application/openmetrics-text;version=0.0.1;q=0.2,*/*;q=0.1
这个情况会希望Exporter返回 text/plain 的优先级高。
No description provided.