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

feat: 1. support prom scrape_protocols, 2. support prom enable_compression #1719

Merged
merged 18 commits into from
Sep 19, 2024

Conversation

catdogpandas
Copy link
Contributor

No description provided.

@catdogpandas catdogpandas changed the title feat: support prom scrape protocols feat: 1. support prom scrape_protocols, 2. support prom enable_compression Aug 28, 2024
val += ";q=0." + std::to_string(weight--);
tmpScrapeProtocol = val;
}
tmpScrapeProtocols.push_back("*/*;q=0." + ToString(weight));
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个拼出来的字符串的含义是什么?会影响什么?

Copy link
Contributor Author

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 的优先级高。

@linrunqi08 linrunqi08 merged commit 7106316 into alibaba:main Sep 19, 2024
15 checks passed
@catdogpandas catdogpandas deleted the feat/prom-scrape-protocols branch September 20, 2024 01:47
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.

3 participants