Line data Source code
1 : // Licensed under the Apache License, Version 2.0
2 : // Copyright 2025, Michael Bushe, All rights reserved.
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 : class SDKSpanCreate {
12 : /// Creates a new Span with the specified delegate and tracer.
13 : ///
14 : /// @param delegateSpan The API Span implementation to delegate to
15 : /// @param sdkTracer The SDK Tracer that created this Span
16 : /// @return A new Span instance
17 28 : static Span create(
18 : {required APISpan delegateSpan, required Tracer sdkTracer}) {
19 28 : return Span._(delegateSpan, sdkTracer);
20 : }
21 : }
|