Package io.micrometer.observation
Interface Observation.Scope
- All Superinterfaces:
AutoCloseable
- Enclosing interface:
Observation
Scope represent an action within which certain resources (e.g. tracing context) are
put in scope (e.g. in a ThreadLocal). When the scope is closed the resources will
be removed from the scope.
- Since:
- 1.10.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Current observation available within this scope.default boolean
isNoop()
Checks whether thisObservation.Scope
is no-op.
-
Field Details
-
NOOP
No-op scope.
-
-
Method Details
-
getCurrentObservation
Observation getCurrentObservation()Current observation available within this scope.- Returns:
- current observation that this scope was created by
-
close
void close()- Specified by:
close
in interfaceAutoCloseable
-
isNoop
default boolean isNoop()Checks whether thisObservation.Scope
is no-op.- Returns:
true
when this is a no-op scope
-