Package io.opentelemetry.api.events
Interface EventBuilder
public interface EventBuilder
The EventBuilder is used to
emit() events.-
Method Summary
Modifier and TypeMethodDescriptionvoidemit()Emit an event.setTimestamp(long timestamp, TimeUnit unit) Set the epochtimestampfor the event, using the timestamp and unit.setTimestamp(Instant instant) Set the epochtimestampfor the event, using the instant.
-
Method Details
-
setTimestamp
Set the epochtimestampfor the event, using the timestamp and unit.The
timestampis the time at which the event occurred. If unset, it will be set to the current time whenemit()is called. -
setTimestamp
Set the epochtimestampfor the event, using the instant.The
timestampis the time at which the event occurred. If unset, it will be set to the current time whenemit()is called. -
emit
void emit()Emit an event.
-