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

fix: flusher_otlp stop nil log/metric/trace client #1994

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shunjiazhu
Copy link
Contributor

Change-Id: I8948322d1e54a61c7b17968a5bcaf5590d9a437c

Change-Id: I8948322d1e54a61c7b17968a5bcaf5590d9a437c
Change-Id: Ib0003a387cb9d23592f28fd8097bc49ff3ae2351
@ralf0131
Copy link

This PR aims to fix #1995

@@ -160,21 +160,21 @@ func (f *FlusherOTLP) IsReady(projectName string, logstoreName string, logstoreK
func (f *FlusherOTLP) Stop() error {
var err error

if f.logClient.grpcConn != nil {
if f.logClient != nil && f.logClient.grpcConn != nil {
Copy link
Collaborator

@yyuuttaaoo yyuuttaaoo Dec 27, 2024

Choose a reason for hiding this comment

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

简洁一些?if f.logClient == nil { return }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

还不行,除了 log 还有 trace,metrics 的 client

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里用户可能 trace/metrics/log 是三个不同的后端,或者用户只上报一部分数据。

@yyuuttaaoo yyuuttaaoo linked an issue Dec 27, 2024 that may be closed by this pull request
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.

[BUG]: Core dump using otlp flusher
4 participants