UNPKG

1.93 kBTypeScriptView Raw
1import { AzureMonitorOpenTelemetryOptions as DistroOptions, InstrumentationOptions as DistroInstrumentationOptions } from "@azure/monitor-opentelemetry";
2import { SeverityNumber } from "@opentelemetry/api-logs";
3import { InstrumentationConfig } from "@opentelemetry/instrumentation";
4import { OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base";
5export declare const APPLICATION_INSIGHTS_OPENTELEMETRY_VERSION = "3.4.0";
6export declare const DEFAULT_ROLE_NAME = "Web";
7export declare const AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES";
8/**
9 * Azure Monitor OpenTelemetry Options
10 */
11export interface AzureMonitorOpenTelemetryOptions extends DistroOptions {
12 /**
13 * Sets the state of exception tracking (enabled by default)
14 * if true uncaught exceptions will be sent to Application Insights
15 */
16 enableAutoCollectExceptions?: boolean;
17 /** OTLP Trace Exporter Configuration */
18 otlpTraceExporterConfig?: OTLPExporterConfig;
19 /** OTLP Metric Exporter Configuration */
20 otlpMetricExporterConfig?: OTLPExporterConfig;
21 /** OTLP Log Exporter Configuration */
22 otlpLogExporterConfig?: OTLPExporterConfig;
23 /**
24 * Sets the state of performance tracking (enabled by default)
25 * if true performance counters will be collected every second and sent to Azure Monitor
26 */
27 enableAutoCollectPerformance?: boolean;
28}
29export interface InstrumentationOptions extends DistroInstrumentationOptions {
30 /** Console Instrumentation Config */
31 console?: InstrumentationConfig & {
32 logSendingLevel?: SeverityNumber;
33 };
34}
35/**
36 * OTLP Exporter Options
37 */
38export interface OTLPExporterConfig extends OTLPExporterNodeConfigBase {
39 /** Enable/Disable OTLP Exporter */
40 enabled?: boolean;
41}
42export interface InstrumentationOptionsType {
43 [key: string]: {
44 enabled: boolean;
45 };
46}