CompositeMetricExporter class
A composite metric exporter that delegates to multiple exporters.
This exporter implements the fan-out pattern, where metrics are exported to multiple backends simultaneously. It forwards all export, flush, and shutdown operations to each of its delegate exporters.
This is useful for scenarios where you want to send metrics to multiple destinations, such as a local console and a remote collector.
More information: https://opentelemetry.io/docs/specs/otel/metrics/sdk/#metricexporter
- Implemented types
Constructors
-
CompositeMetricExporter(List<
MetricExporter> _exporters) - Creates a new CompositeMetricExporter with the given list of exporters.
Properties
-
exporters
→ List<
MetricExporter> -
The delegate exporters this composite forwards to.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
export(
MetricData data) → Future< bool> -
Exports metrics to all delegate exporters.
override
-
forceFlush(
) → Future< bool> -
Forces a flush of all delegate exporters.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shutdown(
) → Future< bool> -
Shuts down all delegate exporters.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited