import { Client } from './client.js'; import { SampleRate } from '../types/sample-rate.js'; import type { TelemetryMeasurements, TelemetryProperties } from '../types/index.js'; /** * */ declare class ApplicationInsightClient extends Client { private readonly clients; /** * * @param applicationKey Application key to identify the Azure Application Insight resource * @param extensionName Unique name of the extension in the format of {publisher}.{extension} * @param extensionVersion Conventional version number of the extension */ constructor(applicationKey: string, extensionName: string, extensionVersion: string); /** * Send a telemetry event to Azure Application Insights. This API makes sure the telemetry event * is flushed to Azure backend before executing the next statement. Since this API blocks * normal execution flow, please use this API cautiously. See `report()` method for non-blocking * usage. * * @param eventName Categorize the type of the event within the scope of an extension. * @param properties A set of string properties to be reported * @param measurements A set of numeric measurements to be reported * @param sampleRate Sampling the event to be sent * @param ignoreSettings Ignore telemetryEnabled settings and skip submitting telemetry data * @returns Promise */ reportBlocking(eventName: string, properties: TelemetryProperties, measurements: TelemetryMeasurements, sampleRate: SampleRate | undefined, ignoreSettings?: boolean): Promise; /** * Send a telemetry event to Azure Application Insights. The telemetry event sending is still non-blocking * in this API. To make sure telemetry event is sent to Azure backend before next statement, please see * `reportBlocking()`. * * @param eventName Categorize the type of the event within the scope of an extension. * @param properties A set of string properties to be reported * @param measurements A set of numeric measurements to be reported * @param sampleRate Sampling the event to be sent * @param telemetryHelperProperties Properties that are passed to specific TelemetryClient for generating specific properties (E.g. ToolsSuiteTelemetryClient) * @param ignoreSettings Ignore telemetryEnabled settings and skip submitting telemetry data */ report(eventName: string, properties: TelemetryProperties, measurements: TelemetryMeasurements, sampleRate: SampleRate | undefined, telemetryHelperProperties?: { [key: string]: string; }, ignoreSettings?: boolean): Promise; /** * Provide specification of telemetry event to be sent. * * @param eventName Categorize the type of the event within the scope of an extension. * @param properties A set of string properties to be reported * @param measurements A set of numeric measurements to be reported * @param sampleRate Sampling the event to be sent * @returns TelemetryClient instance and telemetry event */ private prepareClientAndEvent; /** * Send telemetry event in blocking style. It blocks * the subsequent statements until telemetry event has been sent. * * @param client TelemetryClient instance * @param event Telemetry event * @returns Promise */ private trackEventBlocking; /** * Send teleemtry event in non-blocking fashion. * * @param client Telemetry client instance * @param event Telemetry event * @returns Send telemetry succeeded or not */ private trackEvent; /** * Create telemetry client instance based on sample rate. * * @param sampleRate Sampling telemetry event * @returns Telemetry client instance */ private createTelemetryClient; } export { ApplicationInsightClient }; //# sourceMappingURL=azure-appinsight-client.d.ts.map