Interface EventBuilder
- All Known Implementing Classes:
DefaultEventLogger.NoOpEventBuilder
,SdkEventBuilder
emit()
events.-
Method Summary
Modifier and TypeMethodDescriptionvoid
emit()
Emit an event.default <T> EventBuilder
put
(AttributeKey<T> key, T value) Put the given key and value in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.Put the givenkey
andvalue
in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.default EventBuilder
Put the givenkey
andvalue
in the payload.setAttributes
(Attributes attributes) Set the attributes.setContext
(Context context) Set the context.setSeverity
(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 givenkey
andvalue
in the payload. -
put
Put the givenkey
andvalue
in the payload. -
put
Put the givenkey
andvalue
in the payload. -
put
Put the givenkey
andvalue
in the payload. -
put
Put the givenkey
andvalue
in the payload. -
put
Put the givenkey
andvalue
in the payload. -
put
Put the givenkey
andvalue
in the payload. -
put
Put the givenkey
andvalue
in the payload. -
put
Put the given key and value in the payload.NOTE: The key value pair is NOT added to the event attributes. Setting event attributes is less common than adding entries to the event payload. Use
setAttributes(Attributes)
if intending the data to be set in attributes instead of the payload. -
put
Put the givenkey
andvalue
in the payload. -
setTimestamp
Set the epochtimestamp
, using the timestamp and unit.The
timestamp
is 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
timestamp
is 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
Attributes
provide additional details about the Event which are not part of the well-definedValue
payload. Setting event attributes is less common than adding entries to the event payload. Most users will want to call one of the#put(String, ?)
methods instead. -
emit
void emit()Emit an event.
-