Top Description Fields Constructors Methods
io.micrometer.observation

pack-priv final Class NoopObservationRegistry

extends Object
implements ObservationRegistry
Class Inheritance
All Implemented Interfaces
io.micrometer.observation.ObservationRegistry

No-op implementation of ObservationRegistry so that we can disable the instrumentation logic.
Authors
Jonatan Ivanov, Tommy Ludwig, Marcin Grzejszczak
Since
1.10.0

Field Summary

Modifier and TypeField and Description
pack-priv static final ObservationRegistry
private final ObservationRegistry.ObservationConfig

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Observation
getCurrentObservation()

Implements io.micrometer.observation.ObservationRegistry.getCurrentObservation.

When previously set will allow to retrieve the Observation at any point in time.
public Observation.Scope
public ObservationRegistry.ObservationConfig
observationConfig()

Implements io.micrometer.observation.ObservationRegistry.observationConfig.

Configuration options for this registry.
public void
setCurrentObservationScope(Observation.Scope
observation scope
current
)

Implements io.micrometer.observation.ObservationRegistry.setCurrentObservationScope.

Sets the observation scope as current.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FOR_SCOPESback to summary
pack-priv static final ObservationRegistry FOR_SCOPES
observationConfigback to summary
private final ObservationRegistry.ObservationConfig observationConfig

Constructor Detail

NoopObservationRegistryback to summary
pack-priv NoopObservationRegistry()

Method Detail

getCurrentObservationback to summary
public Observation getCurrentObservation()

Implements io.micrometer.observation.ObservationRegistry.getCurrentObservation.

Doc from io.micrometer.observation.ObservationRegistry.getCurrentObservation.

When previously set will allow to retrieve the Observation at any point in time. Example: if an Observation was put in Observation.Scope then this method will return the current present Observation within the scope.

Returns:Observation

current observation or null if it's not present

Annotations
@Override
getCurrentObservationScopeback to summary
public Observation.Scope getCurrentObservationScope()

Implements io.micrometer.observation.ObservationRegistry.getCurrentObservationScope.

Doc from io.micrometer.observation.ObservationRegistry.getCurrentObservationScope.

When previously set will allow to retrieve the Observation.Scope at any point in time. Example: if an Observation was put in Observation.Scope then this method will return the current present Observation.Scope.

Returns:Observation.Scope

current observation scope or null if it's not present

Annotations
@Override
observationConfigback to summary
public ObservationRegistry.ObservationConfig observationConfig()

Implements io.micrometer.observation.ObservationRegistry.observationConfig.

Doc from io.micrometer.observation.ObservationRegistry.observationConfig.

Configuration options for this registry.

Returns:ObservationRegistry.ObservationConfig

observation configuration

Annotations
@Override
setCurrentObservationScopeback to summary
public void setCurrentObservationScope(Observation.Scope current)

Implements io.micrometer.observation.ObservationRegistry.setCurrentObservationScope.

Doc from io.micrometer.observation.ObservationRegistry.setCurrentObservationScope.

Sets the observation scope as current.

Parameters
current:Observation.Scope

observation scope

Annotations
@Override