Interface EventBuilder
public interface EventBuilder
The EventBuilder is used to
emit() events.-
Method Summary
Modifier and TypeMethodDescriptionvoidemit()Emit an event.default EventBuilderPut the givenkeyandvaluein the payload.default EventBuilderPut the givenkeyandvaluein the payload.default EventBuilderPut the givenkeyandvaluein the payload.default EventBuilderPut the givenkeyandvaluein the payload.default EventBuilderPut the givenkeyandvaluein the payload.default EventBuilderPut the givenkeyandvaluein the payload.Put the givenkeyandvaluein the payload.default EventBuilderPut the givenkeyandvaluein the payload.default EventBuilderPut the givenkeyandvaluein the payload.setAttributes(io.opentelemetry.api.common.Attributes attributes) Set the attributes.setContext(io.opentelemetry.context.Context context) Set the context.setSeverity(io.opentelemetry.api.logs.Severity severity) Set the severity.setTimestamp(long timestamp, TimeUnit unit) Set the epochtimestamp, using the timestamp and unit.setTimestamp(Instant instant) Set the epochtimestamp, using the instant.
-
Method Details
-
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
put
Put the givenkeyandvaluein the payload. -
setTimestamp
Set the epochtimestamp, 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 epochtimestamp, 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. -
setContext
Set the context. -
setSeverity
Set the severity. -
setAttributes
Set the attributes.Event
Attributesprovide additional details about the Event which are not part of the well-definedAnyValuepayload. -
emit
void emit()Emit an event.
-