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的brpc_metrics的输出格式与prometheus的标准不符,尤其MultiDimension<bvar::LatencyRecorder>方式 #2825

Open
xinhua5 opened this issue Nov 22, 2024 · 3 comments · May be fixed by #2870
Labels
good first issue Good for newcomers

Comments

@xinhua5
Copy link

xinhua5 commented Nov 22, 2024

Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)

使用MultiDimensionbvar::LatencyRecorder 自定义了监控埋点,输出之后看到的结果是这样的:

# TYPE server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="80"} gauge
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="80"} 4076
# HELP server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="90"}
# TYPE server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="90"} gauge
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="90"} 5185
# HELP server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="99"}
# TYPE server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="99"} gauge
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="99"} 5185
# HELP server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="999"}
# TYPE server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="999"} gauge
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="999"} 5185
# HELP server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="9999"}
# TYPE server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="9999"} gauge
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="9999"} 5185

Describe the solution you'd like (描述你期望的解决方法)

prometheus期望的格式是这样的:

# HELP server_latency Latency of zbase server operations
# TYPE server_latency gauge
server_latency{db_id="112",shard_id="1",method="fetch",stage="next",quantile="99"} 2816
server_latency{db_id="112",shard_id="1",method="fetch",stage="next",quantile="999"} 2816
server_latency{db_id="112",shard_id="1",method="fetch",stage="next",quantile="9999"} 2816
server_latency{db_id="112",shard_id="2",method="fetch",stage="next"} 2729
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="80"} 4076
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="90"} 5185
server_latency{db_id="112",shard_id="2",method="fetch",stage="next",quantile="99"} 5185

Describe alternatives you've considered (描述你想到的折衷方案)
brpc是否可以把brpc_metrics的输出格式转化为 metrics + lables 的模式

Additional context/screenshots (更多上下文/截图)

@chenBright chenBright added the good first issue Good for newcomers label Nov 27, 2024
@Huixxi
Copy link
Contributor

Huixxi commented Jan 12, 2025

@serverglen cc,也可以尝试提交个PR进行优化。

@snehavats1404
Copy link

can i work on this? @chenBright

@snehavats1404 snehavats1404 linked a pull request Jan 13, 2025 that will close this issue
@chenBright chenBright linked a pull request Jan 13, 2025 that will close this issue
@chenBright
Copy link
Contributor

can i work on this? @chenBright

OK. By the way, I'm also fixing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants