addEvent

open fun addEvent(name: String): Boolean

Add an EmbraceSpanEvent with the given name at the current time. Returns false if the Event was definitely not successfully added. Returns true if the validation at the Embrace level has passed and the call to add the Event at the OpenTelemetry level was successful.


open fun addEvent(name: String, timestampMs: Long?): Boolean

Add an EmbraceSpanEvent with the given name and timestampMs. Optionally, a set of attributes associated with the event can be passed in. Returns false if the Event was definitely not successfully added. Returns true if the validation at the Embrace level has passed and the call to add the Event at the OpenTelemetry level was successful.


abstract fun addEvent(name: String, timestampMs: Long?, attributes: Map<String, String>?): Boolean

Add an EmbraceSpanEvent with the given name. If timestampMs is null, the current time will be used. Optionally, the specific time of the event and a set of attributes can be passed in associated with the event. Returns false if the Event was definitely not successfully added. Returns true if the validation at the Embrace level has passed and the call to add the Event at the OpenTelemetry level was successful.