addSpanEvent method

  1. @override
Future<bool> addSpanEvent(
  1. String spanId,
  2. String name, {
  3. int? timestampMs,
  4. Map<String, String>? attributes,
})
override

Create and add a Span Event with the given parameters to an active span with the given spanId. Returns false if the event cannot be added.

Implementation

@override
Future<bool> addSpanEvent(
  String spanId,
  String name, {
  int? timestampMs,
  Map<String, String>? attributes,
}) async {
  throwIfNotStarted();
  return await methodChannel.invokeMethod(_addSpanEventMethodName, {
    _spanIdArgName: spanId,
    _nameArgName: name,
    _timestampMsArgName: timestampMs,
    _attributesArgName: attributes
  }) as bool;
}