Top Description Fields Constructors Methods
io.micrometer.observation

pack-priv Class SimpleEvent

extends Object
implements Event
Class Inheritance
All Implemented Interfaces
io.micrometer.observation.Observation.Event
Imports
io.micrometer.observation.Observation.Event

Default implementation of Event.
Authors
Jonatan Ivanov, Tommy Ludwig, Marcin Grzejszczak

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
SimpleEvent(String name, String contextualName)

pack-priv
SimpleEvent(String
The name of the event (should have low cardinality).
name
,
String
The contextual name of the event (can have high cardinality).
contextualName
,
long
Wall time in milliseconds since the epoch
wallTime
)

Method Summary

Modifier and TypeMethod and Description
public String
getContextualName()

Overrides default io.micrometer.observation.Observation.Event.getContextualName.

Returns the contextual name of the event.
public String
getName()

Implements io.micrometer.observation.Observation.Event.getName.

Returns the name of the event.
public long
getWallTime()

Overrides default io.micrometer.observation.Observation.Event.getWallTime.

Wall time in milliseconds since the epoch.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

contextualNameback to summary
private final String contextualName
nameback to summary
private final String name
wallTimeback to summary
private final long wallTime

Constructor Detail

SimpleEventback to summary
pack-priv SimpleEvent(String name, String contextualName)
SimpleEventback to summary
pack-priv SimpleEvent(String name, String contextualName, long wallTime)
Parameters
name:String

The name of the event (should have low cardinality).

contextualName:String

The contextual name of the event (can have high cardinality).

wallTime:long

Wall time in milliseconds since the epoch

Method Detail

getContextualNameback to summary
public String getContextualName()

Overrides default io.micrometer.observation.Observation.Event.getContextualName.

Doc from io.micrometer.observation.Observation.Event.getContextualName.

Returns the contextual name of the event. You can use %s to represent dynamic entries that should be resolved at runtime via String#format(String, Object...).

Returns:String

the contextual name of the event.

Annotations
@Override
getNameback to summary
public String getName()

Implements io.micrometer.observation.Observation.Event.getName.

Doc from io.micrometer.observation.Observation.Event.getName.

Returns the name of the event.

Returns:String

the name of the event.

Annotations
@Override
getWallTimeback to summary
public long getWallTime()

Overrides default io.micrometer.observation.Observation.Event.getWallTime.

Doc from io.micrometer.observation.Observation.Event.getWallTime.

Wall time in milliseconds since the epoch. Typically equivalent to System#currentTimeMillis(). Should not be used to determine durations. Used for timestamping events that happened during Observations.

Returns:long

Wall time in milliseconds since the epoch

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override