tracer: quiet routine OpenTelemetry exporter errors#1075
Merged
Conversation
Zoekt can run with OpenTelemetry enabled in environments where no local collector is available. The SDK then reports exporter connection failures periodically, which are useful diagnostics only when debug logging is enabled. Route those errors through sourcegraph/log at debug level, matching Sourcegraph's tracer behavior, so normal local development does not get spammed by expected collector connection failures. Amp-Thread-ID: https://ampcode.com/threads/T-019eef33-d3d1-757a-9828-8df7e7b6f889 Co-authored-by: Amp <amp@ampcode.com>
burmudar
approved these changes
Jun 22, 2026
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.
Zoekt's OpenTelemetry tracer currently installs an SDK error handler that writes exporter errors directly with the standard logger. In environments where tracing is enabled but no collector is listening, such as local development, the exporter reports periodic connection failures that are expected but noisy.
This routes those SDK errors through sourcegraph/log at debug level instead, matching the behavior of Sourcegraph's monolith tracer. The diagnostics remain available when debug logging is enabled, while normal logs stay focused on actionable service output.