@azure/monitor-opentelemetry 1.17.0 → 1.18.1

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.
@@ -24,7 +24,6 @@ export declare class QuickpulseSender {
24
24
  private endpointUrl;
25
25
  private credential;
26
26
  private credentialScopes;
27
- private quickpulseClientOptions;
28
27
  constructor(options: {
29
28
  endpointUrl: string;
30
29
  instrumentationKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"sender.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/quickpulse/export/sender.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EACV,0BAA0B,EAC1B,qBAAqB,EAErB,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;AAKrC;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,2BAA2B;IACrE,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0BAA0B;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,6CAA6C;IAC7C,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,yCAAyC;IACzC,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,gBAAgB,CAAW;IAEnC,OAAO,CAAC,uBAAuB,CAG7B;gBAEU,OAAO,EAAE;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,CAAC,EAAE,eAAe,CAAC;QAC7B,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACtC;IA+BD,OAAO,CAAC,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B,cAAc,EAAE,0BAA0B,GACzC,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAuB1C;;;OAGG;IACG,OAAO,CAAC,cAAc,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAqB7F,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;CAa5D"}
@@ -19,8 +19,6 @@ class QuickpulseSender {
19
19
  endpointUrl;
20
20
  credential;
21
21
  credentialScopes;
22
- // @ts-expect-error - assigned in constructor, accessed by tests via bracket notation
23
- quickpulseClientOptions;
24
22
  constructor(options) {
25
23
  // Build endpoint using provided configuration or default values
26
24
  this.endpointUrl = options.endpointUrl;
@@ -41,11 +39,6 @@ class QuickpulseSender {
41
39
  if (options.credential) {
42
40
  clientOptions.credentials = { scopes: this.credentialScopes };
43
41
  }
44
- // Store credential info for testability
45
- this.quickpulseClientOptions = {
46
- credential: options.credential,
47
- credentialScopes: this.credentialScopes,
48
- };
49
42
  this.quickpulseClient = this.createQuickpulseClient(clientOptions);
50
43
  }
51
44
  createQuickpulseClient(clientOptions) {
@@ -1 +1 @@
1
- {"version":3,"file":"sender.js","sourceRoot":"","sources":["../../../../../src/metrics/quickpulse/export/sender.ts"],"names":[],"mappings":";;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,sDAAsB;AAEtB,kEAA+D;AAE/D,4CAA0C;AAO1C,0DAA+D;AAE/D,MAAM,2BAA2B,GAAG,oCAAoC,CAAC;AAiBzE;;;GAGG;AACH,MAAa,gBAAgB;IACnB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAS;IAC3B,WAAW,CAAS;IACpB,UAAU,CAAkB;IAC5B,gBAAgB,CAAW;IACnC,qFAAqF;IAC7E,uBAAuB,CAG7B;IAEF,YAAY,OAKX;QACC,gEAAgE;QAChE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,MAAM,aAAa,GAAmC;YACpD,QAAQ,E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AAC,IAAI,CAAC,mCAAmC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC;QACD,OAAO;IACT,CAAC;IAED,uBAAuB,CAAC,QAA4B;QAClD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,MAAM,GAAG,IAAI,aAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC1B,IAAI,CAAC,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;gBAC5C,kEAAkE;gBAClE,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,sBAAsB,CAAC;oBAClD,QAAQ,EAAE,IAAI,CAAC,WAAW;oBAC1B,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE;iBAC/C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA1HD,4CA0HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport url from \"url\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { diag } from \"@opentelemetry/api\";\nimport type {\n IsSubscribedOptionalParams,\n PublishOptionalParams,\n QuickpulseClientOptionalParams,\n CollectionConfigurationInfo,\n} from \"../../../generated/index.js\";\nimport { QuickpulseClient } from \"../../../generated/index.js\";\n\nconst applicationInsightsResource = \"https://monitor.azure.com/.default\";\n\n/**\n * Response type that includes the body and response headers from the Live Metrics service.\n * @internal\n */\nexport interface QuickpulseResponse extends CollectionConfigurationInfo {\n /** Whether the instrumentation key is subscribed. */\n xMsQpsSubscribed?: string;\n /** Configuration ETag. */\n xMsQpsConfigurationEtag?: string;\n /** Polling interval hint (only for ping). */\n xMsQpsServicePollingIntervalHint?: string;\n /** Endpoint redirect (only for ping). */\n xMsQpsServiceEndpointRedirectV2?: string;\n}\n\n/**\n * Quickpulse sender class\n * @internal\n */\nexport class QuickpulseSender {\n private quickpulseClient: QuickpulseClient;\n private instrumentationKey: string;\n private endpointUrl: string;\n private credential: TokenCredential;\n private credentialScopes: string[];\n // @ts-expect-error - assigned in constructor, accessed by tests via bracket notation\n private quickpulseClientOptions: {\n credential?: TokenCredential;\n credentialScopes?: string[];\n };\n\n constructor(options: {\n endpointUrl: string;\n instrumentationKey: string;\n credential?: TokenCredential;\n credentialScopes?: string | string[];\n }) {\n // Build endpoint using provided configuration or default values\n this.endpointUrl = options.endpointUrl;\n const clientOptions: QuickpulseClientOptionalParams = {\n endpoint: this.endpointUrl,\n };\n\n this.instrumentationKey = options.instrumentationKey;\n this.credential = options.credential as TokenCredential;\n\n // Configure credential scopes\n if (options.credentialScopes) {\n this.credentialScopes = Array.isArray(options.credentialScopes)\n ? options.credentialScopes\n : [options.credentialScopes];\n } else {\n this.credentialScopes = [applicationInsightsResource];\n }\n if (options.credential) {\n clientOptions.credentials = { scopes: this.credentialScopes };\n }\n\n // Store credential info for testability\n this.quickpulseClientOptions = {\n credential: options.credential,\n credentialScopes: this.credentialScopes,\n };\n\n this.quickpulseClient = this.createQuickpulseClient(clientOptions);\n }\n\n private createQuickpulseClient(clientOptions: QuickpulseClientOptionalParams): QuickpulseClient {\n const client = new QuickpulseClient(this.credential, clientOptions);\n // Handle redirects in HTTP Sender\n client.pipeline.removePolicy({ name: redirectPolicyName });\n return client;\n }\n\n /**\n * isSubscribed Quickpulse service\n * @internal\n */\n async isSubscribed(\n optionalParams: IsSubscribedOptionalParams,\n ): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.isSubscribed(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n xMsQpsServicePollingIntervalHint: responseHeaders[\"x-ms-qps-service-polling-interval-hint\"],\n xMsQpsServiceEndpointRedirectV2: responseHeaders[\"x-ms-qps-service-endpoint-redirect-v2\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.info(\"Failed to ping Quickpulse service\", restError.message);\n }\n return;\n }\n\n /**\n * publish Quickpulse service\n * @internal\n */\n async publish(optionalParams: PublishOptionalParams): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.publish(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.warn(\"Failed to post Quickpulse service\", restError.message);\n }\n return;\n }\n\n handlePermanentRedirect(location: string | undefined): void {\n if (location) {\n const locUrl = new url.URL(location);\n if (locUrl && locUrl.host) {\n this.endpointUrl = \"https://\" + locUrl.host;\n // Recreate the client so subsequent requests use the new endpoint\n this.quickpulseClient = this.createQuickpulseClient({\n endpoint: this.endpointUrl,\n credentials: { scopes: this.credentialScopes },\n });\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"sender.js","sourceRoot":"","sources":["../../../../../src/metrics/quickpulse/export/sender.ts"],"names":[],"mappings":";;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,sDAAsB;AAEtB,kEAA+D;AAE/D,4CAA0C;AAO1C,0DAA+D;AAE/D,MAAM,2BAA2B,GAAG,oCAAoC,CAAC;AAiBzE;;;GAGG;AACH,MAAa,gBAAgB;IACnB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAS;IAC3B,WAAW,CAAS;IACpB,UAAU,CAAkB;IAC5B,gBAAgB,CAAW;IAEnC,YAAY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,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC;QACD,OAAO;IACT,CAAC;IAED,uBAAuB,CAAC,QAA4B;QAClD,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,MAAM,GAAG,IAAI,aAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC1B,IAAI,CAAC,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;gBAC5C,kEAAkE;gBAClE,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,sBAAsB,CAAC;oBAClD,QAAQ,EAAE,IAAI,CAAC,WAAW;oBAC1B,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE;iBAC/C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF;AA/GD,4CA+GC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport url from \"url\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { diag } from \"@opentelemetry/api\";\nimport type {\n IsSubscribedOptionalParams,\n PublishOptionalParams,\n QuickpulseClientOptionalParams,\n CollectionConfigurationInfo,\n} from \"../../../generated/index.js\";\nimport { QuickpulseClient } from \"../../../generated/index.js\";\n\nconst applicationInsightsResource = \"https://monitor.azure.com/.default\";\n\n/**\n * Response type that includes the body and response headers from the Live Metrics service.\n * @internal\n */\nexport interface QuickpulseResponse extends CollectionConfigurationInfo {\n /** Whether the instrumentation key is subscribed. */\n xMsQpsSubscribed?: string;\n /** Configuration ETag. */\n xMsQpsConfigurationEtag?: string;\n /** Polling interval hint (only for ping). */\n xMsQpsServicePollingIntervalHint?: string;\n /** Endpoint redirect (only for ping). */\n xMsQpsServiceEndpointRedirectV2?: string;\n}\n\n/**\n * Quickpulse sender class\n * @internal\n */\nexport class QuickpulseSender {\n private quickpulseClient: QuickpulseClient;\n private instrumentationKey: string;\n private endpointUrl: string;\n private credential: TokenCredential;\n private credentialScopes: string[];\n\n constructor(options: {\n endpointUrl: string;\n instrumentationKey: string;\n credential?: TokenCredential;\n credentialScopes?: string | string[];\n }) {\n // Build endpoint using provided configuration or default values\n this.endpointUrl = options.endpointUrl;\n const clientOptions: QuickpulseClientOptionalParams = {\n endpoint: this.endpointUrl,\n };\n\n this.instrumentationKey = options.instrumentationKey;\n this.credential = options.credential as TokenCredential;\n\n // Configure credential scopes\n if (options.credentialScopes) {\n this.credentialScopes = Array.isArray(options.credentialScopes)\n ? options.credentialScopes\n : [options.credentialScopes];\n } else {\n this.credentialScopes = [applicationInsightsResource];\n }\n if (options.credential) {\n clientOptions.credentials = { scopes: this.credentialScopes };\n }\n\n this.quickpulseClient = this.createQuickpulseClient(clientOptions);\n }\n\n private createQuickpulseClient(clientOptions: QuickpulseClientOptionalParams): QuickpulseClient {\n const client = new QuickpulseClient(this.credential, clientOptions);\n // Handle redirects in HTTP Sender\n client.pipeline.removePolicy({ name: redirectPolicyName });\n return client;\n }\n\n /**\n * isSubscribed Quickpulse service\n * @internal\n */\n async isSubscribed(\n optionalParams: IsSubscribedOptionalParams,\n ): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.isSubscribed(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n xMsQpsServicePollingIntervalHint: responseHeaders[\"x-ms-qps-service-polling-interval-hint\"],\n xMsQpsServiceEndpointRedirectV2: responseHeaders[\"x-ms-qps-service-endpoint-redirect-v2\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.info(\"Failed to ping Quickpulse service\", restError.message);\n }\n return;\n }\n\n /**\n * publish Quickpulse service\n * @internal\n */\n async publish(optionalParams: PublishOptionalParams): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.publish(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.warn(\"Failed to post Quickpulse service\", restError.message);\n }\n return;\n }\n\n handlePermanentRedirect(location: string | undefined): void {\n if (location) {\n const locUrl = new url.URL(location);\n if (locUrl && locUrl.host) {\n this.endpointUrl = \"https://\" + locUrl.host;\n // Recreate the client so subsequent requests use the new endpoint\n this.quickpulseClient = this.createQuickpulseClient({\n endpoint: this.endpointUrl,\n credentials: { scopes: this.credentialScopes },\n });\n }\n }\n }\n}\n"]}
@@ -140,7 +140,7 @@ export interface BrowserSdkLoaderOptions {
140
140
  /** Browser SDK Loader Connection String */
141
141
  connectionString?: string;
142
142
  }
143
- export declare const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.17.0";
143
+ export declare const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.18.1";
144
144
  export declare const AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES";
145
145
  export declare const AZURE_MONITOR_PREFIX = "AZURE_MONITOR_PREFIX";
146
146
  export declare const AZURE_MONITOR_AUTO_ATTACH = "AZURE_MONITOR_AUTO_ATTACH";
@@ -16,7 +16,7 @@ exports.StatsbeatFeaturesMap = new Map([
16
16
  ["multiIkey", 128],
17
17
  ["aksResourceDetectorPopulation", 256],
18
18
  ]);
19
- exports.AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.17.0";
19
+ exports.AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.18.1";
20
20
  exports.AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES";
21
21
  exports.AZURE_MONITOR_PREFIX = "AZURE_MONITOR_PREFIX";
22
22
  exports.AZURE_MONITOR_AUTO_ATTACH = "AZURE_MONITOR_AUTO_ATTACH";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAmFA;;;GAGG;AACU,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAAiB;IAC1D,CAAC,WAAW,EAAE,CAAC,CAAC;IAChB,CAAC,aAAa,EAAE,CAAC,CAAC;IAClB,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACvB,CAAC,QAAQ,EAAE,CAAC,CAAC;IACb,CAAC,aAAa,EAAE,EAAE,CAAC;IACnB,CAAC,MAAM,EAAE,EAAE,CAAC;IACZ,CAAC,kBAAkB,EAAE,EAAE,CAAC;IACxB,CAAC,WAAW,EAAE,GAAG,CAAC;IAClB,CAAC,+BAA+B,EAAE,GAAG,CAAC;CACvC,CAAC,CAAC;AAiEU,QAAA,mCAAmC,GAAG,QAAQ,CAAC;AAC/C,QAAA,gCAAgC,GAAG,kCAAkC,CAAC;AACtE,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AACxD,QAAA,iCAAiC,GAAG,mCAAmC,CAAC;AAErF,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,gCAAY,CAAA;AACd,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED;;;GAGG;AACU,QAAA,iCAAiC,GAAG,2CAA2C,CAAC;AAE7F;;;GAGG;AACU,QAAA,uBAAuB,GAAG,sCAAsC,CAAC;AAC9E;;;GAGG;AACU,QAAA,4BAA4B,GAAG,kDAAkD,CAAC;AAE/F;;;GA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C;IAChF,CAAC,uCAAuC,EAAE,wBAAwB,CAAC,MAAM,CAAC;IAC1E,CAAC,4CAA4C,EAAE,wBAAwB,CAAC,WAAW,CAAC;IACpF,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,GAAG,CAAC;IACpE,CAAC,qCAAqC,EAAE,wBAAwB,CAAC,IAAI,CAAC;IACtE,CAAC,wCAAwC,EAAE,wBAAwB,CAAC,OAAO,CAAC;IAC5E,CAAC,uCAAuC,EAAE,wBAAwB,CAAC,MAAM,CAAC;CAC3E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AzureMonitorExporterOptions } from \"@azure/monitor-opentelemetry-exporter\";\nimport type { InstrumentationConfig } from \"@opentelemetry/instrumentation\";\nimport type { Resource } from \"@opentelemetry/resources\";\nimport type { LogRecordProcessor } from \"@opentelemetry/sdk-logs\";\nimport type { MetricReader, ViewOptions } from \"@opentelemetry/sdk-metrics\";\nimport type { SpanProcessor } from \"@opentelemetry/sdk-trace-base\";\n\n/**\n * Azure Monitor OpenTelemetry Options\n */\nexport interface AzureMonitorOpenTelemetryOptions {\n /** Azure Monitor Exporter Configuration */\n azureMonitorExporterOptions?: AzureMonitorExporterOptions;\n /** OpenTelemetry Resource */\n resource?: Resource;\n /** The rate of telemetry items tracked that should be transmitted (Default 1.0) */\n samplingRatio?: number;\n /** The maximum number of traces to sample per second (Default 5). Set to 0 to use samplingRatio instead. */\n tracesPerSecond?: number;\n /** Enable Live Metrics feature (Default false)*/\n enableLiveMetrics?: boolean;\n /** Enable Standard Metrics feature (Default true)*/\n enableStandardMetrics?: boolean;\n /** Enable log sampling based on trace (Default true) */\n enableTraceBasedSamplingForLogs?: boolean;\n /** Enable Performance Counter feature */\n enablePerformanceCounters?: boolean;\n /** OpenTelemetry Instrumentations options included as part of Azure Monitor. See {@link InstrumentationOptions} for the full set of supported instrumentations. */\n instrumentationOptions?: InstrumentationOptions;\n /** Application Insights Web Instrumentation options (enabled, connectionString, src, config)*/\n browserSdkLoaderOptions?: BrowserSdkLoaderOptions;\n /** An array of log record processors to register to the logger provider.*/\n logRecordProcessors?: LogRecordProcessor[];\n /** An array of span processors to register to the tracer provider.*/\n spanProcessors?: SpanProcessor[];\n /** An array of metric readers to register to the meter provider.*/\n metricReaders?: MetricReader[];\n /** An array of metric views to register to the meter provider.*/\n views?: ViewOptions[];\n}\n\n/**\n * OpenTelemetry Instrumentations Configuration interface\n */\nexport interface InstrumentationOptions {\n /** Azure SDK Instrumentation Config */\n azureSdk?: InstrumentationConfig;\n /** HTTP Instrumentation Config */\n http?: InstrumentationConfig;\n /** MongoDB Instrumentation Config */\n mongoDb?: InstrumentationConfig;\n /** MySQL Instrumentation Config */\n mySql?: InstrumentationConfig;\n /** PostgreSql Instrumentation Config */\n postgreSql?: InstrumentationConfig;\n /** Redis Instrumentation Config */\n redis?: InstrumentationConfig;\n /** Redis4 Instrumentation Config */\n redis4?: InstrumentationConfig;\n /** Bunyan Instrumentation Config */\n bunyan?: InstrumentationConfig;\n /** Winston Instrumentation Config */\n winston?: InstrumentationConfig;\n}\n\n/**\n * Statsbeat Features Configuration interface\n * @internal\n */\nexport interface StatsbeatFeatures {\n diskRetry?: boolean;\n aadHandling?: boolean;\n browserSdkLoader?: boolean;\n distro?: boolean;\n liveMetrics?: boolean;\n shim?: boolean;\n customerSdkStats?: boolean;\n multiIkey?: boolean;\n aksResourceDetectorPopulation?: boolean;\n}\n\n/**\n * Statsbeat Features Mapping\n * @internal\n */\nexport const StatsbeatFeaturesMap = new Map<string, number>([\n [\"diskRetry\", 1],\n [\"aadHandling\", 2],\n [\"browserSdkLoader\", 4],\n [\"distro\", 8],\n [\"liveMetrics\", 16],\n [\"shim\", 32],\n [\"customerSdkStats\", 64],\n [\"multiIkey\", 128],\n [\"aksResourceDetectorPopulation\", 256],\n]);\n\n/**\n * Statsbeat Instrumentations Configuration interface\n * @internal\n */\nexport interface StatsbeatInstrumentations {\n /** Azure Monitor Supported Instrumentations */\n azureSdk?: boolean;\n mongoDb?: boolean;\n mySql?: boolean;\n postgreSql?: boolean;\n redis?: boolean;\n bunyan?: boolean;\n winston?: boolean;\n /** OpenTelemetry Community Instrumentations */\n amqplib?: boolean;\n cucumber?: boolean;\n dataloader?: boolean;\n fs?: boolean;\n lruMemoizer?: boolean;\n mongoose?: boolean;\n runtimeNode?: boolean;\n socketIo?: boolean;\n tedious?: boolean;\n undici?: boolean;\n cassandra?: boolean;\n connect?: boolean;\n dns?: boolean;\n express?: boolean;\n fastify?: boolean;\n genericPool?: boolean;\n graphql?: boolean;\n hapi?: boolean;\n ioredis?: boolean;\n knex?: boolean;\n koa?: boolean;\n memcached?: boolean;\n mysql2?: boolean;\n nestjsCore?: boolean;\n net?: boolean;\n pino?: boolean;\n restify?: boolean;\n router?: boolean;\n}\n\n/**\n * Statsbeat Instrumentation and Feature Option interface\n * @internal\n */\nexport interface StatsbeatOption {\n option: string;\n value: boolean;\n}\n\n/**\n * Application Insights Web Instrumentation Configuration interface\n */\nexport interface BrowserSdkLoaderOptions {\n /** Browser SDK Loader Enable */\n enabled?: boolean;\n /** Browser SDK Loader Connection String */\n connectionString?: string;\n}\n\nexport const AZURE_MONITOR_OPENTELEMETRY_VERSION = \"1.17.0\";\nexport const AZURE_MONITOR_STATSBEAT_FEATURES = \"AZURE_MONITOR_STATSBEAT_FEATURES\";\nexport const AZURE_MONITOR_PREFIX = \"AZURE_MONITOR_PREFIX\";\nexport const AZURE_MONITOR_AUTO_ATTACH = \"AZURE_MONITOR_AUTO_ATTACH\";\nexport const APPLICATION_INSIGHTS_SHIM_VERSION = \"APPLICATION_INSIGHTS_SHIM_VERSION\";\n\nexport enum AttachTypePrefix {\n INTEGRATED_AUTO = \"i\",\n MANUAL = \"m\",\n}\n\n/**\n * Default Browser SDK Loader Source\n * @internal\n */\nexport const BROWSER_SDK_LOADER_DEFAULT_SOURCE = \"https://js.monitor.azure.com/scripts/b/ai\";\n\n/**\n * Default Breeze endpoint.\n * @internal\n */\nexport const DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\n/**\n * Default Live Metrics endpoint.\n * @internal\n */\nexport const DEFAULT_LIVEMETRICS_ENDPOINT = \"https://global.livediagnostics.monitor.azure.com\";\n\n/**\n * Internal attribute name for sample rate\n * @internal\n */\nexport const AzureMonitorSampleRate = \"microsoft.sample_rate\";\n\n/**\n * Disables customer-facing SDK Stats.\n * @internal\n */\nexport const APPLICATIONINSIGHTS_SDKSTATS_DISABLED = \"APPLICATIONINSIGHTS_SDKSTATS_DISABLED\";\n\nexport enum StatsbeatFeature {\n NONE = 0,\n DISK_RETRY = 1,\n AAD_HANDLING = 2,\n BROWSER_SDK_LOADER = 4,\n DISTRO = 8,\n LIVE_METRICS = 16,\n SHIM = 32,\n CUSTOMER_SDKSTATS = 64,\n MULTI_IKEY = 128,\n AKS_RESOURCE_DETECTOR_POPULATION = 256,\n}\n\nexport enum StatsbeatInstrumentation {\n /** Azure Monitor Supported Instrumentations */\n NONE = 0,\n AZURE_CORE_TRACING = 1,\n MONGODB = 2,\n MYSQL = 4,\n REDIS = 8,\n POSTGRES = 16,\n BUNYAN = 32,\n WINSTON = 64,\n /** OpenTelemetry Supported Instrumentations */\n // Console instrumentation is not supported here - occupies 128\n CUCUMBER = 256,\n DATALOADER = 512,\n FS = 1024,\n LRU_MEMOIZER = 2048,\n MONGOOSE = 4096,\n RUNTIME_NODE = 8192,\n SOCKET_IO = 16384,\n TEDIOUS = 32768,\n UNDICI = 65536,\n CASSANDRA = 131072,\n CONNECT = 262144,\n DNS = 524288,\n EXPRESS = 1048576,\n FASTIFY = 2097152,\n GENERIC_POOL = 4194304,\n GRAPHQL = 8388608,\n HAPI = 16777216,\n IOREDIS = 33554432,\n KNEX = 67108864,\n KOA = 134217728,\n MEMCACHED = 268435456,\n MYSQL2 = 536870912,\n NESTJS_CORE = 1073741824,\n NET = 2147483648,\n PINO = 4294967296,\n RESTIFY = 8589934592,\n ROUTER = 17179869184,\n AMQPLIB = 34359738368,\n}\n\n/**\n * Statsbeat Instrumentation Mapping\n * @internal\n */\nexport const StatsbeatInstrumentationMap = new Map<string, number>([\n [\"@opentelemetry/instrumentation-amqplib\", StatsbeatInstrumentation.AMQPLIB],\n [\"@opentelemetry/instrumentation-cucumber\", StatsbeatInstrumentation.CUCUMBER],\n [\"@opentelemetry/instrumentation-dataloader\", StatsbeatInstrumentation.DATALOADER],\n [\"@opentelemetry/instrumentation-fs\", StatsbeatInstrumentation.FS],\n [\"@opentelemetry/instrumentation-lru-memoizer\", StatsbeatInstrumentation.LRU_MEMOIZER],\n [\"@opentelemetry/instrumentation-mongoose\", StatsbeatInstrumentation.MONGOOSE],\n [\"@opentelemetry/instrumentation-runtime-node\", StatsbeatInstrumentation.RUNTIME_NODE],\n [\"@opentelemetry/instrumentation-socket.io\", StatsbeatInstrumentation.SOCKET_IO],\n [\"@opentelemetry/instrumentation-tedious\", StatsbeatInstrumentation.TEDIOUS],\n [\"@opentelemetry/instrumentation-undici\", StatsbeatInstrumentation.UNDICI],\n [\"@opentelemetry/instrumentation-cassandra-driver\", StatsbeatInstrumentation.CASSANDRA],\n [\"@opentelemetry/instrumentation-connect\", StatsbeatInstrumentation.CONNECT],\n [\"@opentelemetry/instrumentation-dns\", StatsbeatInstrumentation.DNS],\n [\"@opentelemetry/instrumentation-express\", StatsbeatInstrumentation.EXPRESS],\n [\"@opentelemetry/instrumentation-fastify\", StatsbeatInstrumentation.FASTIFY],\n [\"@opentelemetry/instrumentation-generic-pool\", StatsbeatInstrumentation.GENERIC_POOL],\n [\"@opentelemetry/instrumentation-graphql\", StatsbeatInstrumentation.GRAPHQL],\n [\"@opentelemetry/instrumentation-hapi\", StatsbeatInstrumentation.HAPI],\n [\"@opentelemetry/instrumentation-ioredis\", StatsbeatInstrumentation.IOREDIS],\n [\"@opentelemetry/instrumentation-knex\", StatsbeatInstrumentation.KNEX],\n [\"@opentelemetry/instrumentation-koa\", StatsbeatInstrumentation.KOA],\n [\"@opentelemetry/instrumentation-memcached\", StatsbeatInstrumentation.MEMCACHED],\n [\"@opentelemetry/instrumentation-mysql2\", StatsbeatInstrumentation.MYSQL2],\n [\"@opentelemetry/instrumentation-nestjs-core\", StatsbeatInstrumentation.NESTJS_CORE],\n [\"@opentelemetry/instrumentation-net\", StatsbeatInstrumentation.NET],\n [\"@opentelemetry/instrumentation-pino\", StatsbeatInstrumentation.PINO],\n [\"@opentelemetry/instrumentation-restify\", StatsbeatInstrumentation.RESTIFY],\n [\"@opentelemetry/instrumentation-router\", StatsbeatInstrumentation.ROUTER],\n]);\n\nexport interface StatsbeatEnvironmentConfig {\n instrumentation: StatsbeatInstrumentation;\n feature: StatsbeatFeature;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAmFA;;;GAGG;AACU,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAAiB;IAC1D,CAAC,WAAW,EAAE,CAAC,CAAC;IAChB,CAAC,aAAa,EAAE,CAAC,CAAC;IAClB,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACvB,CAAC,QAAQ,EAAE,CAAC,CAAC;IACb,CAAC,aAAa,EAAE,EAAE,CAAC;IACnB,CAAC,MAAM,EAAE,EAAE,CAAC;IACZ,CAAC,kBAAkB,EAAE,EAAE,CAAC;IACxB,CAAC,WAAW,EAAE,GAAG,CAAC;IAClB,CAAC,+BAA+B,EAAE,GAAG,CAAC;CACvC,CAAC,CAAC;AAiEU,QAAA,mCAAmC,GAAG,QAAQ,CAAC;AAC/C,QAAA,gCAAgC,GAAG,kCAAkC,CAAC;AACtE,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AACxD,QAAA,iCAAiC,GAAG,mCAAmC,CAAC;AAErF,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,gCAAY,CAAA;AACd,CAAC,EAHW,gBAAgB,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,wCAAwC,EAAE,wBAAwB,CAAC,OAAO,CAAC;IAC5E,CAAC,qCAAqC,EAAE,wBAAwB,CAAC,IAAI,CAAC;IACtE,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,GAAG,CAAC;IACpE,CAAC,0CAA0C,EAAE,wBAAwB,CAAC,SAAS,CAAC;IAChF,CAAC,uCAAuC,EAAE,wBAAwB,CAAC,MAAM,CAAC;IAC1E,CAAC,4CAA4C,EAAE,wBAAwB,CAAC,WAAW,CAAC;IACpF,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,GAAG,CAAC;IACpE,CAAC,qCAAqC,EAAE,wBAAwB,CAAC,IAAI,CAAC;IACtE,CAAC,wCAAwC,EAAE,wBAAwB,CAAC,OAAO,CAAC;IAC5E,CAAC,uCAAuC,EAAE,wBAAwB,CAAC,MAAM,CAAC;CAC3E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AzureMonitorExporterOptions } from \"@azure/monitor-opentelemetry-exporter\";\nimport type { InstrumentationConfig } from \"@opentelemetry/instrumentation\";\nimport type { Resource } from \"@opentelemetry/resources\";\nimport type { LogRecordProcessor } from \"@opentelemetry/sdk-logs\";\nimport type { MetricReader, ViewOptions } from \"@opentelemetry/sdk-metrics\";\nimport type { SpanProcessor } from \"@opentelemetry/sdk-trace-base\";\n\n/**\n * Azure Monitor OpenTelemetry Options\n */\nexport interface AzureMonitorOpenTelemetryOptions {\n /** Azure Monitor Exporter Configuration */\n azureMonitorExporterOptions?: AzureMonitorExporterOptions;\n /** OpenTelemetry Resource */\n resource?: Resource;\n /** The rate of telemetry items tracked that should be transmitted (Default 1.0) */\n samplingRatio?: number;\n /** The maximum number of traces to sample per second (Default 5). Set to 0 to use samplingRatio instead. */\n tracesPerSecond?: number;\n /** Enable Live Metrics feature (Default false)*/\n enableLiveMetrics?: boolean;\n /** Enable Standard Metrics feature (Default true)*/\n enableStandardMetrics?: boolean;\n /** Enable log sampling based on trace (Default true) */\n enableTraceBasedSamplingForLogs?: boolean;\n /** Enable Performance Counter feature */\n enablePerformanceCounters?: boolean;\n /** OpenTelemetry Instrumentations options included as part of Azure Monitor. See {@link InstrumentationOptions} for the full set of supported instrumentations. */\n instrumentationOptions?: InstrumentationOptions;\n /** Application Insights Web Instrumentation options (enabled, connectionString, src, config)*/\n browserSdkLoaderOptions?: BrowserSdkLoaderOptions;\n /** An array of log record processors to register to the logger provider.*/\n logRecordProcessors?: LogRecordProcessor[];\n /** An array of span processors to register to the tracer provider.*/\n spanProcessors?: SpanProcessor[];\n /** An array of metric readers to register to the meter provider.*/\n metricReaders?: MetricReader[];\n /** An array of metric views to register to the meter provider.*/\n views?: ViewOptions[];\n}\n\n/**\n * OpenTelemetry Instrumentations Configuration interface\n */\nexport interface InstrumentationOptions {\n /** Azure SDK Instrumentation Config */\n azureSdk?: InstrumentationConfig;\n /** HTTP Instrumentation Config */\n http?: InstrumentationConfig;\n /** MongoDB Instrumentation Config */\n mongoDb?: InstrumentationConfig;\n /** MySQL Instrumentation Config */\n mySql?: InstrumentationConfig;\n /** PostgreSql Instrumentation Config */\n postgreSql?: InstrumentationConfig;\n /** Redis Instrumentation Config */\n redis?: InstrumentationConfig;\n /** Redis4 Instrumentation Config */\n redis4?: InstrumentationConfig;\n /** Bunyan Instrumentation Config */\n bunyan?: InstrumentationConfig;\n /** Winston Instrumentation Config */\n winston?: InstrumentationConfig;\n}\n\n/**\n * Statsbeat Features Configuration interface\n * @internal\n */\nexport interface StatsbeatFeatures {\n diskRetry?: boolean;\n aadHandling?: boolean;\n browserSdkLoader?: boolean;\n distro?: boolean;\n liveMetrics?: boolean;\n shim?: boolean;\n customerSdkStats?: boolean;\n multiIkey?: boolean;\n aksResourceDetectorPopulation?: boolean;\n}\n\n/**\n * Statsbeat Features Mapping\n * @internal\n */\nexport const StatsbeatFeaturesMap = new Map<string, number>([\n [\"diskRetry\", 1],\n [\"aadHandling\", 2],\n [\"browserSdkLoader\", 4],\n [\"distro\", 8],\n [\"liveMetrics\", 16],\n [\"shim\", 32],\n [\"customerSdkStats\", 64],\n [\"multiIkey\", 128],\n [\"aksResourceDetectorPopulation\", 256],\n]);\n\n/**\n * Statsbeat Instrumentations Configuration interface\n * @internal\n */\nexport interface StatsbeatInstrumentations {\n /** Azure Monitor Supported Instrumentations */\n azureSdk?: boolean;\n mongoDb?: boolean;\n mySql?: boolean;\n postgreSql?: boolean;\n redis?: boolean;\n bunyan?: boolean;\n winston?: boolean;\n /** OpenTelemetry Community Instrumentations */\n amqplib?: boolean;\n cucumber?: boolean;\n dataloader?: boolean;\n fs?: boolean;\n lruMemoizer?: boolean;\n mongoose?: boolean;\n runtimeNode?: boolean;\n socketIo?: boolean;\n tedious?: boolean;\n undici?: boolean;\n cassandra?: boolean;\n connect?: boolean;\n dns?: boolean;\n express?: boolean;\n fastify?: boolean;\n genericPool?: boolean;\n graphql?: boolean;\n hapi?: boolean;\n ioredis?: boolean;\n knex?: boolean;\n koa?: boolean;\n memcached?: boolean;\n mysql2?: boolean;\n nestjsCore?: boolean;\n net?: boolean;\n pino?: boolean;\n restify?: boolean;\n router?: boolean;\n}\n\n/**\n * Statsbeat Instrumentation and Feature Option interface\n * @internal\n */\nexport interface StatsbeatOption {\n option: string;\n value: boolean;\n}\n\n/**\n * Application Insights Web Instrumentation Configuration interface\n */\nexport interface BrowserSdkLoaderOptions {\n /** Browser SDK Loader Enable */\n enabled?: boolean;\n /** Browser SDK Loader Connection String */\n connectionString?: string;\n}\n\nexport const AZURE_MONITOR_OPENTELEMETRY_VERSION = \"1.18.1\";\nexport const AZURE_MONITOR_STATSBEAT_FEATURES = \"AZURE_MONITOR_STATSBEAT_FEATURES\";\nexport const AZURE_MONITOR_PREFIX = \"AZURE_MONITOR_PREFIX\";\nexport const AZURE_MONITOR_AUTO_ATTACH = \"AZURE_MONITOR_AUTO_ATTACH\";\nexport const APPLICATION_INSIGHTS_SHIM_VERSION = \"APPLICATION_INSIGHTS_SHIM_VERSION\";\n\nexport enum AttachTypePrefix {\n INTEGRATED_AUTO = \"i\",\n MANUAL = \"m\",\n}\n\n/**\n * Default Browser SDK Loader Source\n * @internal\n */\nexport const BROWSER_SDK_LOADER_DEFAULT_SOURCE = \"https://js.monitor.azure.com/scripts/b/ai\";\n\n/**\n * Default Breeze endpoint.\n * @internal\n */\nexport const DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\n/**\n * Default Live Metrics endpoint.\n * @internal\n */\nexport const DEFAULT_LIVEMETRICS_ENDPOINT = \"https://global.livediagnostics.monitor.azure.com\";\n\n/**\n * Internal attribute name for sample rate\n * @internal\n */\nexport const AzureMonitorSampleRate = \"microsoft.sample_rate\";\n\n/**\n * Disables customer-facing SDK Stats.\n * @internal\n */\nexport const APPLICATIONINSIGHTS_SDKSTATS_DISABLED = \"APPLICATIONINSIGHTS_SDKSTATS_DISABLED\";\n\nexport enum StatsbeatFeature {\n NONE = 0,\n DISK_RETRY = 1,\n AAD_HANDLING = 2,\n BROWSER_SDK_LOADER = 4,\n DISTRO = 8,\n LIVE_METRICS = 16,\n SHIM = 32,\n CUSTOMER_SDKSTATS = 64,\n MULTI_IKEY = 128,\n AKS_RESOURCE_DETECTOR_POPULATION = 256,\n}\n\nexport enum StatsbeatInstrumentation {\n /** Azure Monitor Supported Instrumentations */\n NONE = 0,\n AZURE_CORE_TRACING = 1,\n MONGODB = 2,\n MYSQL = 4,\n REDIS = 8,\n POSTGRES = 16,\n BUNYAN = 32,\n WINSTON = 64,\n /** OpenTelemetry Supported Instrumentations */\n // Console instrumentation is not supported here - occupies 128\n CUCUMBER = 256,\n DATALOADER = 512,\n FS = 1024,\n LRU_MEMOIZER = 2048,\n MONGOOSE = 4096,\n RUNTIME_NODE = 8192,\n SOCKET_IO = 16384,\n TEDIOUS = 32768,\n UNDICI = 65536,\n CASSANDRA = 131072,\n CONNECT = 262144,\n DNS = 524288,\n EXPRESS = 1048576,\n FASTIFY = 2097152,\n GENERIC_POOL = 4194304,\n GRAPHQL = 8388608,\n HAPI = 16777216,\n IOREDIS = 33554432,\n KNEX = 67108864,\n KOA = 134217728,\n MEMCACHED = 268435456,\n MYSQL2 = 536870912,\n NESTJS_CORE = 1073741824,\n NET = 2147483648,\n PINO = 4294967296,\n RESTIFY = 8589934592,\n ROUTER = 17179869184,\n AMQPLIB = 34359738368,\n}\n\n/**\n * Statsbeat Instrumentation Mapping\n * @internal\n */\nexport const StatsbeatInstrumentationMap = new Map<string, number>([\n [\"@opentelemetry/instrumentation-amqplib\", StatsbeatInstrumentation.AMQPLIB],\n [\"@opentelemetry/instrumentation-cucumber\", StatsbeatInstrumentation.CUCUMBER],\n [\"@opentelemetry/instrumentation-dataloader\", StatsbeatInstrumentation.DATALOADER],\n [\"@opentelemetry/instrumentation-fs\", StatsbeatInstrumentation.FS],\n [\"@opentelemetry/instrumentation-lru-memoizer\", StatsbeatInstrumentation.LRU_MEMOIZER],\n [\"@opentelemetry/instrumentation-mongoose\", StatsbeatInstrumentation.MONGOOSE],\n [\"@opentelemetry/instrumentation-runtime-node\", StatsbeatInstrumentation.RUNTIME_NODE],\n [\"@opentelemetry/instrumentation-socket.io\", StatsbeatInstrumentation.SOCKET_IO],\n [\"@opentelemetry/instrumentation-tedious\", StatsbeatInstrumentation.TEDIOUS],\n [\"@opentelemetry/instrumentation-undici\", StatsbeatInstrumentation.UNDICI],\n [\"@opentelemetry/instrumentation-cassandra-driver\", StatsbeatInstrumentation.CASSANDRA],\n [\"@opentelemetry/instrumentation-connect\", StatsbeatInstrumentation.CONNECT],\n [\"@opentelemetry/instrumentation-dns\", StatsbeatInstrumentation.DNS],\n [\"@opentelemetry/instrumentation-express\", StatsbeatInstrumentation.EXPRESS],\n [\"@opentelemetry/instrumentation-fastify\", StatsbeatInstrumentation.FASTIFY],\n [\"@opentelemetry/instrumentation-generic-pool\", StatsbeatInstrumentation.GENERIC_POOL],\n [\"@opentelemetry/instrumentation-graphql\", StatsbeatInstrumentation.GRAPHQL],\n [\"@opentelemetry/instrumentation-hapi\", StatsbeatInstrumentation.HAPI],\n [\"@opentelemetry/instrumentation-ioredis\", StatsbeatInstrumentation.IOREDIS],\n [\"@opentelemetry/instrumentation-knex\", StatsbeatInstrumentation.KNEX],\n [\"@opentelemetry/instrumentation-koa\", StatsbeatInstrumentation.KOA],\n [\"@opentelemetry/instrumentation-memcached\", StatsbeatInstrumentation.MEMCACHED],\n [\"@opentelemetry/instrumentation-mysql2\", StatsbeatInstrumentation.MYSQL2],\n [\"@opentelemetry/instrumentation-nestjs-core\", StatsbeatInstrumentation.NESTJS_CORE],\n [\"@opentelemetry/instrumentation-net\", StatsbeatInstrumentation.NET],\n [\"@opentelemetry/instrumentation-pino\", StatsbeatInstrumentation.PINO],\n [\"@opentelemetry/instrumentation-restify\", StatsbeatInstrumentation.RESTIFY],\n [\"@opentelemetry/instrumentation-router\", StatsbeatInstrumentation.ROUTER],\n]);\n\nexport interface StatsbeatEnvironmentConfig {\n instrumentation: StatsbeatInstrumentation;\n feature: StatsbeatFeature;\n}\n"]}
@@ -24,7 +24,6 @@ export declare class QuickpulseSender {
24
24
  private endpointUrl;
25
25
  private credential;
26
26
  private credentialScopes;
27
- private quickpulseClientOptions;
28
27
  constructor(options: {
29
28
  endpointUrl: string;
30
29
  instrumentationKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"sender.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/quickpulse/export/sender.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EACV,0BAA0B,EAC1B,qBAAqB,EAErB,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;AAKrC;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,2BAA2B;IACrE,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0BAA0B;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,6CAA6C;IAC7C,gCA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CAAC,EAAE,MAAM,CAAC;IAC1C,yCAAyC;IACzC,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,gBAAgB,CAAW;gBAEvB,OAAO,EAAE;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,UAAU,CAAC,EAAE,eAAe,CAAC;QAC7B,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACtC;IAyBD,OAAO,CAAC,sBAAsB;IAO9B;;;OAGG;IACG,YAAY,CAChB,cAAc,EAAE,0BAA0B,GACzC,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAuB1C;;;OAGG;IACG,OAAO,CAAC,cAAc,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;IAqB7F,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;CAa5D"}
@@ -15,8 +15,6 @@ export class QuickpulseSender {
15
15
  endpointUrl;
16
16
  credential;
17
17
  credentialScopes;
18
- // @ts-expect-error - assigned in constructor, accessed by tests via bracket notation
19
- quickpulseClientOptions;
20
18
  constructor(options) {
21
19
  // Build endpoint using provided configuration or default values
22
20
  this.endpointUrl = options.endpointUrl;
@@ -37,11 +35,6 @@ export class QuickpulseSender {
37
35
  if (options.credential) {
38
36
  clientOptions.credentials = { scopes: this.credentialScopes };
39
37
  }
40
- // Store credential info for testability
41
- this.quickpulseClientOptions = {
42
- credential: options.credential,
43
- credentialScopes: this.credentialScopes,
44
- };
45
38
  this.quickpulseClient = this.createQuickpulseClient(clientOptions);
46
39
  }
47
40
  createQuickpulseClient(clientOptions) {
@@ -1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C;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport url from \"url\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { diag } from \"@opentelemetry/api\";\nimport type {\n IsSubscribedOptionalParams,\n PublishOptionalParams,\n QuickpulseClientOptionalParams,\n CollectionConfigurationInfo,\n} from \"../../../generated/index.js\";\nimport { QuickpulseClient } from \"../../../generated/index.js\";\n\nconst applicationInsightsResource = \"https://monitor.azure.com/.default\";\n\n/**\n * Response type that includes the body and response headers from the Live Metrics service.\n * @internal\n */\nexport interface QuickpulseResponse extends CollectionConfigurationInfo {\n /** Whether the instrumentation key is subscribed. */\n xMsQpsSubscribed?: string;\n /** Configuration ETag. */\n xMsQpsConfigurationEtag?: string;\n /** Polling interval hint (only for ping). */\n xMsQpsServicePollingIntervalHint?: string;\n /** Endpoint redirect (only for ping). */\n xMsQpsServiceEndpointRedirectV2?: string;\n}\n\n/**\n * Quickpulse sender class\n * @internal\n */\nexport class QuickpulseSender {\n private quickpulseClient: QuickpulseClient;\n private instrumentationKey: string;\n private endpointUrl: string;\n private credential: TokenCredential;\n private credentialScopes: string[];\n // @ts-expect-error - assigned in constructor, accessed by tests via bracket notation\n private quickpulseClientOptions: {\n credential?: TokenCredential;\n credentialScopes?: string[];\n };\n\n constructor(options: {\n endpointUrl: string;\n instrumentationKey: string;\n credential?: TokenCredential;\n credentialScopes?: string | string[];\n }) {\n // Build endpoint using provided configuration or default values\n this.endpointUrl = options.endpointUrl;\n const clientOptions: QuickpulseClientOptionalParams = {\n endpoint: this.endpointUrl,\n };\n\n this.instrumentationKey = options.instrumentationKey;\n this.credential = options.credential as TokenCredential;\n\n // Configure credential scopes\n if (options.credentialScopes) {\n this.credentialScopes = Array.isArray(options.credentialScopes)\n ? options.credentialScopes\n : [options.credentialScopes];\n } else {\n this.credentialScopes = [applicationInsightsResource];\n }\n if (options.credential) {\n clientOptions.credentials = { scopes: this.credentialScopes };\n }\n\n // Store credential info for testability\n this.quickpulseClientOptions = {\n credential: options.credential,\n credentialScopes: this.credentialScopes,\n };\n\n this.quickpulseClient = this.createQuickpulseClient(clientOptions);\n }\n\n private createQuickpulseClient(clientOptions: QuickpulseClientOptionalParams): QuickpulseClient {\n const client = new QuickpulseClient(this.credential, clientOptions);\n // Handle redirects in HTTP Sender\n client.pipeline.removePolicy({ name: redirectPolicyName });\n return client;\n }\n\n /**\n * isSubscribed Quickpulse service\n * @internal\n */\n async isSubscribed(\n optionalParams: IsSubscribedOptionalParams,\n ): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.isSubscribed(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n xMsQpsServicePollingIntervalHint: responseHeaders[\"x-ms-qps-service-polling-interval-hint\"],\n xMsQpsServiceEndpointRedirectV2: responseHeaders[\"x-ms-qps-service-endpoint-redirect-v2\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.info(\"Failed to ping Quickpulse service\", restError.message);\n }\n return;\n }\n\n /**\n * publish Quickpulse service\n * @internal\n */\n async publish(optionalParams: PublishOptionalParams): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.publish(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.warn(\"Failed to post Quickpulse service\", restError.message);\n }\n return;\n }\n\n handlePermanentRedirect(location: string | undefined): void {\n if (location) {\n const locUrl = new url.URL(location);\n if (locUrl && locUrl.host) {\n this.endpointUrl = \"https://\" + locUrl.host;\n // Recreate the client so subsequent requests use the new endpoint\n this.quickpulseClient = this.createQuickpulseClient({\n endpoint: this.endpointUrl,\n credentials: { scopes: this.credentialScopes },\n });\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"sender.js","sourceRoot":"","sources":["../../../../../src/metrics/quickpulse/export/sender.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAO1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,2BAA2B,GAAG,oCAAoC,CAAC;AAiBzE;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IACnB,gBAAgB,CAAmB;IACnC,kBAAkB,CAAS;IAC3B,WAAW,CAAS;IACpB,UAAU,CAAkB;IAC5B,gBAAgB,CAAW;IAEnC,YAAY,OAKX;QACC,gEAAgE;QAChE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,MAAM,aAAa,GAAmC;YACpD,QAAQ,EAAE,IAAI,CAAC,WAAW;SAC3B,CAAC;QAEF,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC;QACrD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAA6B,CAAC;QAExD,8BAA8B;QAC9B,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC;gBAC7D,CAAC,CAAC,OAAO,CAAC,gBAA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,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE;iBAC/C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport url from \"url\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\nimport { redirectPolicyName } from \"@azure/core-rest-pipeline\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { diag } from \"@opentelemetry/api\";\nimport type {\n IsSubscribedOptionalParams,\n PublishOptionalParams,\n QuickpulseClientOptionalParams,\n CollectionConfigurationInfo,\n} from \"../../../generated/index.js\";\nimport { QuickpulseClient } from \"../../../generated/index.js\";\n\nconst applicationInsightsResource = \"https://monitor.azure.com/.default\";\n\n/**\n * Response type that includes the body and response headers from the Live Metrics service.\n * @internal\n */\nexport interface QuickpulseResponse extends CollectionConfigurationInfo {\n /** Whether the instrumentation key is subscribed. */\n xMsQpsSubscribed?: string;\n /** Configuration ETag. */\n xMsQpsConfigurationEtag?: string;\n /** Polling interval hint (only for ping). */\n xMsQpsServicePollingIntervalHint?: string;\n /** Endpoint redirect (only for ping). */\n xMsQpsServiceEndpointRedirectV2?: string;\n}\n\n/**\n * Quickpulse sender class\n * @internal\n */\nexport class QuickpulseSender {\n private quickpulseClient: QuickpulseClient;\n private instrumentationKey: string;\n private endpointUrl: string;\n private credential: TokenCredential;\n private credentialScopes: string[];\n\n constructor(options: {\n endpointUrl: string;\n instrumentationKey: string;\n credential?: TokenCredential;\n credentialScopes?: string | string[];\n }) {\n // Build endpoint using provided configuration or default values\n this.endpointUrl = options.endpointUrl;\n const clientOptions: QuickpulseClientOptionalParams = {\n endpoint: this.endpointUrl,\n };\n\n this.instrumentationKey = options.instrumentationKey;\n this.credential = options.credential as TokenCredential;\n\n // Configure credential scopes\n if (options.credentialScopes) {\n this.credentialScopes = Array.isArray(options.credentialScopes)\n ? options.credentialScopes\n : [options.credentialScopes];\n } else {\n this.credentialScopes = [applicationInsightsResource];\n }\n if (options.credential) {\n clientOptions.credentials = { scopes: this.credentialScopes };\n }\n\n this.quickpulseClient = this.createQuickpulseClient(clientOptions);\n }\n\n private createQuickpulseClient(clientOptions: QuickpulseClientOptionalParams): QuickpulseClient {\n const client = new QuickpulseClient(this.credential, clientOptions);\n // Handle redirects in HTTP Sender\n client.pipeline.removePolicy({ name: redirectPolicyName });\n return client;\n }\n\n /**\n * isSubscribed Quickpulse service\n * @internal\n */\n async isSubscribed(\n optionalParams: IsSubscribedOptionalParams,\n ): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.isSubscribed(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n xMsQpsServicePollingIntervalHint: responseHeaders[\"x-ms-qps-service-polling-interval-hint\"],\n xMsQpsServiceEndpointRedirectV2: responseHeaders[\"x-ms-qps-service-endpoint-redirect-v2\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.info(\"Failed to ping Quickpulse service\", restError.message);\n }\n return;\n }\n\n /**\n * publish Quickpulse service\n * @internal\n */\n async publish(optionalParams: PublishOptionalParams): Promise<QuickpulseResponse | undefined> {\n try {\n let responseHeaders: Record<string, string> = {};\n const body = await this.quickpulseClient.publish(this.instrumentationKey, {\n ...optionalParams,\n onResponse: (rawResponse) => {\n responseHeaders = rawResponse.headers.toJSON();\n },\n });\n return {\n ...body,\n xMsQpsSubscribed: responseHeaders[\"x-ms-qps-subscribed\"],\n xMsQpsConfigurationEtag: responseHeaders[\"x-ms-qps-configuration-etag\"],\n };\n } catch (error: any) {\n const restError = error as RestError;\n diag.warn(\"Failed to post Quickpulse service\", restError.message);\n }\n return;\n }\n\n handlePermanentRedirect(location: string | undefined): void {\n if (location) {\n const locUrl = new url.URL(location);\n if (locUrl && locUrl.host) {\n this.endpointUrl = \"https://\" + locUrl.host;\n // Recreate the client so subsequent requests use the new endpoint\n this.quickpulseClient = this.createQuickpulseClient({\n endpoint: this.endpointUrl,\n credentials: { scopes: this.credentialScopes },\n });\n }\n }\n }\n}\n"]}
@@ -140,7 +140,7 @@ export interface BrowserSdkLoaderOptions {
140
140
  /** Browser SDK Loader Connection String */
141
141
  connectionString?: string;
142
142
  }
143
- export declare const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.17.0";
143
+ export declare const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.18.1";
144
144
  export declare const AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES";
145
145
  export declare const AZURE_MONITOR_PREFIX = "AZURE_MONITOR_PREFIX";
146
146
  export declare const AZURE_MONITOR_AUTO_ATTACH = "AZURE_MONITOR_AUTO_ATTACH";
package/dist/esm/types.js CHANGED
@@ -13,7 +13,7 @@ export const StatsbeatFeaturesMap = new Map([
13
13
  ["multiIkey", 128],
14
14
  ["aksResourceDetectorPopulation", 256],
15
15
  ]);
16
- export const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.17.0";
16
+ export const AZURE_MONITOR_OPENTELEMETRY_VERSION = "1.18.1";
17
17
  export const AZURE_MONITOR_STATSBEAT_FEATURES = "AZURE_MONITOR_STATSBEAT_FEATURES";
18
18
  export const AZURE_MONITOR_PREFIX = "AZURE_MONITOR_PREFIX";
19
19
  export const AZURE_MONITOR_AUTO_ATTACH = "AZURE_MONITOR_AUTO_ATTACH";
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAmFA;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAiB;IAC1D,CAAC,WAAW,EAAE,CAAC,CAAC;IAChB,CAAC,aAAa,EAAE,CAAC,CAA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,CAAC,uCAAuC,EAAE,wBAAwB,CAAC,MAAM,CAAC;CAC3E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AzureMonitorExporterOptions } from \"@azure/monitor-opentelemetry-exporter\";\nimport type { InstrumentationConfig } from \"@opentelemetry/instrumentation\";\nimport type { Resource } from \"@opentelemetry/resources\";\nimport type { LogRecordProcessor } from \"@opentelemetry/sdk-logs\";\nimport type { MetricReader, ViewOptions } from \"@opentelemetry/sdk-metrics\";\nimport type { SpanProcessor } from \"@opentelemetry/sdk-trace-base\";\n\n/**\n * Azure Monitor OpenTelemetry Options\n */\nexport interface AzureMonitorOpenTelemetryOptions {\n /** Azure Monitor Exporter Configuration */\n azureMonitorExporterOptions?: AzureMonitorExporterOptions;\n /** OpenTelemetry Resource */\n resource?: Resource;\n /** The rate of telemetry items tracked that should be transmitted (Default 1.0) */\n samplingRatio?: number;\n /** The maximum number of traces to sample per second (Default 5). Set to 0 to use samplingRatio instead. */\n tracesPerSecond?: number;\n /** Enable Live Metrics feature (Default false)*/\n enableLiveMetrics?: boolean;\n /** Enable Standard Metrics feature (Default true)*/\n enableStandardMetrics?: boolean;\n /** Enable log sampling based on trace (Default true) */\n enableTraceBasedSamplingForLogs?: boolean;\n /** Enable Performance Counter feature */\n enablePerformanceCounters?: boolean;\n /** OpenTelemetry Instrumentations options included as part of Azure Monitor. See {@link InstrumentationOptions} for the full set of supported instrumentations. */\n instrumentationOptions?: InstrumentationOptions;\n /** Application Insights Web Instrumentation options (enabled, connectionString, src, config)*/\n browserSdkLoaderOptions?: BrowserSdkLoaderOptions;\n /** An array of log record processors to register to the logger provider.*/\n logRecordProcessors?: LogRecordProcessor[];\n /** An array of span processors to register to the tracer provider.*/\n spanProcessors?: SpanProcessor[];\n /** An array of metric readers to register to the meter provider.*/\n metricReaders?: MetricReader[];\n /** An array of metric views to register to the meter provider.*/\n views?: ViewOptions[];\n}\n\n/**\n * OpenTelemetry Instrumentations Configuration interface\n */\nexport interface InstrumentationOptions {\n /** Azure SDK Instrumentation Config */\n azureSdk?: InstrumentationConfig;\n /** HTTP Instrumentation Config */\n http?: InstrumentationConfig;\n /** MongoDB Instrumentation Config */\n mongoDb?: InstrumentationConfig;\n /** MySQL Instrumentation Config */\n mySql?: InstrumentationConfig;\n /** PostgreSql Instrumentation Config */\n postgreSql?: InstrumentationConfig;\n /** Redis Instrumentation Config */\n redis?: InstrumentationConfig;\n /** Redis4 Instrumentation Config */\n redis4?: InstrumentationConfig;\n /** Bunyan Instrumentation Config */\n bunyan?: InstrumentationConfig;\n /** Winston Instrumentation Config */\n winston?: InstrumentationConfig;\n}\n\n/**\n * Statsbeat Features Configuration interface\n * @internal\n */\nexport interface StatsbeatFeatures {\n diskRetry?: boolean;\n aadHandling?: boolean;\n browserSdkLoader?: boolean;\n distro?: boolean;\n liveMetrics?: boolean;\n shim?: boolean;\n customerSdkStats?: boolean;\n multiIkey?: boolean;\n aksResourceDetectorPopulation?: boolean;\n}\n\n/**\n * Statsbeat Features Mapping\n * @internal\n */\nexport const StatsbeatFeaturesMap = new Map<string, number>([\n [\"diskRetry\", 1],\n [\"aadHandling\", 2],\n [\"browserSdkLoader\", 4],\n [\"distro\", 8],\n [\"liveMetrics\", 16],\n [\"shim\", 32],\n [\"customerSdkStats\", 64],\n [\"multiIkey\", 128],\n [\"aksResourceDetectorPopulation\", 256],\n]);\n\n/**\n * Statsbeat Instrumentations Configuration interface\n * @internal\n */\nexport interface StatsbeatInstrumentations {\n /** Azure Monitor Supported Instrumentations */\n azureSdk?: boolean;\n mongoDb?: boolean;\n mySql?: boolean;\n postgreSql?: boolean;\n redis?: boolean;\n bunyan?: boolean;\n winston?: boolean;\n /** OpenTelemetry Community Instrumentations */\n amqplib?: boolean;\n cucumber?: boolean;\n dataloader?: boolean;\n fs?: boolean;\n lruMemoizer?: boolean;\n mongoose?: boolean;\n runtimeNode?: boolean;\n socketIo?: boolean;\n tedious?: boolean;\n undici?: boolean;\n cassandra?: boolean;\n connect?: boolean;\n dns?: boolean;\n express?: boolean;\n fastify?: boolean;\n genericPool?: boolean;\n graphql?: boolean;\n hapi?: boolean;\n ioredis?: boolean;\n knex?: boolean;\n koa?: boolean;\n memcached?: boolean;\n mysql2?: boolean;\n nestjsCore?: boolean;\n net?: boolean;\n pino?: boolean;\n restify?: boolean;\n router?: boolean;\n}\n\n/**\n * Statsbeat Instrumentation and Feature Option interface\n * @internal\n */\nexport interface StatsbeatOption {\n option: string;\n value: boolean;\n}\n\n/**\n * Application Insights Web Instrumentation Configuration interface\n */\nexport interface BrowserSdkLoaderOptions {\n /** Browser SDK Loader Enable */\n enabled?: boolean;\n /** Browser SDK Loader Connection String */\n connectionString?: string;\n}\n\nexport const AZURE_MONITOR_OPENTELEMETRY_VERSION = \"1.17.0\";\nexport const AZURE_MONITOR_STATSBEAT_FEATURES = \"AZURE_MONITOR_STATSBEAT_FEATURES\";\nexport const AZURE_MONITOR_PREFIX = \"AZURE_MONITOR_PREFIX\";\nexport const AZURE_MONITOR_AUTO_ATTACH = \"AZURE_MONITOR_AUTO_ATTACH\";\nexport const APPLICATION_INSIGHTS_SHIM_VERSION = \"APPLICATION_INSIGHTS_SHIM_VERSION\";\n\nexport enum AttachTypePrefix {\n INTEGRATED_AUTO = \"i\",\n MANUAL = \"m\",\n}\n\n/**\n * Default Browser SDK Loader Source\n * @internal\n */\nexport const BROWSER_SDK_LOADER_DEFAULT_SOURCE = \"https://js.monitor.azure.com/scripts/b/ai\";\n\n/**\n * Default Breeze endpoint.\n * @internal\n */\nexport const DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\n/**\n * Default Live Metrics endpoint.\n * @internal\n */\nexport const DEFAULT_LIVEMETRICS_ENDPOINT = \"https://global.livediagnostics.monitor.azure.com\";\n\n/**\n * Internal attribute name for sample rate\n * @internal\n */\nexport const AzureMonitorSampleRate = \"microsoft.sample_rate\";\n\n/**\n * Disables customer-facing SDK Stats.\n * @internal\n */\nexport const APPLICATIONINSIGHTS_SDKSTATS_DISABLED = \"APPLICATIONINSIGHTS_SDKSTATS_DISABLED\";\n\nexport enum StatsbeatFeature {\n NONE = 0,\n DISK_RETRY = 1,\n AAD_HANDLING = 2,\n BROWSER_SDK_LOADER = 4,\n DISTRO = 8,\n LIVE_METRICS = 16,\n SHIM = 32,\n CUSTOMER_SDKSTATS = 64,\n MULTI_IKEY = 128,\n AKS_RESOURCE_DETECTOR_POPULATION = 256,\n}\n\nexport enum StatsbeatInstrumentation {\n /** Azure Monitor Supported Instrumentations */\n NONE = 0,\n AZURE_CORE_TRACING = 1,\n MONGODB = 2,\n MYSQL = 4,\n REDIS = 8,\n POSTGRES = 16,\n BUNYAN = 32,\n WINSTON = 64,\n /** OpenTelemetry Supported Instrumentations */\n // Console instrumentation is not supported here - occupies 128\n CUCUMBER = 256,\n DATALOADER = 512,\n FS = 1024,\n LRU_MEMOIZER = 2048,\n MONGOOSE = 4096,\n RUNTIME_NODE = 8192,\n SOCKET_IO = 16384,\n TEDIOUS = 32768,\n UNDICI = 65536,\n CASSANDRA = 131072,\n CONNECT = 262144,\n DNS = 524288,\n EXPRESS = 1048576,\n FASTIFY = 2097152,\n GENERIC_POOL = 4194304,\n GRAPHQL = 8388608,\n HAPI = 16777216,\n IOREDIS = 33554432,\n KNEX = 67108864,\n KOA = 134217728,\n MEMCACHED = 268435456,\n MYSQL2 = 536870912,\n NESTJS_CORE = 1073741824,\n NET = 2147483648,\n PINO = 4294967296,\n RESTIFY = 8589934592,\n ROUTER = 17179869184,\n AMQPLIB = 34359738368,\n}\n\n/**\n * Statsbeat Instrumentation Mapping\n * @internal\n */\nexport const StatsbeatInstrumentationMap = new Map<string, number>([\n [\"@opentelemetry/instrumentation-amqplib\", StatsbeatInstrumentation.AMQPLIB],\n [\"@opentelemetry/instrumentation-cucumber\", StatsbeatInstrumentation.CUCUMBER],\n [\"@opentelemetry/instrumentation-dataloader\", StatsbeatInstrumentation.DATALOADER],\n [\"@opentelemetry/instrumentation-fs\", StatsbeatInstrumentation.FS],\n [\"@opentelemetry/instrumentation-lru-memoizer\", StatsbeatInstrumentation.LRU_MEMOIZER],\n [\"@opentelemetry/instrumentation-mongoose\", StatsbeatInstrumentation.MONGOOSE],\n [\"@opentelemetry/instrumentation-runtime-node\", StatsbeatInstrumentation.RUNTIME_NODE],\n [\"@opentelemetry/instrumentation-socket.io\", StatsbeatInstrumentation.SOCKET_IO],\n [\"@opentelemetry/instrumentation-tedious\", StatsbeatInstrumentation.TEDIOUS],\n [\"@opentelemetry/instrumentation-undici\", StatsbeatInstrumentation.UNDICI],\n [\"@opentelemetry/instrumentation-cassandra-driver\", StatsbeatInstrumentation.CASSANDRA],\n [\"@opentelemetry/instrumentation-connect\", StatsbeatInstrumentation.CONNECT],\n [\"@opentelemetry/instrumentation-dns\", StatsbeatInstrumentation.DNS],\n [\"@opentelemetry/instrumentation-express\", StatsbeatInstrumentation.EXPRESS],\n [\"@opentelemetry/instrumentation-fastify\", StatsbeatInstrumentation.FASTIFY],\n [\"@opentelemetry/instrumentation-generic-pool\", StatsbeatInstrumentation.GENERIC_POOL],\n [\"@opentelemetry/instrumentation-graphql\", StatsbeatInstrumentation.GRAPHQL],\n [\"@opentelemetry/instrumentation-hapi\", StatsbeatInstrumentation.HAPI],\n [\"@opentelemetry/instrumentation-ioredis\", StatsbeatInstrumentation.IOREDIS],\n [\"@opentelemetry/instrumentation-knex\", StatsbeatInstrumentation.KNEX],\n [\"@opentelemetry/instrumentation-koa\", StatsbeatInstrumentation.KOA],\n [\"@opentelemetry/instrumentation-memcached\", StatsbeatInstrumentation.MEMCACHED],\n [\"@opentelemetry/instrumentation-mysql2\", StatsbeatInstrumentation.MYSQL2],\n [\"@opentelemetry/instrumentation-nestjs-core\", StatsbeatInstrumentation.NESTJS_CORE],\n [\"@opentelemetry/instrumentation-net\", StatsbeatInstrumentation.NET],\n [\"@opentelemetry/instrumentation-pino\", StatsbeatInstrumentation.PINO],\n [\"@opentelemetry/instrumentation-restify\", StatsbeatInstrumentation.RESTIFY],\n [\"@opentelemetry/instrumentation-router\", StatsbeatInstrumentation.ROUTER],\n]);\n\nexport interface StatsbeatEnvironmentConfig {\n instrumentation: StatsbeatInstrumentation;\n feature: StatsbeatFeature;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAmFA;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAiB;IAC1D,CAAC,WAAW,EAAE,CAAC,CAAC;IAChB,CAAC,aAAa,EAAE,CAAC,CAAC;IAClB,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACvB,CAAC,QAAQ,EAAE,CAAC,CAAC;IACb,CAAC,aAAa,EAAE,EAAE,CAAC;IACnB,CAAC,MAAM,EAAE,EAAE,CAAC;IACZ,CAAC,kBAAkB,EAAE,EAAE,CAAC;IACxB,CAAC,WAAW,EAAE,GAAG,CAAC;IAClB,CAAC,+BAA+B,EAAE,GAAG,CAAC;CACvC,CAAC,CAAC;AAiEH,MAAM,CAAC,MAAM,mCAAmC,GAAG,QAAQ,CAAC;AAC5D,MAAM,CAAC,MAAM,gCAAgC,GAAG,kCAAkC,CAAC;AACnF,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAC3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AACrE,MAAM,CAAC,MAAM,iCAAiC,GAAG,mCAAmC,CAAC;AAErF,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,yCAAqB,CAAA;IACrB,gCAAY,CAAA;AACd,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,2CAA2C,CAAC;AAE7F;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sCAAsC,CAAC;AAC9E;;;GAGG;AACH,MAAM,CAAC,MAAM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E,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,GAAG,CAAC;IACpE,CAAC,0CAA0C,EAAE,wBAAwB,CAAC,SAAS,CAAC;IAChF,CAAC,uCAAuC,EAAE,wBAAwB,CAAC,MAAM,CAAC;IAC1E,CAAC,4CAA4C,EAAE,wBAAwB,CAAC,WAAW,CAAC;IACpF,CAAC,oCAAoC,EAAE,wBAAwB,CAAC,GAAG,CAAC;IACpE,CAAC,qCAAqC,EAAE,wBAAwB,CAAC,IAAI,CAAC;IACtE,CAAC,wCAAwC,EAAE,wBAAwB,CAAC,OAAO,CAAC;IAC5E,CAAC,uCAAuC,EAAE,wBAAwB,CAAC,MAAM,CAAC;CAC3E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { AzureMonitorExporterOptions } from \"@azure/monitor-opentelemetry-exporter\";\nimport type { InstrumentationConfig } from \"@opentelemetry/instrumentation\";\nimport type { Resource } from \"@opentelemetry/resources\";\nimport type { LogRecordProcessor } from \"@opentelemetry/sdk-logs\";\nimport type { MetricReader, ViewOptions } from \"@opentelemetry/sdk-metrics\";\nimport type { SpanProcessor } from \"@opentelemetry/sdk-trace-base\";\n\n/**\n * Azure Monitor OpenTelemetry Options\n */\nexport interface AzureMonitorOpenTelemetryOptions {\n /** Azure Monitor Exporter Configuration */\n azureMonitorExporterOptions?: AzureMonitorExporterOptions;\n /** OpenTelemetry Resource */\n resource?: Resource;\n /** The rate of telemetry items tracked that should be transmitted (Default 1.0) */\n samplingRatio?: number;\n /** The maximum number of traces to sample per second (Default 5). Set to 0 to use samplingRatio instead. */\n tracesPerSecond?: number;\n /** Enable Live Metrics feature (Default false)*/\n enableLiveMetrics?: boolean;\n /** Enable Standard Metrics feature (Default true)*/\n enableStandardMetrics?: boolean;\n /** Enable log sampling based on trace (Default true) */\n enableTraceBasedSamplingForLogs?: boolean;\n /** Enable Performance Counter feature */\n enablePerformanceCounters?: boolean;\n /** OpenTelemetry Instrumentations options included as part of Azure Monitor. See {@link InstrumentationOptions} for the full set of supported instrumentations. */\n instrumentationOptions?: InstrumentationOptions;\n /** Application Insights Web Instrumentation options (enabled, connectionString, src, config)*/\n browserSdkLoaderOptions?: BrowserSdkLoaderOptions;\n /** An array of log record processors to register to the logger provider.*/\n logRecordProcessors?: LogRecordProcessor[];\n /** An array of span processors to register to the tracer provider.*/\n spanProcessors?: SpanProcessor[];\n /** An array of metric readers to register to the meter provider.*/\n metricReaders?: MetricReader[];\n /** An array of metric views to register to the meter provider.*/\n views?: ViewOptions[];\n}\n\n/**\n * OpenTelemetry Instrumentations Configuration interface\n */\nexport interface InstrumentationOptions {\n /** Azure SDK Instrumentation Config */\n azureSdk?: InstrumentationConfig;\n /** HTTP Instrumentation Config */\n http?: InstrumentationConfig;\n /** MongoDB Instrumentation Config */\n mongoDb?: InstrumentationConfig;\n /** MySQL Instrumentation Config */\n mySql?: InstrumentationConfig;\n /** PostgreSql Instrumentation Config */\n postgreSql?: InstrumentationConfig;\n /** Redis Instrumentation Config */\n redis?: InstrumentationConfig;\n /** Redis4 Instrumentation Config */\n redis4?: InstrumentationConfig;\n /** Bunyan Instrumentation Config */\n bunyan?: InstrumentationConfig;\n /** Winston Instrumentation Config */\n winston?: InstrumentationConfig;\n}\n\n/**\n * Statsbeat Features Configuration interface\n * @internal\n */\nexport interface StatsbeatFeatures {\n diskRetry?: boolean;\n aadHandling?: boolean;\n browserSdkLoader?: boolean;\n distro?: boolean;\n liveMetrics?: boolean;\n shim?: boolean;\n customerSdkStats?: boolean;\n multiIkey?: boolean;\n aksResourceDetectorPopulation?: boolean;\n}\n\n/**\n * Statsbeat Features Mapping\n * @internal\n */\nexport const StatsbeatFeaturesMap = new Map<string, number>([\n [\"diskRetry\", 1],\n [\"aadHandling\", 2],\n [\"browserSdkLoader\", 4],\n [\"distro\", 8],\n [\"liveMetrics\", 16],\n [\"shim\", 32],\n [\"customerSdkStats\", 64],\n [\"multiIkey\", 128],\n [\"aksResourceDetectorPopulation\", 256],\n]);\n\n/**\n * Statsbeat Instrumentations Configuration interface\n * @internal\n */\nexport interface StatsbeatInstrumentations {\n /** Azure Monitor Supported Instrumentations */\n azureSdk?: boolean;\n mongoDb?: boolean;\n mySql?: boolean;\n postgreSql?: boolean;\n redis?: boolean;\n bunyan?: boolean;\n winston?: boolean;\n /** OpenTelemetry Community Instrumentations */\n amqplib?: boolean;\n cucumber?: boolean;\n dataloader?: boolean;\n fs?: boolean;\n lruMemoizer?: boolean;\n mongoose?: boolean;\n runtimeNode?: boolean;\n socketIo?: boolean;\n tedious?: boolean;\n undici?: boolean;\n cassandra?: boolean;\n connect?: boolean;\n dns?: boolean;\n express?: boolean;\n fastify?: boolean;\n genericPool?: boolean;\n graphql?: boolean;\n hapi?: boolean;\n ioredis?: boolean;\n knex?: boolean;\n koa?: boolean;\n memcached?: boolean;\n mysql2?: boolean;\n nestjsCore?: boolean;\n net?: boolean;\n pino?: boolean;\n restify?: boolean;\n router?: boolean;\n}\n\n/**\n * Statsbeat Instrumentation and Feature Option interface\n * @internal\n */\nexport interface StatsbeatOption {\n option: string;\n value: boolean;\n}\n\n/**\n * Application Insights Web Instrumentation Configuration interface\n */\nexport interface BrowserSdkLoaderOptions {\n /** Browser SDK Loader Enable */\n enabled?: boolean;\n /** Browser SDK Loader Connection String */\n connectionString?: string;\n}\n\nexport const AZURE_MONITOR_OPENTELEMETRY_VERSION = \"1.18.1\";\nexport const AZURE_MONITOR_STATSBEAT_FEATURES = \"AZURE_MONITOR_STATSBEAT_FEATURES\";\nexport const AZURE_MONITOR_PREFIX = \"AZURE_MONITOR_PREFIX\";\nexport const AZURE_MONITOR_AUTO_ATTACH = \"AZURE_MONITOR_AUTO_ATTACH\";\nexport const APPLICATION_INSIGHTS_SHIM_VERSION = \"APPLICATION_INSIGHTS_SHIM_VERSION\";\n\nexport enum AttachTypePrefix {\n INTEGRATED_AUTO = \"i\",\n MANUAL = \"m\",\n}\n\n/**\n * Default Browser SDK Loader Source\n * @internal\n */\nexport const BROWSER_SDK_LOADER_DEFAULT_SOURCE = \"https://js.monitor.azure.com/scripts/b/ai\";\n\n/**\n * Default Breeze endpoint.\n * @internal\n */\nexport const DEFAULT_BREEZE_ENDPOINT = \"https://dc.services.visualstudio.com\";\n/**\n * Default Live Metrics endpoint.\n * @internal\n */\nexport const DEFAULT_LIVEMETRICS_ENDPOINT = \"https://global.livediagnostics.monitor.azure.com\";\n\n/**\n * Internal attribute name for sample rate\n * @internal\n */\nexport const AzureMonitorSampleRate = \"microsoft.sample_rate\";\n\n/**\n * Disables customer-facing SDK Stats.\n * @internal\n */\nexport const APPLICATIONINSIGHTS_SDKSTATS_DISABLED = \"APPLICATIONINSIGHTS_SDKSTATS_DISABLED\";\n\nexport enum StatsbeatFeature {\n NONE = 0,\n DISK_RETRY = 1,\n AAD_HANDLING = 2,\n BROWSER_SDK_LOADER = 4,\n DISTRO = 8,\n LIVE_METRICS = 16,\n SHIM = 32,\n CUSTOMER_SDKSTATS = 64,\n MULTI_IKEY = 128,\n AKS_RESOURCE_DETECTOR_POPULATION = 256,\n}\n\nexport enum StatsbeatInstrumentation {\n /** Azure Monitor Supported Instrumentations */\n NONE = 0,\n AZURE_CORE_TRACING = 1,\n MONGODB = 2,\n MYSQL = 4,\n REDIS = 8,\n POSTGRES = 16,\n BUNYAN = 32,\n WINSTON = 64,\n /** OpenTelemetry Supported Instrumentations */\n // Console instrumentation is not supported here - occupies 128\n CUCUMBER = 256,\n DATALOADER = 512,\n FS = 1024,\n LRU_MEMOIZER = 2048,\n MONGOOSE = 4096,\n RUNTIME_NODE = 8192,\n SOCKET_IO = 16384,\n TEDIOUS = 32768,\n UNDICI = 65536,\n CASSANDRA = 131072,\n CONNECT = 262144,\n DNS = 524288,\n EXPRESS = 1048576,\n FASTIFY = 2097152,\n GENERIC_POOL = 4194304,\n GRAPHQL = 8388608,\n HAPI = 16777216,\n IOREDIS = 33554432,\n KNEX = 67108864,\n KOA = 134217728,\n MEMCACHED = 268435456,\n MYSQL2 = 536870912,\n NESTJS_CORE = 1073741824,\n NET = 2147483648,\n PINO = 4294967296,\n RESTIFY = 8589934592,\n ROUTER = 17179869184,\n AMQPLIB = 34359738368,\n}\n\n/**\n * Statsbeat Instrumentation Mapping\n * @internal\n */\nexport const StatsbeatInstrumentationMap = new Map<string, number>([\n [\"@opentelemetry/instrumentation-amqplib\", StatsbeatInstrumentation.AMQPLIB],\n [\"@opentelemetry/instrumentation-cucumber\", StatsbeatInstrumentation.CUCUMBER],\n [\"@opentelemetry/instrumentation-dataloader\", StatsbeatInstrumentation.DATALOADER],\n [\"@opentelemetry/instrumentation-fs\", StatsbeatInstrumentation.FS],\n [\"@opentelemetry/instrumentation-lru-memoizer\", StatsbeatInstrumentation.LRU_MEMOIZER],\n [\"@opentelemetry/instrumentation-mongoose\", StatsbeatInstrumentation.MONGOOSE],\n [\"@opentelemetry/instrumentation-runtime-node\", StatsbeatInstrumentation.RUNTIME_NODE],\n [\"@opentelemetry/instrumentation-socket.io\", StatsbeatInstrumentation.SOCKET_IO],\n [\"@opentelemetry/instrumentation-tedious\", StatsbeatInstrumentation.TEDIOUS],\n [\"@opentelemetry/instrumentation-undici\", StatsbeatInstrumentation.UNDICI],\n [\"@opentelemetry/instrumentation-cassandra-driver\", StatsbeatInstrumentation.CASSANDRA],\n [\"@opentelemetry/instrumentation-connect\", StatsbeatInstrumentation.CONNECT],\n [\"@opentelemetry/instrumentation-dns\", StatsbeatInstrumentation.DNS],\n [\"@opentelemetry/instrumentation-express\", StatsbeatInstrumentation.EXPRESS],\n [\"@opentelemetry/instrumentation-fastify\", StatsbeatInstrumentation.FASTIFY],\n [\"@opentelemetry/instrumentation-generic-pool\", StatsbeatInstrumentation.GENERIC_POOL],\n [\"@opentelemetry/instrumentation-graphql\", StatsbeatInstrumentation.GRAPHQL],\n [\"@opentelemetry/instrumentation-hapi\", StatsbeatInstrumentation.HAPI],\n [\"@opentelemetry/instrumentation-ioredis\", StatsbeatInstrumentation.IOREDIS],\n [\"@opentelemetry/instrumentation-knex\", StatsbeatInstrumentation.KNEX],\n [\"@opentelemetry/instrumentation-koa\", StatsbeatInstrumentation.KOA],\n [\"@opentelemetry/instrumentation-memcached\", StatsbeatInstrumentation.MEMCACHED],\n [\"@opentelemetry/instrumentation-mysql2\", StatsbeatInstrumentation.MYSQL2],\n [\"@opentelemetry/instrumentation-nestjs-core\", StatsbeatInstrumentation.NESTJS_CORE],\n [\"@opentelemetry/instrumentation-net\", StatsbeatInstrumentation.NET],\n [\"@opentelemetry/instrumentation-pino\", StatsbeatInstrumentation.PINO],\n [\"@opentelemetry/instrumentation-restify\", StatsbeatInstrumentation.RESTIFY],\n [\"@opentelemetry/instrumentation-router\", StatsbeatInstrumentation.ROUTER],\n]);\n\nexport interface StatsbeatEnvironmentConfig {\n instrumentation: StatsbeatInstrumentation;\n feature: StatsbeatFeature;\n}\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure/monitor-opentelemetry",
3
3
  "author": "Microsoft Corporation",
4
4
  "sdk-type": "client",
5
- "version": "1.17.0",
5
+ "version": "1.18.1",
6
6
  "description": "Azure Monitor OpenTelemetry (Node.js)",
7
7
  "main": "./dist/commonjs/index.js",
8
8
  "module": "./dist/esm/index.js",
@@ -38,8 +38,8 @@
38
38
  "devDependencies": {
39
39
  "@azure/functions": "^4.9.0",
40
40
  "@azure/functions-old": "npm:@azure/functions@3.5.1",
41
- "@opentelemetry/exporter-metrics-otlp-http": "^0.204.0",
42
- "@opentelemetry/exporter-trace-otlp-http": "^0.204.0",
41
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
42
+ "@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
43
43
  "@types/node": "^20.19.25",
44
44
  "@vitest/browser-playwright": "^4.1.2",
45
45
  "@vitest/coverage-istanbul": "^4.1.2",
@@ -51,37 +51,37 @@
51
51
  "typescript": "~6.0.2",
52
52
  "vitest": "^4.1.2",
53
53
  "@azure/dev-tool": "^1.0.0",
54
- "@azure-tools/test-utils-vitest": "^2.0.1",
55
- "@azure/eslint-plugin-azure-sdk": "^3.0.0"
54
+ "@azure/eslint-plugin-azure-sdk": "^3.0.0",
55
+ "@azure-tools/test-utils-vitest": "^2.0.1"
56
56
  },
57
57
  "dependencies": {
58
58
  "@azure-rest/core-client": "^2.5.2",
59
59
  "@azure/core-auth": "^1.10.1",
60
60
  "@azure/core-rest-pipeline": "^1.22.2",
61
61
  "@azure/logger": "^1.3.0",
62
- "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.40",
62
+ "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.42",
63
63
  "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0",
64
64
  "@microsoft/applicationinsights-web-snippet": "^1.2.3",
65
65
  "@opentelemetry/api": "^1.9.0",
66
- "@opentelemetry/api-logs": "^0.208.0",
67
- "@opentelemetry/core": "^2.2.0",
68
- "@opentelemetry/instrumentation": "^0.208.0",
69
- "@opentelemetry/instrumentation-bunyan": "^0.54.0",
70
- "@opentelemetry/instrumentation-http": "^0.208.0",
71
- "@opentelemetry/instrumentation-mongodb": "^0.61.0",
72
- "@opentelemetry/instrumentation-mysql": "^0.54.0",
73
- "@opentelemetry/instrumentation-pg": "^0.61.0",
74
- "@opentelemetry/instrumentation-redis": "^0.57.0",
75
- "@opentelemetry/instrumentation-winston": "^0.53.0",
76
- "@opentelemetry/resource-detector-azure": "^0.20.0",
77
- "@opentelemetry/resources": "^2.2.0",
78
- "@opentelemetry/sdk-logs": "^0.208.0",
79
- "@opentelemetry/sdk-metrics": "^2.2.0",
80
- "@opentelemetry/sdk-node": "^0.208.0",
81
- "@opentelemetry/sdk-trace-base": "^2.2.0",
82
- "@opentelemetry/sdk-trace-node": "^2.2.0",
83
- "@opentelemetry/semantic-conventions": "^1.38.0",
84
- "@opentelemetry/winston-transport": "^0.19.0",
66
+ "@opentelemetry/api-logs": "^0.218.0",
67
+ "@opentelemetry/core": "^2.7.1",
68
+ "@opentelemetry/instrumentation": "^0.218.0",
69
+ "@opentelemetry/instrumentation-bunyan": "^0.62.0",
70
+ "@opentelemetry/instrumentation-http": "^0.218.0",
71
+ "@opentelemetry/instrumentation-mongodb": "^0.70.0",
72
+ "@opentelemetry/instrumentation-mysql": "^0.63.0",
73
+ "@opentelemetry/instrumentation-pg": "^0.69.0",
74
+ "@opentelemetry/instrumentation-redis": "^0.65.0",
75
+ "@opentelemetry/instrumentation-winston": "^0.61.0",
76
+ "@opentelemetry/resource-detector-azure": "^0.25.0",
77
+ "@opentelemetry/resources": "^2.7.1",
78
+ "@opentelemetry/sdk-logs": "^0.218.0",
79
+ "@opentelemetry/sdk-metrics": "^2.7.1",
80
+ "@opentelemetry/sdk-node": "^0.218.0",
81
+ "@opentelemetry/sdk-trace-base": "^2.7.1",
82
+ "@opentelemetry/sdk-trace-node": "^2.7.1",
83
+ "@opentelemetry/semantic-conventions": "^1.40.0",
84
+ "@opentelemetry/winston-transport": "^0.27.0",
85
85
  "tslib": "^2.8.1"
86
86
  },
87
87
  "sideEffects": false,