Skip to content

fix: use the stable OpenTelemetry logger provider API - #5299

Open
pellared wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
pellared:otel-log-global-migration
Open

pellared wants to merge 1 commit into
GoogleCloudPlatform:masterfrom
pellared:otel-log-global-migration

Conversation

@pellared

Copy link
Copy Markdown

Description

Use the global logger provider functions from go.opentelemetry.io/otel so this code can build when the Logs API drops the forwarding log/global package. The affected modules already require OTel v1.47.0.

Link to the issue in case of a bug fix

Fixes #5298

Testing details

  • go test -short -mod=readonly ./internal/monitor passed

Any backward incompatible change? If so, please explain.

The logger provider setup remains the same. OpenTelemetry Go PR #9634.

@pellared
pellared requested a review from a team as a code owner November 30, 2026 16:28
@pellared
pellared requested a review from charith87 November 30, 2026 16:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the OpenTelemetry logging configuration in internal/monitor/otelexporters.go by replacing the deprecated globalLog.SetLoggerProvider with otel.SetLoggerProvider and removing the unused go.opentelemetry.io/otel/log/global import. As a result, the go.opentelemetry.io/otel/log dependency in go.mod has been demoted to an indirect dependency. There are no review comments, and I have no feedback to provide.

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

Labels

None yet

2 participants