Top Description Fields Constructors Methods
io.micrometer.tracing.handler

public Class TracingAwareMeterObservationHandler<T extends Observation.Context>

extends Object
implements io.micrometer.core.instrument.observation.MeterObservationHandler<T extends Observation.Context>
Class Inheritance
Annotations
@NonNullApi
Type Parameters
<T>
type of handler context
Imports
io.micrometer.common.lang.NonNullApi, io.micrometer.core.instrument.observation.MeterObservationHandler, io.micrometer.observation.Observation, io.micrometer.tracing.CurrentTraceContext, .Span, .Tracer

A MeterObservationHandler that can wrap another one and makes the tracing data available for it. This handler can be used in cases where the MeterRegistry or the MeterObservationHandler itself needs access to the tracing data (e.g.: exemplars).
Author
Jonatan Ivanov
Since
1.0.0

Field Summary

Modifier and TypeField and Description
private final io.micrometer.core.instrument.observation.MeterObservationHandler<T>
private final Tracer

Constructor Summary

AccessConstructor and Description
public
TracingAwareMeterObservationHandler(io.micrometer.core.instrument.observation.MeterObservationHandler<T> delegate, Tracer
tracer
tracer
)

Creates a new instance of TracingAwareMeterObservationHandler.

Method Summary

Modifier and TypeMethod and Description
public void
onError(T context)

public void
onEvent(Observation.Event event, T context)

public void
onScopeClosed(T context)

public void
onScopeOpened(T context)

public void
onStart(T context)

public void
onStop(T context)

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final io.micrometer.core.instrument.observation.MeterObservationHandler<T> delegate
tracerback to summary
private final Tracer tracer

Constructor Detail

TracingAwareMeterObservationHandlerback to summary
public TracingAwareMeterObservationHandler(io.micrometer.core.instrument.observation.MeterObservationHandler<T> delegate, Tracer tracer)

Creates a new instance of TracingAwareMeterObservationHandler.

Parameters
delegate:io.micrometer.core.instrument.observation.MeterObservationHandler<T>

a MeterObservationHandler delegate

tracer:Tracer

tracer

Method Detail

onErrorback to summary
public void onError(T context)
Annotations
@Override
onEventback to summary
public void onEvent(Observation.Event event, T context)
Annotations
@Override
onScopeClosedback to summary
public void onScopeClosed(T context)
Annotations
@Override
onScopeOpenedback to summary
public void onScopeOpened(T context)
Annotations
@Override
onStartback to summary
public void onStart(T context)
Annotations
@Override
onStopback to summary
public void onStop(T context)
Annotations
@Override
supportsContextback to summary
public boolean supportsContext(Observation.Context context)
Annotations
@Override