Upgrade OpenTelemetry and other tracing crates (#9200)

* tracing-utils now returns a `Layer` impl. Removes the need for crates
to
  import OTel crates.
* Drop the /v1/traces URI check. Verified that the code does the right
thing.
* Leave a TODO to hook in an error handler for OTel to log errors to
when it
  assumes the regular pipeline cannot be used/is broken.
This commit is contained in:
Folke Behrens
2024-10-01 11:02:54 +02:00
committed by GitHub
parent 651ae44569
commit 2e508b1ff9
10 changed files with 199 additions and 199 deletions

View File

@@ -1,4 +1,3 @@
use tracing_opentelemetry::OpenTelemetryLayer;
use tracing_subscriber::{
filter::{EnvFilter, LevelFilter},
prelude::*,
@@ -23,9 +22,7 @@ pub async fn init() -> anyhow::Result<LoggingGuard> {
.with_writer(std::io::stderr)
.with_target(false);
let otlp_layer = tracing_utils::init_tracing("proxy")
.await
.map(OpenTelemetryLayer::new);
let otlp_layer = tracing_utils::init_tracing("proxy").await;
tracing_subscriber::registry()
.with(env_filter)