OpenTelemetry SDK
    Preparing search index...

    Hierarchy

    • MetricReader
      • PrometheusExporter
    Index
    DEFAULT_OPTIONS: {
        appendTimestamp: boolean;
        endpoint: string;
        host: string;
        port: number;
        prefix: string;
        withoutScopeInfo: boolean;
        withoutTargetInfo: boolean;
        withResourceConstantLabels: undefined;
    } = ...
    • Parameters

      • meterProvider: MeterProvider

      Returns void

    • Collect all metrics from the associated MetricProducer

      Parameters

      • Optionaloptions: CommonReaderOptions

      Returns Promise<CollectionResult>

    • 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>

    • Request handler that responds with the current state of metrics

      Parameters

      • _request: IncomingMessage

        Incoming HTTP request of server instance

      • response: ServerResponse

        HTTP response object used to response to request

      Returns void

    • Handle once the SDK has initialized this MetricReader Overriding this method is optional.

      Returns void

    • Select the AggregationOption for the given InstrumentType for this reader.

      NOTE: implementations MUST be pure

      Parameters

      • instrumentType: InstrumentType

      Returns AggregationOption

    • Select the AggregationTemporality for the given InstrumentType for this reader.

      NOTE: implementations MUST be pure

      Parameters

      • instrumentType: InstrumentType

      Returns AggregationTemporality

    • Select the cardinality limit for the given InstrumentType for this reader.

      NOTE: implementations MUST be pure

      Parameters

      • instrumentType: InstrumentType

      Returns number

    • Set the MetricProducer used by this instance. This should only be called once by the SDK and should be considered internal.

      NOTE: implementations MUST throw when called more than once

      Parameters

      • metricProducer: MetricProducer

      Returns 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>