applicationinsights
Version:
Microsoft Application Insights module for Node.js
62 lines (61 loc) • 2.65 kB
TypeScript
import { AzureMonitorOpenTelemetryOptions as DistroOptions, InstrumentationOptions as DistroInstrumentationOptions } from "@azure/monitor-opentelemetry";
import { SeverityNumber } from "@opentelemetry/api-logs";
import { InstrumentationConfig } from "@opentelemetry/instrumentation";
import { LogRecordProcessor } from "@opentelemetry/sdk-logs";
import { SpanProcessor } from "@opentelemetry/sdk-trace-base";
import { MetricReader } from "@opentelemetry/sdk-metrics";
import { OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base";
export declare const APPLICATION_INSIGHTS_OPENTELEMETRY_VERSION = "3.14.0";
export declare const DEFAULT_ROLE_NAME = "Web";
export declare const AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES";
/**
* Azure Monitor OpenTelemetry Options
*/
export interface AzureMonitorOpenTelemetryOptions extends DistroOptions {
/**
* Sets the state of exception tracking (enabled by default)
* if true uncaught exceptions will be sent to Application Insights
*/
enableAutoCollectExceptions?: boolean;
/** Additional span processors to register */
spanProcessors?: SpanProcessor[];
/** Additional log record processors to register */
logRecordProcessors?: LogRecordProcessor[];
/** OTLP Trace Exporter Configuration */
otlpTraceExporterConfig?: OTLPExporterConfig;
/** OTLP Metric Exporter Configuration */
otlpMetricExporterConfig?: OTLPExporterConfig;
/** OTLP Log Exporter Configuration */
otlpLogExporterConfig?: OTLPExporterConfig;
/** Additional metric readers to register */
metricReaders?: MetricReader[];
/**
* Sets the state of performance tracking (enabled by default)
* if true performance counters will be collected every second and sent to Azure Monitor
*/
enableAutoCollectPerformance?: boolean;
enableAutoCollectDependencies?: boolean;
enableAutoCollectRequests?: boolean;
}
export interface InstrumentationOptions extends DistroInstrumentationOptions {
/** Console Instrumentation Config */
console?: InstrumentationConfig & {
logSendingLevel?: SeverityNumber;
};
/** Bunyan Instrumentation Config */
bunyan?: InstrumentationConfig;
/** Winston Instrumentation Config */
winston?: InstrumentationConfig;
}
/**
* OTLP Exporter Options
*/
export interface OTLPExporterConfig extends OTLPExporterNodeConfigBase {
/** Enable/Disable OTLP Exporter */
enabled?: boolean;
}
export interface InstrumentationOptionsType {
[key: string]: {
enabled: boolean;
};
}