@azure/monitor-opentelemetry 1.18.1 → 1.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +5 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/metrics/handler.d.ts.map +1 -1
- package/dist/commonjs/metrics/handler.js +2 -3
- package/dist/commonjs/metrics/handler.js.map +1 -1
- package/dist/commonjs/metrics/quickpulse/export/sender.d.ts +10 -0
- package/dist/commonjs/metrics/quickpulse/export/sender.d.ts.map +1 -1
- package/dist/commonjs/metrics/quickpulse/export/sender.js +37 -8
- package/dist/commonjs/metrics/quickpulse/export/sender.js.map +1 -1
- package/dist/commonjs/metrics/quickpulse/filtering/filter.d.ts.map +1 -1
- package/dist/commonjs/metrics/quickpulse/filtering/filter.js +2 -5
- package/dist/commonjs/metrics/quickpulse/filtering/filter.js.map +1 -1
- package/dist/commonjs/metrics/quickpulse/liveMetrics.d.ts +4 -2
- package/dist/commonjs/metrics/quickpulse/liveMetrics.d.ts.map +1 -1
- package/dist/commonjs/metrics/quickpulse/liveMetrics.js +71 -16
- package/dist/commonjs/metrics/quickpulse/liveMetrics.js.map +1 -1
- package/dist/commonjs/metrics/quickpulse/redirectUtils.d.ts +28 -0
- package/dist/commonjs/metrics/quickpulse/redirectUtils.d.ts.map +1 -0
- package/dist/commonjs/metrics/quickpulse/redirectUtils.js +80 -0
- package/dist/commonjs/metrics/quickpulse/redirectUtils.js.map +1 -0
- package/dist/commonjs/metrics/quickpulse/utils.d.ts.map +1 -1
- package/dist/commonjs/metrics/quickpulse/utils.js.map +1 -1
- package/dist/commonjs/metrics/standardMetrics.js.map +1 -1
- package/dist/commonjs/traces/handler.d.ts +12 -0
- package/dist/commonjs/traces/handler.d.ts.map +1 -1
- package/dist/commonjs/traces/handler.js +30 -1
- package/dist/commonjs/traces/handler.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/types.d.ts +1 -1
- package/dist/commonjs/types.js +1 -1
- package/dist/commonjs/types.js.map +1 -1
- package/dist/commonjs/utils/azureSdkTracingBridge.d.ts +18 -0
- package/dist/commonjs/utils/azureSdkTracingBridge.d.ts.map +1 -0
- package/dist/commonjs/utils/azureSdkTracingBridge.js +35 -0
- package/dist/commonjs/utils/azureSdkTracingBridge.js.map +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/metrics/handler.d.ts.map +1 -1
- package/dist/esm/metrics/handler.js +2 -3
- package/dist/esm/metrics/handler.js.map +1 -1
- package/dist/esm/metrics/quickpulse/export/sender.d.ts +10 -0
- package/dist/esm/metrics/quickpulse/export/sender.d.ts.map +1 -1
- package/dist/esm/metrics/quickpulse/export/sender.js +37 -8
- package/dist/esm/metrics/quickpulse/export/sender.js.map +1 -1
- package/dist/esm/metrics/quickpulse/filtering/filter.d.ts.map +1 -1
- package/dist/esm/metrics/quickpulse/filtering/filter.js +2 -5
- package/dist/esm/metrics/quickpulse/filtering/filter.js.map +1 -1
- package/dist/esm/metrics/quickpulse/liveMetrics.d.ts +4 -2
- package/dist/esm/metrics/quickpulse/liveMetrics.d.ts.map +1 -1
- package/dist/esm/metrics/quickpulse/liveMetrics.js +71 -16
- package/dist/esm/metrics/quickpulse/liveMetrics.js.map +1 -1
- package/dist/esm/metrics/quickpulse/redirectUtils.d.ts +28 -0
- package/dist/esm/metrics/quickpulse/redirectUtils.d.ts.map +1 -0
- package/dist/esm/metrics/quickpulse/redirectUtils.js +76 -0
- package/dist/esm/metrics/quickpulse/redirectUtils.js.map +1 -0
- package/dist/esm/metrics/quickpulse/utils.d.ts.map +1 -1
- package/dist/esm/metrics/quickpulse/utils.js.map +1 -1
- package/dist/esm/metrics/standardMetrics.js.map +1 -1
- package/dist/esm/traces/handler.d.ts +12 -0
- package/dist/esm/traces/handler.d.ts.map +1 -1
- package/dist/esm/traces/handler.js +29 -1
- package/dist/esm/traces/handler.js.map +1 -1
- package/dist/esm/types.d.ts +1 -1
- package/dist/esm/types.js +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/azureSdkTracingBridge.d.ts +18 -0
- package/dist/esm/utils/azureSdkTracingBridge.d.ts.map +1 -0
- package/dist/esm/utils/azureSdkTracingBridge.js +34 -0
- package/dist/esm/utils/azureSdkTracingBridge.js.map +1 -0
- package/package.json +29 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveMetrics.js","sourceRoot":"","sources":["../../../../src/metrics/quickpulse/liveMetrics.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AAKzB,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAI1F,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAclE,OAAO,EACL,cAAc,EACd,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAS9D,OAAO,EAAE,kCAAkC,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEv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AAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,WAAW,GAAiC;wBAChD,gCAAgC,EAAE,SAAS;wBAC3C,OAAO,EAAE,EAAE;wBACX,aAAa,EAAE,EAAE;wBACjB,IAAI,EAAE,EAAE;qBACT,CAAC;oBACF,IAAI,KAAK,YAAY,0BAA0B,EAAE,CAAC;wBAChD,WAAW,CAAC,gCAAgC,GAAG,uBAAuB,CAAC;wBAEvE,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;4BAC3B,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;4BACpC,WAAW,CAAC,aAAa,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;wBAChD,CAAC;wBACD,MAAM,SAAS,GAA+B,EAAE,CAAC;wBACjD,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,iBAAiB,CAAC,EAAE,EAAE,CAAC,CAAC;wBACjE,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;wBAClD,WAAW,CAAC,IAAI,GAAG,SAAS,CAAC;wBAC7B,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;oBACjD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport os from \"node:os\";\nimport type {\n MeterProviderOptions,\n PeriodicExportingMetricReaderOptions,\n} from \"@opentelemetry/sdk-metrics\";\nimport { MeterProvider, PeriodicExportingMetricReader } from \"@opentelemetry/sdk-metrics\";\nimport type { SdkLogRecord } from \"@opentelemetry/sdk-logs\";\nimport type { InternalConfig } from \"../../shared/config.js\";\nimport type { Meter, ObservableGauge, ObservableResult } from \"@opentelemetry/api\";\nimport { SpanKind, SpanStatusCode, ValueType, context } from \"@opentelemetry/api\";\nimport type { ReadableSpan, TimedEvent } from \"@opentelemetry/sdk-trace-base\";\nimport { RandomIdGenerator } from \"@opentelemetry/sdk-trace-base\";\nimport type {\n DocumentIngress,\n Exception,\n MonitoringDataPoint,\n IsSubscribedOptionalParams,\n RemoteDependency,\n Request,\n Trace,\n KeyValuePairStringString,\n DerivedMetricInfo,\n FilterConjunctionGroupInfo,\n} from \"../../generated/index.js\";\nimport type { QuickpulseResponse } from \"./export/sender.js\";\nimport {\n getLogDocument,\n getSdkVersion,\n getSpanData,\n getLogData,\n getSpanDocument,\n getTransmissionTime,\n isRequestData,\n getSpanExceptionColumns,\n isExceptionData,\n isDependencyData,\n} from \"./utils.js\";\nimport { QuickpulseMetricExporter } from \"./export/exporter.js\";\nimport { QuickpulseSender } from \"./export/sender.js\";\nimport { ConnectionStringParser } from \"../../utils/connectionStringParser.js\";\nimport { DEFAULT_LIVEMETRICS_ENDPOINT } from \"../../types.js\";\nimport type {\n QuickpulseExporterOptions,\n RequestData,\n DependencyData,\n TraceData,\n ExceptionData,\n TelemetryData,\n} from \"./types.js\";\nimport { QuickPulseOpenTelemetryMetricNames } from \"./types.js\";\nimport { hrTimeToMilliseconds, suppressTracing } from \"@opentelemetry/core\";\nimport { getInstance } from \"../../utils/statsbeat.js\";\nimport type { CollectionConfigurationError } from \"../../generated/index.js\";\nimport { Filter } from \"./filtering/filter.js\";\nimport { Validator } from \"./filtering/validator.js\";\nimport { CollectionConfigurationErrorTracker } from \"./filtering/collectionConfigurationErrorTracker.js\";\nimport { Projection } from \"./filtering/projection.js\";\nimport {\n TelemetryTypeError,\n UnexpectedFilterCreateError,\n DuplicateMetricIdError,\n MetricFailureToCreateError,\n} from \"./filtering/quickpulseErrors.js\";\nimport { SEMATTRS_EXCEPTION_TYPE } from \"@opentelemetry/semantic-conventions\";\nimport { getPhysicalMemory, getProcessorTimeNormalized } from \"../utils.js\";\nimport { getCloudRole, getCloudRoleInstance } from \"../utils.js\";\nimport { Logger } from \"../../shared/logging/logger.js\";\n\nconst POST_INTERVAL = 1000;\nconst MAX_POST_WAIT_TIME = 20000;\nconst PING_INTERVAL = 5000;\nconst MAX_PING_WAIT_TIME = 60000;\nconst FALLBACK_INTERVAL = 60000;\n\n/**\n * Azure Monitor Live Metrics\n * @internal\n */\nexport class LiveMetrics {\n private config: InternalConfig;\n private meterProvider: MeterProvider | undefined;\n private metricReader: PeriodicExportingMetricReader | undefined;\n private meter: Meter | undefined;\n private requestDurationGauge: ObservableGauge | undefined;\n private dependencyDurationGauge: ObservableGauge | undefined;\n private requestRateGauge: ObservableGauge | undefined;\n private requestFailedRateGauge: ObservableGauge | undefined;\n private dependencyRateGauge: ObservableGauge | undefined;\n private dependencyFailedRateGauge: ObservableGauge | undefined;\n private processPhysicalBytesGauge: ObservableGauge | undefined;\n private percentProcessorTimeNormalizedGauge: ObservableGauge | undefined;\n private exceptionsRateGauge: ObservableGauge | undefined;\n\n private documents: DocumentIngress[] = [];\n private pingInterval: number;\n private postInterval: number;\n private quickpulseExporter: QuickpulseMetricExporter;\n private pingSender: QuickpulseSender;\n private isCollectingData: boolean;\n private lastSuccessTime: number = Date.now();\n private handle: NodeJS.Timer;\n // Monitoring data point with common properties\n private baseMonitoringDataPoint: MonitoringDataPoint;\n private totalRequestCount = 0;\n private totalFailedRequestCount = 0;\n private totalDependencyCount = 0;\n private totalFailedDependencyCount = 0;\n private totalExceptionCount = 0;\n private requestDuration = 0;\n private dependencyDuration = 0;\n private lastRequestDuration: { count: number; duration: number; time: number } = {\n count: 0,\n duration: 0,\n time: 0,\n };\n private lastRequestRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastFailedRequestRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastDependencyDuration: { count: number; duration: number; time: number } = {\n count: 0,\n duration: 0,\n time: 0,\n };\n private lastDependencyRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastFailedDependencyRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastExceptionRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastCpuUsage: NodeJS.CpuUsage;\n private lastHrTime: bigint;\n private statsbeatOptionsUpdated = false;\n private etag: string = \"\";\n private errorTracker: CollectionConfigurationErrorTracker =\n new CollectionConfigurationErrorTracker();\n // For tracking of duplicate metric ids in the same configuration.\n private seenMetricIds: Set<string> = new Set();\n private validDerivedMetrics: Map<string, DerivedMetricInfo[]> = new Map();\n private derivedMetricProjection: Projection = new Projection();\n private validator: Validator = new Validator();\n private filter: Filter = new Filter();\n // type: Map<telemetryType, Map<id, FilterConjunctionGroupInfo[]>>\n private validDocumentFilterConjuctionGroupInfos: Map<\n string,\n Map<string, FilterConjunctionGroupInfo[]>\n > = new Map();\n /**\n * Initializes a new instance of the StandardMetrics class.\n * @param config - Distro configuration.\n * @param options - Standard Metrics options.\n */\n constructor(config: InternalConfig) {\n this.config = config;\n const idGenerator = new RandomIdGenerator();\n const streamId = idGenerator.generateTraceId();\n const machineName = os.hostname();\n const instance = getCloudRoleInstance(this.config.resource);\n const roleName = getCloudRole(this.config.resource);\n const version = getSdkVersion();\n this.baseMonitoringDataPoint = {\n version: version,\n invariantVersion: 5, // 5 means we support live metrics filtering of metrics and documents\n instance: instance,\n roleName: roleName,\n machineName: machineName,\n streamId: streamId,\n performanceCollectionSupported: true,\n isWebApp: process.env[\"WEBSITE_SITE_NAME\"] ? true : false,\n };\n const parsedConnectionString = ConnectionStringParser.parse(\n this.config.azureMonitorExporterOptions.connectionString ||\n process.env[\"APPLICATIONINSIGHTS_CONNECTION_STRING\"],\n );\n this.pingSender = new QuickpulseSender({\n endpointUrl: parsedConnectionString.liveendpoint || DEFAULT_LIVEMETRICS_ENDPOINT,\n instrumentationKey: parsedConnectionString.instrumentationkey || \"\",\n credential: this.config.azureMonitorExporterOptions.credential,\n credentialScopes:\n parsedConnectionString.aadaudience ||\n this.config.azureMonitorExporterOptions.credentialScopes,\n });\n const exporterOptions: QuickpulseExporterOptions = {\n endpointUrl: parsedConnectionString.liveendpoint || DEFAULT_LIVEMETRICS_ENDPOINT,\n instrumentationKey: parsedConnectionString.instrumentationkey || \"\",\n credential: this.config.azureMonitorExporterOptions.credential,\n credentialScopes:\n parsedConnectionString.aadaudience ||\n this.config.azureMonitorExporterOptions.credentialScopes,\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n postCallback: this.quickPulseDone.bind(this),\n getDocumentsFn: this.getDocuments.bind(this),\n getErrorsFn: this.getErrors.bind(this),\n getDerivedMetricValuesFn: this.getDerivedMetricValues.bind(this),\n baseMonitoringDataPoint: this.baseMonitoringDataPoint,\n };\n this.quickpulseExporter = new QuickpulseMetricExporter(exporterOptions);\n this.isCollectingData = false;\n this.pingInterval = PING_INTERVAL; // Default\n this.postInterval = POST_INTERVAL;\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n this.handle = <any>setTimeout(this.goQuickpulse.bind(this), this.pingInterval);\n this.handle.unref(); // Don't block apps from terminating\n this.lastCpuUsage = process.cpuUsage();\n this.lastHrTime = process.hrtime.bigint();\n }\n\n public shutdown(): void {\n this.meterProvider?.shutdown();\n }\n\n private async goQuickpulse(): Promise<void> {\n if (!this.isCollectingData) {\n // If not collecting, Ping\n try {\n const params: IsSubscribedOptionalParams = {\n transmissionTime: getTransmissionTime(),\n monitoringDataPoint: this.baseMonitoringDataPoint,\n configurationEtag: this.etag,\n };\n await context.with(suppressTracing(context.active()), async () => {\n const response = await this.pingSender.isSubscribed(params);\n this.quickPulseDone(response);\n });\n } catch (error) {\n this.quickPulseDone(undefined);\n }\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n this.handle = <any>setTimeout(this.goQuickpulse.bind(this), this.pingInterval);\n this.handle.unref();\n }\n if (this.isCollectingData) {\n this.activateMetrics({ collectionInterval: this.postInterval });\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n private async quickPulseDone(response: QuickpulseResponse | undefined): Promise<void> {\n if (!response) {\n if (!this.isCollectingData) {\n if (Date.now() - this.lastSuccessTime >= MAX_PING_WAIT_TIME) {\n this.pingInterval = FALLBACK_INTERVAL;\n }\n } else {\n if (Date.now() - this.lastSuccessTime >= MAX_POST_WAIT_TIME) {\n this.postInterval = FALLBACK_INTERVAL;\n this.deactivateMetrics();\n this.activateMetrics({ collectionInterval: this.postInterval });\n }\n }\n } else {\n this.postInterval = POST_INTERVAL;\n // Update using response if needed\n this.lastSuccessTime = Date.now();\n this.isCollectingData =\n response.xMsQpsSubscribed && response.xMsQpsSubscribed === \"true\" ? true : false;\n if (response.xMsQpsConfigurationEtag && this.etag !== response.xMsQpsConfigurationEtag) {\n this.updateConfiguration(response);\n }\n\n // If collecting was stoped\n if (!this.isCollectingData && this.meterProvider) {\n this.etag = \"\";\n this.deactivateMetrics();\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n this.handle = <any>setTimeout(this.goQuickpulse.bind(this), this.pingInterval);\n this.handle.unref();\n }\n\n const endpointRedirect = response.xMsQpsServiceEndpointRedirectV2;\n if (endpointRedirect) {\n this.pingSender.handlePermanentRedirect(endpointRedirect);\n this.quickpulseExporter.getSender().handlePermanentRedirect(endpointRedirect);\n }\n const pollingInterval = response.xMsQpsServicePollingIntervalHint;\n if (pollingInterval) {\n this.pingInterval = Number(pollingInterval);\n } else {\n this.pingInterval = PING_INTERVAL;\n }\n }\n }\n\n // Activate live metrics collection\n public activateMetrics(options?: { collectionInterval: number }): void {\n if (this.meterProvider) {\n return;\n }\n // Turn on live metrics active collection for statsbeat\n if (!this.statsbeatOptionsUpdated) {\n getInstance().setStatsbeatFeatures({}, { liveMetrics: true });\n this.statsbeatOptionsUpdated = true;\n }\n this.totalDependencyCount = 0;\n this.totalExceptionCount = 0;\n this.totalFailedDependencyCount = 0;\n this.totalFailedRequestCount = 0;\n this.totalRequestCount = 0;\n this.requestDuration = 0;\n this.dependencyDuration = 0;\n this.lastRequestDuration = { count: 0, duration: 0, time: 0 };\n this.lastRequestRate = { count: 0, time: 0 };\n this.lastFailedRequestRate = { count: 0, time: 0 };\n this.lastDependencyDuration = { count: 0, duration: 0, time: 0 };\n this.lastDependencyRate = { count: 0, time: 0 };\n this.lastFailedDependencyRate = { count: 0, time: 0 };\n this.lastExceptionRate = { count: 0, time: 0 };\n\n const metricReaderOptions: PeriodicExportingMetricReaderOptions = {\n exporter: this.quickpulseExporter,\n exportIntervalMillis: options?.collectionInterval,\n };\n this.metricReader = new PeriodicExportingMetricReader(metricReaderOptions);\n const meterProviderConfig: MeterProviderOptions = {\n resource: this.config.resource,\n readers: [this.metricReader],\n };\n this.meterProvider = new MeterProvider(meterProviderConfig);\n this.meter = this.meterProvider.getMeter(\"AzureMonitorLiveMetricsMeter\");\n this.requestDurationGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.REQUEST_DURATION,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.requestRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.REQUEST_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.requestFailedRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.REQUEST_FAILURE_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.dependencyDurationGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.DEPENDENCY_DURATION,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.dependencyRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.DEPENDENCY_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.dependencyFailedRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.DEPENDENCY_FAILURE_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n\n this.processPhysicalBytesGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.PHYSICAL_BYTES,\n {\n valueType: ValueType.INT,\n },\n );\n\n this.percentProcessorTimeNormalizedGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.PROCESSOR_TIME_NORMALIZED,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.exceptionsRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.EXCEPTION_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n\n this.requestDurationGauge.addCallback(this.getRequestDuration.bind(this));\n this.requestRateGauge.addCallback(this.getRequestRate.bind(this));\n this.requestFailedRateGauge.addCallback(this.getRequestFailedRate.bind(this));\n this.dependencyDurationGauge.addCallback(this.getDependencyDuration.bind(this));\n this.dependencyRateGauge.addCallback(this.getDependencyRate.bind(this));\n this.dependencyFailedRateGauge.addCallback(this.getDependencyFailedRate.bind(this));\n this.exceptionsRateGauge.addCallback(this.getExceptionRate.bind(this));\n this.processPhysicalBytesGauge.addCallback(this.getPhysicalMemory.bind(this));\n this.percentProcessorTimeNormalizedGauge.addCallback(\n this.getProcessorTimeNormalized.bind(this),\n );\n }\n\n /**\n * Deactivate metric collection\n */\n public deactivateMetrics(): void {\n this.documents = [];\n this.validDocumentFilterConjuctionGroupInfos.clear();\n this.errorTracker.clearRunTimeErrors();\n this.errorTracker.clearValidationTimeErrors();\n this.validDerivedMetrics.clear();\n this.derivedMetricProjection.clearProjectionMaps();\n this.seenMetricIds.clear();\n this.meterProvider?.shutdown();\n this.meterProvider = undefined;\n }\n\n /**\n * Force flush Meter Provider.\n */\n public async flush(): Promise<void> {\n await this.meterProvider?.forceFlush();\n }\n\n /**\n *Get OpenTelemetry MeterProvider\n */\n public getMeterProvider(): MeterProvider | undefined {\n return this.meterProvider;\n }\n\n public getDocuments(): DocumentIngress[] {\n const result: DocumentIngress[] = this.documents;\n this.documents = [];\n return result;\n }\n\n public getErrors(): CollectionConfigurationError[] {\n const result = this.errorTracker.getErrors();\n this.errorTracker.clearRunTimeErrors();\n return result;\n }\n\n public getDerivedMetricValues(): Map<string, number> {\n return this.derivedMetricProjection.getMetricValues();\n }\n\n private addDocument(document: DocumentIngress): void {\n if (document) {\n // Limit risk of memory leak by limiting doc length to something manageable\n if (this.documents.length > 20) {\n this.documents.shift(); // Remove oldest document\n }\n this.documents.push(document);\n }\n }\n\n /**\n * Record Span metrics\n * @internal\n */\n public recordSpan(span: ReadableSpan): void {\n if (this.isCollectingData) {\n const columns: RequestData | DependencyData = getSpanData(span);\n let documentConfiguration: Map<string, FilterConjunctionGroupInfo[]>;\n let derivedMetricInfos: DerivedMetricInfo[];\n if (isRequestData(columns)) {\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Request\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n derivedMetricInfos = this.validDerivedMetrics.get(\"Request\") || [];\n } else {\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Dependency\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n derivedMetricInfos = this.validDerivedMetrics.get(\"Dependency\") || [];\n }\n this.applyDocumentFilters(documentConfiguration, columns);\n this.checkMetricFilterAndCreateProjection(derivedMetricInfos, columns);\n\n const durationMs = hrTimeToMilliseconds(span.duration);\n const success = span.status.code !== SpanStatusCode.ERROR;\n\n if (span.kind === SpanKind.SERVER || span.kind === SpanKind.CONSUMER) {\n this.totalRequestCount++;\n this.requestDuration += durationMs;\n if (!success) {\n this.totalFailedRequestCount++;\n }\n } else {\n this.totalDependencyCount++;\n this.dependencyDuration += durationMs;\n if (!success) {\n this.totalFailedDependencyCount++;\n }\n }\n if (span.events) {\n span.events.forEach((event: TimedEvent) => {\n event.attributes = event.attributes || {};\n if (event.name === \"exception\") {\n const exceptionColumns: ExceptionData = getSpanExceptionColumns(\n event.attributes,\n span.attributes,\n );\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Exception\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n this.applyDocumentFilters(\n documentConfiguration,\n exceptionColumns,\n event.attributes[SEMATTRS_EXCEPTION_TYPE] as string,\n );\n derivedMetricInfos = this.validDerivedMetrics.get(\"Exception\") || [];\n this.checkMetricFilterAndCreateProjection(derivedMetricInfos, exceptionColumns);\n this.totalExceptionCount++;\n }\n });\n }\n }\n }\n\n /**\n * Record LogRecord metrics, add attribute so data is not aggregated again in ingestion\n * @internal\n */\n public recordLog(logRecord: SdkLogRecord): void {\n if (this.isCollectingData) {\n const columns: TraceData | ExceptionData = getLogData(logRecord);\n let derivedMetricInfos: DerivedMetricInfo[];\n let documentConfiguration: Map<string, FilterConjunctionGroupInfo[]>;\n if (isExceptionData(columns)) {\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Exception\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n this.applyDocumentFilters(\n documentConfiguration,\n columns,\n logRecord.attributes[SEMATTRS_EXCEPTION_TYPE] as string,\n );\n derivedMetricInfos = this.validDerivedMetrics.get(\"Exception\") || [];\n this.totalExceptionCount++;\n } else {\n // trace\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Trace\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n this.applyDocumentFilters(documentConfiguration, columns);\n derivedMetricInfos = this.validDerivedMetrics.get(\"Trace\") || [];\n }\n this.checkMetricFilterAndCreateProjection(derivedMetricInfos, columns);\n }\n }\n\n private getRequestDuration(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const requestInterval = this.totalRequestCount - this.lastRequestDuration.count || 0;\n const durationInterval = this.requestDuration - this.lastRequestDuration.duration || 0;\n const elapsedMs = currentTime - this.lastRequestDuration.time;\n if (elapsedMs > 0) {\n const averageExecutionTime = durationInterval / requestInterval || 0; // default to 0 in case no requests in this interval\n observableResult.observe(averageExecutionTime);\n }\n this.lastRequestDuration = {\n count: this.totalRequestCount,\n duration: this.requestDuration,\n time: currentTime,\n };\n }\n\n private getRequestRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalRequests = this.totalRequestCount - this.lastRequestRate.count || 0;\n const elapsedMs = currentTime - this.lastRequestRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalRequests / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastRequestRate = {\n count: this.totalRequestCount,\n time: currentTime,\n };\n }\n\n private getRequestFailedRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalRequests = this.totalFailedRequestCount - this.lastFailedRequestRate.count || 0;\n const elapsedMs = currentTime - this.lastFailedRequestRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalRequests / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastFailedRequestRate = {\n count: this.totalFailedRequestCount,\n time: currentTime,\n };\n }\n\n private getDependencyDuration(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const dependencyInterval = this.totalDependencyCount - this.lastDependencyDuration.count || 0;\n const durationInterval = this.dependencyDuration - this.lastDependencyDuration.duration || 0;\n const elapsedMs = currentTime - this.lastDependencyDuration.time;\n if (elapsedMs > 0) {\n const averageExecutionTime = durationInterval / dependencyInterval || 0; // default to 0 in case no dependencies in this interval\n observableResult.observe(averageExecutionTime);\n }\n this.lastDependencyDuration = {\n count: this.totalDependencyCount,\n duration: this.dependencyDuration,\n time: currentTime,\n };\n }\n\n private getDependencyRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalData = this.totalDependencyCount - this.lastDependencyRate.count || 0;\n const elapsedMs = currentTime - this.lastDependencyRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalData / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastDependencyRate = {\n count: this.totalDependencyCount,\n time: currentTime,\n };\n }\n\n private getDependencyFailedRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalData = this.totalFailedDependencyCount - this.lastFailedDependencyRate.count || 0;\n const elapsedMs = currentTime - this.lastFailedDependencyRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalData / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastFailedDependencyRate = {\n count: this.totalFailedDependencyCount,\n time: currentTime,\n };\n }\n\n private getExceptionRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalData = this.totalExceptionCount - this.lastExceptionRate.count || 0;\n const elapsedMs = currentTime - this.lastExceptionRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalData / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastExceptionRate = {\n count: this.totalExceptionCount,\n time: currentTime,\n };\n }\n\n private getPhysicalMemory(observableResult: ObservableResult): void {\n const rss = getPhysicalMemory();\n observableResult.observe(rss);\n }\n\n private getProcessorTimeNormalized(observableResult: ObservableResult): void {\n if (process && process.hrtime) {\n const cpuUsagePercent = getProcessorTimeNormalized(this.lastHrTime, this.lastCpuUsage);\n observableResult.observe(cpuUsagePercent);\n this.lastHrTime = process.hrtime.bigint();\n this.lastCpuUsage = process.cpuUsage();\n } else {\n Logger.getInstance().debug(\"Getting Normalized Processor Time Failed. No process available.\");\n }\n }\n\n private updateConfiguration(response: QuickpulseResponse): void {\n this.etag = response.xMsQpsConfigurationEtag || \"\";\n this.quickpulseExporter.setEtag(this.etag);\n this.errorTracker.clearValidationTimeErrors();\n this.validDocumentFilterConjuctionGroupInfos.clear();\n this.validDerivedMetrics.clear();\n this.derivedMetricProjection.clearProjectionMaps();\n this.seenMetricIds.clear();\n\n this.parseDocumentFilterConfiguration(response);\n this.parseMetricFilterConfiguration(response);\n }\n\n private parseDocumentFilterConfiguration(response: QuickpulseResponse): void {\n if (!response?.documentStreams || typeof response.documentStreams.forEach !== \"function\") {\n return;\n }\n response.documentStreams.forEach((documentStreamInfo) => {\n documentStreamInfo.documentFilterGroups.forEach((documentFilterGroupInfo) => {\n try {\n this.validator.validateTelemetryType(documentFilterGroupInfo.telemetryType);\n this.validator.validateDocumentFilters(documentFilterGroupInfo);\n this.filter.renameExceptionFieldNamesForFiltering(documentFilterGroupInfo.filters);\n\n if (\n !this.validDocumentFilterConjuctionGroupInfos.has(documentFilterGroupInfo.telemetryType)\n ) {\n this.validDocumentFilterConjuctionGroupInfos.set(\n documentFilterGroupInfo.telemetryType,\n new Map<string, FilterConjunctionGroupInfo[]>(),\n );\n }\n\n const innerMap = this.validDocumentFilterConjuctionGroupInfos.get(\n documentFilterGroupInfo.telemetryType,\n );\n if (!innerMap?.has(documentStreamInfo.id)) {\n innerMap?.set(documentStreamInfo.id, [documentFilterGroupInfo.filters]);\n } else {\n innerMap.get(documentStreamInfo.id)?.push(documentFilterGroupInfo.filters);\n }\n } catch (error) {\n const configError: CollectionConfigurationError = {\n collectionConfigurationErrorType: \"Unknown\",\n message: \"\",\n fullException: \"\",\n data: [],\n };\n if (error instanceof TelemetryTypeError) {\n configError.collectionConfigurationErrorType =\n \"CollectionConfigurationFailureToCreateUnexpected\";\n } else if (error instanceof UnexpectedFilterCreateError) {\n configError.collectionConfigurationErrorType =\n \"DocumentStreamFailureToCreateFilterUnexpected\";\n }\n\n if (error instanceof Error) {\n configError.message = error.message;\n configError.fullException = error.stack || \"\";\n }\n const data: KeyValuePairStringString[] = [];\n data.push({ key: \"DocumentStreamInfoId\", value: documentStreamInfo.id });\n data.push({ key: \"ETag\", value: this.etag });\n configError.data = data;\n this.errorTracker.addValidationError(configError);\n }\n });\n });\n }\n\n private applyDocumentFilters(\n documentConfiguration: Map<string, FilterConjunctionGroupInfo[]>,\n data: TelemetryData,\n exceptionType?: string,\n ): void {\n const streamIds: Set<string> = new Set<string>();\n documentConfiguration.forEach((filterConjunctionGroupInfoList, streamId) => {\n filterConjunctionGroupInfoList.forEach((filterConjunctionGroupInfo) => {\n // by going though each filterConjuctionGroupInfo, we are implicitly -OR-ing\n // different filterConjunctionGroupInfo within documentStreamInfo. If there are multiple\n // documentStreamInfos, this logic will -OR- the filtering results of each documentStreamInfo.\n if (this.filter.checkFilterConjunctionGroup(filterConjunctionGroupInfo, data)) {\n streamIds.add(streamId);\n }\n });\n });\n\n // Emit a document when a telemetry data matches a particular filtering configuration,\n // or when filtering configuration is empty.\n if (streamIds.size > 0 || documentConfiguration.size === 0) {\n let document: Request | RemoteDependency | Trace | Exception;\n if (isRequestData(data) || isDependencyData(data)) {\n document = getSpanDocument(data);\n } else if (isExceptionData(data) && exceptionType) {\n document = getLogDocument(data, exceptionType);\n } else {\n document = getLogDocument(data);\n }\n document.documentStreamIds = [...streamIds];\n this.addDocument(document);\n }\n }\n\n private parseMetricFilterConfiguration(response: QuickpulseResponse): void {\n if (!response?.documentStreams || typeof response.documentStreams.forEach !== \"function\") {\n return;\n }\n response.metrics.forEach((derivedMetricInfo) => {\n try {\n if (!this.seenMetricIds.has(derivedMetricInfo.id)) {\n this.seenMetricIds.add(derivedMetricInfo.id);\n this.validator.validateTelemetryType(derivedMetricInfo.telemetryType);\n this.validator.checkCustomMetricProjection(derivedMetricInfo);\n this.validator.validateMetricFilters(derivedMetricInfo);\n derivedMetricInfo.filterGroups.forEach((filterConjunctionGroupInfo) => {\n this.filter.renameExceptionFieldNamesForFiltering(filterConjunctionGroupInfo);\n });\n\n if (this.validDerivedMetrics.has(derivedMetricInfo.telemetryType)) {\n this.validDerivedMetrics.get(derivedMetricInfo.telemetryType)?.push(derivedMetricInfo);\n } else {\n this.validDerivedMetrics.set(derivedMetricInfo.telemetryType, [derivedMetricInfo]);\n }\n } else {\n throw new DuplicateMetricIdError(`Duplicate Metric Id: ${derivedMetricInfo.id}`);\n }\n this.derivedMetricProjection.initDerivedMetricProjection(derivedMetricInfo);\n } catch (error) {\n const configError: CollectionConfigurationError = {\n collectionConfigurationErrorType: \"Unknown\",\n message: \"\",\n fullException: \"\",\n data: [],\n };\n if (error instanceof TelemetryTypeError) {\n configError.collectionConfigurationErrorType = \"MetricTelemetryTypeUnsupported\";\n } else if (error instanceof UnexpectedFilterCreateError) {\n configError.collectionConfigurationErrorType = \"MetricFailureToCreateFilterUnexpected\";\n } else if (error instanceof DuplicateMetricIdError) {\n configError.collectionConfigurationErrorType = \"MetricDuplicateIds\";\n }\n\n if (error instanceof Error) {\n configError.message = error.message;\n configError.fullException = error.stack || \"\";\n }\n const data: KeyValuePairStringString[] = [];\n data.push({ key: \"MetricId\", value: derivedMetricInfo.id });\n data.push({ key: \"ETag\", value: this.etag });\n configError.data = data;\n this.errorTracker.addValidationError(configError);\n }\n });\n }\n\n private checkMetricFilterAndCreateProjection(\n derivedMetricInfoList: DerivedMetricInfo[],\n data: TelemetryData,\n ): void {\n derivedMetricInfoList.forEach((derivedMetricInfo: DerivedMetricInfo) => {\n if (this.filter.checkMetricFilters(derivedMetricInfo, data)) {\n try {\n this.derivedMetricProjection.calculateProjection(derivedMetricInfo, data);\n } catch (error) {\n const configError: CollectionConfigurationError = {\n collectionConfigurationErrorType: \"Unknown\",\n message: \"\",\n fullException: \"\",\n data: [],\n };\n if (error instanceof MetricFailureToCreateError) {\n configError.collectionConfigurationErrorType = \"MetricFailureToCreate\";\n\n if (error instanceof Error) {\n configError.message = error.message;\n configError.fullException = error.stack || \"\";\n }\n const errorData: KeyValuePairStringString[] = [];\n errorData.push({ key: \"MetricId\", value: derivedMetricInfo.id });\n errorData.push({ key: \"ETag\", value: this.etag });\n configError.data = errorData;\n this.errorTracker.addRunTimeError(configError);\n }\n }\n }\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"liveMetrics.js","sourceRoot":"","sources":["../../../../src/metrics/quickpulse/liveMetrics.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AAKzB,OAAO,EAAE,aAAa,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAI1F,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAclE,OAAO,EACL,cAAc,EACd,aAAa,EAC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wBACjE,SAAS,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;wBAClD,WAAW,CAAC,IAAI,GAAG,SAAS,CAAC;wBAC7B,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;oBACjD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport os from \"node:os\";\nimport type {\n MeterProviderOptions,\n PeriodicExportingMetricReaderOptions,\n} from \"@opentelemetry/sdk-metrics\";\nimport { MeterProvider, PeriodicExportingMetricReader } from \"@opentelemetry/sdk-metrics\";\nimport type { SdkLogRecord } from \"@opentelemetry/sdk-logs\";\nimport type { InternalConfig } from \"../../shared/config.js\";\nimport type { Meter, ObservableGauge, ObservableResult } from \"@opentelemetry/api\";\nimport { SpanKind, SpanStatusCode, ValueType, context } from \"@opentelemetry/api\";\nimport type { ReadableSpan, TimedEvent } from \"@opentelemetry/sdk-trace-base\";\nimport { RandomIdGenerator } from \"@opentelemetry/sdk-trace-base\";\nimport type {\n DocumentIngress,\n Exception,\n MonitoringDataPoint,\n IsSubscribedOptionalParams,\n RemoteDependency,\n Request,\n Trace,\n KeyValuePairStringString,\n DerivedMetricInfo,\n FilterConjunctionGroupInfo,\n} from \"../../generated/index.js\";\nimport type { QuickpulseResponse } from \"./export/sender.js\";\nimport {\n getLogDocument,\n getSdkVersion,\n getSpanData,\n getLogData,\n getSpanDocument,\n getTransmissionTime,\n isRequestData,\n getSpanExceptionColumns,\n isExceptionData,\n isDependencyData,\n} from \"./utils.js\";\nimport { QuickpulseMetricExporter } from \"./export/exporter.js\";\nimport { QuickpulseSender } from \"./export/sender.js\";\nimport { ConnectionStringParser } from \"../../utils/connectionStringParser.js\";\nimport { DEFAULT_LIVEMETRICS_ENDPOINT } from \"../../types.js\";\nimport type {\n QuickpulseExporterOptions,\n RequestData,\n DependencyData,\n TraceData,\n ExceptionData,\n TelemetryData,\n} from \"./types.js\";\nimport { QuickPulseOpenTelemetryMetricNames } from \"./types.js\";\nimport { hrTimeToMilliseconds, suppressTracing } from \"@opentelemetry/core\";\nimport { getInstance } from \"../../utils/statsbeat.js\";\nimport type { CollectionConfigurationError } from \"../../generated/index.js\";\nimport { Filter } from \"./filtering/filter.js\";\nimport { Validator } from \"./filtering/validator.js\";\nimport { CollectionConfigurationErrorTracker } from \"./filtering/collectionConfigurationErrorTracker.js\";\nimport { Projection } from \"./filtering/projection.js\";\nimport {\n TelemetryTypeError,\n UnexpectedFilterCreateError,\n DuplicateMetricIdError,\n MetricFailureToCreateError,\n} from \"./filtering/quickpulseErrors.js\";\nimport { SEMATTRS_EXCEPTION_TYPE } from \"@opentelemetry/semantic-conventions\";\nimport { getPhysicalMemory, getProcessorTimeNormalized } from \"../utils.js\";\nimport { getCloudRole, getCloudRoleInstance } from \"../utils.js\";\nimport { Logger } from \"../../shared/logging/logger.js\";\n\nconst POST_INTERVAL = 1000;\nconst MAX_POST_WAIT_TIME = 20000;\nconst PING_INTERVAL = 5000;\nconst MAX_PING_WAIT_TIME = 60000;\nconst FALLBACK_INTERVAL = 60000;\n\n/**\n * Azure Monitor Live Metrics\n * @internal\n */\nexport class LiveMetrics {\n private config: InternalConfig;\n private meterProvider: MeterProvider | undefined;\n private metricReader: PeriodicExportingMetricReader | undefined;\n private meter: Meter | undefined;\n private requestDurationGauge: ObservableGauge | undefined;\n private dependencyDurationGauge: ObservableGauge | undefined;\n private requestRateGauge: ObservableGauge | undefined;\n private requestFailedRateGauge: ObservableGauge | undefined;\n private dependencyRateGauge: ObservableGauge | undefined;\n private dependencyFailedRateGauge: ObservableGauge | undefined;\n private processPhysicalBytesGauge: ObservableGauge | undefined;\n private percentProcessorTimeNormalizedGauge: ObservableGauge | undefined;\n private exceptionsRateGauge: ObservableGauge | undefined;\n\n private documents: DocumentIngress[] = [];\n private pingInterval: number;\n private postInterval: number;\n private quickpulseExporter: QuickpulseMetricExporter;\n private pingSender: QuickpulseSender;\n private isCollectingData: boolean;\n private isDeactivating: boolean = false;\n private deactivatingPromise: Promise<void> | undefined;\n private lastSuccessTime: number = Date.now();\n private handle: NodeJS.Timer;\n // Monitoring data point with common properties\n private baseMonitoringDataPoint: MonitoringDataPoint;\n private totalRequestCount = 0;\n private totalFailedRequestCount = 0;\n private totalDependencyCount = 0;\n private totalFailedDependencyCount = 0;\n private totalExceptionCount = 0;\n private requestDuration = 0;\n private dependencyDuration = 0;\n private lastRequestDuration: { count: number; duration: number; time: number } = {\n count: 0,\n duration: 0,\n time: 0,\n };\n private lastRequestRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastFailedRequestRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastDependencyDuration: { count: number; duration: number; time: number } = {\n count: 0,\n duration: 0,\n time: 0,\n };\n private lastDependencyRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastFailedDependencyRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastExceptionRate: { count: number; time: number } = { count: 0, time: 0 };\n private lastCpuUsage: NodeJS.CpuUsage;\n private lastHrTime: bigint;\n private statsbeatOptionsUpdated = false;\n private etag: string = \"\";\n private errorTracker: CollectionConfigurationErrorTracker =\n new CollectionConfigurationErrorTracker();\n // For tracking of duplicate metric ids in the same configuration.\n private seenMetricIds: Set<string> = new Set();\n private validDerivedMetrics: Map<string, DerivedMetricInfo[]> = new Map();\n private derivedMetricProjection: Projection = new Projection();\n private validator: Validator = new Validator();\n private filter: Filter = new Filter();\n // type: Map<telemetryType, Map<id, FilterConjunctionGroupInfo[]>>\n private validDocumentFilterConjuctionGroupInfos: Map<\n string,\n Map<string, FilterConjunctionGroupInfo[]>\n > = new Map();\n /**\n * Initializes a new instance of the StandardMetrics class.\n * @param config - Distro configuration.\n * @param options - Standard Metrics options.\n */\n constructor(config: InternalConfig) {\n this.config = config;\n const idGenerator = new RandomIdGenerator();\n const streamId = idGenerator.generateTraceId();\n const machineName = os.hostname();\n const instance = getCloudRoleInstance(this.config.resource);\n const roleName = getCloudRole(this.config.resource);\n const version = getSdkVersion();\n this.baseMonitoringDataPoint = {\n version: version,\n invariantVersion: 5, // 5 means we support live metrics filtering of metrics and documents\n instance: instance,\n roleName: roleName,\n machineName: machineName,\n streamId: streamId,\n performanceCollectionSupported: true,\n isWebApp: process.env[\"WEBSITE_SITE_NAME\"] ? true : false,\n };\n const parsedConnectionString = ConnectionStringParser.parse(\n this.config.azureMonitorExporterOptions.connectionString ||\n process.env[\"APPLICATIONINSIGHTS_CONNECTION_STRING\"],\n );\n this.pingSender = new QuickpulseSender({\n endpointUrl: parsedConnectionString.liveendpoint || DEFAULT_LIVEMETRICS_ENDPOINT,\n instrumentationKey: parsedConnectionString.instrumentationkey || \"\",\n credential: this.config.azureMonitorExporterOptions.credential,\n credentialScopes:\n parsedConnectionString.aadaudience ||\n this.config.azureMonitorExporterOptions.credentialScopes,\n });\n const exporterOptions: QuickpulseExporterOptions = {\n endpointUrl: parsedConnectionString.liveendpoint || DEFAULT_LIVEMETRICS_ENDPOINT,\n instrumentationKey: parsedConnectionString.instrumentationkey || \"\",\n credential: this.config.azureMonitorExporterOptions.credential,\n credentialScopes:\n parsedConnectionString.aadaudience ||\n this.config.azureMonitorExporterOptions.credentialScopes,\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n postCallback: this.quickPulseDone.bind(this),\n getDocumentsFn: this.getDocuments.bind(this),\n getErrorsFn: this.getErrors.bind(this),\n getDerivedMetricValuesFn: this.getDerivedMetricValues.bind(this),\n baseMonitoringDataPoint: this.baseMonitoringDataPoint,\n };\n this.quickpulseExporter = new QuickpulseMetricExporter(exporterOptions);\n this.isCollectingData = false;\n this.pingInterval = PING_INTERVAL; // Default\n this.postInterval = POST_INTERVAL;\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n this.handle = setTimeout(this.goQuickpulse.bind(this), this.pingInterval);\n this.handle.unref(); // Don't block apps from terminating\n this.lastCpuUsage = process.cpuUsage();\n this.lastHrTime = process.hrtime.bigint();\n }\n\n public async shutdown(): Promise<void> {\n // Force collecting=false before tearing down so the shutdown's final\n // force-flush export, if it fails, cannot trigger the deactivate/\n // reactivate fallback in quickPulseDone(). Delegate to deactivateMetrics()\n // which manages the in-flight deactivation promise so callers (including\n // a concurrent failure-fallback in quickPulseDone) all observe the same\n // completion and shutdown waits for any in-flight deactivation to finish.\n this.isCollectingData = false;\n await this.deactivateMetrics();\n }\n\n private async goQuickpulse(): Promise<void> {\n if (!this.isCollectingData) {\n // If not collecting, Ping\n try {\n const params: IsSubscribedOptionalParams = {\n transmissionTime: getTransmissionTime(),\n monitoringDataPoint: this.baseMonitoringDataPoint,\n configurationEtag: this.etag,\n };\n await context.with(suppressTracing(context.active()), async () => {\n const response = await this.pingSender.isSubscribed(params);\n this.quickPulseDone(response);\n });\n } catch (error) {\n this.quickPulseDone(undefined);\n }\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n this.handle = setTimeout(this.goQuickpulse.bind(this), this.pingInterval);\n this.handle.unref();\n }\n if (this.isCollectingData) {\n this.activateMetrics({ collectionInterval: this.postInterval });\n }\n }\n\n private async quickPulseDone(response: QuickpulseResponse | undefined): Promise<void> {\n if (!response) {\n if (!this.isCollectingData) {\n if (Date.now() - this.lastSuccessTime >= MAX_PING_WAIT_TIME) {\n this.pingInterval = FALLBACK_INTERVAL;\n }\n } else {\n if (Date.now() - this.lastSuccessTime >= MAX_POST_WAIT_TIME) {\n // Re-entrancy guard: MeterProvider.shutdown() triggers a final\n // force-flush export which, on failure, re-invokes this callback\n // synchronously from inside the shutdown's export call. If a\n // deactivation is already in flight, bail out — awaiting the\n // in-flight promise here would deadlock the exporter's callback.\n if (this.isDeactivating) {\n return;\n }\n this.postInterval = FALLBACK_INTERVAL;\n try {\n await this.deactivateMetrics();\n } catch (error) {\n // The exporter invokes postCallback without awaiting it, so a\n // rejection here would surface as an unhandled rejection. Swallow\n // and log so the failure path stays contained.\n Logger.getInstance().warn(\n \"Failed to deactivate Live Metrics during failure fallback\",\n error,\n );\n }\n // Reset the success-time baseline so the FALLBACK_INTERVAL backoff\n // can take effect before we consider deactivating again.\n this.lastSuccessTime = Date.now();\n // Re-check after the await: shutdown() may have run concurrently and\n // flipped isCollectingData to false. Don't restart collection in\n // that case — doing so would re-create the meterProvider after\n // shutdown has begun.\n if (this.isCollectingData) {\n this.activateMetrics({ collectionInterval: this.postInterval });\n }\n }\n }\n } else {\n this.postInterval = POST_INTERVAL;\n // Update using response if needed\n this.lastSuccessTime = Date.now();\n this.isCollectingData =\n response.xMsQpsSubscribed && response.xMsQpsSubscribed === \"true\" ? true : false;\n if (response.xMsQpsConfigurationEtag && this.etag !== response.xMsQpsConfigurationEtag) {\n this.updateConfiguration(response);\n }\n\n // If collecting was stoped\n if (!this.isCollectingData && this.meterProvider) {\n this.etag = \"\";\n await this.deactivateMetrics();\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n this.handle = setTimeout(this.goQuickpulse.bind(this), this.pingInterval);\n this.handle.unref();\n }\n\n const endpointRedirect = response.xMsQpsServiceEndpointRedirectV2;\n if (endpointRedirect) {\n this.pingSender.handlePermanentRedirect(endpointRedirect);\n this.quickpulseExporter.getSender().handlePermanentRedirect(endpointRedirect);\n }\n const pollingInterval = response.xMsQpsServicePollingIntervalHint;\n if (pollingInterval) {\n this.pingInterval = Number(pollingInterval);\n } else {\n this.pingInterval = PING_INTERVAL;\n }\n }\n }\n\n // Activate live metrics collection\n public activateMetrics(options?: { collectionInterval: number }): void {\n if (this.meterProvider) {\n return;\n }\n // Turn on live metrics active collection for statsbeat\n if (!this.statsbeatOptionsUpdated) {\n getInstance().setStatsbeatFeatures({}, { liveMetrics: true });\n this.statsbeatOptionsUpdated = true;\n }\n this.totalDependencyCount = 0;\n this.totalExceptionCount = 0;\n this.totalFailedDependencyCount = 0;\n this.totalFailedRequestCount = 0;\n this.totalRequestCount = 0;\n this.requestDuration = 0;\n this.dependencyDuration = 0;\n this.lastRequestDuration = { count: 0, duration: 0, time: 0 };\n this.lastRequestRate = { count: 0, time: 0 };\n this.lastFailedRequestRate = { count: 0, time: 0 };\n this.lastDependencyDuration = { count: 0, duration: 0, time: 0 };\n this.lastDependencyRate = { count: 0, time: 0 };\n this.lastFailedDependencyRate = { count: 0, time: 0 };\n this.lastExceptionRate = { count: 0, time: 0 };\n\n const metricReaderOptions: PeriodicExportingMetricReaderOptions = {\n exporter: this.quickpulseExporter,\n exportIntervalMillis: options?.collectionInterval,\n };\n this.metricReader = new PeriodicExportingMetricReader(metricReaderOptions);\n const meterProviderConfig: MeterProviderOptions = {\n resource: this.config.resource,\n readers: [this.metricReader],\n };\n this.meterProvider = new MeterProvider(meterProviderConfig);\n this.meter = this.meterProvider.getMeter(\"AzureMonitorLiveMetricsMeter\");\n this.requestDurationGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.REQUEST_DURATION,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.requestRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.REQUEST_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.requestFailedRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.REQUEST_FAILURE_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.dependencyDurationGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.DEPENDENCY_DURATION,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.dependencyRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.DEPENDENCY_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.dependencyFailedRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.DEPENDENCY_FAILURE_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n\n this.processPhysicalBytesGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.PHYSICAL_BYTES,\n {\n valueType: ValueType.INT,\n },\n );\n\n this.percentProcessorTimeNormalizedGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.PROCESSOR_TIME_NORMALIZED,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n this.exceptionsRateGauge = this.meter.createObservableGauge(\n QuickPulseOpenTelemetryMetricNames.EXCEPTION_RATE,\n {\n valueType: ValueType.DOUBLE,\n },\n );\n\n this.requestDurationGauge.addCallback(this.getRequestDuration.bind(this));\n this.requestRateGauge.addCallback(this.getRequestRate.bind(this));\n this.requestFailedRateGauge.addCallback(this.getRequestFailedRate.bind(this));\n this.dependencyDurationGauge.addCallback(this.getDependencyDuration.bind(this));\n this.dependencyRateGauge.addCallback(this.getDependencyRate.bind(this));\n this.dependencyFailedRateGauge.addCallback(this.getDependencyFailedRate.bind(this));\n this.exceptionsRateGauge.addCallback(this.getExceptionRate.bind(this));\n this.processPhysicalBytesGauge.addCallback(this.getPhysicalMemory.bind(this));\n this.percentProcessorTimeNormalizedGauge.addCallback(\n this.getProcessorTimeNormalized.bind(this),\n );\n }\n\n /**\n * Deactivate metric collection\n */\n public async deactivateMetrics(): Promise<void> {\n // Coalesce concurrent deactivations: callers (shutdown(), the\n // failure-fallback in quickPulseDone(), and the \"unsubscribed\" branch in\n // goQuickpulse()) can all race. Return the in-flight promise so every\n // caller awaits the same completion and the underlying meterProvider\n // shutdown only runs once.\n if (this.deactivatingPromise) {\n return this.deactivatingPromise;\n }\n this.isDeactivating = true;\n this.deactivatingPromise = (async () => {\n try {\n this.documents = [];\n this.validDocumentFilterConjuctionGroupInfos.clear();\n this.errorTracker.clearRunTimeErrors();\n this.errorTracker.clearValidationTimeErrors();\n this.validDerivedMetrics.clear();\n this.derivedMetricProjection.clearProjectionMaps();\n this.seenMetricIds.clear();\n // Capture and clear the reference before awaiting shutdown so any\n // re-entrant calls triggered by the shutdown's final force-flush\n // export observe meterProvider as undefined and exit early.\n const provider = this.meterProvider;\n this.meterProvider = undefined;\n await provider?.shutdown();\n } finally {\n this.isDeactivating = false;\n this.deactivatingPromise = undefined;\n }\n })();\n return this.deactivatingPromise;\n }\n\n /**\n * Force flush Meter Provider.\n */\n public async flush(): Promise<void> {\n await this.meterProvider?.forceFlush();\n }\n\n /**\n *Get OpenTelemetry MeterProvider\n */\n public getMeterProvider(): MeterProvider | undefined {\n return this.meterProvider;\n }\n\n public getDocuments(): DocumentIngress[] {\n const result: DocumentIngress[] = this.documents;\n this.documents = [];\n return result;\n }\n\n public getErrors(): CollectionConfigurationError[] {\n const result = this.errorTracker.getErrors();\n this.errorTracker.clearRunTimeErrors();\n return result;\n }\n\n public getDerivedMetricValues(): Map<string, number> {\n return this.derivedMetricProjection.getMetricValues();\n }\n\n private addDocument(document: DocumentIngress): void {\n if (document) {\n // Limit risk of memory leak by limiting doc length to something manageable\n if (this.documents.length > 20) {\n this.documents.shift(); // Remove oldest document\n }\n this.documents.push(document);\n }\n }\n\n /**\n * Record Span metrics\n * @internal\n */\n public recordSpan(span: ReadableSpan): void {\n if (this.isCollectingData) {\n const columns: RequestData | DependencyData = getSpanData(span);\n let documentConfiguration: Map<string, FilterConjunctionGroupInfo[]>;\n let derivedMetricInfos: DerivedMetricInfo[];\n if (isRequestData(columns)) {\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Request\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n derivedMetricInfos = this.validDerivedMetrics.get(\"Request\") || [];\n } else {\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Dependency\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n derivedMetricInfos = this.validDerivedMetrics.get(\"Dependency\") || [];\n }\n this.applyDocumentFilters(documentConfiguration, columns);\n this.checkMetricFilterAndCreateProjection(derivedMetricInfos, columns);\n\n const durationMs = hrTimeToMilliseconds(span.duration);\n const success = span.status.code !== SpanStatusCode.ERROR;\n\n if (span.kind === SpanKind.SERVER || span.kind === SpanKind.CONSUMER) {\n this.totalRequestCount++;\n this.requestDuration += durationMs;\n if (!success) {\n this.totalFailedRequestCount++;\n }\n } else {\n this.totalDependencyCount++;\n this.dependencyDuration += durationMs;\n if (!success) {\n this.totalFailedDependencyCount++;\n }\n }\n if (span.events) {\n span.events.forEach((event: TimedEvent) => {\n event.attributes = event.attributes || {};\n if (event.name === \"exception\") {\n const exceptionColumns: ExceptionData = getSpanExceptionColumns(\n event.attributes,\n span.attributes,\n );\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Exception\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n this.applyDocumentFilters(\n documentConfiguration,\n exceptionColumns,\n event.attributes[SEMATTRS_EXCEPTION_TYPE] as string,\n );\n derivedMetricInfos = this.validDerivedMetrics.get(\"Exception\") || [];\n this.checkMetricFilterAndCreateProjection(derivedMetricInfos, exceptionColumns);\n this.totalExceptionCount++;\n }\n });\n }\n }\n }\n\n /**\n * Record LogRecord metrics, add attribute so data is not aggregated again in ingestion\n * @internal\n */\n public recordLog(logRecord: SdkLogRecord): void {\n if (this.isCollectingData) {\n const columns: TraceData | ExceptionData = getLogData(logRecord);\n let derivedMetricInfos: DerivedMetricInfo[];\n let documentConfiguration: Map<string, FilterConjunctionGroupInfo[]>;\n if (isExceptionData(columns)) {\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Exception\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n this.applyDocumentFilters(\n documentConfiguration,\n columns,\n logRecord.attributes[SEMATTRS_EXCEPTION_TYPE] as string,\n );\n derivedMetricInfos = this.validDerivedMetrics.get(\"Exception\") || [];\n this.totalExceptionCount++;\n } else {\n // trace\n documentConfiguration =\n this.validDocumentFilterConjuctionGroupInfos.get(\"Trace\") ||\n new Map<string, FilterConjunctionGroupInfo[]>();\n this.applyDocumentFilters(documentConfiguration, columns);\n derivedMetricInfos = this.validDerivedMetrics.get(\"Trace\") || [];\n }\n this.checkMetricFilterAndCreateProjection(derivedMetricInfos, columns);\n }\n }\n\n private getRequestDuration(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const requestInterval = this.totalRequestCount - this.lastRequestDuration.count || 0;\n const durationInterval = this.requestDuration - this.lastRequestDuration.duration || 0;\n const elapsedMs = currentTime - this.lastRequestDuration.time;\n if (elapsedMs > 0) {\n const averageExecutionTime = durationInterval / requestInterval || 0; // default to 0 in case no requests in this interval\n observableResult.observe(averageExecutionTime);\n }\n this.lastRequestDuration = {\n count: this.totalRequestCount,\n duration: this.requestDuration,\n time: currentTime,\n };\n }\n\n private getRequestRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalRequests = this.totalRequestCount - this.lastRequestRate.count || 0;\n const elapsedMs = currentTime - this.lastRequestRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalRequests / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastRequestRate = {\n count: this.totalRequestCount,\n time: currentTime,\n };\n }\n\n private getRequestFailedRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalRequests = this.totalFailedRequestCount - this.lastFailedRequestRate.count || 0;\n const elapsedMs = currentTime - this.lastFailedRequestRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalRequests / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastFailedRequestRate = {\n count: this.totalFailedRequestCount,\n time: currentTime,\n };\n }\n\n private getDependencyDuration(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const dependencyInterval = this.totalDependencyCount - this.lastDependencyDuration.count || 0;\n const durationInterval = this.dependencyDuration - this.lastDependencyDuration.duration || 0;\n const elapsedMs = currentTime - this.lastDependencyDuration.time;\n if (elapsedMs > 0) {\n const averageExecutionTime = durationInterval / dependencyInterval || 0; // default to 0 in case no dependencies in this interval\n observableResult.observe(averageExecutionTime);\n }\n this.lastDependencyDuration = {\n count: this.totalDependencyCount,\n duration: this.dependencyDuration,\n time: currentTime,\n };\n }\n\n private getDependencyRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalData = this.totalDependencyCount - this.lastDependencyRate.count || 0;\n const elapsedMs = currentTime - this.lastDependencyRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalData / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastDependencyRate = {\n count: this.totalDependencyCount,\n time: currentTime,\n };\n }\n\n private getDependencyFailedRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalData = this.totalFailedDependencyCount - this.lastFailedDependencyRate.count || 0;\n const elapsedMs = currentTime - this.lastFailedDependencyRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalData / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastFailedDependencyRate = {\n count: this.totalFailedDependencyCount,\n time: currentTime,\n };\n }\n\n private getExceptionRate(observableResult: ObservableResult): void {\n const currentTime = +new Date();\n const intervalData = this.totalExceptionCount - this.lastExceptionRate.count || 0;\n const elapsedMs = currentTime - this.lastExceptionRate.time;\n if (elapsedMs > 0) {\n const elapsedSeconds = elapsedMs / 1000;\n const dataPerSec = intervalData / elapsedSeconds;\n observableResult.observe(dataPerSec);\n }\n this.lastExceptionRate = {\n count: this.totalExceptionCount,\n time: currentTime,\n };\n }\n\n private getPhysicalMemory(observableResult: ObservableResult): void {\n const rss = getPhysicalMemory();\n observableResult.observe(rss);\n }\n\n private getProcessorTimeNormalized(observableResult: ObservableResult): void {\n if (process && process.hrtime) {\n const cpuUsagePercent = getProcessorTimeNormalized(this.lastHrTime, this.lastCpuUsage);\n observableResult.observe(cpuUsagePercent);\n this.lastHrTime = process.hrtime.bigint();\n this.lastCpuUsage = process.cpuUsage();\n } else {\n Logger.getInstance().debug(\"Getting Normalized Processor Time Failed. No process available.\");\n }\n }\n\n private updateConfiguration(response: QuickpulseResponse): void {\n this.etag = response.xMsQpsConfigurationEtag || \"\";\n this.quickpulseExporter.setEtag(this.etag);\n this.errorTracker.clearValidationTimeErrors();\n this.validDocumentFilterConjuctionGroupInfos.clear();\n this.validDerivedMetrics.clear();\n this.derivedMetricProjection.clearProjectionMaps();\n this.seenMetricIds.clear();\n\n this.parseDocumentFilterConfiguration(response);\n this.parseMetricFilterConfiguration(response);\n }\n\n private parseDocumentFilterConfiguration(response: QuickpulseResponse): void {\n if (!response?.documentStreams || typeof response.documentStreams.forEach !== \"function\") {\n return;\n }\n response.documentStreams.forEach((documentStreamInfo) => {\n documentStreamInfo.documentFilterGroups.forEach((documentFilterGroupInfo) => {\n try {\n this.validator.validateTelemetryType(documentFilterGroupInfo.telemetryType);\n this.validator.validateDocumentFilters(documentFilterGroupInfo);\n this.filter.renameExceptionFieldNamesForFiltering(documentFilterGroupInfo.filters);\n\n if (\n !this.validDocumentFilterConjuctionGroupInfos.has(documentFilterGroupInfo.telemetryType)\n ) {\n this.validDocumentFilterConjuctionGroupInfos.set(\n documentFilterGroupInfo.telemetryType,\n new Map<string, FilterConjunctionGroupInfo[]>(),\n );\n }\n\n const innerMap = this.validDocumentFilterConjuctionGroupInfos.get(\n documentFilterGroupInfo.telemetryType,\n );\n if (!innerMap?.has(documentStreamInfo.id)) {\n innerMap?.set(documentStreamInfo.id, [documentFilterGroupInfo.filters]);\n } else {\n innerMap.get(documentStreamInfo.id)?.push(documentFilterGroupInfo.filters);\n }\n } catch (error) {\n const configError: CollectionConfigurationError = {\n collectionConfigurationErrorType: \"Unknown\",\n message: \"\",\n fullException: \"\",\n data: [],\n };\n if (error instanceof TelemetryTypeError) {\n configError.collectionConfigurationErrorType =\n \"CollectionConfigurationFailureToCreateUnexpected\";\n } else if (error instanceof UnexpectedFilterCreateError) {\n configError.collectionConfigurationErrorType =\n \"DocumentStreamFailureToCreateFilterUnexpected\";\n }\n\n if (error instanceof Error) {\n configError.message = error.message;\n configError.fullException = error.stack || \"\";\n }\n const data: KeyValuePairStringString[] = [];\n data.push({ key: \"DocumentStreamInfoId\", value: documentStreamInfo.id });\n data.push({ key: \"ETag\", value: this.etag });\n configError.data = data;\n this.errorTracker.addValidationError(configError);\n }\n });\n });\n }\n\n private applyDocumentFilters(\n documentConfiguration: Map<string, FilterConjunctionGroupInfo[]>,\n data: TelemetryData,\n exceptionType?: string,\n ): void {\n const streamIds: Set<string> = new Set<string>();\n documentConfiguration.forEach((filterConjunctionGroupInfoList, streamId) => {\n filterConjunctionGroupInfoList.forEach((filterConjunctionGroupInfo) => {\n // by going though each filterConjuctionGroupInfo, we are implicitly -OR-ing\n // different filterConjunctionGroupInfo within documentStreamInfo. If there are multiple\n // documentStreamInfos, this logic will -OR- the filtering results of each documentStreamInfo.\n if (this.filter.checkFilterConjunctionGroup(filterConjunctionGroupInfo, data)) {\n streamIds.add(streamId);\n }\n });\n });\n\n // Emit a document when a telemetry data matches a particular filtering configuration,\n // or when filtering configuration is empty.\n if (streamIds.size > 0 || documentConfiguration.size === 0) {\n let document: Request | RemoteDependency | Trace | Exception;\n if (isRequestData(data) || isDependencyData(data)) {\n document = getSpanDocument(data);\n } else if (isExceptionData(data) && exceptionType) {\n document = getLogDocument(data, exceptionType);\n } else {\n document = getLogDocument(data);\n }\n document.documentStreamIds = [...streamIds];\n this.addDocument(document);\n }\n }\n\n private parseMetricFilterConfiguration(response: QuickpulseResponse): void {\n if (!response?.documentStreams || typeof response.documentStreams.forEach !== \"function\") {\n return;\n }\n response.metrics.forEach((derivedMetricInfo) => {\n try {\n if (!this.seenMetricIds.has(derivedMetricInfo.id)) {\n this.seenMetricIds.add(derivedMetricInfo.id);\n this.validator.validateTelemetryType(derivedMetricInfo.telemetryType);\n this.validator.checkCustomMetricProjection(derivedMetricInfo);\n this.validator.validateMetricFilters(derivedMetricInfo);\n derivedMetricInfo.filterGroups.forEach((filterConjunctionGroupInfo) => {\n this.filter.renameExceptionFieldNamesForFiltering(filterConjunctionGroupInfo);\n });\n\n if (this.validDerivedMetrics.has(derivedMetricInfo.telemetryType)) {\n this.validDerivedMetrics.get(derivedMetricInfo.telemetryType)?.push(derivedMetricInfo);\n } else {\n this.validDerivedMetrics.set(derivedMetricInfo.telemetryType, [derivedMetricInfo]);\n }\n } else {\n throw new DuplicateMetricIdError(`Duplicate Metric Id: ${derivedMetricInfo.id}`);\n }\n this.derivedMetricProjection.initDerivedMetricProjection(derivedMetricInfo);\n } catch (error) {\n const configError: CollectionConfigurationError = {\n collectionConfigurationErrorType: \"Unknown\",\n message: \"\",\n fullException: \"\",\n data: [],\n };\n if (error instanceof TelemetryTypeError) {\n configError.collectionConfigurationErrorType = \"MetricTelemetryTypeUnsupported\";\n } else if (error instanceof UnexpectedFilterCreateError) {\n configError.collectionConfigurationErrorType = \"MetricFailureToCreateFilterUnexpected\";\n } else if (error instanceof DuplicateMetricIdError) {\n configError.collectionConfigurationErrorType = \"MetricDuplicateIds\";\n }\n\n if (error instanceof Error) {\n configError.message = error.message;\n configError.fullException = error.stack || \"\";\n }\n const data: KeyValuePairStringString[] = [];\n data.push({ key: \"MetricId\", value: derivedMetricInfo.id });\n data.push({ key: \"ETag\", value: this.etag });\n configError.data = data;\n this.errorTracker.addValidationError(configError);\n }\n });\n }\n\n private checkMetricFilterAndCreateProjection(\n derivedMetricInfoList: DerivedMetricInfo[],\n data: TelemetryData,\n ): void {\n derivedMetricInfoList.forEach((derivedMetricInfo: DerivedMetricInfo) => {\n if (this.filter.checkMetricFilters(derivedMetricInfo, data)) {\n try {\n this.derivedMetricProjection.calculateProjection(derivedMetricInfo, data);\n } catch (error) {\n const configError: CollectionConfigurationError = {\n collectionConfigurationErrorType: \"Unknown\",\n message: \"\",\n fullException: \"\",\n data: [],\n };\n if (error instanceof MetricFailureToCreateError) {\n configError.collectionConfigurationErrorType = \"MetricFailureToCreate\";\n\n if (error instanceof Error) {\n configError.message = error.message;\n configError.fullException = error.stack || \"\";\n }\n const errorData: KeyValuePairStringString[] = [];\n errorData.push({ key: \"MetricId\", value: derivedMetricInfo.id });\n errorData.push({ key: \"ETag\", value: this.etag });\n configError.data = errorData;\n this.errorTracker.addRunTimeError(configError);\n }\n }\n }\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Allowed domain suffixes for redirect targets. A redirect (either a 30x `Location` header or a
|
|
3
|
+
* Live Metrics `x-ms-qps-service-endpoint-redirect-v2` header) is followed only when the current
|
|
4
|
+
* host and the redirect target either match exactly or both live under one of these trusted Azure
|
|
5
|
+
* Monitor / Application Insights suffixes. This prevents an attacker-controlled redirect from
|
|
6
|
+
* causing the bearer auth policy to attach a fresh AAD token (and the telemetry body) to an
|
|
7
|
+
* unrelated host.
|
|
8
|
+
*
|
|
9
|
+
* Mirrors `ALLOWED_REDIRECT_DOMAIN_SUFFIXES` in `@azure/monitor-opentelemetry-exporter`.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const ALLOWED_REDIRECT_DOMAIN_SUFFIXES: readonly string[];
|
|
13
|
+
/**
|
|
14
|
+
* Return `true` if the redirect target is safe to follow.
|
|
15
|
+
*
|
|
16
|
+
* Used to gate redirects so an attacker-controlled redirect cannot cause the Live Metrics sender
|
|
17
|
+
* (and its credential-bearing pipeline) to send telemetry — and a freshly-signed bearer token —
|
|
18
|
+
* to an unrelated host.
|
|
19
|
+
*
|
|
20
|
+
* A redirect is permitted only when the target equals the currently configured host exactly, or
|
|
21
|
+
* when both the current host and the redirect target are under one of the known Azure Monitor
|
|
22
|
+
* ingestion host suffixes (see {@link ALLOWED_REDIRECT_DOMAIN_SUFFIXES}). Customers with a custom
|
|
23
|
+
* (non-Azure) host will therefore not have server-issued cross-host redirects followed.
|
|
24
|
+
*
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare function isSameRegisteredDomain(currentNetloc: string | undefined, redirectNetloc: string | undefined): boolean;
|
|
28
|
+
//# sourceMappingURL=redirectUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirectUtils.d.ts","sourceRoot":"","sources":["../../../../src/metrics/quickpulse/redirectUtils.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,MAAM,EAS7D,CAAC;AAqBF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,OAAO,CAkBT"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
/**
|
|
4
|
+
* Allowed domain suffixes for redirect targets. A redirect (either a 30x `Location` header or a
|
|
5
|
+
* Live Metrics `x-ms-qps-service-endpoint-redirect-v2` header) is followed only when the current
|
|
6
|
+
* host and the redirect target either match exactly or both live under one of these trusted Azure
|
|
7
|
+
* Monitor / Application Insights suffixes. This prevents an attacker-controlled redirect from
|
|
8
|
+
* causing the bearer auth policy to attach a fresh AAD token (and the telemetry body) to an
|
|
9
|
+
* unrelated host.
|
|
10
|
+
*
|
|
11
|
+
* Mirrors `ALLOWED_REDIRECT_DOMAIN_SUFFIXES` in `@azure/monitor-opentelemetry-exporter`.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export const ALLOWED_REDIRECT_DOMAIN_SUFFIXES = [
|
|
15
|
+
".livediagnostics.monitor.azure.com",
|
|
16
|
+
".monitor.azure.com",
|
|
17
|
+
".services.visualstudio.com",
|
|
18
|
+
".applicationinsights.azure.com",
|
|
19
|
+
".monitor.azure.us",
|
|
20
|
+
".applicationinsights.azure.us",
|
|
21
|
+
".monitor.azure.cn",
|
|
22
|
+
".applicationinsights.azure.cn",
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
* Normalize a netloc-like value (`user@host:port`) to a bare lowercase host with no trailing dot.
|
|
26
|
+
*/
|
|
27
|
+
function normalizeHost(netloc) {
|
|
28
|
+
const afterUserInfo = netloc.split("@").pop() ?? "";
|
|
29
|
+
// Strip an IPv6 zone/bracket safely: only split on the last ':' if it's not inside brackets.
|
|
30
|
+
let host = afterUserInfo;
|
|
31
|
+
if (host.startsWith("[")) {
|
|
32
|
+
const end = host.indexOf("]");
|
|
33
|
+
host = end >= 0 ? host.slice(0, end + 1) : host;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const colon = host.lastIndexOf(":");
|
|
37
|
+
if (colon >= 0) {
|
|
38
|
+
host = host.slice(0, colon);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return host.toLowerCase().replace(/\.+$/, "");
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Return `true` if the redirect target is safe to follow.
|
|
45
|
+
*
|
|
46
|
+
* Used to gate redirects so an attacker-controlled redirect cannot cause the Live Metrics sender
|
|
47
|
+
* (and its credential-bearing pipeline) to send telemetry — and a freshly-signed bearer token —
|
|
48
|
+
* to an unrelated host.
|
|
49
|
+
*
|
|
50
|
+
* A redirect is permitted only when the target equals the currently configured host exactly, or
|
|
51
|
+
* when both the current host and the redirect target are under one of the known Azure Monitor
|
|
52
|
+
* ingestion host suffixes (see {@link ALLOWED_REDIRECT_DOMAIN_SUFFIXES}). Customers with a custom
|
|
53
|
+
* (non-Azure) host will therefore not have server-issued cross-host redirects followed.
|
|
54
|
+
*
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
export function isSameRegisteredDomain(currentNetloc, redirectNetloc) {
|
|
58
|
+
if (!currentNetloc || !redirectNetloc) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
const currentHost = normalizeHost(currentNetloc);
|
|
62
|
+
const redirectHost = normalizeHost(redirectNetloc);
|
|
63
|
+
if (!currentHost || !redirectHost) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (currentHost === redirectHost) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
for (const suffix of ALLOWED_REDIRECT_DOMAIN_SUFFIXES) {
|
|
70
|
+
if (currentHost.endsWith(suffix) && redirectHost.endsWith(suffix)) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=redirectUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirectUtils.js","sourceRoot":"","sources":["../../../../src/metrics/quickpulse/redirectUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAsB;IACjE,oCAAoC;IACpC,oBAAoB;IACpB,4BAA4B;IAC5B,gCAAgC;IAChC,mBAAmB;IACnB,+BAA+B;IAC/B,mBAAmB;IACnB,+BAA+B;CAChC,CAAC;AAEF;;GAEG;AACH,SAAS,aAAa,CAAC,MAAc;IACnC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;IACpD,6FAA6F;IAC7F,IAAI,IAAI,GAAG,aAAa,CAAC;IACzB,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAClD,CAAC;SAAM,CAAC;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CACpC,aAAiC,EACjC,cAAkC;IAElC,IAAI,CAAC,aAAa,IAAI,CAAC,cAAc,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,WAAW,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;IACjD,MAAM,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC;IACnD,IAAI,CAAC,WAAW,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,WAAW,KAAK,YAAY,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IACD,KAAK,MAAM,MAAM,IAAI,gCAAgC,EAAE,CAAC;QACtD,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAClE,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Allowed domain suffixes for redirect targets. A redirect (either a 30x `Location` header or a\n * Live Metrics `x-ms-qps-service-endpoint-redirect-v2` header) is followed only when the current\n * host and the redirect target either match exactly or both live under one of these trusted Azure\n * Monitor / Application Insights suffixes. This prevents an attacker-controlled redirect from\n * causing the bearer auth policy to attach a fresh AAD token (and the telemetry body) to an\n * unrelated host.\n *\n * Mirrors `ALLOWED_REDIRECT_DOMAIN_SUFFIXES` in `@azure/monitor-opentelemetry-exporter`.\n * @internal\n */\nexport const ALLOWED_REDIRECT_DOMAIN_SUFFIXES: readonly string[] = [\n \".livediagnostics.monitor.azure.com\",\n \".monitor.azure.com\",\n \".services.visualstudio.com\",\n \".applicationinsights.azure.com\",\n \".monitor.azure.us\",\n \".applicationinsights.azure.us\",\n \".monitor.azure.cn\",\n \".applicationinsights.azure.cn\",\n];\n\n/**\n * Normalize a netloc-like value (`user@host:port`) to a bare lowercase host with no trailing dot.\n */\nfunction normalizeHost(netloc: string): string {\n const afterUserInfo = netloc.split(\"@\").pop() ?? \"\";\n // Strip an IPv6 zone/bracket safely: only split on the last ':' if it's not inside brackets.\n let host = afterUserInfo;\n if (host.startsWith(\"[\")) {\n const end = host.indexOf(\"]\");\n host = end >= 0 ? host.slice(0, end + 1) : host;\n } else {\n const colon = host.lastIndexOf(\":\");\n if (colon >= 0) {\n host = host.slice(0, colon);\n }\n }\n return host.toLowerCase().replace(/\\.+$/, \"\");\n}\n\n/**\n * Return `true` if the redirect target is safe to follow.\n *\n * Used to gate redirects so an attacker-controlled redirect cannot cause the Live Metrics sender\n * (and its credential-bearing pipeline) to send telemetry — and a freshly-signed bearer token —\n * to an unrelated host.\n *\n * A redirect is permitted only when the target equals the currently configured host exactly, or\n * when both the current host and the redirect target are under one of the known Azure Monitor\n * ingestion host suffixes (see {@link ALLOWED_REDIRECT_DOMAIN_SUFFIXES}). Customers with a custom\n * (non-Azure) host will therefore not have server-issued cross-host redirects followed.\n *\n * @internal\n */\nexport function isSameRegisteredDomain(\n currentNetloc: string | undefined,\n redirectNetloc: string | undefined,\n): boolean {\n if (!currentNetloc || !redirectNetloc) {\n return false;\n }\n const currentHost = normalizeHost(currentNetloc);\n const redirectHost = normalizeHost(redirectNetloc);\n if (!currentHost || !redirectHost) {\n return false;\n }\n if (currentHost === redirectHost) {\n return true;\n }\n for (const suffix of ALLOWED_REDIRECT_DOMAIN_SUFFIXES) {\n if (currentHost.endsWith(suffix) && redirectHost.endsWith(suffix)) {\n return true;\n }\n }\n return false;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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