Line data Source code
1 : // Copyright The OpenTelemetry Authors
2 : // SPDX-License-Identifier: Apache-2.0
3 :
4 : part of 'tracer_provider.dart';
5 :
6 : /// Factory for creating TracerProvider instances.
7 : ///
8 : /// This factory class provides a static create method for constructing
9 : /// properly configured TracerProvider instances. It follows the factory
10 : /// pattern to separate the construction logic from the TracerProvider
11 : /// class itself.
12 : @internal
13 : class SDKTracerProviderCreate {
14 : /// Creates a new TracerProvider with the specified delegate and resource.
15 : ///
16 : /// @param delegate The API TracerProvider implementation to delegate to
17 : /// @param resource Optional Resource describing the entity producing telemetry
18 : /// @return A new TracerProvider instance
19 128 : static TracerProvider create({
20 : required APITracerProvider delegate,
21 : Resource? resource,
22 : }) {
23 128 : return TracerProvider._(delegate: delegate, resource: resource);
24 : }
25 : }
|