Package io.opentelemetry.sdk.trace.data
Interface SpanData.Event
-
- Enclosing interface:
- SpanData
public static interface SpanData.Event
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static SpanData.Event
create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes)
Returns a new immutableEvent
.static SpanData.Event
create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes, int totalAttributeCount)
Returns a new immutableEvent
.io.opentelemetry.api.common.Attributes
getAttributes()
Return the attributes of theEvent
.default int
getDroppedAttributesCount()
Returns the dropped attributes count of this event.long
getEpochNanos()
Returns the epoch time in nanos of this event.String
getName()
Return the name of theEvent
.int
getTotalAttributeCount()
The total number of attributes that were recorded on this Event.
-
-
-
Method Detail
-
create
static SpanData.Event create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes)
Returns a new immutableEvent
.- Parameters:
epochNanos
- epoch timestamp in nanos of theEvent
.name
- the name of theEvent
.attributes
- the attributes of theEvent
.- Returns:
- a new immutable
Event<T>
-
create
static SpanData.Event create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes, int totalAttributeCount)
Returns a new immutableEvent
.- Parameters:
epochNanos
- epoch timestamp in nanos of theEvent
.name
- the name of theEvent
.attributes
- the attributes of theEvent
.totalAttributeCount
- the total number of attributes for this Event.- Returns:
- a new immutable
Event<T>
-
getName
String getName()
Return the name of theEvent
.- Returns:
- the name of the
Event
.
-
getAttributes
io.opentelemetry.api.common.Attributes getAttributes()
Return the attributes of theEvent
.- Returns:
- the attributes of the
Event
.
-
getEpochNanos
long getEpochNanos()
Returns the epoch time in nanos of this event.- Returns:
- the epoch time in nanos of this event.
-
getTotalAttributeCount
int getTotalAttributeCount()
The total number of attributes that were recorded on this Event. This number may be larger than the number of attributes that are attached to this span, if the total number recorded was greater than the configured maximum value. See:TraceConfig.getMaxNumberOfAttributesPerEvent()
- Returns:
- The total number of attributes on this event.
-
getDroppedAttributesCount
default int getDroppedAttributesCount()
Returns the dropped attributes count of this event.- Returns:
- the dropped attributes count of this event.
-
-