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

OpenTelemetryにCloud Client Libraryのspanを連携した時にCloud Traceのspanを出力しないようにする #149

Closed
sinmetal opened this issue Jun 28, 2023 · 1 comment

Comments

@sinmetal
Copy link
Member

Cloud Client LibraryはOpenCensusを使っているので、OpenTelemetryにspanを出力する場合、Bridge を設定することになります。

ただ、これを設定するとCloud Trace自体のspanが大量に出てきて、結構邪魔です。

image

Cloud Trace自体のspanを送らないようにする

Optionを指定すれば、このspanは送られなくなります。
Cloud Trace自体のspanが見たいわけじゃなければ、disableにしておくと良いでしょう。

import "google.golang.org/api/option"

gcp, err := texporter.NewExporter(texporter.WithTraceClientOptions([]option.ClientOption{option.WithTelemetryDisabled()}))

refs open-telemetry/opentelemetry-go#1928 (comment)

@sinmetal
Copy link
Member Author

sinmetal commented Mar 4, 2024

#150 にmerge

@sinmetal sinmetal closed this as completed Mar 4, 2024
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

1 participant