OpenTelemetry SDK
    Preparing search index...

    Interface IMetricReader

    Reads metrics from the SDK. Implementations MUST follow the Metric Reader Specification as well as the requirements listed in this interface. Consider extending MetricReader to get a specification-compliant base implementation of this interface

    interface IMetricReader {
        collect(options?: CommonReaderOptions): Promise<CollectionResult>;
        forceFlush(options?: CommonReaderOptions): Promise<void>;
        selectAggregation(instrumentType: InstrumentType): AggregationOption;
        selectAggregationTemporality(
            instrumentType: InstrumentType,
        ): AggregationTemporality;
        selectCardinalityLimit(instrumentType: InstrumentType): number;
        setMetricProducer(metricProducer: MetricProducer): void;
        shutdown(options?: CommonReaderOptions): Promise<void>;
    }

    Implemented by

    Index
    • Flushes metrics read by this reader, the promise will reject after the optional timeout or resolve after completion.

      NOTE: this operation MAY continue even after the promise rejects due to a timeout.

      Parameters

      • Optionaloptions: CommonReaderOptions

        options with timeout.

      Returns Promise<void>

    • Shuts down the metric reader, the promise will reject after the optional timeout or resolve after completion.

      NOTE: this operation MAY continue even after the promise rejects due to a timeout.

      Parameters

      • Optionaloptions: CommonReaderOptions

        options with timeout.

      Returns Promise<void>