Line data Source code
1 : // Copyright The OpenTelemetry Authors
2 : // SPDX-License-Identifier: Apache-2.0
3 :
4 : part of 'span.dart';
5 :
6 : /// Factory for creating Span instances.
7 : ///
8 : /// This factory class provides a static create method for constructing
9 : /// properly configured Span instances. It follows the factory pattern
10 : /// to separate the construction logic from the Span class itself.
11 : @internal
12 : class SDKSpanCreate {
13 : /// Creates a new Span with the specified delegate and tracer.
14 : ///
15 : /// @param delegateSpan The API Span implementation to delegate to
16 : /// @param sdkTracer The SDK Tracer that created this Span
17 : /// @return A new Span instance
18 48 : static Span create({
19 : required APISpan delegateSpan,
20 : required Tracer sdkTracer,
21 : }) {
22 48 : return Span._(delegateSpan, sdkTracer);
23 : }
24 : }
|