An interface that allows different metric services to export recorded data in their own format.

To export data this MUST be registered to the Metrics SDK with a MetricReader.

interface PushMetricExporter {
    export(
        metrics: metrics.ResourceMetrics,
        resultCallback: (result: core.ExportResult) => void,
    ): void;
    forceFlush(): Promise<void>;
    selectAggregation(
        instrumentType: metrics.InstrumentType,
    ): metrics.AggregationOption;
    selectAggregationTemporality(
        instrumentType: metrics.InstrumentType,
    ): metrics.AggregationTemporality;
    shutdown(): Promise<void>;
}

Implemented by

Methods

  • Ensure that the export of any metrics the exporter has received is completed before the returned promise is settled.

    Returns Promise<void>

  • Returns a promise which resolves when the last exportation is completed. Further calls to PushMetricExporter.export may not export the data.

    Returns Promise<void>