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

net/http: The metrics exported by OpenTelemetry are inconsistent with the official definition #4177

Open
shuqingzai opened this issue Mar 1, 2025 · 4 comments

Comments

@shuqingzai
Copy link

Go version

go version go1.23.6 darwin/arm64

GoFrame version

2.8.3

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

参考文档

文档中所描述的指标与属性字段与 OTEL 定义的不一致,导致 OTEL 采集后导入到其他监控系统时,无法转换与显示出正确的数据,参考:https://opentelemetry.io/docs/specs/semconv/attributes-registry/http/

也许可以参考:open-telemetry/opentelemetry-go-contrib/instrumentation#otelginopen-telemetry/opentelemetry-go-contrib/instrumentation#net/http 实现标准化字段导出,以便可以在其它系统正确转换属性

What did you see happen?

无法正确转换为 OTEL 标准指标属性

What did you expect to see?

GF 定义的指标、属性与 OTEL 不一致

@shuqingzai shuqingzai added the bug It is confirmed a bug, but don't worry, we'll handle it. label Mar 1, 2025
@Issues-translate-bot Issues-translate-bot changed the title net/http: OpenTelemetry 导出的指标与官方所定义的不一致 net/http: The metrics exported by OpenTelemetry are inconsistent with the official definition Mar 1, 2025
@gqcn
Copy link
Member

gqcn commented Mar 14, 2025

@shuqingzai 当时是参考otel的标准来的哈,我刚看了下,似乎是新的otel规范废弃了一些属性了。当时看就觉得不是很成熟,这两年规范还是发生了一些变化。感兴趣可以根据新的规范来对框架组件做一些调整,一起参与共建。

@gqcn gqcn added enhancement help wanted and removed bug It is confirmed a bug, but don't worry, we'll handle it. labels Mar 14, 2025
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@shuqingzai I came to refer to the otel standard at that time. I just looked at it and it seemed that the new otel specification had abandoned some attributes. At that time, I felt that it was not very mature, but the regulations have changed in the past two years. If you are interested, you can make some adjustments to the framework components according to the new specifications and participate in co-construction together.

Copy link
Contributor

Hello @shuqingzai. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!
你好 @shuqingzai。我们喜欢您的提案/反馈,并希望您或其他社区成员通过拉取请求做出贡献。我们提前感谢您的贡献,并期待对其进行审查。

@shuqingzai
Copy link
Author

@shuqingzai 当时是参考otel的标准来的哈,我刚看了下,似乎是新的otel规范废弃了一些属性了。当时看就觉得不是很成熟,这两年规范还是发生了一些变化。感兴趣可以根据新的规范来对框架组件做一些调整,一起参与共建。

@gqcn 一些稳定的属性是可以接入的吧

See:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants