Top Description Fields Methods
io.micrometer.tracing.docs

public Interface SpanDocumentation

Known Direct Implementers
io.micrometer.tracing.annotation.AnnotationSpanDocumentation
Imports
io.micrometer.common.docs.KeyName

In order to describe your spans via e.g. enums instead of Strings you can use this interface that returns all the characteristics of a span. In Micrometer Tracing we analyze the sources and reuse this information to build a table of known spans, their names, tags and events.

We can generate documentation for all created spans but certain requirements need to be met

Author
Marcin Grzejszczak
Since
1.0.0

Field Summary

Modifier and TypeField and Description
public static final KeyName[]
EMPTY_KEY_NAMES

Empty key names.

public static final EventValue[]
EMPTY_VALUES

Empty values.

Method Summary

Modifier and TypeMethod and Description
public default KeyName[]

Returns:

additional key names - if set will append any key names coming from SpanDocumentation#overridesDefaultSpanFrom()
getAdditionalKeyNames
()

Additional key names.

public default EventValue[]

Returns:

allowed events
getEvents
()

Allowed events.

public default KeyName[]

Returns:

allowed key names - if set will override any key names coming from SpanDocumentation#overridesDefaultSpanFrom()
getKeyNames
()

Allowed key names.

public String

Returns:

metric name
getName
()

Span name.

public default String

Returns:

constructed name
getName
(String... vars)

Builds a name from provided vars.

public default String

Returns:

required prefix
getPrefix
()

Returns required prefix to be there for tags.

public default Enum<?>

Returns:

io.micrometer.observation.docs.ObservationDocumentation for which you don't want to create a default span documentation
overridesDefaultSpanFrom
()

Override this when custom span should be documented instead of the default one.

Field Detail

EMPTY_KEY_NAMESback to summary
public static final KeyName[] EMPTY_KEY_NAMES

Empty key names.

EMPTY_VALUESback to summary
public static final EventValue[] EMPTY_VALUES

Empty values.

Method Detail

getAdditionalKeyNamesback to summary
public default KeyName[] getAdditionalKeyNames()

Additional key names.

Returns:KeyName[]

additional key names - if set will append any key names coming from SpanDocumentation#overridesDefaultSpanFrom()

getEventsback to summary
public default EventValue[] getEvents()

Allowed events.

Returns:EventValue[]

allowed events

getKeyNamesback to summary
public default KeyName[] getKeyNames()

Allowed key names.

Returns:KeyName[]

allowed key names - if set will override any key names coming from SpanDocumentation#overridesDefaultSpanFrom()

getNameback to summary
public String getName()

Span name.

Returns:String

metric name

getNameback to summary
public default String getName(String... vars)

Builds a name from provided vars. Follows the String#format(String, Object...) patterns.

Parameters
vars:String[]

variables to pass to String#format(String, Object...)

Returns:String

constructed name

getPrefixback to summary
public default String getPrefix()

Returns required prefix to be there for tags. For example, foo. would require the tags to have a foo. prefix like this: foo.bar=true.

Returns:String

required prefix

overridesDefaultSpanFromback to summary
public default Enum<?> overridesDefaultSpanFrom()

Override this when custom span should be documented instead of the default one.

Returns:Enum<?>

io.micrometer.observation.docs.ObservationDocumentation for which you don't want to create a default span documentation