startSpan method

  1. @override
Future<String?> startSpan(
  1. String name, {
  2. String? parentSpanId,
  3. int? startTimeMs,
})
override

Create and start a new span. Returns the spanId of the new span if both operations are successful, and null if either fails.

Implementation

@override
Future<String?> startSpan(
  String name, {
  String? parentSpanId,
  int? startTimeMs,
}) async {
  throwIfNotStarted();
  return methodChannel.invokeMethod(_startSpanMethodName, {
    _nameArgName: name,
    _parentSpanIdArgName: parentSpanId,
    _startTimeMsArgName: startTimeMs,
  });
}