Skip to content

Better internal logging#6

Merged
raphael-theriault-swi merged 7 commits into
mainfrom
NH-140639
Jun 12, 2026
Merged

Better internal logging#6
raphael-theriault-swi merged 7 commits into
mainfrom
NH-140639

Conversation

@raphael-theriault-swi

Copy link
Copy Markdown
Contributor

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 :)

Copilot AI review requested due to automatic review settings June 12, 2026 15:40
@raphael-theriault-swi raphael-theriault-swi requested review from a team as code owners June 12, 2026 15:40

Copilot AI 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.

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-subscriber initialization and instrument key functions for debug-level spans.
  • Replace several eprintln! error/warning prints with structured tracing::{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.

Comment thread src/detector.rs Outdated
Comment thread src/exporter.rs
Comment thread src/exporter.rs
Comment thread src/exporter.rs
Comment thread src/exporter.rs

Copilot AI 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.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Comment thread src/env.rs
Comment thread src/server.rs
Comment thread src/exporter.rs

@tammy-baylis-swi tammy-baylis-swi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't know Rust but looks helpful!

@raphael-theriault-swi raphael-theriault-swi merged commit 9eebca9 into main Jun 12, 2026
7 checks passed
@raphael-theriault-swi raphael-theriault-swi deleted the NH-140639 branch June 12, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants