Interface EventData


@Immutable public interface EventData
Data representation of an event.
  • Method Summary

    Modifier and Type
    Method
    Description
    static EventData
    create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes)
    Returns a new immutable EventData.
    static EventData
    create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes, int totalAttributeCount)
    Returns a new immutable EventData.
    io.opentelemetry.api.common.Attributes
    Return the attributes of the EventData.
    default int
    Returns the dropped attributes count of this event.
    long
    Returns the epoch time in nanos of this event.
    Return the name of the EventData.
    int
    The total number of attributes that were recorded on this Event.
  • Method Details

    • create

      static EventData create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes)
      Returns a new immutable EventData.
      Parameters:
      epochNanos - epoch timestamp in nanos of the EventData.
      name - the name of the EventData.
      attributes - the attributes of the EventData.
      Returns:
      a new immutable EventData
    • create

      static EventData create(long epochNanos, String name, io.opentelemetry.api.common.Attributes attributes, int totalAttributeCount)
      Returns a new immutable EventData.
      Parameters:
      epochNanos - epoch timestamp in nanos of the EventData.
      name - the name of the EventData.
      attributes - the attributes of the EventData.
      totalAttributeCount - the total number of attributes for this Event.
      Returns:
      a new immutable EventData
    • getName

      String getName()
      Return the name of the EventData.
      Returns:
      the name of the EventData.
    • getAttributes

      io.opentelemetry.api.common.Attributes getAttributes()
      Return the attributes of the EventData.
      Returns:
      the attributes of the EventData.
    • 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: SpanLimits.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.