[−][src]Struct tracing_distributed::TelemetryLayer
A tracing_subscriber::Layer
that publishes events and spans to some backend
using the provided Telemetry
capability.
Methods
impl<T, SpanId, TraceId> TelemetryLayer<T, SpanId, TraceId> where
SpanId: 'static + Clone + Send + Sync,
TraceId: 'static + Clone + Send + Sync,
[src]
SpanId: 'static + Clone + Send + Sync,
TraceId: 'static + Clone + Send + Sync,
pub fn new<F: 'static + Send + Sync + Fn(Id) -> SpanId>(
service_name: &'static str,
telemetry: T,
promote_span_id: F
) -> Self
[src]
service_name: &'static str,
telemetry: T,
promote_span_id: F
) -> Self
Construct a new TelemetryLayer using the provided Telemetry
capability.
Uses the provided function, F
, to promote tracing::span::Id
instances to the
SpanId
type associated with the provided Telemetry
instance.
Trait Implementations
impl<S, TraceId, SpanId, V, T> Layer<S> for TelemetryLayer<T, SpanId, TraceId> where
S: Subscriber + for<'a> LookupSpan<'a>,
TraceId: 'static + Clone + Eq + Send + Sync,
SpanId: 'static + Clone + Eq + Send + Sync,
V: 'static + Visit + Default + Send + Sync,
T: 'static + Telemetry<Visitor = V, TraceId = TraceId, SpanId = SpanId>,
[src]
S: Subscriber + for<'a> LookupSpan<'a>,
TraceId: 'static + Clone + Eq + Send + Sync,
SpanId: 'static + Clone + Eq + Send + Sync,
V: 'static + Visit + Default + Send + Sync,
T: 'static + Telemetry<Visitor = V, TraceId = TraceId, SpanId = SpanId>,
fn new_span(&self, attrs: &Attributes, id: &Id, ctx: Context<S>)
[src]
fn on_record(&self, id: &Id, values: &Record, ctx: Context<S>)
[src]
fn on_event(&self, event: &Event, ctx: Context<S>)
[src]
fn on_close(&self, id: Id, ctx: Context<S>)
[src]
unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>
[src]
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
[src]
fn enabled(&self, metadata: &Metadata, ctx: Context<S>) -> bool
[src]
fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<S>)
[src]
fn on_enter(&self, _id: &Id, _ctx: Context<S>)
[src]
fn on_exit(&self, _id: &Id, _ctx: Context<S>)
[src]
fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<S>)
[src]
fn and_then<L>(self, layer: L) -> Layered<L, Self, S> where
L: Layer<S>,
[src]
L: Layer<S>,
fn with_subscriber(self, inner: S) -> Layered<Self, S, S>
[src]
Auto Trait Implementations
impl<Telemetry, SpanId, TraceId> !RefUnwindSafe for TelemetryLayer<Telemetry, SpanId, TraceId>
impl<Telemetry, SpanId, TraceId> Send for TelemetryLayer<Telemetry, SpanId, TraceId> where
SpanId: Send,
Telemetry: Send,
TraceId: Send,
SpanId: Send,
Telemetry: Send,
TraceId: Send,
impl<Telemetry, SpanId, TraceId> Sync for TelemetryLayer<Telemetry, SpanId, TraceId> where
SpanId: Send + Sync,
Telemetry: Sync,
TraceId: Send + Sync,
SpanId: Send + Sync,
Telemetry: Sync,
TraceId: Send + Sync,
impl<Telemetry, SpanId, TraceId> Unpin for TelemetryLayer<Telemetry, SpanId, TraceId> where
SpanId: Unpin,
Telemetry: Unpin,
TraceId: Unpin,
SpanId: Unpin,
Telemetry: Unpin,
TraceId: Unpin,
impl<Telemetry, SpanId, TraceId> !UnwindSafe for TelemetryLayer<Telemetry, SpanId, TraceId>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,