Top Description Fields Constructors Methods
org.springframework.scheduling.support

public Class DefaultScheduledTaskObservationConvention

extends Object
implements ScheduledTaskObservationConvention
Class Inheritance
All Implemented Interfaces
org.springframework.scheduling.support.ScheduledTaskObservationConvention, io.micrometer.observation.ObservationConvention, io.micrometer.observation.KeyValuesConvention
Imports
io.micrometer.common.KeyValue, .KeyValues, org.springframework.util.StringUtils

Default implementation for ScheduledTaskObservationConvention.
Author
Brian Clozel
Since
6.1

Field Summary

Modifier and TypeField and Description
private static final KeyValue
private static final String
private static final KeyValue
private static final KeyValue
private static final KeyValue
private static final KeyValue

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected KeyValue
protected KeyValue
protected KeyValue
public String
getContextualName(ScheduledTaskObservationContext
context
context
)

Overrides default io.micrometer.observation.ObservationConvention.getContextualName.

Allows to override the contextual name for an Observation.
public KeyValues
public String
getName()

Overrides default io.micrometer.observation.ObservationConvention.getName.

Allows to override the name for an observation.
protected KeyValue
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CODE_NAMESPACE_ANONYMOUSback to summary
private static final KeyValue CODE_NAMESPACE_ANONYMOUS
DEFAULT_NAMEback to summary
private static final String DEFAULT_NAME
EXCEPTION_NONEback to summary
private static final KeyValue EXCEPTION_NONE
OUTCOME_ERRORback to summary
private static final KeyValue OUTCOME_ERROR
OUTCOME_SUCCESSback to summary
private static final KeyValue OUTCOME_SUCCESS
OUTCOME_UNKNOWNback to summary
private static final KeyValue OUTCOME_UNKNOWN

Constructor Detail

DefaultScheduledTaskObservationConventionback to summary
public DefaultScheduledTaskObservationConvention()

Method Detail

codeFunctionback to summary
protected KeyValue codeFunction(ScheduledTaskObservationContext context)
codeNamespaceback to summary
protected KeyValue codeNamespace(ScheduledTaskObservationContext context)
exceptionback to summary
protected KeyValue exception(ScheduledTaskObservationContext context)
getContextualNameback to summary
public String getContextualName(ScheduledTaskObservationContext context)

Overrides default io.micrometer.observation.ObservationConvention.getContextualName.

Doc from io.micrometer.observation.ObservationConvention.getContextualName.

Allows to override the contextual name for an Observation. The Observation will be renamed only when an explicit context was passed - if an implicit context is used this method won't be called.

Parameters
context:ScheduledTaskObservationContext

context

Returns:String

the new, contextual name for the observation

Annotations
@Override
getLowCardinalityKeyValuesback to summary
public KeyValues getLowCardinalityKeyValues(ScheduledTaskObservationContext context)

Overrides default io.micrometer.observation.ObservationConvention.getLowCardinalityKeyValues.

Doc from io.micrometer.observation.ObservationConvention.getLowCardinalityKeyValues.

Low cardinality key values.

Returns:KeyValues

key values

Annotations
@Override
getNameback to summary
public String getName()

Overrides default io.micrometer.observation.ObservationConvention.getName.

Doc from io.micrometer.observation.ObservationConvention.getName.

Allows to override the name for an observation.

Returns:String

the new name for the observation

Annotations
@Override
outcomeback to summary
protected KeyValue outcome(ScheduledTaskObservationContext context)