addSpanAttribute method

  1. @override
Future<bool> addSpanAttribute(
  1. String spanId,
  2. String key,
  3. String value
)
override

Add an attribute to an active span with the given spanId. Returns true if the attribute is added and false otherwise.

Implementation

@override
Future<bool> addSpanAttribute(String spanId, String key, String value) async {
  throwIfNotStarted();
  return await methodChannel.invokeMethod(_addSpanAttributeMethodName, {
        _spanIdArgName: spanId,
        _keyArgName: key,
        _valueArgName: value,
      }) as bool? ??
      false;
}