Skip to content

Commit

Permalink
feat!(init-tracing-opentelemetry): no longer enable otel=debug in log
Browse files Browse the repository at this point in the history
  • Loading branch information
davidB committed Dec 10, 2024
1 parent 0c57a9f commit dba0bc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[env]
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = "http://127.0.0.1:4317"
# OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = "grpc"
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = "grpc"
OTEL_TRACES_SAMPLER = "always_on"
# RUSTC_WRAPPER = "sccache"
# RUST_WITHOUT = "rust-docs"
ASDF_RUST_PROFILE = "minimal"
# RUST_LOG = "warn,otel::setup=debug"

[tools]
rust = '1.80.0'
Expand Down
4 changes: 2 additions & 2 deletions init-tracing-opentelemetry/src/tracing_subscriber_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ pub fn build_loglevel_filter_layer() -> tracing_subscriber::filter::EnvFilter {
"RUST_LOG",
format!(
// `otel::tracing` should be a level info to emit opentelemetry trace & span
// `otel::setup` set to debug to log detected resources, configuration read and infered
"{},otel::tracing=trace,otel=debug",
// `otel::setup` set to debug to log detected resources, configuration read
"{},otel::tracing=trace",
std::env::var("RUST_LOG")
.or_else(|_| std::env::var("OTEL_LOG_LEVEL"))
.unwrap_or_else(|_| "info".to_string())
Expand Down

0 comments on commit dba0bc7

Please sign in to comment.