Observation.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Observation. | |
| private ObservationConvention | |
| private final Collection | |
| private final Deque | |
| pack-priv final Map | |
| pack-priv final ObservationRegistry |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | SimpleObservation(ObservationConvention<? extends Observation.
|
| Modifier and Type | Method and Description |
|---|---|
| public Observation | contextualName(String
contextual name contextualName)Implements io. |
| public Observation | error(Throwable
error error)Implements io. |
| public Observation | event(Observation.
event eventImplements io. Event.
|
| public Observation. | getContext()
Implements io. |
| private static ObservationConvention | |
| public Observation. | getEnclosingScope()
Overrides default io. ObservationView in this thread.
|
| private static Deque | |
| public ObservationRegistry | getObservationRegistry()
Overrides default io. ObservationRegistry attached to this observation.
|
| public Observation | highCardinalityKeyValue(KeyValue
key value keyValue)Implements io. |
| public Observation | lowCardinalityKeyValue(KeyValue
key value keyValue)Implements io. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public Observation | observationConvention(ObservationConvention<?>
observation convention convention)Implements io. |
| public Observation. | openScope()
Implements io. ObservationHandlers such as putting entries in thread local.
|
| public Observation | parentObservation(Observation
parent observation to set parentObservation)Implements io. Observation you can manually set
the parent Observation using this method - that way you won't need to open
scopes just to create a child observation.
|
| public Observation | |
| public void | |
| public String |
| context | back to summary |
|---|---|
| private final Observation. | |
| convention | back to summary |
|---|---|
private ObservationConvention<T extends Observation.
| |
| filters | back to summary |
|---|---|
| private final Collection<ObservationFilter> filters | |
| handlers | back to summary |
|---|---|
private final Deque<ObservationHandler<T extends Observation.
| |
| lastScope | back to summary |
|---|---|
| pack-priv final Map<Thread, Observation. | |
| registry | back to summary |
|---|---|
| pack-priv final ObservationRegistry registry | |
| SimpleObservation | back to summary |
|---|---|
| pack-priv SimpleObservation(String name, ObservationRegistry registry, Observation. | |
| SimpleObservation | back to summary |
|---|---|
| pack-priv SimpleObservation(ObservationConvention<? extends Observation. | |
| contextualName | back to summary |
|---|---|
| public Observation contextualName(String contextualName) Implements io. Doc from io. Sets the name that can be defined from the contents of the context. E.g. a span name should not be the default observation name but one coming from an HTTP request.
| |
| error | back to summary |
|---|---|
| public Observation error(Throwable error) Implements io. Doc from io. Signals an error.
| |
| event | back to summary |
|---|---|
| public Observation event(Observation. Implements io. Doc from io. Signals an arbitrary
| |
| getContext | back to summary |
|---|---|
| public Observation. Implements io. Doc from io. Returns the context attached to this observation.
| |
| getConventionFromConfig | back to summary |
|---|---|
private static ObservationConvention
| |
| getEnclosingScope | back to summary |
|---|---|
| public Observation. Overrides default io. Doc from io. Pops the last scope attached to this
| |
| getHandlersFromConfig | back to summary |
|---|---|
| private static Deque | |
| getObservationRegistry | back to summary |
|---|---|
| public ObservationRegistry getObservationRegistry() Overrides default io. Doc from io. Returns the
| |
| highCardinalityKeyValue | back to summary |
|---|---|
| public Observation highCardinalityKeyValue(KeyValue keyValue) Implements io. Doc from io. Adds a high cardinality key value. High cardinality means that this key value will have an unbounded number of possible values. An HTTP URL is a good example of such a key value (e.g. /foo/bar, /foo/baz etc.).
| |
| lowCardinalityKeyValue | back to summary |
|---|---|
| public Observation lowCardinalityKeyValue(KeyValue keyValue) Implements io. Doc from io. Adds a low cardinality key value. Low cardinality means that this key value will have a bounded number of possible values. A templated HTTP URL is a good example of such a key value (e.g. /foo/{userId}).
| |
| notifyOnError | back to summary |
|---|---|
pack-priv void notifyOnError()
| |
| notifyOnEvent | back to summary |
|---|---|
pack-priv void notifyOnEvent(Observation.
| |
| notifyOnObservationStarted | back to summary |
|---|---|
pack-priv void notifyOnObservationStarted()
| |
| notifyOnObservationStopped | back to summary |
|---|---|
pack-priv void notifyOnObservationStopped(Observation.
| |
| notifyOnScopeClosed | back to summary |
|---|---|
pack-priv void notifyOnScopeClosed()
| |
| notifyOnScopeMakeCurrent | back to summary |
|---|---|
pack-priv void notifyOnScopeMakeCurrent()
| |
| notifyOnScopeOpened | back to summary |
|---|---|
pack-priv void notifyOnScopeOpened()
| |
| notifyOnScopeReset | back to summary |
|---|---|
pack-priv void notifyOnScopeReset()
| |
| observationConvention | back to summary |
|---|---|
| public Observation observationConvention(ObservationConvention<?> convention) Implements io. Doc from io. Sets an observation convention that can be used to attach key values to the
observation. Implementations should only set the convention when it supports (see:
Warning You must set the ObservationConvention to the Observation before it is started.
| |
| openScope | back to summary |
|---|---|
| public Observation. Implements io. Doc from io. When put in scope, additional operations can take place by the
| |
| parentObservation | back to summary |
|---|---|
| public Observation parentObservation(Observation parentObservation) Implements io. Doc from io. If you have access to a previously created
| |
| start | back to summary |
|---|---|
| public Observation start() Implements io. Doc from io. Starts the observation. Remember to call this method, otherwise timing calculations will not take place.
| |
| stop | back to summary |
|---|---|
| public void stop() Implements io. Doc from io. Stop the observation. Remember to call this method, otherwise timing calculations won't be finished.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Observation | |
| private static final InternalLogger | |
| pack-priv final Observation. | |
| pack-priv final ObservationRegistry |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements io. |
| public Observation | getCurrentObservation()
Implements io. |
| private SimpleObservation. | |
| public Observation. | getPreviousObservationScope()
Overrides default io. |
| public void | makeCurrent()
Implements io. ObservationThreadLocalAccessor#restore(Observation).
|
| public void |
| currentObservation | back to summary |
|---|---|
| private final Observation currentObservation | |
| log | back to summary |
|---|---|
| private static final InternalLogger log | |
| previousObservationScope | back to summary |
|---|---|
| pack-priv final Observation. | |
| registry | back to summary |
|---|---|
| pack-priv final ObservationRegistry registry | |
| SimpleScope | back to summary |
|---|---|
| pack-priv SimpleScope(ObservationRegistry registry, Observation current) | |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from io. Clears the current scope and notifies the handlers that the scope was closed. You don't need to call this method manually. If you use try-with-resource, it will call this for you. Please only call this method if you know what you are doing and your use-case demands the usage of it.
| |
| getCurrentObservation | back to summary |
|---|---|
| public Observation getCurrentObservation() Implements io. Doc from io. Current observation available within this scope.
| |
| getLastScope | back to summary |
|---|---|
private SimpleObservation.
| |
| getPreviousObservationScope | back to summary |
|---|---|
| public Observation. Overrides default io. Doc from io. Parent scope.
| |
| makeCurrent | back to summary |
|---|---|
| public void makeCurrent() Implements io. This method is called e.g. via
| |
| reset | back to summary |
|---|---|
| public void reset() Implements io. Doc from io. Resets the current scope. The effect of calling this method should be clearing all related thread local entries. You don't need to call this method in most of the cases. Please only call this method if you know what you are doing and your use-case demands the usage of it.
| |