Top Description Fields Constructors Methods
io.micrometer.observation

pack-priv Class SimpleObservationRegistry

extends Object
implements ObservationRegistry
Class Inheritance
All Implemented Interfaces
io.micrometer.observation.ObservationRegistry
Imports
io.micrometer.common.lang.Nullable

Default implementation of ObservationRegistry.
Authors
Jonatan Ivanov, Tommy Ludwig, Marcin Grzejszczak
Since
1.10.0

Field Summary

Modifier and TypeField and Description
private static final ThreadLocal<Observation.Scope>
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 boolean
isNoop()

Overrides default io.micrometer.observation.ObservationRegistry.isNoop.

Checks whether this ObservationRegistry is no-op.
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

localObservationScopeback to summary
private static final ThreadLocal<Observation.Scope> localObservationScope
observationConfigback to summary
private final ObservationRegistry.ObservationConfig observationConfig

Constructor Detail

SimpleObservationRegistryback to summary
pack-priv SimpleObservationRegistry()

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
@Nullable
@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
isNoopback to summary
public boolean isNoop()

Overrides default io.micrometer.observation.ObservationRegistry.isNoop.

Doc from io.micrometer.observation.ObservationRegistry.isNoop.

Checks whether this ObservationRegistry is no-op.

Returns:boolean

true when this is a no-op observation registry

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