EmbraceSpan class abstract

Represents a Span that can be started and stopped with the appropriate ErrorCode if applicable. This wraps the OpenTelemetry Span by adding an additional layer for local validation

Implementers

Constructors

EmbraceSpan(String id)
constructor

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
ID for this span
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAttribute(String key, String value) Future<bool>
Add the given key-value pair as an Attribute to the Event. Returns false if the Attribute was definitely not added. Returns true if the validation at the Embrace Level has passed and the call to add the Attribute at the OpenTelemetry level was successful.
addEvent(String name, {int? timestampMs, Map<String, String>? attributes}) Future<bool>
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stop({ErrorCode? errorCode, int? endTimeMs}) Future<bool>
Stop an active span. Returns true if the span is stopped after the method returns and false otherwise.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited