import { TelemetryClient } from "applicationinsights"; import { Metrics, Properties } from "../../models"; export declare class ApplicationInsightsMetrics implements Metrics { private localMetricCache; private client; private defaultProperties?; constructor(client: TelemetryClient, defaultProperties?: Properties); getProperties(): Properties | undefined; /** * Emits a metric event, which sets the value of the metric to the value passed in. Useful for Gauge style metrics. * * @param {string} metricName The target metric name. * @param {number} value The current value of the metric. * @param {Properties | undefined} properties A string/string map of additional properties to describe this metric series. */ set(metricName: string, value: number, properties?: Properties): void; /** * Emits a metric event, which increments the value of the metric by 1. Useful for Counter style metrics. * * @param {string} metricName The target metric name. * @param {Properties | undefined} properties A string/string map of additional properties to describe this metric series. */ increment(metricName: string, properties?: Properties): void; /** * Emits a metric event, which increments the value of the metric by N. Useful for Counter style metrics. * * @param {string} metricName The target metric name. * @param {number} value The amount you want to increment the specified metric * @param {Properties | undefined} properties A string/string map of additional properties to describe this metric series. */ incrementBy(metricName: string, value: number, properties?: Properties): void; /** * Immediately sends any metrics that may not yet have been sent to Application Insights. Call this on program exit or * crash to ensure that all metrics have been remotely recorded. */ flush(): void; addDefaultProperties(properties: Properties): void; private trackMetric; /** * Gets a key for the metric, for use in the in memory store. * * @param {string} metricName name of the metric * @param {Properties} properties key/value pairs of properties to further describe the metric. * @returns {string} the key for use in the memory storage. */ private getKey; }