APITracerProvider class

APITracerProvider is the entry point of the OpenTelemetry tracing API. The API prefix indicates that it's part of the API and not the SDK and generally should not be used since an API without an SDK is a noop. Use the TracerProvider from the SDK instead. It provides access to APITracers which are used to trace operations. You cannot create a TracerProvider directly; you must use OTelAPI or more likely OTel, for example to get the default tracer:

var tracerProvider = OTel.tracerProvider();

See OTel for creating tracers in addition to the default. Use OTelAPI to run in no-op mode, as required by the specification.

Properties

enabled bool
Returns whether this tracer provider is enabled.
getter/setter pair
endpoint String
Gets the endpoint URL used by this tracer provider.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isShutdown bool
Returns whether this tracer provider has been shut down.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceName String
Gets the service name used by this tracer provider.
getter/setter pair
serviceVersion String?
Gets the service version used by this tracer provider.
getter/setter pair

Methods

getTracer(String name, {String? version, String? schemaUrl, Attributes? attributes}) APITracer
Returns a APITracer with the given name and version.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() Future<bool>
Shuts down the TracerProvider. After shutdown:
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited