Better internal logging#6
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates internal diagnostic output from eprintln! to tracing, adds request/response tracing middleware, and updates the exporter’s default compression to Zstandard to align with the stated deployment readiness.
Changes:
- Add
tracing/tracing-subscriberinitialization and instrument key functions for debug-level spans. - Replace several
eprintln!error/warning prints with structuredtracing::{warn,error,info}!events. - Switch default exporter compression from gzip to zstd and add Tower HTTP trace layers.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util.rs | Logs bound listener addresses via tracing::info!. |
| src/settings.rs | Instruments settings fetch and replaces eprintln! warnings with tracing::warn!. |
| src/server/http.rs | Replaces HTTP exporter eprintln! with tracing::warn!. |
| src/server.rs | Adds TraceLayer for HTTP routes and gRPC routes. |
| src/requests/telemetry.rs | Instruments telemetry registration for debug tracing. |
| src/requests/extension.rs | Instruments extension register/next calls for debug tracing. |
| src/main.rs | Initializes tracing-subscriber with EnvFilter controlled by OPENTELEMETRY_EXTENSION_LOG_LEVEL; replaces lifecycle eprintln! with tracing::error!. |
| src/exporter.rs | Replaces eprintln! partial-success/error prints with tracing::warn! and instruments export. |
| src/env.rs | Instruments config parsing and changes default compression to Zstd. |
| src/detector.rs | Instruments detect for debug tracing. |
| Cargo.toml | Adds tracing, tracing-subscriber, and enables tower-http trace feature. |
| Cargo.lock | Updates lockfile for newly added tracing dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tammy-baylis-swi
approved these changes
Jun 12, 2026
tammy-baylis-swi
left a comment
There was a problem hiding this comment.
I don't know Rust but looks helpful!
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.
This adds a bunch of internal logging for debugging purposes, using the same environment variable as go otelcol to select the level. I also set the default compression encoding to zstd now that it's been deployed :)