recordCompletedSpan method

  1. @override
Future<bool> recordCompletedSpan(
  1. String name,
  2. int startTimeMs,
  3. int endTimeMs, {
  4. ErrorCode? errorCode,
  5. String? parentSpanId,
  6. Map<String, String>? attributes,
  7. List<Map<String, dynamic>>? events,
})
override

Record a completed span with the given parameters. Returns true if the span is recorded and false otherwise.

Implementation

@override
Future<bool> recordCompletedSpan(
  String name,
  int startTimeMs,
  int endTimeMs, {
  ErrorCode? errorCode,
  String? parentSpanId,
  Map<String, String>? attributes,
  List<Map<String, dynamic>>? events,
}) async {
  throwIfNotStarted();
  return await methodChannel.invokeMethod(_recordCompletedSpanMethodName, {
    _nameArgName: name,
    _startTimeMsArgName: startTimeMs,
    _endTimeMsArgName: endTimeMs,
    _errorCodeArgName: errorCode?.name,
    _parentSpanIdArgName: parentSpanId,
    _attributesArgName: attributes,
    _eventsArgName: events,
  }) as bool;
}