Skip to content

Commit

Permalink
Make subscriber generic in capturer
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Oct 17, 2024
1 parent 10561ae commit 8a24494
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libs/telemetry/src/capturing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ use once_cell::sync::Lazy;
use opentelemetry::{global, sdk, trace};
use tracing::subscriber;
use tracing_subscriber::{
filter::filter_fn, layer::Layered, prelude::__tracing_subscriber_SubscriberExt, Layer, Registry,
filter::filter_fn,
layer::{Layered, SubscriberExt},
registry::LookupSpan,
Layer, Registry,
};

static PROCESSOR: Lazy<capturer::Processor> = Lazy::new(Processor::default);
Expand All @@ -158,12 +161,8 @@ pub fn capturer(trace_id: trace::TraceId, settings: Settings) -> Capturer {
/// Adds a capturing layer to the given subscriber and installs the transformed subscriber as the
/// global, default subscriber
#[cfg(feature = "metrics")]
#[allow(clippy::type_complexity)]
pub fn install_capturing_layer(
subscriber: Layered<
Option<query_engine_metrics::MetricRegistry>,
Layered<Box<dyn Layer<Registry> + Send + Sync>, Registry>,
>,
subscriber: impl SubscriberExt + for<'a> LookupSpan<'a> + Send + Sync + 'static,
log_queries: bool,
) {
// set a trace context propagator, so that the trace context is propagated via the
Expand Down

0 comments on commit 8a24494

Please sign in to comment.