docs: 明确NewOpenTelemetryProvider的重复调用规范(关联Issue #1327)#1328
Merged
GuangmingLuo merged 3 commits intocloudwego:mainfrom May 12, 2025
Merged
docs: 明确NewOpenTelemetryProvider的重复调用规范(关联Issue #1327)#1328GuangmingLuo merged 3 commits intocloudwego:mainfrom
GuangmingLuo merged 3 commits intocloudwego:mainfrom
Conversation
docs: 明确多次调用NewOpenTelemetryProvider时的资源管理要求 。强调必须先调用Shutdown才能再次调用NewOpenTelemetryProvider,避免资源泄漏。
docs: 明确多次调用NewOpenTelemetryProvider时的资源管理要求。 强调必须先调用Shutdown才能再次调用NewOpenTelemetryProvider,避免资源泄漏以及网络连接混乱。
Member
感谢贡献! 一点小建议:资源泄露这块可以明确一下,其实本质是 provider 内部维护的 trace/metric exporter client,这个是需要通过 shutdown 来关闭的 可以改成:用户需要自行通过 shutdown 来关闭前一个 provider 生命周期,shutdown 会自动关闭内部维护的 trace/metric exporter client 实例 |
docs: 明确在重复调用`NewOpenTelemetryProvider`时,用户需要自行通过`Shutdown`来关闭前一个provider实例维护的trace/metric exporter client实例,否则会导致资源泄露和网络连接混乱问题。
Contributor
Author
|
好的👌,我改好了
|
panda-xinyi
added a commit
to panda-xinyi/cloudwego.github.io
that referenced
this pull request
May 27, 2025
docs: create generic streaming documentation in Chinese version (cloudwego#1326) docs: 明确NewOpenTelemetryProvider的重复调用规范(关联Issue cloudwego#1327) (cloudwego#1328) 修复milvus的indexer文档,缺乏”document配置必须搭配fields配置“这一信息,导致容易误用问题 (cloudwego#1331) chore: upgrade typos (cloudwego#1332) feat: update merge register & with eager execution (cloudwego#1333) chore: update getting-started docs (cloudwego#1334) feat: update host multi-agent docs (cloudwego#1335) docs: add doc for hertz v0.10.0 (cloudwego#1337) Co-authored-by: Kyle Xiao <xiaoguoqiao@bytedance.com> fix(eino): remove error prompt directory (cloudwego#1338) docs(kitex): improve transport protocol documentation with clearer explanations docs: improve transport protocol documentation to clarify Kitex's support for Thrift and Protobuf with gRPC transport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

修改说明
此PR针对 Issue #1327,完善"github.com/kitex-contrib/obs-opentelemetry/provider"中的NewOpenTelemetryProvider的调用规范说明,避免资源泄漏和网络连接混乱问题。
主要变更
在文档中明确指出重复调用NewOpenTelemetryProvider时的资源泄漏问题,明确要求程序员在多次调用NewOpenTelemetryProvider时每次都要先shutdown原来的。
