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

brpc支持Prometheus收集,没有label维度的信息,类型限定是gauge #765

Closed
yineima opened this issue May 14, 2019 · 6 comments
Closed

Comments

@yineima
Copy link

yineima commented May 14, 2019

这是brpc输出
image

这是一般的promethus client的输出
image

brpc的输出缺少label维度的信息,不便于promQL快速查询
并且产出都是gauge类型,缺少counter,summary这些类型
请问:
1.后续会支持label维度的产出吗
2.后续会支持除了gauge类型以外的产出吗?

@zyearn @jamesge @wanglun

@yineima yineima changed the title brpc brpc支持Prometheus收集,没有label维度的信息 May 14, 2019
@yineima yineima changed the title brpc支持Prometheus收集,没有label维度的信息 brpc支持Prometheus收集,没有label维度的信息,类型限定是gauge May 14, 2019
@Ye-Tian-Zero
Copy link
Contributor

我理解 brpc 的 prometheus 是用来传输自己的 metric 信息的,而不是一套公开的机制,因此是不是对 counter summary 这些东西并没有什么需求,其实就是一堆统计信息

@peiyuanzheng
Copy link

我们也遇到同样的问题,解决方法是在自己的应用代码中,把metrics name 和 label 拼接成bvar,然后提供一个给Prometheus查询的服务,解析bvar回metrics name 和label。

@zyearn
Copy link
Member

zyearn commented Jun 3, 2019

目前brpc内部统计的metric用gauge和summary就足够了,所以只输出了gauge和summary。如果需要用label来输出业务的统计数据,建议用Prometheus官方提供的cpp client

@wanglun
Copy link
Contributor

wanglun commented Nov 22, 2019

目前brpc内部统计的metric用gauge和summary就足够了,所以只输出了gauge和summary。如果需要用label来输出业务的统计数据,建议用Prometheus官方提供的cpp client

能否将用户自定义的LatencyRecorder,也用summary导出?

@xu-tao777
Copy link

我们也遇到同样的问题,解决方法是在自己的应用代码中,把metrics name 和 label 拼接成bvar,然后提供一个给Prometheus查询的服务,解析bvar回metrics name 和label。

能麻烦您贴了一下,您这边的拼接示例吗?非常感谢!

@wwbmmm
Copy link
Contributor

wwbmmm commented Sep 14, 2022

master已支持多维度bvar,支持输出多维度prometheus信息:https://github.com/apache/incubator-brpc/blob/master/docs/cn/mbvar_c%2B%2B.md

@wwbmmm wwbmmm closed this as completed Sep 14, 2022
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

No branches or pull requests

7 participants