From 95b0a9d8789601ce7d30571ee298b085e2bb9761 Mon Sep 17 00:00:00 2001 From: Hector Date: Mon, 14 Aug 2023 18:41:27 -0700 Subject: [PATCH 01/14] Files restructure --- src/agent/agentLoader.ts | 2 +- src/agent/diagnostics/writers/consoleWriter.ts | 2 +- src/agent/diagnostics/writers/fileWriter.ts | 2 +- src/applicationInsightsClient.ts | 2 +- src/{shim/autoCollection => logs}/console.ts | 4 ++-- .../diagnostic-channel/bunyan.sub.ts | 4 ++-- .../diagnostic-channel/console.sub.ts | 4 ++-- .../diagnostic-channel/initialization.ts | 2 +- .../diagnostic-channel/winston.sub.ts | 4 ++-- src/{shim/autoCollection => logs}/exceptions.ts | 4 ++-- .../autoCollection => metrics}/nativeMetrics.ts | 2 +- src/{shim => shared}/configuration/internal.ts | 0 src/{shim => shared}/configuration/jsonConfig.ts | 0 src/{shim => shared}/logging/index.ts | 0 .../logging/internalAzureLogger.ts | 0 src/{shim => shared}/logging/logger.ts | 0 src/{shim => shared}/util/configHelper.ts | 0 src/{shim => shared}/util/contextTagKeys.ts | 0 src/{shim => shared}/util/fileSystemHelper.ts | 0 src/{shim => shared}/util/index.ts | 0 src/{shim => shared}/util/util.ts | 0 src/shim/NodeClient.ts | 2 +- src/shim/{configuration => }/config.ts | 6 +++--- src/shim/context.ts | 2 +- src/shim/correlationContextManager.ts | 2 +- src/shim/shim-applicationinsights.ts | 4 ++-- src/shim/telemetryClient.ts | 14 +++++++------- .../{shim/autoCollection => logs}/bunyan.tests.ts | 8 ++++---- .../{shim/autoCollection => logs}/console.tests.ts | 6 +++--- .../autoCollection => logs}/exceptions.tests.ts | 2 +- .../{shim/autoCollection => logs}/winston.tests.ts | 6 +++--- test/unitTests/shared/logging.tests.ts | 2 +- test/unitTests/shared/util.tests.ts | 2 +- test/unitTests/shim/config.tests.ts | 3 +-- 34 files changed, 45 insertions(+), 46 deletions(-) rename src/{shim/autoCollection => logs}/console.ts (92%) rename src/{shim/autoCollection => logs}/diagnostic-channel/bunyan.sub.ts (93%) rename src/{shim/autoCollection => logs}/diagnostic-channel/console.sub.ts (92%) rename src/{shim/autoCollection => logs}/diagnostic-channel/initialization.ts (95%) rename src/{shim/autoCollection => logs}/diagnostic-channel/winston.sub.ts (95%) rename src/{shim/autoCollection => logs}/exceptions.ts (98%) rename src/{shim/autoCollection => metrics}/nativeMetrics.ts (99%) rename src/{shim => shared}/configuration/internal.ts (100%) rename src/{shim => shared}/configuration/jsonConfig.ts (100%) rename src/{shim => shared}/logging/index.ts (100%) rename src/{shim => shared}/logging/internalAzureLogger.ts (100%) rename src/{shim => shared}/logging/logger.ts (100%) rename src/{shim => shared}/util/configHelper.ts (100%) rename src/{shim => shared}/util/contextTagKeys.ts (100%) rename src/{shim => shared}/util/fileSystemHelper.ts (100%) rename src/{shim => shared}/util/index.ts (100%) rename src/{shim => shared}/util/util.ts (100%) rename src/shim/{configuration => }/config.ts (97%) rename test/unitTests/{shim/autoCollection => logs}/bunyan.tests.ts (92%) rename test/unitTests/{shim/autoCollection => logs}/console.tests.ts (94%) rename test/unitTests/{shim/autoCollection => logs}/exceptions.tests.ts (96%) rename test/unitTests/{shim/autoCollection => logs}/winston.tests.ts (93%) diff --git a/src/agent/agentLoader.ts b/src/agent/agentLoader.ts index 36e6f768e..23a32fac4 100644 --- a/src/agent/agentLoader.ts +++ b/src/agent/agentLoader.ts @@ -3,7 +3,7 @@ import { ManagedIdentityCredential } from "@azure/identity"; import { AzureMonitorOpenTelemetryClient } from "@azure/monitor-opentelemetry"; -import { Util } from "../shim/util"; +import { Util } from "../shared/util"; import { ConsoleWriter } from "./diagnostics/writers/consoleWriter"; import { DiagnosticLogger } from "./diagnostics/diagnosticLogger"; import { StatusLogger } from "./diagnostics/statusLogger"; diff --git a/src/agent/diagnostics/writers/consoleWriter.ts b/src/agent/diagnostics/writers/consoleWriter.ts index 3d52d4138..8332bd677 100644 --- a/src/agent/diagnostics/writers/consoleWriter.ts +++ b/src/agent/diagnostics/writers/consoleWriter.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Util } from "../../../shim/util"; +import { Util } from "../../../shared/util"; import { IAgentLogger } from "../../types"; export class ConsoleWriter implements IAgentLogger { diff --git a/src/agent/diagnostics/writers/fileWriter.ts b/src/agent/diagnostics/writers/fileWriter.ts index 563843b4f..2bed57318 100644 --- a/src/agent/diagnostics/writers/fileWriter.ts +++ b/src/agent/diagnostics/writers/fileWriter.ts @@ -5,7 +5,7 @@ import * as path from "path"; import * as fs from "fs"; import { makeStatusDirs, renameCurrentFile } from "./fileHelpers"; import { IAgentLogger } from "../../types"; -import { Util } from "../../../shim/util"; +import { Util } from "../../../shared/util"; export interface FileWriterOptions { append: boolean; // Overwrite or append on file write (false) diff --git a/src/applicationInsightsClient.ts b/src/applicationInsightsClient.ts index cafee7a62..0f7faeb16 100644 --- a/src/applicationInsightsClient.ts +++ b/src/applicationInsightsClient.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { ApplicationInsightsConfig } from "./applicationInsightsConfig"; -import { Logger } from "./shim/logging"; +import { Logger } from "./shared/logging"; import { AzureMonitorOpenTelemetryClient, AzureMonitorOpenTelemetryOptions } from "@azure/monitor-opentelemetry"; /** diff --git a/src/shim/autoCollection/console.ts b/src/logs/console.ts similarity index 92% rename from src/shim/autoCollection/console.ts rename to src/logs/console.ts index 8bcb994ab..73ff09724 100644 --- a/src/shim/autoCollection/console.ts +++ b/src/logs/console.ts @@ -1,6 +1,6 @@ -import { LogInstrumentationsConfig } from "../../types"; +import { LogInstrumentationsConfig } from "../types"; import { enablePublishers } from "./diagnostic-channel/initialization"; -import { TelemetryClient } from "../telemetryClient"; +import { TelemetryClient } from "../shim/telemetryClient"; enablePublishers(); export class AutoCollectConsole { diff --git a/src/shim/autoCollection/diagnostic-channel/bunyan.sub.ts b/src/logs/diagnostic-channel/bunyan.sub.ts similarity index 93% rename from src/shim/autoCollection/diagnostic-channel/bunyan.sub.ts rename to src/logs/diagnostic-channel/bunyan.sub.ts index 3927bae68..81fee8155 100644 --- a/src/shim/autoCollection/diagnostic-channel/bunyan.sub.ts +++ b/src/logs/diagnostic-channel/bunyan.sub.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for details. import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { bunyan } from "diagnostic-channel-publishers"; -import { KnownSeverityLevel } from "../../../declarations/generated"; -import { TelemetryClient } from "../../telemetryClient"; +import { KnownSeverityLevel } from "../../declarations/generated"; +import { TelemetryClient } from "../../shim/telemetryClient"; let clients: TelemetryClient[] = []; diff --git a/src/shim/autoCollection/diagnostic-channel/console.sub.ts b/src/logs/diagnostic-channel/console.sub.ts similarity index 92% rename from src/shim/autoCollection/diagnostic-channel/console.sub.ts rename to src/logs/diagnostic-channel/console.sub.ts index 6969e0590..e3508680c 100644 --- a/src/shim/autoCollection/diagnostic-channel/console.sub.ts +++ b/src/logs/diagnostic-channel/console.sub.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for details. import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { console as consolePub } from "diagnostic-channel-publishers"; -import { KnownSeverityLevel } from "../../../declarations/generated"; -import { TelemetryClient } from "../../telemetryClient"; +import { KnownSeverityLevel } from "../../declarations/generated"; +import { TelemetryClient } from "../../shim/telemetryClient"; let clients: TelemetryClient[] = []; diff --git a/src/shim/autoCollection/diagnostic-channel/initialization.ts b/src/logs/diagnostic-channel/initialization.ts similarity index 95% rename from src/shim/autoCollection/diagnostic-channel/initialization.ts rename to src/logs/diagnostic-channel/initialization.ts index 61257a48f..b6db3dad8 100644 --- a/src/shim/autoCollection/diagnostic-channel/initialization.ts +++ b/src/logs/diagnostic-channel/initialization.ts @@ -3,7 +3,7 @@ // Don't reference modules from these directly. Use only for types. import * as DiagChannelPublishers from "diagnostic-channel-publishers"; -import { Logger } from "../../logging"; +import { Logger } from "../../shared/logging"; const TAG = "DiagnosticChannel"; let isInitialized = false; diff --git a/src/shim/autoCollection/diagnostic-channel/winston.sub.ts b/src/logs/diagnostic-channel/winston.sub.ts similarity index 95% rename from src/shim/autoCollection/diagnostic-channel/winston.sub.ts rename to src/logs/diagnostic-channel/winston.sub.ts index 47dfc4b58..cf9e3818d 100644 --- a/src/shim/autoCollection/diagnostic-channel/winston.sub.ts +++ b/src/logs/diagnostic-channel/winston.sub.ts @@ -2,8 +2,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for details. import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { winston } from "diagnostic-channel-publishers"; -import { KnownSeverityLevel } from "../../../declarations/generated"; -import { TelemetryClient } from "../../telemetryClient"; +import { KnownSeverityLevel } from "../../declarations/generated"; +import { TelemetryClient } from "../../shim/telemetryClient"; let clients: TelemetryClient[] = []; diff --git a/src/shim/autoCollection/exceptions.ts b/src/logs/exceptions.ts similarity index 98% rename from src/shim/autoCollection/exceptions.ts rename to src/logs/exceptions.ts index 772e900d8..ca8764d87 100644 --- a/src/shim/autoCollection/exceptions.ts +++ b/src/logs/exceptions.ts @@ -1,5 +1,5 @@ -import { Util } from "../util"; -import { TelemetryClient } from "../telemetryClient"; +import { Util } from "../shared/util"; +import { TelemetryClient } from "../shim/telemetryClient"; type ExceptionHandle = "uncaughtExceptionMonitor" | "uncaughtException" | "unhandledRejection"; const UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME: ExceptionHandle = "uncaughtExceptionMonitor"; diff --git a/src/shim/autoCollection/nativeMetrics.ts b/src/metrics/nativeMetrics.ts similarity index 99% rename from src/shim/autoCollection/nativeMetrics.ts rename to src/metrics/nativeMetrics.ts index cd7fe92e6..47ebfb8eb 100644 --- a/src/shim/autoCollection/nativeMetrics.ts +++ b/src/metrics/nativeMetrics.ts @@ -10,7 +10,7 @@ import { PeriodicExportingMetricReaderOptions, } from "@opentelemetry/sdk-metrics"; import { Histogram, Meter, ObservableGauge, ObservableResult } from "@opentelemetry/api"; -import { Logger } from "../logging"; +import { Logger } from "../shared/logging"; /** * Azure Monitor Native Metrics diff --git a/src/shim/configuration/internal.ts b/src/shared/configuration/internal.ts similarity index 100% rename from src/shim/configuration/internal.ts rename to src/shared/configuration/internal.ts diff --git a/src/shim/configuration/jsonConfig.ts b/src/shared/configuration/jsonConfig.ts similarity index 100% rename from src/shim/configuration/jsonConfig.ts rename to src/shared/configuration/jsonConfig.ts diff --git a/src/shim/logging/index.ts b/src/shared/logging/index.ts similarity index 100% rename from src/shim/logging/index.ts rename to src/shared/logging/index.ts diff --git a/src/shim/logging/internalAzureLogger.ts b/src/shared/logging/internalAzureLogger.ts similarity index 100% rename from src/shim/logging/internalAzureLogger.ts rename to src/shared/logging/internalAzureLogger.ts diff --git a/src/shim/logging/logger.ts b/src/shared/logging/logger.ts similarity index 100% rename from src/shim/logging/logger.ts rename to src/shared/logging/logger.ts diff --git a/src/shim/util/configHelper.ts b/src/shared/util/configHelper.ts similarity index 100% rename from src/shim/util/configHelper.ts rename to src/shared/util/configHelper.ts diff --git a/src/shim/util/contextTagKeys.ts b/src/shared/util/contextTagKeys.ts similarity index 100% rename from src/shim/util/contextTagKeys.ts rename to src/shared/util/contextTagKeys.ts diff --git a/src/shim/util/fileSystemHelper.ts b/src/shared/util/fileSystemHelper.ts similarity index 100% rename from src/shim/util/fileSystemHelper.ts rename to src/shared/util/fileSystemHelper.ts diff --git a/src/shim/util/index.ts b/src/shared/util/index.ts similarity index 100% rename from src/shim/util/index.ts rename to src/shared/util/index.ts diff --git a/src/shim/util/util.ts b/src/shared/util/util.ts similarity index 100% rename from src/shim/util/util.ts rename to src/shared/util/util.ts diff --git a/src/shim/NodeClient.ts b/src/shim/NodeClient.ts index 86ccb4842..ab9e29c06 100644 --- a/src/shim/NodeClient.ts +++ b/src/shim/NodeClient.ts @@ -1,4 +1,4 @@ -import { Logger } from "./logging"; +import { Logger } from "../shared/logging"; import { Contracts, TelemetryClient } from "./shim-applicationinsights"; class NodeClient extends TelemetryClient { diff --git a/src/shim/configuration/config.ts b/src/shim/config.ts similarity index 97% rename from src/shim/configuration/config.ts rename to src/shim/config.ts index 5f537e42f..a141a974e 100644 --- a/src/shim/configuration/config.ts +++ b/src/shim/config.ts @@ -1,9 +1,9 @@ -import { DistributedTracingModes, IConfig, IDisabledExtendedMetrics, IWebInstrumentationConfig } from "../types"; +import { DistributedTracingModes, IConfig, IDisabledExtendedMetrics, IWebInstrumentationConfig } from "./types"; import http = require("http"); import https = require("https"); import azureCoreAuth = require("@azure/core-auth"); -import { Logger } from "../logging"; -import constants = require("../../declarations/constants"); +import { Logger } from "../shared/logging"; +import constants = require("../declarations/constants"); class config implements IConfig { diff --git a/src/shim/context.ts b/src/shim/context.ts index b60f1fe44..30a21331c 100644 --- a/src/shim/context.ts +++ b/src/shim/context.ts @@ -1,4 +1,4 @@ -import ContextTagKeys = require("./util/contextTagKeys"); +import ContextTagKeys = require("../shared/util/contextTagKeys"); export class Context { public keys: ContextTagKeys; diff --git a/src/shim/correlationContextManager.ts b/src/shim/correlationContextManager.ts index 888ddb5bd..7a70493af 100644 --- a/src/shim/correlationContextManager.ts +++ b/src/shim/correlationContextManager.ts @@ -4,7 +4,7 @@ import { context, SpanContext, trace, Context } from "@opentelemetry/api"; import { TraceState } from "@opentelemetry/core"; import { Span } from "@opentelemetry/sdk-trace-base"; import { ICorrelationContext, ITraceparent, ITracestate, HttpRequest, ICustomProperties } from "./types"; -import { Logger } from "./logging"; +import { Logger } from "../shared/logging"; import * as azureFunctionsTypes from "@azure/functions"; export class CorrelationContextManager { diff --git a/src/shim/shim-applicationinsights.ts b/src/shim/shim-applicationinsights.ts index 627a81173..32a8254e6 100644 --- a/src/shim/shim-applicationinsights.ts +++ b/src/shim/shim-applicationinsights.ts @@ -3,13 +3,13 @@ import { DiagLogLevel, SpanContext } from "@opentelemetry/api"; import { CorrelationContextManager } from "./correlationContextManager"; import * as azureFunctionsTypes from "@azure/functions"; import { Span } from "@opentelemetry/sdk-trace-base"; -import { Logger } from "./logging"; +import { Logger } from "../shared/logging"; import { ICorrelationContext, HttpRequest, DistributedTracingModes } from "./types"; import { TelemetryClient } from "./telemetryClient"; import * as Contracts from "../declarations/contracts"; import { ApplicationInsightsOptions } from "../types"; import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; -import ConfigHelper = require("./util/configHelper"); +import ConfigHelper = require("../shared/util/configHelper"); // We export these imports so that SDK users may use these classes directly. // They're exposed using "export import" so that types are passed along as expected diff --git a/src/shim/telemetryClient.ts b/src/shim/telemetryClient.ts index 847f43fe8..b5f0ab533 100644 --- a/src/shim/telemetryClient.ts +++ b/src/shim/telemetryClient.ts @@ -10,17 +10,17 @@ import { SemanticAttributes } from "@opentelemetry/semantic-conventions"; import * as Contracts from "../declarations/contracts"; import { AvailabilityData, TelemetryItem as Envelope, KnownSeverityLevel, MessageData, MonitorDomain, PageViewData, TelemetryEventData, TelemetryExceptionData, TelemetryExceptionDetails } from "../declarations/generated"; import { Context } from "./context"; -import { Logger } from "./logging"; -import { Util } from "./util"; -import { AutoCollectConsole } from "./autoCollection/console"; -import { AutoCollectExceptions, parseStack } from "./autoCollection/exceptions"; +import { Logger } from "../shared/logging"; +import { Util } from "../shared/util"; +import { AutoCollectConsole } from "../logs/console"; +import { AutoCollectExceptions, parseStack } from "../logs/exceptions"; import { ApplicationInsightsOptions, ExtendedMetricType } from "../types"; -import { InternalConfig } from "./configuration/internal"; +import { InternalConfig } from "../shared/configuration/internal"; import { IConfig } from "../shim/types"; -import Config = require("./configuration/config"); +import Config = require("./config"); import { dispose, Configuration, _setupCalled } from "./shim-applicationinsights"; import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; -import ConfigHelper = require("./util/configHelper"); +import ConfigHelper = require("../shared/util/configHelper"); /** * Application Insights telemetry client provides interface to track telemetry items, register telemetry initializers and diff --git a/test/unitTests/shim/autoCollection/bunyan.tests.ts b/test/unitTests/logs/bunyan.tests.ts similarity index 92% rename from test/unitTests/shim/autoCollection/bunyan.tests.ts rename to test/unitTests/logs/bunyan.tests.ts index 510e109d7..a13b9b380 100644 --- a/test/unitTests/shim/autoCollection/bunyan.tests.ts +++ b/test/unitTests/logs/bunyan.tests.ts @@ -3,10 +3,10 @@ import * as sinon from "sinon"; import { channel } from "diagnostic-channel"; import { bunyan } from "diagnostic-channel-publishers"; -import { enable, dispose } from "../../../../src/shim/autoCollection/diagnostic-channel/bunyan.sub"; -import { Util } from "../../../../src/shim/util"; -import { TelemetryClient } from "../../../../src"; -import { ApplicationInsightsOptions } from "../../../../src/types"; +import { enable, dispose } from "../../../src/logs/diagnostic-channel/bunyan.sub"; +import { Util } from "../../../src/shared/util"; +import { TelemetryClient } from "../../../src"; +import { ApplicationInsightsOptions } from "../../../src/types"; describe("diagnostic-channel/bunyan", () => { let sandbox: sinon.SinonSandbox; diff --git a/test/unitTests/shim/autoCollection/console.tests.ts b/test/unitTests/logs/console.tests.ts similarity index 94% rename from test/unitTests/shim/autoCollection/console.tests.ts rename to test/unitTests/logs/console.tests.ts index 2e18a3837..9837f141a 100644 --- a/test/unitTests/shim/autoCollection/console.tests.ts +++ b/test/unitTests/logs/console.tests.ts @@ -3,9 +3,9 @@ import * as sinon from "sinon"; import { channel } from "diagnostic-channel"; import { console } from "diagnostic-channel-publishers"; -import { enable, dispose } from "../../../../src/shim/autoCollection/diagnostic-channel/console.sub"; -import { TelemetryClient } from "../../../../src"; -import { ApplicationInsightsOptions } from "../../../../src/types"; +import { enable, dispose } from "../../../src/logs/diagnostic-channel/console.sub"; +import { TelemetryClient } from "../../../src"; +import { ApplicationInsightsOptions } from "../../../src/types"; describe("AutoCollection/Console", () => { let sandbox: sinon.SinonSandbox; diff --git a/test/unitTests/shim/autoCollection/exceptions.tests.ts b/test/unitTests/logs/exceptions.tests.ts similarity index 96% rename from test/unitTests/shim/autoCollection/exceptions.tests.ts rename to test/unitTests/logs/exceptions.tests.ts index 99d18f4e7..366690a88 100644 --- a/test/unitTests/shim/autoCollection/exceptions.tests.ts +++ b/test/unitTests/logs/exceptions.tests.ts @@ -1,7 +1,7 @@ import * as assert from "assert"; import * as sinon from "sinon"; -import { AutoCollectExceptions } from "../../../../src/shim/autoCollection/exceptions"; +import { AutoCollectExceptions } from "../../../src/logs/exceptions"; describe("AutoCollection/Exceptions", () => { let sandbox: sinon.SinonSandbox; diff --git a/test/unitTests/shim/autoCollection/winston.tests.ts b/test/unitTests/logs/winston.tests.ts similarity index 93% rename from test/unitTests/shim/autoCollection/winston.tests.ts rename to test/unitTests/logs/winston.tests.ts index 2df15bd55..0201b341e 100644 --- a/test/unitTests/shim/autoCollection/winston.tests.ts +++ b/test/unitTests/logs/winston.tests.ts @@ -3,9 +3,9 @@ import * as sinon from "sinon"; import { channel } from "diagnostic-channel"; import { winston } from "diagnostic-channel-publishers"; -import { enable, dispose } from "../../../../src/shim/autoCollection/diagnostic-channel/winston.sub"; -import { TelemetryClient } from "../../../../src"; -import { ApplicationInsightsOptions } from "../../../../src/types"; +import { enable, dispose } from "../../../src/logs/diagnostic-channel/winston.sub"; +import { TelemetryClient } from "../../../src"; +import { ApplicationInsightsOptions } from "../../../src/types"; describe("diagnostic-channel/winston", () => { let sandbox: sinon.SinonSandbox; diff --git a/test/unitTests/shared/logging.tests.ts b/test/unitTests/shared/logging.tests.ts index d854faf24..a93cbbc3b 100644 --- a/test/unitTests/shared/logging.tests.ts +++ b/test/unitTests/shared/logging.tests.ts @@ -2,7 +2,7 @@ import { diag, DiagLogLevel } from "@opentelemetry/api"; import * as assert from "assert"; import * as sinon from "sinon"; -import { Logger } from "../../../src/shim/logging"; +import { Logger } from "../../../src/shared/logging"; describe("Library/Logger", () => { let sandbox: sinon.SinonSandbox; diff --git a/test/unitTests/shared/util.tests.ts b/test/unitTests/shared/util.tests.ts index 6f97e149d..266bd617b 100644 --- a/test/unitTests/shared/util.tests.ts +++ b/test/unitTests/shared/util.tests.ts @@ -1,7 +1,7 @@ import * as assert from "assert"; import * as sinon from "sinon"; -import { Util } from "../../../src/shim/util"; +import { Util } from "../../../src/shared/util"; describe("Library/Util", () => { let sandbox: sinon.SinonSandbox; diff --git a/test/unitTests/shim/config.tests.ts b/test/unitTests/shim/config.tests.ts index 73f3acc69..b37e675d9 100644 --- a/test/unitTests/shim/config.tests.ts +++ b/test/unitTests/shim/config.tests.ts @@ -2,10 +2,9 @@ import assert = require('assert'); import sinon = require('sinon'); import { TelemetryClient } from '../../../applicationinsights'; import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http'; -import { CorrelationContextManager } from '../../../src/shim/correlationContextManager'; const applicationInsights = require('../../../applicationinsights'); import azureCoreAuth = require("@azure/core-auth"); -import { Logger } from "../../../src/shim/logging" +import { Logger } from "../../../src/shared/logging" import { DiagLogLevel } from '@opentelemetry/api'; class TestTokenCredential implements azureCoreAuth.TokenCredential { From bc937fe4594cfbf3cb7841552f9bcfc1e469154f Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 15 Aug 2023 15:08:15 -0700 Subject: [PATCH 02/14] WIP --- README.md | 6 +- applicationinsights.ts => index.ts | 0 package-lock.json | 539 ++++++++++++--------- package.json | 3 +- src/agent/agentLoader.ts | 1 - src/agent/azureFunctionsLoader.ts | 2 +- src/applicationInsightsClient.ts | 69 +-- src/applicationInsightsConfig.ts | 100 ---- src/index.ts | 4 +- src/logs/console.ts | 16 +- src/logs/diagnostic-channel/bunyan.sub.ts | 6 +- src/logs/diagnostic-channel/console.sub.ts | 6 +- src/logs/diagnostic-channel/winston.sub.ts | 6 +- src/logs/exceptions.ts | 14 +- src/shared/configuration/config.ts | 107 ++++ src/shared/configuration/internal.ts | 103 ---- src/shared/configuration/jsonConfig.ts | 23 +- src/shared/util/configHelper.ts | 2 +- src/shim/shim-applicationinsights.ts | 12 +- src/shim/telemetryClient.ts | 139 ++---- src/types.ts | 24 +- test/functionalTests/testApp/main.js | 2 +- test/unitTests/logs/bunyan.tests.ts | 20 +- test/unitTests/logs/console.tests.ts | 20 +- test/unitTests/logs/winston.tests.ts | 20 +- test/unitTests/shim/config.tests.ts | 4 +- 26 files changed, 613 insertions(+), 635 deletions(-) rename applicationinsights.ts => index.ts (100%) delete mode 100644 src/applicationInsightsConfig.ts create mode 100644 src/shared/configuration/config.ts delete mode 100644 src/shared/configuration/internal.ts diff --git a/README.md b/README.md index 07fdf8563..a06a524e0 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ const config : ApplicationInsightsOptions = { redis4: { enabled: true }, }, resource: resource, - logInstrumentations: { + logInstrumentationOptions: { console: { enabled: true}, bunyan: { enabled: true}, winston: { enabled: true}, @@ -122,7 +122,7 @@ const appInsights = new TelemetryClient(config); | ------------------------------- |------------------------------------------------------------------------------------------------------------|-------| | ... | Azure Monitor OpenTelemetry Configuration [More info here](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/monitor-opentelemetry#configuration) | | | enableAutoCollectExceptions | Sets the state of exception tracking. If true uncaught exceptions will be sent to Application Insights | true| -| logInstrumentations| Allow configuration of Log Instrumentations. | {"console": { enabled: false },"bunyan": { enabled: false },"winston": { enabled: false }}| +| logInstrumentationOptions| Allow configuration of Log Instrumentations. | {"console": { enabled: false },"bunyan": { enabled: false },"winston": { enabled: false }}| | extendedMetrics | Enable/Disable specific extended Metrics(gc, heap and loop). |{"gc":false,"heap":false,"loop":false}| Configuration could be set using configuration file `applicationinsights.json` located under root folder of applicationinsights package installation folder, Ex: `node_modules/applicationinsights`. These configuration values will be applied to all ApplicationInsightsClients created in the SDK. @@ -138,7 +138,7 @@ Configuration could be set using configuration file `applicationinsights.json` "enabled": false } }, - "logInstrumentations":{ + "logInstrumentationOptions":{ "console": { "enabled": true } diff --git a/applicationinsights.ts b/index.ts similarity index 100% rename from applicationinsights.ts rename to index.ts diff --git a/package-lock.json b/package-lock.json index f8334ca76..b34282bb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@azure/core-client": "^1.0.0", "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", - "@azure/monitor-opentelemetry": "^1.0.0-beta.1", + "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.1", "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.0", @@ -25,6 +25,7 @@ "@opentelemetry/instrumentation-pg": "^0.35.0", "@opentelemetry/instrumentation-redis": "^0.34.1", "@opentelemetry/instrumentation-redis-4": "^0.34.1", + "@opentelemetry/otlp-exporter-base": "^0.41.2", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", @@ -219,27 +220,24 @@ } }, "node_modules/@azure/monitor-opentelemetry": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@azure/monitor-opentelemetry/-/monitor-opentelemetry-1.0.0-beta.1.tgz", - "integrity": "sha512-45UZGoxfxBdoS2OfmSkxM7FEW3RpJplPSIwHgFM7Lhi6IMWYvqVJcAe+431/731oriXbKBZUX3BHUdN/2n5vtw==", + "version": "1.0.0-beta.2", + "resolved": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", + "integrity": "sha512-vDTEhdAOx/7N1ApyG4Zg2luHQ3oRXi3wClEfYDfOD1HwIuZnyNVRONPUryljBMRcTleyftx6VZSdoWD3BDYDxg==", + "license": "MIT", "dependencies": { "@azure/functions": "^3.2.0", "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.14", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.3", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.41.0", - "@opentelemetry/core": "^1.15.0", - "@opentelemetry/exporter-logs-otlp-http": "^0.41.0", - "@opentelemetry/exporter-metrics-otlp-http": "^0.41.0", - "@opentelemetry/exporter-trace-otlp-http": "^0.41.0", - "@opentelemetry/instrumentation": "^0.41.0", - "@opentelemetry/instrumentation-http": "^0.41.0", - "@opentelemetry/instrumentation-mongodb": "^0.35.0", - "@opentelemetry/instrumentation-mysql": "^0.33.3", - "@opentelemetry/instrumentation-pg": "^0.35.3", - "@opentelemetry/instrumentation-redis": "^0.34.7", - "@opentelemetry/instrumentation-redis-4": "^0.34.6", - "@opentelemetry/otlp-exporter-base": "^0.41.0", + "@opentelemetry/api-logs": "^0.41.2", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/instrumentation-http": "^0.41.2", + "@opentelemetry/instrumentation-mongodb": "^0.36.0", + "@opentelemetry/instrumentation-mysql": "^0.34.0", + "@opentelemetry/instrumentation-pg": "^0.36.0", + "@opentelemetry/instrumentation-redis": "^0.35.0", + "@opentelemetry/instrumentation-redis-4": "^0.35.0", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", @@ -338,12 +336,26 @@ "node": ">=14" } }, + "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/core": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", + "dependencies": { + "@opentelemetry/semantic-conventions": "1.15.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.5.0" + } + }, "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.35.0.tgz", - "integrity": "sha512-E+tt/IJiRXYVHs0iUzwBFPqtaHsBVxxwci/0Cu26iOmxwXJQKse6HzVOg469iF6uam8fHsPXTr7u+P/FgjXrPQ==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.36.1.tgz", + "integrity": "sha512-//FdYXGcUO08Y1tVPXlcEvUYCnRU8tlBgYBe3ZMjF7E1GMaFti4Xy6sAHVreyl0ZQjBTaGtHdyORHIOTKUM4ZA==", "dependencies": { - "@opentelemetry/instrumentation": "^0.40.0", + "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.0.0" }, @@ -354,16 +366,14 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-mongodb/node_modules/@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", + "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-mysql": { + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.34.1.tgz", + "integrity": "sha512-zQq7hN3ILm1vIJCGeKHRc4pTK8LOmkTt8oKWf0v+whFs7axieIhXZMoCqIBm6BigLy3Trg5iaKyuSrx7kO6q2g==", "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/semantic-conventions": "^1.0.0", + "@types/mysql": "2.15.21" }, "engines": { "node": ">=14" @@ -372,12 +382,79 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@azure/monitor-opentelemetry/node_modules/import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", + "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-pg": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.36.1.tgz", + "integrity": "sha512-k8L7RSRTQ6e+DbHEXZB8Tmf/efkQnWKeClpZb3TEdb34Pvme4PmcpG2zb6JtM99nNrshNlVDLCZ90U3xDneTbw==", "dependencies": { - "module-details-from-path": "^1.0.3" + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/sql-common": "^0.40.0", + "@types/pg": "8.6.1", + "@types/pg-pool": "2.0.3" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-redis": { + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.35.1.tgz", + "integrity": "sha512-zY7eTzGyJCMX/0o04Q9yLy7gllf7Zh4s+g7Kv1d2cMLtTt9zGSlncqj49uNCnneywnpMNRUIwcmd+Ch1bQeh+g==", + "dependencies": { + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/semantic-conventions": "^1.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-redis-4": { + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.35.1.tgz", + "integrity": "sha512-tQ07wvtjUbHSvvhPPvWyZjYTSzVBTpC746ro5szLnniodvxtKkmP/N+R9KyFXfyH7wwaLIR1Scgq3XSGSppt+Q==", + "dependencies": { + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/semantic-conventions": "^1.0.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/redis-common": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.1.tgz", + "integrity": "sha512-YjfNEr7DK1Ymc5H0bzhmqVvMcCs+PUEUerzrpTFdHfZxj3HpnnjZTIFKx/gxiL/sajQ8dxycjlreoYTVYKBXlw==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", + "engines": { + "node": ">=14" + } + }, + "node_modules/@azure/monitor-opentelemetry/node_modules/@types/mysql": { + "version": "2.15.21", + "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz", + "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==", + "dependencies": { + "@types/node": "*" } }, "node_modules/@azure/msal-browser": { @@ -1220,9 +1297,9 @@ } }, "node_modules/@opentelemetry/api-logs": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.41.1.tgz", - "integrity": "sha512-J/PjXZkhW72RZfWKym23GmBRZeFNYQjxCarZFrChmQVSpVI57QrvmzBMiDHGYz6ZkPYXdeKsxW4kxbYL8pRApg==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.41.2.tgz", + "integrity": "sha512-JEV2RAqijAFdWeT6HddYymfnkiRu2ASxoTBr4WsnGJhOjWZkEy6vp+Sx9ozr1NaIODOa2HUyckExIqQjn6qywQ==", "dependencies": { "@opentelemetry/api": "^1.0.0" }, @@ -1255,33 +1332,33 @@ "@opentelemetry/api": ">=1.0.0 <1.5.0" } }, - "node_modules/@opentelemetry/exporter-logs-otlp-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.41.1.tgz", - "integrity": "sha512-/mcUL/31IyeBGaBNFa3zjtuUyKt4iaSoYTTicM0jvAElnwzg5x/QPHto8ZaLKtSvaJ5vBQXC4NKBviGgifniMQ==", + "node_modules/@opentelemetry/instrumentation": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz", + "integrity": "sha512-rxU72E0pKNH6ae2w5+xgVYZLzc5mlxAbGzF4shxMVK8YC2QQsfN38B2GPbj0jvrKWWNUElfclQ+YTykkNg/grw==", "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/otlp-exporter-base": "0.41.1", - "@opentelemetry/otlp-transformer": "0.41.1", - "@opentelemetry/sdk-logs": "0.41.1" + "@types/shimmer": "^1.0.2", + "import-in-the-middle": "1.4.2", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.1", + "shimmer": "^1.2.1" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api-logs": ">=0.38.0" + "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.41.1.tgz", - "integrity": "sha512-A0uiwC5HnVtglgYyCSneUh6VqPtbmZ9QINMkxTfEplNaVPrM8yqPq51kVFemqkgpT1h5laNlgByURBt7xVaUBA==", + "node_modules/@opentelemetry/instrumentation-http": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.41.2.tgz", + "integrity": "sha512-dzOC6xkfK0LM6Dzo91aInLdSbdIzKA0IgSDnyLi6YZ0Z7c1bfrFncFx/3gZs8vi+KXLALgfMlpzE7IYDW/cM3A==", "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/otlp-exporter-base": "0.41.1", - "@opentelemetry/otlp-transformer": "0.41.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/sdk-metrics": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/instrumentation": "0.41.2", + "@opentelemetry/semantic-conventions": "1.15.2", + "semver": "^7.5.1" }, "engines": { "node": ">=14" @@ -1290,57 +1367,26 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.41.1.tgz", - "integrity": "sha512-78TvzayfaFpLo/ZsW9z63Jwv3bg9u219sOuzKF83x8Q3Man5ZWucUzUGh/IQi/9IfCMaZqXmcDwINbvqaN5nng==", + "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/core": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/otlp-exporter-base": "0.41.1", - "@opentelemetry/otlp-transformer": "0.41.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/sdk-trace-base": "1.15.1" + "@opentelemetry/semantic-conventions": "1.15.2" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": ">=1.0.0 <1.5.0" } }, - "node_modules/@opentelemetry/instrumentation": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.1.tgz", - "integrity": "sha512-IsOidIIgI7Sg2NhWGYRZRifiv9kLyrxT89hBK1YVPDetuBEBUgFzD5VXdwqwfOKL3kgT4KiERMmLJ8gqig0o1A==", - "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.4.1", - "require-in-the-middle": "^7.1.1", - "semver": "^7.5.1", - "shimmer": "^1.2.1" - }, + "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", "engines": { "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.41.1.tgz", - "integrity": "sha512-fhLBlSxTg+jw5HZVzOvH4tIUQHJkP8L2dyYYXu60sppYZHFVltL/DyfoMErdq5cSn97WHWfRqnbYrG0wlPJedA==", - "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/instrumentation": "0.41.1", - "@opentelemetry/semantic-conventions": "1.15.1", - "semver": "^7.5.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" } }, "node_modules/@opentelemetry/instrumentation-mongodb": { @@ -1545,11 +1591,11 @@ } }, "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.41.1.tgz", - "integrity": "sha512-QJTRhrjVIN+gt2iCBmzcL/TU0ZgYFpFXEtY+ImfoqfWC2PpGIFkcN7R1dQWTyvmb1MrjwbtM+SVKLHCoBFiMJA==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.41.2.tgz", + "integrity": "sha512-pfwa6d+Dax3itZcGWiA0AoXeVaCuZbbqUTsCtOysd2re8C2PWXNxDONUfBWsn+KgxAdi+ljwTjJGiaVLDaIEvQ==", "dependencies": { - "@opentelemetry/core": "1.15.1" + "@opentelemetry/core": "1.15.2" }, "engines": { "node": ">=14" @@ -1558,23 +1604,26 @@ "@opentelemetry/api": "^1.0.0" } }, - "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.41.1.tgz", - "integrity": "sha512-QI0VVmYDH2le3x4d87PWLQsvxMJ5MCn8lIer/hPwysmN49E8BkIdHlBuR7PP4v/IrUFhL1bGV5ZEGwBmi9RDAw==", + "node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", "dependencies": { - "@opentelemetry/api-logs": "0.41.1", - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/sdk-logs": "0.41.1", - "@opentelemetry/sdk-metrics": "1.15.1", - "@opentelemetry/sdk-trace-base": "1.15.1" + "@opentelemetry/semantic-conventions": "1.15.2" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.5.0" + "@opentelemetry/api": ">=1.0.0 <1.5.0" + } + }, + "node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", + "engines": { + "node": ">=14" } }, "node_modules/@opentelemetry/propagator-b3": { @@ -1703,6 +1752,20 @@ "node": ">=14" } }, + "node_modules/@opentelemetry/sql-common": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.40.0.tgz", + "integrity": "sha512-vSqRJYUPJVjMFQpYkQS3ruexCPSZJ8esne3LazLwtCPaPRvzZ7WG3tX44RouAn7w4wMp8orKguBqtt+ng2UTnw==", + "dependencies": { + "@opentelemetry/core": "^1.1.0" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0" + } + }, "node_modules/@sinonjs/commons": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", @@ -3461,9 +3524,9 @@ } }, "node_modules/import-in-the-middle": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.4.1.tgz", - "integrity": "sha512-hGG0PcCsykVo8MBVH8l0uEWLWW6DXMgJA9jvC0yps6M3uIJ8L/tagTCbyF8Ud5TtqJ8/jmZL1YkyySyeVkVQrA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.4.2.tgz", + "integrity": "sha512-9WOz1Yh/cvO/p69sxRmhyQwrIGGSp7EIdcb+fFNVi7CzQGQB8U1/1XrKVSbEd/GNOAeM0peJtmi7+qphe7NvAw==", "dependencies": { "acorn": "^8.8.2", "acorn-import-assertions": "^1.9.0", @@ -5831,27 +5894,22 @@ } }, "@azure/monitor-opentelemetry": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@azure/monitor-opentelemetry/-/monitor-opentelemetry-1.0.0-beta.1.tgz", - "integrity": "sha512-45UZGoxfxBdoS2OfmSkxM7FEW3RpJplPSIwHgFM7Lhi6IMWYvqVJcAe+431/731oriXbKBZUX3BHUdN/2n5vtw==", + "version": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", + "integrity": "sha512-vDTEhdAOx/7N1ApyG4Zg2luHQ3oRXi3wClEfYDfOD1HwIuZnyNVRONPUryljBMRcTleyftx6VZSdoWD3BDYDxg==", "requires": { "@azure/functions": "^3.2.0", "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.14", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.3", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.41.0", - "@opentelemetry/core": "^1.15.0", - "@opentelemetry/exporter-logs-otlp-http": "^0.41.0", - "@opentelemetry/exporter-metrics-otlp-http": "^0.41.0", - "@opentelemetry/exporter-trace-otlp-http": "^0.41.0", - "@opentelemetry/instrumentation": "^0.41.0", - "@opentelemetry/instrumentation-http": "^0.41.0", - "@opentelemetry/instrumentation-mongodb": "^0.35.0", - "@opentelemetry/instrumentation-mysql": "^0.33.3", - "@opentelemetry/instrumentation-pg": "^0.35.3", - "@opentelemetry/instrumentation-redis": "^0.34.7", - "@opentelemetry/instrumentation-redis-4": "^0.34.6", - "@opentelemetry/otlp-exporter-base": "^0.41.0", + "@opentelemetry/api-logs": "^0.41.2", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/instrumentation-http": "^0.41.2", + "@opentelemetry/instrumentation-mongodb": "^0.36.0", + "@opentelemetry/instrumentation-mysql": "^0.34.0", + "@opentelemetry/instrumentation-pg": "^0.36.0", + "@opentelemetry/instrumentation-redis": "^0.35.0", + "@opentelemetry/instrumentation-redis-4": "^0.35.0", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", @@ -5861,36 +5919,83 @@ "tslib": "^2.2.0" }, "dependencies": { + "@opentelemetry/core": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", + "requires": { + "@opentelemetry/semantic-conventions": "1.15.2" + } + }, "@opentelemetry/instrumentation-mongodb": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.35.0.tgz", - "integrity": "sha512-E+tt/IJiRXYVHs0iUzwBFPqtaHsBVxxwci/0Cu26iOmxwXJQKse6HzVOg469iF6uam8fHsPXTr7u+P/FgjXrPQ==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.36.1.tgz", + "integrity": "sha512-//FdYXGcUO08Y1tVPXlcEvUYCnRU8tlBgYBe3ZMjF7E1GMaFti4Xy6sAHVreyl0ZQjBTaGtHdyORHIOTKUM4ZA==", "requires": { - "@opentelemetry/instrumentation": "^0.40.0", + "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "dependencies": { - "@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "requires": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - } - } } }, - "import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", + "@opentelemetry/instrumentation-mysql": { + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.34.1.tgz", + "integrity": "sha512-zQq7hN3ILm1vIJCGeKHRc4pTK8LOmkTt8oKWf0v+whFs7axieIhXZMoCqIBm6BigLy3Trg5iaKyuSrx7kO6q2g==", "requires": { - "module-details-from-path": "^1.0.3" + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/semantic-conventions": "^1.0.0", + "@types/mysql": "2.15.21" + } + }, + "@opentelemetry/instrumentation-pg": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.36.1.tgz", + "integrity": "sha512-k8L7RSRTQ6e+DbHEXZB8Tmf/efkQnWKeClpZb3TEdb34Pvme4PmcpG2zb6JtM99nNrshNlVDLCZ90U3xDneTbw==", + "requires": { + "@opentelemetry/core": "^1.8.0", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/sql-common": "^0.40.0", + "@types/pg": "8.6.1", + "@types/pg-pool": "2.0.3" + } + }, + "@opentelemetry/instrumentation-redis": { + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.35.1.tgz", + "integrity": "sha512-zY7eTzGyJCMX/0o04Q9yLy7gllf7Zh4s+g7Kv1d2cMLtTt9zGSlncqj49uNCnneywnpMNRUIwcmd+Ch1bQeh+g==", + "requires": { + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/semantic-conventions": "^1.0.0" + } + }, + "@opentelemetry/instrumentation-redis-4": { + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.35.1.tgz", + "integrity": "sha512-tQ07wvtjUbHSvvhPPvWyZjYTSzVBTpC746ro5szLnniodvxtKkmP/N+R9KyFXfyH7wwaLIR1Scgq3XSGSppt+Q==", + "requires": { + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/semantic-conventions": "^1.0.0" + } + }, + "@opentelemetry/redis-common": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.1.tgz", + "integrity": "sha512-YjfNEr7DK1Ymc5H0bzhmqVvMcCs+PUEUerzrpTFdHfZxj3HpnnjZTIFKx/gxiL/sajQ8dxycjlreoYTVYKBXlw==" + }, + "@opentelemetry/semantic-conventions": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==" + }, + "@types/mysql": { + "version": "2.15.21", + "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz", + "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==", + "requires": { + "@types/node": "*" } } } @@ -6600,9 +6705,9 @@ "integrity": "sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==" }, "@opentelemetry/api-logs": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.41.1.tgz", - "integrity": "sha512-J/PjXZkhW72RZfWKym23GmBRZeFNYQjxCarZFrChmQVSpVI57QrvmzBMiDHGYz6ZkPYXdeKsxW4kxbYL8pRApg==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.41.2.tgz", + "integrity": "sha512-JEV2RAqijAFdWeT6HddYymfnkiRu2ASxoTBr4WsnGJhOjWZkEy6vp+Sx9ozr1NaIODOa2HUyckExIqQjn6qywQ==", "requires": { "@opentelemetry/api": "^1.0.0" } @@ -6621,62 +6726,42 @@ "@opentelemetry/semantic-conventions": "1.15.1" } }, - "@opentelemetry/exporter-logs-otlp-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.41.1.tgz", - "integrity": "sha512-/mcUL/31IyeBGaBNFa3zjtuUyKt4iaSoYTTicM0jvAElnwzg5x/QPHto8ZaLKtSvaJ5vBQXC4NKBviGgifniMQ==", - "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/otlp-exporter-base": "0.41.1", - "@opentelemetry/otlp-transformer": "0.41.1", - "@opentelemetry/sdk-logs": "0.41.1" - } - }, - "@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.41.1.tgz", - "integrity": "sha512-A0uiwC5HnVtglgYyCSneUh6VqPtbmZ9QINMkxTfEplNaVPrM8yqPq51kVFemqkgpT1h5laNlgByURBt7xVaUBA==", - "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/otlp-exporter-base": "0.41.1", - "@opentelemetry/otlp-transformer": "0.41.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/sdk-metrics": "1.15.1" - } - }, - "@opentelemetry/exporter-trace-otlp-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.41.1.tgz", - "integrity": "sha512-78TvzayfaFpLo/ZsW9z63Jwv3bg9u219sOuzKF83x8Q3Man5ZWucUzUGh/IQi/9IfCMaZqXmcDwINbvqaN5nng==", - "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/otlp-exporter-base": "0.41.1", - "@opentelemetry/otlp-transformer": "0.41.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/sdk-trace-base": "1.15.1" - } - }, "@opentelemetry/instrumentation": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.1.tgz", - "integrity": "sha512-IsOidIIgI7Sg2NhWGYRZRifiv9kLyrxT89hBK1YVPDetuBEBUgFzD5VXdwqwfOKL3kgT4KiERMmLJ8gqig0o1A==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz", + "integrity": "sha512-rxU72E0pKNH6ae2w5+xgVYZLzc5mlxAbGzF4shxMVK8YC2QQsfN38B2GPbj0jvrKWWNUElfclQ+YTykkNg/grw==", "requires": { "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.4.1", + "import-in-the-middle": "1.4.2", "require-in-the-middle": "^7.1.1", "semver": "^7.5.1", "shimmer": "^1.2.1" } }, "@opentelemetry/instrumentation-http": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.41.1.tgz", - "integrity": "sha512-fhLBlSxTg+jw5HZVzOvH4tIUQHJkP8L2dyYYXu60sppYZHFVltL/DyfoMErdq5cSn97WHWfRqnbYrG0wlPJedA==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.41.2.tgz", + "integrity": "sha512-dzOC6xkfK0LM6Dzo91aInLdSbdIzKA0IgSDnyLi6YZ0Z7c1bfrFncFx/3gZs8vi+KXLALgfMlpzE7IYDW/cM3A==", "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/instrumentation": "0.41.1", - "@opentelemetry/semantic-conventions": "1.15.1", + "@opentelemetry/core": "1.15.2", + "@opentelemetry/instrumentation": "0.41.2", + "@opentelemetry/semantic-conventions": "1.15.2", "semver": "^7.5.1" + }, + "dependencies": { + "@opentelemetry/core": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", + "requires": { + "@opentelemetry/semantic-conventions": "1.15.2" + } + }, + "@opentelemetry/semantic-conventions": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==" + } } }, "@opentelemetry/instrumentation-mongodb": { @@ -6831,24 +6916,26 @@ } }, "@opentelemetry/otlp-exporter-base": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.41.1.tgz", - "integrity": "sha512-QJTRhrjVIN+gt2iCBmzcL/TU0ZgYFpFXEtY+ImfoqfWC2PpGIFkcN7R1dQWTyvmb1MrjwbtM+SVKLHCoBFiMJA==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.41.2.tgz", + "integrity": "sha512-pfwa6d+Dax3itZcGWiA0AoXeVaCuZbbqUTsCtOysd2re8C2PWXNxDONUfBWsn+KgxAdi+ljwTjJGiaVLDaIEvQ==", "requires": { - "@opentelemetry/core": "1.15.1" - } - }, - "@opentelemetry/otlp-transformer": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.41.1.tgz", - "integrity": "sha512-QI0VVmYDH2le3x4d87PWLQsvxMJ5MCn8lIer/hPwysmN49E8BkIdHlBuR7PP4v/IrUFhL1bGV5ZEGwBmi9RDAw==", - "requires": { - "@opentelemetry/api-logs": "0.41.1", - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/sdk-logs": "0.41.1", - "@opentelemetry/sdk-metrics": "1.15.1", - "@opentelemetry/sdk-trace-base": "1.15.1" + "@opentelemetry/core": "1.15.2" + }, + "dependencies": { + "@opentelemetry/core": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", + "requires": { + "@opentelemetry/semantic-conventions": "1.15.2" + } + }, + "@opentelemetry/semantic-conventions": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==" + } } }, "@opentelemetry/propagator-b3": { @@ -6928,6 +7015,14 @@ "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.1.tgz", "integrity": "sha512-n8Kur1/CZlYG32YCEj30CoUqA8R7UyDVZzoEU6SDP+13+kXDT2kFVu6MpcnEUTyGP3i058ID6Qjp5h6IJxdPPQ==" }, + "@opentelemetry/sql-common": { + "version": "0.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.40.0.tgz", + "integrity": "sha512-vSqRJYUPJVjMFQpYkQS3ruexCPSZJ8esne3LazLwtCPaPRvzZ7WG3tX44RouAn7w4wMp8orKguBqtt+ng2UTnw==", + "requires": { + "@opentelemetry/core": "^1.1.0" + } + }, "@sinonjs/commons": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", @@ -8211,9 +8306,9 @@ } }, "import-in-the-middle": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.4.1.tgz", - "integrity": "sha512-hGG0PcCsykVo8MBVH8l0uEWLWW6DXMgJA9jvC0yps6M3uIJ8L/tagTCbyF8Ud5TtqJ8/jmZL1YkyySyeVkVQrA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.4.2.tgz", + "integrity": "sha512-9WOz1Yh/cvO/p69sxRmhyQwrIGGSp7EIdcb+fFNVi7CzQGQB8U1/1XrKVSbEd/GNOAeM0peJtmi7+qphe7NvAw==", "requires": { "acorn": "^8.8.2", "acorn-import-assertions": "^1.9.0", diff --git a/package.json b/package.json index 3afb8f839..e78137956 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@azure/core-client": "^1.0.0", "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", - "@azure/monitor-opentelemetry": "^1.0.0-beta.1", + "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.1", "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.0", @@ -81,6 +81,7 @@ "@opentelemetry/instrumentation-pg": "^0.35.0", "@opentelemetry/instrumentation-redis": "^0.34.1", "@opentelemetry/instrumentation-redis-4": "^0.34.1", + "@opentelemetry/otlp-exporter-base": "^0.41.2", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", diff --git a/src/agent/agentLoader.ts b/src/agent/agentLoader.ts index 23a32fac4..809b4b851 100644 --- a/src/agent/agentLoader.ts +++ b/src/agent/agentLoader.ts @@ -43,7 +43,6 @@ export class AgentLoader { }, enableAutoCollectExceptions: true, enableAutoCollectPerformance: true, - enableAutoCollectStandardMetrics: true, samplingRatio: 1, // Sample all telemetry by default instrumentationOptions: { azureSdk: { diff --git a/src/agent/azureFunctionsLoader.ts b/src/agent/azureFunctionsLoader.ts index bd4047e82..0e6f69061 100644 --- a/src/agent/azureFunctionsLoader.ts +++ b/src/agent/azureFunctionsLoader.ts @@ -17,7 +17,7 @@ export class AzureFunctionsLoader extends AgentLoader { if (this._canLoad) { // Azure Fn specific configuration this._options.enableAutoCollectPerformance = false; - this._options.enableAutoCollectStandardMetrics = false; + process.env["APPLICATION_INSIGHTS_NO_STANDARD_METRICS"] = "disable"; const resourceAttributes: Attributes = {}; if (process.env.WEBSITE_SITE_NAME) { resourceAttributes[SemanticResourceAttributes.SERVICE_NAME] = diff --git a/src/applicationInsightsClient.ts b/src/applicationInsightsClient.ts index 0f7faeb16..8aac4068d 100644 --- a/src/applicationInsightsClient.ts +++ b/src/applicationInsightsClient.ts @@ -1,49 +1,43 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { ApplicationInsightsConfig } from "./applicationInsightsConfig"; + +import { AzureMonitorOpenTelemetryClient } from "@azure/monitor-opentelemetry"; import { Logger } from "./shared/logging"; -import { AzureMonitorOpenTelemetryClient, AzureMonitorOpenTelemetryOptions } from "@azure/monitor-opentelemetry"; +import { AutoCollectConsole } from "./logs/console"; +import { AutoCollectExceptions, parseStack } from "./logs/exceptions"; +import { ApplicationInsightsOptions, ExtendedMetricType } from "./types"; +import { ApplicationInsightsConfig } from "./shared/configuration/config"; +import { IConfig } from "./shim/types"; +import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; + + -/** -* @deprecated Use TelemetryClient instead -*/ export class ApplicationInsightsClient { + private _internalConfig: ApplicationInsightsConfig; private _client: AzureMonitorOpenTelemetryClient; + private _console: AutoCollectConsole; + private _exceptions: AutoCollectExceptions; + + + /** * Constructs a new client - * @param options AzureMonitorOpenTelemetryOptions + * @param options ApplicationInsightsOptions */ - constructor(options?: AzureMonitorOpenTelemetryOptions) { - this._client = new AzureMonitorOpenTelemetryClient(options); - } + constructor(options?: ApplicationInsightsOptions) { - public start() { - // No Op - } - - public getTraceHandler(): any { - return this._client["_traceHandler"]; - } - - public getMetricHandler(): any { - return this._client["_metricHandler"]; - } - - public getLogHandler(): any { - return this._client["_logHandler"]; - } + this._internalConfig = new ApplicationInsightsConfig(options); + this._client = new AzureMonitorOpenTelemetryClient(options); + this._console = new AutoCollectConsole(this); + if (this._internalConfig.enableAutoCollectExceptions) { + this._exceptions = new AutoCollectExceptions(this); + } + + this._console.enable(this._internalConfig.logInstrumentationOptions); - /** - * @deprecated This method should not be used - */ - public getConfig(): ApplicationInsightsConfig { - return null; - } - public getLogger(): Logger { - return Logger.getInstance(); } /** @@ -58,9 +52,16 @@ export class ApplicationInsightsClient { } /** - *Shutdown all handlers - */ + * Shutdown client + */ public async shutdown(): Promise { this._client.shutdown(); + this._console.shutdown(); + this._console = null; + this._exceptions?.shutdown(); + this._exceptions = null; } + + + } diff --git a/src/applicationInsightsConfig.ts b/src/applicationInsightsConfig.ts deleted file mode 100644 index 889405592..000000000 --- a/src/applicationInsightsConfig.ts +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { TokenCredential } from "@azure/core-auth"; -import { Resource } from "@opentelemetry/resources"; -import { ApplicationInsightsOptions, LogInstrumentationsConfig } from "./types"; -import { AzureMonitorExporterOptions } from "@azure/monitor-opentelemetry-exporter"; -import { InstrumentationOptions } from "@azure/monitor-opentelemetry"; - -/** -* @deprecated Use ApplicationInsightsOptions instead -*/ -export class ApplicationInsightsConfig implements ApplicationInsightsOptions { - // ApplicationInsightsOptions - public enableAutoCollectExceptions?: boolean; - public extendedMetrics: { [type: string]: boolean }; - public logInstrumentations?: LogInstrumentationsConfig; - // AzureMonitorOpenTelemetryOptions - public azureMonitorExporterConfig?: AzureMonitorExporterOptions; - public resource?: Resource; - public samplingRatio: number; - public enableAutoCollectPerformance: boolean; - public enableAutoCollectStandardMetrics: boolean; - public instrumentationOptions?: InstrumentationOptions; - - // Deprecated - public enableAutoCollectHeartbeat: boolean; - - /** Connection String used to send telemetry payloads to - * @deprecated This config should not be used, use azureMonitorExporterConfig to configure Connection String - */ - public set connectionString(connectionString: string) { - this.azureMonitorExporterConfig.connectionString = connectionString; - } - public get connectionString(): string { - return this.azureMonitorExporterConfig.connectionString; - } - /** AAD TokenCredential to use to authenticate the app - * @deprecated This config should not be used, use azureMonitorExporterConfig to configure aadTokenCredential - */ - public set aadTokenCredential(aadTokenCredential: TokenCredential) { - this.azureMonitorExporterConfig.aadTokenCredential = aadTokenCredential; - } - public get aadTokenCredential() { - return this.azureMonitorExporterConfig.aadTokenCredential; - } - /** - * Disable offline storage when telemetry cannot be exported. - * @deprecated This config should not be used, use azureMonitorExporterConfig to configure disableOfflineStorage - */ - public set disableOfflineStorage(disableOfflineStorage: boolean) { - this.azureMonitorExporterConfig.disableOfflineStorage = disableOfflineStorage; - } - public get disableOfflineStorage() { - return this.azureMonitorExporterConfig.disableOfflineStorage; - } - /** - * Directory to store retriable telemetry when it fails to export. - * @deprecated This config should not be used, use azureMonitorExporterConfig to configure storageDirectory - */ - public set storageDirectory(storageDirectory: string) { - this.azureMonitorExporterConfig.storageDirectory = storageDirectory; - } - public get storageDirectory() { - return this.azureMonitorExporterConfig.storageDirectory; - } - /** - * @deprecated This config should not be used, use instrumentationOptions - */ - public set instrumentations(instrumentations: InstrumentationOptions) { - this.instrumentationOptions = instrumentations; - } - public get instrumentations(): InstrumentationOptions { - return this.instrumentationOptions; - } - - /** - * Get Instrumentation Key - * @deprecated This method should not be used - */ - public getInstrumentationKey(): string { - return ""; - } - - /** - * Get Instrumentation Key - * @deprecated This method should not be used - */ - public getIngestionEndpoint(): string { - return ""; - } - - /** - * Get Instrumentation Key - * @deprecated This method should not be used - */ - public getDisableStatsbeat(): boolean { - return false; - } -} diff --git a/src/index.ts b/src/index.ts index 1596ae42e..05b4a6cb7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,9 +12,7 @@ export { Telemetry, } from "./declarations/contracts"; -// To support previous versions of Beta, will be removed before GA release export { ApplicationInsightsClient } from "./applicationInsightsClient"; -export { ApplicationInsightsConfig } from "./applicationInsightsConfig"; // To support the shim -export * from "../applicationinsights"; \ No newline at end of file +export * from ".."; \ No newline at end of file diff --git a/src/logs/console.ts b/src/logs/console.ts index 73ff09724..9aa61c40c 100644 --- a/src/logs/console.ts +++ b/src/logs/console.ts @@ -1,22 +1,22 @@ -import { LogInstrumentationsConfig } from "../types"; +import { ApplicationInsightsClient } from "../applicationInsightsClient"; +import { LogInstrumentationOptions } from "../types"; import { enablePublishers } from "./diagnostic-channel/initialization"; -import { TelemetryClient } from "../shim/telemetryClient"; enablePublishers(); export class AutoCollectConsole { - private _client: TelemetryClient; + private _client: ApplicationInsightsClient; - constructor(client: TelemetryClient) { + constructor(client: ApplicationInsightsClient) { this._client = client; } - public enable(config: LogInstrumentationsConfig) { + public enable(options: LogInstrumentationOptions) { // eslint-disable-next-line @typescript-eslint/no-var-requires - require("./diagnostic-channel/console.sub").enable(config.console.enabled, this._client); + require("./diagnostic-channel/console.sub").enable(options.console.enabled, this._client); // eslint-disable-next-line @typescript-eslint/no-var-requires - require("./diagnostic-channel/bunyan.sub").enable(config.bunyan.enabled, this._client); + require("./diagnostic-channel/bunyan.sub").enable(options.bunyan.enabled, this._client); // eslint-disable-next-line @typescript-eslint/no-var-requires - require("./diagnostic-channel/winston.sub").enable(config.winston.enabled, this._client); + require("./diagnostic-channel/winston.sub").enable(options.winston.enabled, this._client); } public shutdown() { diff --git a/src/logs/diagnostic-channel/bunyan.sub.ts b/src/logs/diagnostic-channel/bunyan.sub.ts index 81fee8155..715a687bb 100644 --- a/src/logs/diagnostic-channel/bunyan.sub.ts +++ b/src/logs/diagnostic-channel/bunyan.sub.ts @@ -3,9 +3,9 @@ import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { bunyan } from "diagnostic-channel-publishers"; import { KnownSeverityLevel } from "../../declarations/generated"; -import { TelemetryClient } from "../../shim/telemetryClient"; +import { ApplicationInsightsClient } from "../../applicationInsightsClient"; -let clients: TelemetryClient[] = []; +let clients: ApplicationInsightsClient[] = []; // Mapping from bunyan levels defined at https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L256 const bunyanToAILevelMap: { [key: number]: string } = { @@ -35,7 +35,7 @@ const subscriber = (event: IStandardEvent) => { }); }; -export function enable(enabled: boolean, client: TelemetryClient) { +export function enable(enabled: boolean, client: ApplicationInsightsClient) { if (enabled) { const handlerFound = clients.find((c) => c === client); if (handlerFound) { diff --git a/src/logs/diagnostic-channel/console.sub.ts b/src/logs/diagnostic-channel/console.sub.ts index e3508680c..3c67d77f1 100644 --- a/src/logs/diagnostic-channel/console.sub.ts +++ b/src/logs/diagnostic-channel/console.sub.ts @@ -3,9 +3,9 @@ import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { console as consolePub } from "diagnostic-channel-publishers"; import { KnownSeverityLevel } from "../../declarations/generated"; -import { TelemetryClient } from "../../shim/telemetryClient"; +import { ApplicationInsightsClient } from "../../applicationInsightsClient"; -let clients: TelemetryClient[] = []; +let clients: ApplicationInsightsClient[] = []; const subscriber = (event: IStandardEvent) => { let message = event.data.message as Error | string; @@ -27,7 +27,7 @@ const subscriber = (event: IStandardEvent) => { }); }; -export function enable(enabled: boolean, client: TelemetryClient) { +export function enable(enabled: boolean, client: ApplicationInsightsClient) { if (enabled) { const handlerFound = clients.find((c) => c === client); if (handlerFound) { diff --git a/src/logs/diagnostic-channel/winston.sub.ts b/src/logs/diagnostic-channel/winston.sub.ts index cf9e3818d..6b90bea03 100644 --- a/src/logs/diagnostic-channel/winston.sub.ts +++ b/src/logs/diagnostic-channel/winston.sub.ts @@ -3,9 +3,9 @@ import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { winston } from "diagnostic-channel-publishers"; import { KnownSeverityLevel } from "../../declarations/generated"; -import { TelemetryClient } from "../../shim/telemetryClient"; +import { ApplicationInsightsClient } from "../../applicationInsightsClient"; -let clients: TelemetryClient[] = []; +let clients: ApplicationInsightsClient[] = []; const winstonToAILevelMap: { [key: string]: (og: string) => string } = { syslog(og: string) { @@ -58,7 +58,7 @@ const subscriber = (event: IStandardEvent) => { }); }; -export function enable(enabled: boolean, client: TelemetryClient) { +export function enable(enabled: boolean, client: ApplicationInsightsClient) { if (enabled) { const handlerFound = clients.find((c) => c === client); if (handlerFound) { diff --git a/src/logs/exceptions.ts b/src/logs/exceptions.ts index ca8764d87..f58a270f3 100644 --- a/src/logs/exceptions.ts +++ b/src/logs/exceptions.ts @@ -1,5 +1,5 @@ +import { ApplicationInsightsClient } from "../applicationInsightsClient"; import { Util } from "../shared/util"; -import { TelemetryClient } from "../shim/telemetryClient"; type ExceptionHandle = "uncaughtExceptionMonitor" | "uncaughtException" | "unhandledRejection"; const UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME: ExceptionHandle = "uncaughtExceptionMonitor"; @@ -12,9 +12,9 @@ export class AutoCollectExceptions { private _canUseUncaughtExceptionMonitor = false; private _exceptionListenerHandle?: (error: Error | undefined) => void; private _rejectionListenerHandle?: (error: Error | undefined) => void; - private _client: TelemetryClient; + private _client: ApplicationInsightsClient; - constructor(client: TelemetryClient) { + constructor(client: ApplicationInsightsClient) { this._client = client; // Only use for 13.7.0+ const nodeVer = process.versions.node.split("."); @@ -56,14 +56,6 @@ export class AutoCollectExceptions { } } - /** - * @deprecated This should not be used - */ - public enable(isEnabled: boolean) { - // No Op - } - - public shutdown() { if (this._exceptionListenerHandle) { if (this._canUseUncaughtExceptionMonitor) { diff --git a/src/shared/configuration/config.ts b/src/shared/configuration/config.ts new file mode 100644 index 000000000..df83fb57c --- /dev/null +++ b/src/shared/configuration/config.ts @@ -0,0 +1,107 @@ +import { JsonConfig } from "./jsonConfig"; +import { Logger } from "../logging"; +import { ApplicationInsightsOptions, ExtendedMetricType, LogInstrumentationOptions, OTLPExporterConfig } from "../../types"; + + +export class ApplicationInsightsConfig { + public logInstrumentationOptions: LogInstrumentationOptions; + public enableAutoCollectExceptions: boolean; + public extendedMetrics: { [type: string]: boolean }; + /** OTLP Trace Exporter Configuration */ + public otlpTraceExporterConfig: OTLPExporterConfig; + /** OTLP Metric Exporter Configuration */ + public otlpMetricExporterConfig: OTLPExporterConfig; + /** OTLP Log Exporter Configuration */ + public otlpLogExporterConfig: OTLPExporterConfig; + /** + * Sets the state of performance tracking (enabled by default) + * if true performance counters will be collected every second and sent to Azure Monitor + */ + public enableAutoCollectPerformance: boolean; + + constructor(options?: ApplicationInsightsOptions) { + this.otlpLogExporterConfig = {}; + this.otlpMetricExporterConfig = {}; + this.otlpTraceExporterConfig = {}; + this.enableAutoCollectPerformance = true; + this.logInstrumentationOptions = { + console: { enabled: false }, + bunyan: { enabled: false }, + winston: { enabled: false }, + }; + this.extendedMetrics = {}; + this.extendedMetrics[ExtendedMetricType.gc] = false; + this.extendedMetrics[ExtendedMetricType.heap] = false; + this.extendedMetrics[ExtendedMetricType.loop] = false; + this.enableAutoCollectExceptions = true; + this.enableAutoCollectPerformance = true; + + // Merge JSON configuration file if available + this._mergeConfig(); + // Check for explicitly passed options when instantiating client + // This will take precedence over other settings + if (options) { + this.enableAutoCollectExceptions = + options.enableAutoCollectExceptions || this.enableAutoCollectExceptions; + this.enableAutoCollectPerformance = + options.enableAutoCollectPerformance || this.enableAutoCollectPerformance; + this.logInstrumentationOptions = Object.assign( + this.logInstrumentationOptions, + options.logInstrumentationOptions + ); + this.otlpTraceExporterConfig = Object.assign( + this.otlpTraceExporterConfig, + options.otlpTraceExporterConfig + ); + this.otlpMetricExporterConfig = Object.assign( + this.otlpMetricExporterConfig, + options.otlpMetricExporterConfig + ); + this.otlpLogExporterConfig = Object.assign( + this.otlpLogExporterConfig, + options.otlpLogExporterConfig + ); + } + } + + private _mergeConfig() { + try { + const jsonConfig = JsonConfig.getInstance(); + this.enableAutoCollectPerformance = + jsonConfig.enableAutoCollectPerformance !== undefined + ? jsonConfig.enableAutoCollectPerformance + : this.enableAutoCollectPerformance; + this.enableAutoCollectExceptions = + jsonConfig.enableAutoCollectExceptions !== undefined + ? jsonConfig.enableAutoCollectExceptions + : this.enableAutoCollectExceptions; + + + this.otlpTraceExporterConfig = Object.assign( + this.otlpTraceExporterConfig, + jsonConfig.otlpTraceExporterConfig + ); + this.otlpMetricExporterConfig = Object.assign( + this.otlpMetricExporterConfig, + jsonConfig.otlpMetricExporterConfig + ); + this.otlpLogExporterConfig = Object.assign( + this.otlpLogExporterConfig, + jsonConfig.otlpLogExporterConfig + ); + + this.logInstrumentationOptions = Object.assign( + this.logInstrumentationOptions, + jsonConfig.logInstrumentationOptions + ); + + this.extendedMetrics = Object.assign( + this.extendedMetrics, + jsonConfig.extendedMetrics + ); + + } catch (error) { + Logger.getInstance().error("Failed to load JSON config file values.", error); + } + } +} diff --git a/src/shared/configuration/internal.ts b/src/shared/configuration/internal.ts deleted file mode 100644 index db7239337..000000000 --- a/src/shared/configuration/internal.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { JsonConfig } from "./jsonConfig"; -import { Logger } from "../logging"; -import { ApplicationInsightsOptions, ExtendedMetricType, LogInstrumentationsConfig } from "../../types"; - - -export class InternalConfig implements ApplicationInsightsOptions { - private _logInstrumentations: LogInstrumentationsConfig; - public enableAutoCollectExceptions: boolean; - public extendedMetrics: { [type: string]: boolean }; - - constructor(options?: ApplicationInsightsOptions) { - this.extendedMetrics = {}; - // Load config values from env variables and JSON if available - this._loadDefaultValues(); - this._mergeConfig(); - // This will take precedence over other settings - if (options) { - this.enableAutoCollectExceptions = - options.enableAutoCollectExceptions || this.enableAutoCollectExceptions; - this.logInstrumentations = options.logInstrumentations || this.logInstrumentations; - } - } - - public set logInstrumentations(value: LogInstrumentationsConfig) { - this._logInstrumentations = Object.assign(this._logInstrumentations, value); - } - - public get logInstrumentations(): LogInstrumentationsConfig { - return this._logInstrumentations; - } - - /** - * Get Instrumentation Key - * @deprecated This method should not be used - */ - public getDisableStatsbeat(): boolean { - return false; - } - - private _loadDefaultValues() { - this.enableAutoCollectExceptions = - this.enableAutoCollectExceptions !== undefined - ? this.enableAutoCollectExceptions - : true; - this._logInstrumentations = { - console: { enabled: false }, - bunyan: { enabled: false }, - winston: { enabled: false }, - }; - this.extendedMetrics[ExtendedMetricType.gc] = false; - this.extendedMetrics[ExtendedMetricType.heap] = false; - this.extendedMetrics[ExtendedMetricType.loop] = false; - } - - private _mergeConfig() { - try { - const jsonConfig = JsonConfig.getInstance(); - this.enableAutoCollectExceptions = - jsonConfig.enableAutoCollectExceptions !== undefined - ? jsonConfig.enableAutoCollectExceptions - : this.enableAutoCollectExceptions; - if (jsonConfig.logInstrumentations) { - if ( - jsonConfig.logInstrumentations.console && - jsonConfig.logInstrumentations.console.enabled !== undefined - ) { - this.logInstrumentations.console.enabled = - jsonConfig.logInstrumentations.console.enabled; - } - if ( - jsonConfig.logInstrumentations.bunyan && - jsonConfig.logInstrumentations.bunyan.enabled !== undefined - ) { - this.logInstrumentations.bunyan.enabled = - jsonConfig.logInstrumentations.bunyan.enabled; - } - if ( - jsonConfig.logInstrumentations.winston && - jsonConfig.logInstrumentations.winston.enabled !== undefined - ) { - this.logInstrumentations.winston.enabled = - jsonConfig.logInstrumentations.winston.enabled; - } - } - if (jsonConfig.extendedMetrics) { - if (jsonConfig.extendedMetrics[ExtendedMetricType.gc] !== undefined) { - this.extendedMetrics[ExtendedMetricType.gc] = - jsonConfig.extendedMetrics[ExtendedMetricType.gc]; - } - if (jsonConfig.extendedMetrics[ExtendedMetricType.heap] !== undefined) { - this.extendedMetrics[ExtendedMetricType.heap] = - jsonConfig.extendedMetrics[ExtendedMetricType.heap]; - } - if (jsonConfig.extendedMetrics[ExtendedMetricType.loop] !== undefined) { - this.extendedMetrics[ExtendedMetricType.loop] = - jsonConfig.extendedMetrics[ExtendedMetricType.loop]; - } - } - } catch (error) { - Logger.getInstance().error("Failed to load JSON config file values.", error); - } - } -} diff --git a/src/shared/configuration/jsonConfig.ts b/src/shared/configuration/jsonConfig.ts index fc28f4b96..2724b46cf 100644 --- a/src/shared/configuration/jsonConfig.ts +++ b/src/shared/configuration/jsonConfig.ts @@ -1,16 +1,27 @@ import * as fs from "fs"; import * as path from "path"; import { Logger } from "../logging"; -import { ApplicationInsightsOptions, LogInstrumentationsConfig } from "../../types"; +import { ApplicationInsightsOptions, LogInstrumentationOptions, OTLPExporterConfig } from "../../types"; const ENV_CONFIGURATION_FILE = "APPLICATIONINSIGHTS_CONFIGURATION_FILE"; const ENV_CONTENT = "APPLICATIONINSIGHTS_CONFIGURATION_CONTENT"; -export class JsonConfig implements ApplicationInsightsOptions { +export class JsonConfig { private static _instance: JsonConfig; public enableAutoCollectExceptions: boolean; - public logInstrumentations: LogInstrumentationsConfig; + public logInstrumentationOptions: LogInstrumentationOptions; public extendedMetrics: { [type: string]: boolean }; + /** OTLP Trace Exporter Configuration */ + public otlpTraceExporterConfig?: OTLPExporterConfig; + /** OTLP Metric Exporter Configuration */ + public otlpMetricExporterConfig?: OTLPExporterConfig; + /** OTLP Log Exporter Configuration */ + public otlpLogExporterConfig?: OTLPExporterConfig; + /** + * Sets the state of performance tracking (enabled by default) + * if true performance counters will be collected every second and sent to Azure Monitor + */ + public enableAutoCollectPerformance?: boolean; public static getInstance() { if (!JsonConfig._instance) { @@ -52,8 +63,12 @@ export class JsonConfig implements ApplicationInsightsOptions { try { const jsonConfig: ApplicationInsightsOptions = JSON.parse(jsonString); this.enableAutoCollectExceptions = jsonConfig.enableAutoCollectExceptions; - this.logInstrumentations = jsonConfig.logInstrumentations; + this.logInstrumentationOptions = jsonConfig.logInstrumentationOptions; this.extendedMetrics = jsonConfig.extendedMetrics; + this.otlpLogExporterConfig = jsonConfig.otlpLogExporterConfig; + this.otlpMetricExporterConfig = jsonConfig.otlpMetricExporterConfig; + this.otlpTraceExporterConfig = jsonConfig.otlpTraceExporterConfig; + this.enableAutoCollectPerformance = jsonConfig.enableAutoCollectPerformance; } catch (err) { Logger.getInstance().info("Missing or invalid JSON config file: ", err); } diff --git a/src/shared/util/configHelper.ts b/src/shared/util/configHelper.ts index 8aab205d1..8fd2dc0b9 100644 --- a/src/shared/util/configHelper.ts +++ b/src/shared/util/configHelper.ts @@ -68,7 +68,7 @@ export function setAutoCollectDependencies(options: ApplicationInsightsOptions, export function setAutoCollectConsole(options: ApplicationInsightsOptions, value: boolean, enableConsole: boolean, collectConsoleLog = false) { if (options) { - options.logInstrumentations = { + options.logInstrumentationOptions = { bunyan: { enabled: value }, winston: { enabled: value }, console: { enabled: collectConsoleLog }, diff --git a/src/shim/shim-applicationinsights.ts b/src/shim/shim-applicationinsights.ts index 32a8254e6..76fb04f35 100644 --- a/src/shim/shim-applicationinsights.ts +++ b/src/shim/shim-applicationinsights.ts @@ -1,14 +1,15 @@ import * as http from "http"; -import { DiagLogLevel, SpanContext } from "@opentelemetry/api"; -import { CorrelationContextManager } from "./correlationContextManager"; import * as azureFunctionsTypes from "@azure/functions"; +import { DiagLogLevel, SpanContext } from "@opentelemetry/api"; import { Span } from "@opentelemetry/sdk-trace-base"; +import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; + +import { CorrelationContextManager } from "./correlationContextManager"; import { Logger } from "../shared/logging"; import { ICorrelationContext, HttpRequest, DistributedTracingModes } from "./types"; import { TelemetryClient } from "./telemetryClient"; import * as Contracts from "../declarations/contracts"; import { ApplicationInsightsOptions } from "../types"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; import ConfigHelper = require("../shared/util/configHelper"); // We export these imports so that SDK users may use these classes directly. @@ -132,7 +133,7 @@ export class Configuration { */ public static setAutoCollectConsole(value: boolean, collectConsoleLog = false) { if (_options) { - _options.logInstrumentations = { + _options.logInstrumentationOptions = { bunyan: { enabled: value }, winston: { enabled: value }, console: { enabled: collectConsoleLog }, @@ -171,7 +172,8 @@ export class Configuration { */ public static setAutoCollectPreAggregatedMetrics(value: boolean) { if (_options) { - _options.enableAutoCollectStandardMetrics = value; + // TODO: Add support to disable + process.env["APPLICATION_INSIGHTS_NO_STANDARD_METRICS "] = "disable"; } return Configuration; } diff --git a/src/shim/telemetryClient.ts b/src/shim/telemetryClient.ts index b5f0ab533..6a26d1ca7 100644 --- a/src/shim/telemetryClient.ts +++ b/src/shim/telemetryClient.ts @@ -1,38 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { LogRecord } from "@opentelemetry/api-logs"; +import { Logger as OtelLogger, LogRecord, logs } from "@opentelemetry/api-logs"; import { LogRecord as SDKLogRecord } from "@opentelemetry/sdk-logs"; -import { AzureMonitorOpenTelemetryClient } from "@azure/monitor-opentelemetry"; import { Attributes, context, DiagLogLevel, SpanKind, SpanOptions, SpanStatusCode } from "@opentelemetry/api"; +import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; import { IdGenerator, RandomIdGenerator } from "@opentelemetry/sdk-trace-base"; import { SemanticAttributes } from "@opentelemetry/semantic-conventions"; + import * as Contracts from "../declarations/contracts"; import { AvailabilityData, TelemetryItem as Envelope, KnownSeverityLevel, MessageData, MonitorDomain, PageViewData, TelemetryEventData, TelemetryExceptionData, TelemetryExceptionDetails } from "../declarations/generated"; import { Context } from "./context"; import { Logger } from "../shared/logging"; import { Util } from "../shared/util"; -import { AutoCollectConsole } from "../logs/console"; -import { AutoCollectExceptions, parseStack } from "../logs/exceptions"; import { ApplicationInsightsOptions, ExtendedMetricType } from "../types"; -import { InternalConfig } from "../shared/configuration/internal"; import { IConfig } from "../shim/types"; import Config = require("./config"); import { dispose, Configuration, _setupCalled } from "./shim-applicationinsights"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; import ConfigHelper = require("../shared/util/configHelper"); +import { ApplicationInsightsClient } from "../applicationInsightsClient"; /** * Application Insights telemetry client provides interface to track telemetry items, register telemetry initializers and * and manually trigger immediate sending (flushing) */ export class TelemetryClient { - private _internalConfig: InternalConfig; private _options: ApplicationInsightsOptions; - private _client: AzureMonitorOpenTelemetryClient; - private _console: AutoCollectConsole; - private _exceptions: AutoCollectExceptions; + private _client: ApplicationInsightsClient; private _idGenerator: IdGenerator; + private _logger: OtelLogger; public context: Context; public commonProperties: { [key: string]: string }; // TODO: Add setter so Resources are updated public config: IConfig; @@ -43,11 +39,12 @@ export class TelemetryClient { */ constructor(input?: string | ApplicationInsightsOptions) { // If the user does not pass a new connectionString, use the one defined in the _options - const config = new Config(typeof(input) === "string" ? input : input?.azureMonitorExporterConfig?.connectionString); + const config = new Config(typeof (input) === "string" ? input : input?.azureMonitorExporterConfig?.connectionString); this.config = config; this.commonProperties = {}; this.context = new Context(); + this._idGenerator = new RandomIdGenerator(); if (input) { if (typeof (input) === "object") { this._options = input; @@ -98,59 +95,59 @@ export class TelemetryClient { this._options.azureMonitorExporterConfig.aadTokenCredential = this.config.aadTokenCredential; } - if (typeof(this.config.enableAutoCollectConsole) === "boolean") { + if (typeof (this.config.enableAutoCollectConsole) === "boolean") { const setting: boolean = this.config.enableAutoCollectConsole; - this._options.logInstrumentations = { - ...this._options.logInstrumentations, + this._options.logInstrumentationOptions = { + ...this._options.logInstrumentationOptions, console: { enabled: setting }, } } - if (typeof(this.config.enableAutoCollectExceptions) === "boolean") { + if (typeof (this.config.enableAutoCollectExceptions) === "boolean") { this._options.enableAutoCollectExceptions = this.config.enableAutoCollectExceptions; } - if (typeof(this.config.enableAutoCollectDependencies) === "boolean") { + if (typeof (this.config.enableAutoCollectDependencies) === "boolean") { ConfigHelper.setAutoCollectDependencies(this._options, this.config.enableAutoCollectDependencies); } - if (typeof(this.config.enableAutoCollectRequests) === "boolean") { + if (typeof (this.config.enableAutoCollectRequests) === "boolean") { ConfigHelper.setAutoCollectRequests(this._options, this.config.enableAutoCollectRequests); } - if (typeof(this.config.enableAutoCollectPerformance) === "boolean") { + if (typeof (this.config.enableAutoCollectPerformance) === "boolean") { ConfigHelper.setAutoCollectPerformance(this._options, this.config.enableAutoCollectPerformance); } - if (typeof(this.config.enableAutoCollectExternalLoggers) === "boolean") { - this._options.logInstrumentations = { - ...this._options.logInstrumentations, + if (typeof (this.config.enableAutoCollectExternalLoggers) === "boolean") { + this._options.logInstrumentationOptions = { + ...this._options.logInstrumentationOptions, winston: { enabled: this.config.enableAutoCollectExternalLoggers }, bunyan: { enabled: this.config.enableAutoCollectExternalLoggers }, } } - if (typeof(this.config.enableAutoCollectPreAggregatedMetrics) === "boolean") { - this._options.enableAutoCollectStandardMetrics = this.config.enableAutoCollectPreAggregatedMetrics; + if (typeof (this.config.enableAutoCollectPreAggregatedMetrics) === "boolean") { + // TODO: Add support for this config in shim } - if (typeof(this.config.enableAutoCollectHeartbeat) === "boolean") { + if (typeof (this.config.enableAutoCollectHeartbeat) === "boolean") { Configuration.setAutoCollectHeartbeat(this.config.enableAutoCollectHeartbeat); } - if (typeof(this.config.enableAutoDependencyCorrelation) === "boolean") { + if (typeof (this.config.enableAutoDependencyCorrelation) === "boolean") { Configuration.setAutoDependencyCorrelation(this.config.enableAutoDependencyCorrelation); } - if (typeof(this.config.enableAutoCollectIncomingRequestAzureFunctions) === "boolean") { + if (typeof (this.config.enableAutoCollectIncomingRequestAzureFunctions) === "boolean") { Configuration.setAutoCollectIncomingRequestAzureFunctions(this.config.enableAutoCollectIncomingRequestAzureFunctions); } - if (typeof(this.config.enableSendLiveMetrics) === "boolean") { + if (typeof (this.config.enableSendLiveMetrics) === "boolean") { Configuration.setSendLiveMetrics(this.config.enableSendLiveMetrics); } - if (typeof(this.config.enableUseDiskRetryCaching) === "boolean") { + if (typeof (this.config.enableUseDiskRetryCaching) === "boolean") { Configuration.setUseDiskRetryCaching(this.config.enableUseDiskRetryCaching); } @@ -158,11 +155,11 @@ export class TelemetryClient { Logger.getInstance().warn("The use of non async hooks is no longer supported."); } - if (typeof(this.config.distributedTracingMode) === "boolean") { + if (typeof (this.config.distributedTracingMode) === "boolean") { Configuration.setDistributedTracingMode(this.config.distributedTracingMode); } - if (typeof(this.config.enableAutoCollectExtendedMetrics) === "boolean") { + if (typeof (this.config.enableAutoCollectExtendedMetrics) === "boolean") { const setting = this.config.enableAutoCollectExtendedMetrics; this._options.extendedMetrics = { [ExtendedMetricType.gc]: setting, @@ -179,13 +176,13 @@ export class TelemetryClient { Configuration.setUseDiskRetryCaching(true, resendInterval, this.config.enableMaxBytesOnDisk); } - if (typeof(this.config.enableInternalDebugLogging) === "boolean") { + if (typeof (this.config.enableInternalDebugLogging) === "boolean") { if (this.config.enableInternalDebugLogging) { Logger.getInstance().updateLogLevel(DiagLogLevel.DEBUG); } } - if (typeof(this.config.enableInternalWarningLogging) === "boolean") { + if (typeof (this.config.enableInternalWarningLogging) === "boolean") { if (this.config.enableInternalWarningLogging) { Logger.getInstance().updateLogLevel(DiagLogLevel.WARN); } @@ -203,7 +200,7 @@ export class TelemetryClient { }; } - if (typeof(this.config.disableStatsbeat) === "boolean") { + if (typeof (this.config.disableStatsbeat) === "boolean") { Logger.getInstance().warn("The disableStatsbeat configuration option is deprecated."); } @@ -250,7 +247,7 @@ export class TelemetryClient { Logger.getInstance().warn("The webInstrumentation configuration options are not supported by the shim."); } } - + /** * Starts automatic collection of telemetry. Prior to calling start no telemetry will be collected * @param input Set of options to configure the Azure Monitor Client @@ -260,22 +257,7 @@ export class TelemetryClient { if (_setupCalled) { this._parseConfig(input); } - this._internalConfig = new InternalConfig(this._options); - this._client = new AzureMonitorOpenTelemetryClient(this._options); - this._console = new AutoCollectConsole(this); - if (this._internalConfig.enableAutoCollectExceptions) { - this._exceptions = new AutoCollectExceptions(this); - } - this._idGenerator = new RandomIdGenerator(); - this._console.enable(this._internalConfig.logInstrumentations); - } - - public getAzureMonitorOpenTelemetryClient(): AzureMonitorOpenTelemetryClient { - return this._client; - } - public getInternalConfig(): InternalConfig { - return this._internalConfig; } /** @@ -287,7 +269,7 @@ export class TelemetryClient { const logRecord = this._availabilityToLogRecord( telemetry ); - this._client.getLogger().emit(logRecord); + this._logger.emit(logRecord); } catch (err) { Logger.getInstance().error("Failed to send telemetry.", err); } @@ -302,7 +284,7 @@ export class TelemetryClient { const logRecord = this._pageViewToLogRecord( telemetry ); - this._client.getLogger().emit(logRecord); + this._logger.emit(logRecord); } catch (err) { Logger.getInstance().error("Failed to send telemetry.", err); } @@ -315,7 +297,7 @@ export class TelemetryClient { public trackTrace(telemetry: Contracts.TraceTelemetry): void { try { const logRecord = this._traceToLogRecord(telemetry) as SDKLogRecord; - this._client.getLogger().emit(logRecord); + this._logger.emit(logRecord); } catch (err) { Logger.getInstance().error("Failed to send telemetry.", err); } @@ -333,7 +315,7 @@ export class TelemetryClient { const logRecord = this._exceptionToLogRecord( telemetry ) as SDKLogRecord; - this._client.getLogger().emit(logRecord); + this._logger.emit(logRecord); } catch (err) { Logger.getInstance().error("Failed to send telemetry.", err); } @@ -346,7 +328,7 @@ export class TelemetryClient { public trackEvent(telemetry: Contracts.EventTelemetry): void { try { const logRecord = this._eventToLogRecord(telemetry); - this._client.getLogger().emit(logRecord); + this._logger.emit(logRecord); } catch (err) { Logger.getInstance().error("Failed to send telemetry.", err); } @@ -450,25 +432,6 @@ export class TelemetryClient { }); span.end(endTime); } - - /** - * Immediately send all queued telemetry. - */ - public async flush(): Promise { - this._client.flush(); - } - - /** - * Shutdown client - */ - public async shutdown(): Promise { - this._client.shutdown(); - this._console.shutdown(); - this._console = null; - this._exceptions?.shutdown(); - this._exceptions = null; - } - /** * Generic track method for all telemetry types * @param data the telemetry to send @@ -524,6 +487,18 @@ export class TelemetryClient { throw new Error("Not implemented"); } + public trackNodeHttpRequestSync(telemetry: Contracts.NodeHttpRequestTelemetry) { + Logger.getInstance().warn("trackNodeHttpRequestSync is not implemented and is a no-op. Please use trackRequest instead."); + } + + public trackNodeHttpRequest(telemetry: Contracts.NodeHttpRequestTelemetry) { + Logger.getInstance().warn("trackNodeHttpRequest is not implemented and is a no-op. Please use trackRequest instead."); + } + + public trackNodeHttpDependency(telemetry: Contracts.NodeHttpRequestTelemetry) { + Logger.getInstance().warn("trackNodeHttpDependency is not implemented and is a no-op. Please use trackDependency instead."); + } + private _telemetryToLogRecord( telemetry: Contracts.Telemetry, baseType: string, @@ -543,9 +518,9 @@ export class TelemetryClient { } /** - * Availability Log to LogRecord parsing. - * @internal - */ + * Availability Log to LogRecord parsing. + * @internal + */ private _availabilityToLogRecord( telemetry: Contracts.AvailabilityTelemetry ): LogRecord { @@ -643,16 +618,4 @@ export class TelemetryClient { const record = this._telemetryToLogRecord(telemetry, baseType, baseData); return record; } - - public trackNodeHttpRequestSync(telemetry: Contracts.NodeHttpRequestTelemetry) { - Logger.getInstance().warn("trackNodeHttpRequestSync is not implemented and is a no-op. Please use trackRequest instead."); - } - - public trackNodeHttpRequest(telemetry: Contracts.NodeHttpRequestTelemetry) { - Logger.getInstance().warn("trackNodeHttpRequest is not implemented and is a no-op. Please use trackRequest instead."); - } - - public trackNodeHttpDependency(telemetry: Contracts.NodeHttpRequestTelemetry) { - Logger.getInstance().warn("trackNodeHttpDependency is not implemented and is a no-op. Please use trackDependency instead."); - } } diff --git a/src/types.ts b/src/types.ts index 3a98e6728..b7bcf8479 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2,6 +2,7 @@ // Licensed under the MIT license. import { AzureMonitorOpenTelemetryOptions } from "@azure/monitor-opentelemetry"; +import { OTLPExporterNodeConfigBase } from "@opentelemetry/otlp-exporter-base"; /** * Azure Monitor OpenTelemetry Options @@ -15,14 +16,33 @@ export interface ApplicationInsightsOptions extends AzureMonitorOpenTelemetryOpt /** * Log Instrumentations configuration included as part of Application Insights (console, bunyan, winston) */ - logInstrumentations?: LogInstrumentationsConfig; + logInstrumentationOptions?: LogInstrumentationOptions; + /** OTLP Trace Exporter Configuration */ + otlpTraceExporterConfig?: OTLPExporterConfig; + /** OTLP Metric Exporter Configuration */ + otlpMetricExporterConfig?: OTLPExporterConfig; + /** OTLP Log Exporter Configuration */ + otlpLogExporterConfig?: OTLPExporterConfig; + /** + * Sets the state of performance tracking (enabled by default) + * if true performance counters will be collected every second and sent to Azure Monitor + */ + enableAutoCollectPerformance?: boolean; /** * Specific extended metrics, applicationinsights-native-metrics package need to be available */ extendedMetrics?: { [type: string]: boolean }; } -export interface LogInstrumentationsConfig { +/** + * OTLP Exporter Options + */ +export interface OTLPExporterConfig extends OTLPExporterNodeConfigBase { + /** Enable/Disable OTLP Exporter */ + enabled?: boolean; + } + +export interface LogInstrumentationOptions { console?: { enabled: boolean }; bunyan?: { enabled: boolean }; winston?: { enabled: boolean }; diff --git a/test/functionalTests/testApp/main.js b/test/functionalTests/testApp/main.js index ee315dfc6..e1eec32ea 100644 --- a/test/functionalTests/testApp/main.js +++ b/test/functionalTests/testApp/main.js @@ -39,7 +39,7 @@ if (testconfig.AppInsightsEnabled) { enabled: true } }, - logInstrumentations: { + logInstrumentationOptions: { console: { enabled: true, }, diff --git a/test/unitTests/logs/bunyan.tests.ts b/test/unitTests/logs/bunyan.tests.ts index a13b9b380..67f01332b 100644 --- a/test/unitTests/logs/bunyan.tests.ts +++ b/test/unitTests/logs/bunyan.tests.ts @@ -5,7 +5,7 @@ import { bunyan } from "diagnostic-channel-publishers"; import { enable, dispose } from "../../../src/logs/diagnostic-channel/bunyan.sub"; import { Util } from "../../../src/shared/util"; -import { TelemetryClient } from "../../../src"; +import { ApplicationInsightsClient } from "../../../src"; import { ApplicationInsightsOptions } from "../../../src/types"; describe("diagnostic-channel/bunyan", () => { @@ -25,12 +25,11 @@ describe("diagnostic-channel/bunyan", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { bunyan: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); + const client = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackException"); const dummyError = { stack: "Test error" }; const bunyanJson = Util.getInstance().stringify({ err: dummyError }); @@ -48,12 +47,11 @@ describe("diagnostic-channel/bunyan", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { bunyan: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); + const client = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackTrace"); const logEvent: bunyan.IBunyanData = { result: "test log", @@ -69,14 +67,12 @@ describe("diagnostic-channel/bunyan", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { bunyan: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); - const secondClient = new TelemetryClient(config); - secondClient.start(); + const client = new ApplicationInsightsClient(config); + const secondClient = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackTrace"); const secondStub = sandbox.stub(secondClient, "trackTrace"); enable(true, client); diff --git a/test/unitTests/logs/console.tests.ts b/test/unitTests/logs/console.tests.ts index 9837f141a..eb3d07d95 100644 --- a/test/unitTests/logs/console.tests.ts +++ b/test/unitTests/logs/console.tests.ts @@ -4,7 +4,7 @@ import { channel } from "diagnostic-channel"; import { console } from "diagnostic-channel-publishers"; import { enable, dispose } from "../../../src/logs/diagnostic-channel/console.sub"; -import { TelemetryClient } from "../../../src"; +import { ApplicationInsightsClient } from "../../../src"; import { ApplicationInsightsOptions } from "../../../src/types"; describe("AutoCollection/Console", () => { @@ -25,12 +25,11 @@ describe("AutoCollection/Console", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { console: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); + const client = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackException"); const dummyError = new Error("test error"); const errorEvent: console.IConsoleData = { @@ -48,12 +47,11 @@ describe("AutoCollection/Console", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { console: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); + const client = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackTrace"); const logEvent: console.IConsoleData = { message: "test log", @@ -69,14 +67,12 @@ describe("AutoCollection/Console", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { console: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); - const secondClient = new TelemetryClient(config); - secondClient.start(); + const client = new ApplicationInsightsClient(config); + const secondClient = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackTrace"); const secondStub = sandbox.stub(secondClient, "trackTrace"); enable(true, client); diff --git a/test/unitTests/logs/winston.tests.ts b/test/unitTests/logs/winston.tests.ts index 0201b341e..9a8c98bb3 100644 --- a/test/unitTests/logs/winston.tests.ts +++ b/test/unitTests/logs/winston.tests.ts @@ -4,7 +4,7 @@ import { channel } from "diagnostic-channel"; import { winston } from "diagnostic-channel-publishers"; import { enable, dispose } from "../../../src/logs/diagnostic-channel/winston.sub"; -import { TelemetryClient } from "../../../src"; +import { ApplicationInsightsClient } from "../../../src"; import { ApplicationInsightsOptions } from "../../../src/types"; describe("diagnostic-channel/winston", () => { @@ -24,12 +24,11 @@ describe("diagnostic-channel/winston", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { winston: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); + const client = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackException"); const dummyError = new Error("test error"); const errorEvent: winston.IWinstonData = { @@ -48,12 +47,11 @@ describe("diagnostic-channel/winston", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { winston: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); + const client = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackTrace"); const logEvent: winston.IWinstonData = { message: "test log", @@ -71,14 +69,12 @@ describe("diagnostic-channel/winston", () => { azureMonitorExporterConfig: { connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" }, - logInstrumentations: { + logInstrumentationOptions: { winston: { enabled: true } } }; - const client = new TelemetryClient(config); - client.start(); - const secondClient = new TelemetryClient(config); - secondClient.start(); + const client = new ApplicationInsightsClient(config); + const secondClient = new ApplicationInsightsClient(config); const stub = sandbox.stub(client, "trackTrace"); const secondStub = sandbox.stub(secondClient, "trackTrace"); enable(true, client); diff --git a/test/unitTests/shim/config.tests.ts b/test/unitTests/shim/config.tests.ts index b37e675d9..a62d0c3d0 100644 --- a/test/unitTests/shim/config.tests.ts +++ b/test/unitTests/shim/config.tests.ts @@ -1,6 +1,6 @@ import assert = require('assert'); import sinon = require('sinon'); -import { TelemetryClient } from '../../../applicationinsights'; +import { TelemetryClient } from '../../..'; import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http'; const applicationInsights = require('../../../applicationinsights'); import azureCoreAuth = require("@azure/core-auth"); @@ -70,7 +70,7 @@ describe("shim/configuration/config", () => { assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.proxyOptions.port, 3000); const ignoreOutgoingUrls = telemetryClient["_options"].instrumentationOptions.http as HttpInstrumentationConfig; assert.equal(ignoreOutgoingUrls.ignoreOutgoingUrls, "https://www.bing.com"); - assert.equal(JSON.stringify(telemetryClient["_options"].logInstrumentations), JSON.stringify({ console: { enabled: true }, winston: { enabled: true }, bunyan: { enabled: true } })); + assert.equal(JSON.stringify(telemetryClient["_options"].logInstrumentationOptions), JSON.stringify({ console: { enabled: true }, winston: { enabled: true }, bunyan: { enabled: true } })); assert.equal(telemetryClient["_options"].enableAutoCollectExceptions, true); assert.equal(telemetryClient["_options"].enableAutoCollectPerformance, true); assert.equal(JSON.stringify(telemetryClient["_options"].extendedMetrics), JSON.stringify({ gc: true, heap: true, loop: true })); From 47aede37e8c5528da88566f35a25c0f93bd71a20 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 22 Aug 2023 10:38:08 -0700 Subject: [PATCH 03/14] WIP --- package-lock.json | 1063 ++++++-------------- package.json | 36 +- src/applicationInsightsClient.ts | 6 +- src/logs/api.ts | 232 +++++ src/logs/diagnostic-channel/bunyan.sub.ts | 6 +- src/logs/diagnostic-channel/console.sub.ts | 6 +- src/logs/diagnostic-channel/winston.sub.ts | 6 +- src/logs/exceptions.ts | 9 +- src/shim/telemetryClient.ts | 176 +--- 9 files changed, 592 insertions(+), 948 deletions(-) create mode 100644 src/logs/api.ts diff --git a/package-lock.json b/package-lock.json index b34282bb4..a3a4c7bdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,26 +14,26 @@ "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.1", + "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.41.0", - "@opentelemetry/core": "^1.15.0", - "@opentelemetry/instrumentation": "^0.41.0", - "@opentelemetry/instrumentation-http": "^0.41.0", - "@opentelemetry/instrumentation-mongodb": "^0.34.0", - "@opentelemetry/instrumentation-mysql": "^0.33.0", - "@opentelemetry/instrumentation-pg": "^0.35.0", - "@opentelemetry/instrumentation-redis": "^0.34.1", - "@opentelemetry/instrumentation-redis-4": "^0.34.1", + "@opentelemetry/api-logs": "^0.41.2", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/instrumentation-http": "^0.41.2", + "@opentelemetry/instrumentation-mongodb": "^0.36.0", + "@opentelemetry/instrumentation-mysql": "^0.34.1", + "@opentelemetry/instrumentation-pg": "^0.36.1", + "@opentelemetry/instrumentation-redis": "^0.35.1", + "@opentelemetry/instrumentation-redis-4": "^0.35.1", "@opentelemetry/otlp-exporter-base": "^0.41.2", - "@opentelemetry/resources": "^1.15.0", - "@opentelemetry/sdk-logs": "^0.41.0", - "@opentelemetry/sdk-metrics": "^1.15.0", - "@opentelemetry/sdk-trace-base": "^1.15.0", - "@opentelemetry/sdk-trace-node": "^1.15.0", - "@opentelemetry/semantic-conventions": "^1.15.0", - "diagnostic-channel": "1.1.0", - "diagnostic-channel-publishers": "1.0.4" + "@opentelemetry/resources": "^1.15.2", + "@opentelemetry/sdk-logs": "^0.41.2", + "@opentelemetry/sdk-metrics": "^1.15.2", + "@opentelemetry/sdk-trace-base": "^1.15.2", + "@opentelemetry/sdk-trace-node": "^1.15.2", + "@opentelemetry/semantic-conventions": "^1.15.2", + "diagnostic-channel": "1.1.1", + "diagnostic-channel-publishers": "1.0.7" }, "devDependencies": { "@azure/functions": "^3.2.0", @@ -222,7 +222,7 @@ "node_modules/@azure/monitor-opentelemetry": { "version": "1.0.0-beta.2", "resolved": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "integrity": "sha512-vDTEhdAOx/7N1ApyG4Zg2luHQ3oRXi3wClEfYDfOD1HwIuZnyNVRONPUryljBMRcTleyftx6VZSdoWD3BDYDxg==", + "integrity": "sha512-C6haw95i9HXaVJSImSI69wFZ8xN+/ye8ubtL9iuFGi7+C8EOBW26zVLjxFCG9YVCwqaerghCL1IJzXBqTGJW0Q==", "license": "MIT", "dependencies": { "@azure/functions": "^3.2.0", @@ -231,6 +231,9 @@ "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", "@opentelemetry/core": "^1.15.2", + "@opentelemetry/exporter-logs-otlp-http": "^0.41.2", + "@opentelemetry/exporter-metrics-otlp-http": "^0.41.2", + "@opentelemetry/exporter-trace-otlp-http": "^0.41.2", "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/instrumentation-http": "^0.41.2", "@opentelemetry/instrumentation-mongodb": "^0.36.0", @@ -238,6 +241,7 @@ "@opentelemetry/instrumentation-pg": "^0.36.0", "@opentelemetry/instrumentation-redis": "^0.35.0", "@opentelemetry/instrumentation-redis-4": "^0.35.0", + "@opentelemetry/otlp-exporter-base": "^0.41.0", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", @@ -336,127 +340,6 @@ "node": ">=14" } }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/core": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", - "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.36.1.tgz", - "integrity": "sha512-//FdYXGcUO08Y1tVPXlcEvUYCnRU8tlBgYBe3ZMjF7E1GMaFti4Xy6sAHVreyl0ZQjBTaGtHdyORHIOTKUM4ZA==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/sdk-metrics": "^1.9.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-mysql": { - "version": "0.34.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.34.1.tgz", - "integrity": "sha512-zQq7hN3ILm1vIJCGeKHRc4pTK8LOmkTt8oKWf0v+whFs7axieIhXZMoCqIBm6BigLy3Trg5iaKyuSrx7kO6q2g==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/mysql": "2.15.21" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-pg": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.36.1.tgz", - "integrity": "sha512-k8L7RSRTQ6e+DbHEXZB8Tmf/efkQnWKeClpZb3TEdb34Pvme4PmcpG2zb6JtM99nNrshNlVDLCZ90U3xDneTbw==", - "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@opentelemetry/sql-common": "^0.40.0", - "@types/pg": "8.6.1", - "@types/pg-pool": "2.0.3" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-redis": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.35.1.tgz", - "integrity": "sha512-zY7eTzGyJCMX/0o04Q9yLy7gllf7Zh4s+g7Kv1d2cMLtTt9zGSlncqj49uNCnneywnpMNRUIwcmd+Ch1bQeh+g==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/instrumentation-redis-4": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.35.1.tgz", - "integrity": "sha512-tQ07wvtjUbHSvvhPPvWyZjYTSzVBTpC746ro5szLnniodvxtKkmP/N+R9KyFXfyH7wwaLIR1Scgq3XSGSppt+Q==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/redis-common": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.1.tgz", - "integrity": "sha512-YjfNEr7DK1Ymc5H0bzhmqVvMcCs+PUEUerzrpTFdHfZxj3HpnnjZTIFKx/gxiL/sajQ8dxycjlreoYTVYKBXlw==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", - "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@azure/monitor-opentelemetry/node_modules/@types/mysql": { - "version": "2.15.21", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz", - "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@azure/msal-browser": { "version": "2.38.0", "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.38.0.tgz", @@ -490,47 +373,21 @@ } }, "node_modules/@azure/opentelemetry-instrumentation-azure-sdk": { - "version": "1.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@azure/opentelemetry-instrumentation-azure-sdk/-/opentelemetry-instrumentation-azure-sdk-1.0.0-beta.4.tgz", - "integrity": "sha512-bSF2l47Od7kH+u/O67cmQCj5jmNeC+gUNDKr2cMfLBwSqk12T7B4JZQ34viEq2vhLWoKbZO7j6srPmKiSGPzNg==", + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@azure/opentelemetry-instrumentation-azure-sdk/-/opentelemetry-instrumentation-azure-sdk-1.0.0-beta.5.tgz", + "integrity": "sha512-fsUarKQDvjhmBO4nIfaZkfNSApm1hZBzcvpNbSrXdcUBxu7lRvKsV5DnwszX7cnhLyVOW9yl1uigtRQ1yDANjA==", "dependencies": { "@azure/core-tracing": "^1.0.0", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/core": "^1.14.0", - "@opentelemetry/instrumentation": "^0.40.0", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/instrumentation": "^0.41.2", "tslib": "^2.2.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@azure/opentelemetry-instrumentation-azure-sdk/node_modules/@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@azure/opentelemetry-instrumentation-azure-sdk/node_modules/import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "dependencies": { - "module-details-from-path": "^1.0.3" - } - }, "node_modules/@babel/code-frame": { "version": "7.22.10", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", @@ -1308,9 +1165,9 @@ } }, "node_modules/@opentelemetry/context-async-hooks": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.15.1.tgz", - "integrity": "sha512-JHPs/o15OO902lI5jkWWPz0JyOpQav7hfOY20MZFH/elq6kSvjBTw5cCu1v7SJwN0Ac3n08fOjYK+jtNlYP0LA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.15.2.tgz", + "integrity": "sha512-VAMHG67srGFQDG/N2ns5AyUT9vUcoKpZ/NpJ5fDQIPfJd7t3ju+aHwvDsMcrYBWuCh03U3Ky6o16+872CZchBg==", "engines": { "node": ">=14" }, @@ -1319,11 +1176,11 @@ } }, "node_modules/@opentelemetry/core": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.1.tgz", - "integrity": "sha512-V6GoRTY6aANMDDOQ9CiHOiLWEK2b2b3OGZK+zk05Li5merb9jadFeV5ooTSGtjxfxVNMpQUaQERO1cdbdbeEGg==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", "dependencies": { - "@opentelemetry/semantic-conventions": "1.15.1" + "@opentelemetry/semantic-conventions": "1.15.2" }, "engines": { "node": ">=14" @@ -1332,33 +1189,33 @@ "@opentelemetry/api": ">=1.0.0 <1.5.0" } }, - "node_modules/@opentelemetry/instrumentation": { + "node_modules/@opentelemetry/exporter-logs-otlp-http": { "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz", - "integrity": "sha512-rxU72E0pKNH6ae2w5+xgVYZLzc5mlxAbGzF4shxMVK8YC2QQsfN38B2GPbj0jvrKWWNUElfclQ+YTykkNg/grw==", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.41.2.tgz", + "integrity": "sha512-9nG6rvMK1toG3On7JAeKpEXJeaTmFzmMKDXE3+gvqye3SORqoRuJDbh+o3IXL2K7qmPn/34m9pl9PgArUei0nQ==", "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.4.2", - "require-in-the-middle": "^7.1.1", - "semver": "^7.5.1", - "shimmer": "^1.2.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/otlp-exporter-base": "0.41.2", + "@opentelemetry/otlp-transformer": "0.41.2", + "@opentelemetry/sdk-logs": "0.41.2" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": "^1.3.0" + "@opentelemetry/api-logs": ">=0.38.0" } }, - "node_modules/@opentelemetry/instrumentation-http": { + "node_modules/@opentelemetry/exporter-metrics-otlp-http": { "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.41.2.tgz", - "integrity": "sha512-dzOC6xkfK0LM6Dzo91aInLdSbdIzKA0IgSDnyLi6YZ0Z7c1bfrFncFx/3gZs8vi+KXLALgfMlpzE7IYDW/cM3A==", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.41.2.tgz", + "integrity": "sha512-+YeIcL4nuldWE89K8NBLImpXCvih04u1MBnn8EzvoywG2TKR5JC3CZEPepODIxlsfGSgP8W5khCEP1NHZzftYw==", "dependencies": { "@opentelemetry/core": "1.15.2", - "@opentelemetry/instrumentation": "0.41.2", - "@opentelemetry/semantic-conventions": "1.15.2", - "semver": "^7.5.1" + "@opentelemetry/otlp-exporter-base": "0.41.2", + "@opentelemetry/otlp-transformer": "0.41.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/sdk-metrics": "1.15.2" }, "engines": { "node": ">=14" @@ -1367,35 +1224,34 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/core": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", - "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", + "node_modules/@opentelemetry/exporter-trace-otlp-http": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.41.2.tgz", + "integrity": "sha512-Y0fGLipjZXLMelWtlS1/MDtrPxf25oM408KukRdkN31a1MEFo4h/ZkNwS7ZfmqHGUa+4rWRt2bi6JBiqy7Ytgw==", "dependencies": { - "@opentelemetry/semantic-conventions": "1.15.2" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/otlp-exporter-base": "0.41.2", + "@opentelemetry/otlp-transformer": "0.41.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/sdk-trace-base": "1.15.2" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/instrumentation-http/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", - "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", - "engines": { - "node": ">=14" + "@opentelemetry/api": "^1.0.0" } }, - "node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.34.3.tgz", - "integrity": "sha512-QCsX5vGjmmUnqLOlT+eThfBQ35JbQ3bdZSOCFvYu24+vqDEzMf+sWmgQVZuSlEGooXJ9lhlyFszPyUrTk2jS3g==", + "node_modules/@opentelemetry/instrumentation": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz", + "integrity": "sha512-rxU72E0pKNH6ae2w5+xgVYZLzc5mlxAbGzF4shxMVK8YC2QQsfN38B2GPbj0jvrKWWNUElfclQ+YTykkNg/grw==", "dependencies": { - "@opentelemetry/instrumentation": "^0.39.1", - "@opentelemetry/semantic-conventions": "^1.0.0" + "@types/shimmer": "^1.0.2", + "import-in-the-middle": "1.4.2", + "require-in-the-middle": "^7.1.1", + "semver": "^7.5.1", + "shimmer": "^1.2.1" }, "engines": { "node": ">=14" @@ -1404,14 +1260,15 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-mongodb/node_modules/@opentelemetry/instrumentation": { - "version": "0.39.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.39.1.tgz", - "integrity": "sha512-s7/9tPmM0l5KCd07VQizC4AO2/5UJdkXq5gMSHPdCeiMKSeBEdyDyQX7A+Cq+RYZM452qzFmrJ4ut628J5bnSg==", + "node_modules/@opentelemetry/instrumentation-http": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.41.2.tgz", + "integrity": "sha512-dzOC6xkfK0LM6Dzo91aInLdSbdIzKA0IgSDnyLi6YZ0Z7c1bfrFncFx/3gZs8vi+KXLALgfMlpzE7IYDW/cM3A==", "dependencies": { - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/instrumentation": "0.41.2", + "@opentelemetry/semantic-conventions": "1.15.2", + "semver": "^7.5.1" }, "engines": { "node": ">=14" @@ -1420,14 +1277,14 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-mysql": { - "version": "0.33.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.33.3.tgz", - "integrity": "sha512-nzKW1mtEHu0YlUD+dRq+oPAMMQHMML5hLNDGKDwK/mcGqrXKHzaQKukVIKHv3AS3tMVBoayQi4Rz2LdZ/kylwA==", + "node_modules/@opentelemetry/instrumentation-mongodb": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.36.1.tgz", + "integrity": "sha512-//FdYXGcUO08Y1tVPXlcEvUYCnRU8tlBgYBe3ZMjF7E1GMaFti4Xy6sAHVreyl0ZQjBTaGtHdyORHIOTKUM4ZA==", "dependencies": { - "@opentelemetry/instrumentation": "^0.40.0", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/mysql": "2.15.19" + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/sdk-metrics": "^1.9.1", + "@opentelemetry/semantic-conventions": "^1.0.0" }, "engines": { "node": ">=14" @@ -1436,16 +1293,14 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-mysql/node_modules/@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", + "node_modules/@opentelemetry/instrumentation-mysql": { + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.34.1.tgz", + "integrity": "sha512-zQq7hN3ILm1vIJCGeKHRc4pTK8LOmkTt8oKWf0v+whFs7axieIhXZMoCqIBm6BigLy3Trg5iaKyuSrx7kO6q2g==", "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/semantic-conventions": "^1.0.0", + "@types/mysql": "2.15.21" }, "engines": { "node": ">=14" @@ -1454,22 +1309,15 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-mysql/node_modules/import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "dependencies": { - "module-details-from-path": "^1.0.3" - } - }, "node_modules/@opentelemetry/instrumentation-pg": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.35.3.tgz", - "integrity": "sha512-Q37HiZJ1KsHH/gdzRHI8ixgiR1v7/+bFL+E/f6bi4BpPdJGJzer+sYYhdPyzpvGMFwlzRcGJpv9jYaQvCwJp9Q==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.36.1.tgz", + "integrity": "sha512-k8L7RSRTQ6e+DbHEXZB8Tmf/efkQnWKeClpZb3TEdb34Pvme4PmcpG2zb6JtM99nNrshNlVDLCZ90U3xDneTbw==", "dependencies": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.40.0", + "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/sql-common": "^0.40.0", "@types/pg": "8.6.1", "@types/pg-pool": "2.0.3" }, @@ -1480,74 +1328,14 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-pg/node_modules/@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-pg/node_modules/import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "dependencies": { - "module-details-from-path": "^1.0.3" - } - }, "node_modules/@opentelemetry/instrumentation-redis": { - "version": "0.34.7", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.34.7.tgz", - "integrity": "sha512-mDfoMi73SXC5TRn/Xt1LRrQKYcz7w7TVekM8QlbPpx3KI7xKAjwa9+38psO1snhbX/nXdXgtcrtbXhz8nUJ+Sg==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.40.0", - "@opentelemetry/redis-common": "^0.35.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-redis-4": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.34.6.tgz", - "integrity": "sha512-owBvjxm5QjSLaJJT23yX0Wx6DzBEE0m+yq3wue4k3yGToGgYienS5ThfrWNtkoTKhECJNajR0LyqZCtC+CGHsw==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.40.0", - "@opentelemetry/redis-common": "^0.35.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-redis-4/node_modules/@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.35.1.tgz", + "integrity": "sha512-zY7eTzGyJCMX/0o04Q9yLy7gllf7Zh4s+g7Kv1d2cMLtTt9zGSlncqj49uNCnneywnpMNRUIwcmd+Ch1bQeh+g==", "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/semantic-conventions": "^1.0.0" }, "engines": { "node": ">=14" @@ -1556,24 +1344,14 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-redis-4/node_modules/import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "dependencies": { - "module-details-from-path": "^1.0.3" - } - }, - "node_modules/@opentelemetry/instrumentation-redis/node_modules/@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", + "node_modules/@opentelemetry/instrumentation-redis-4": { + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.35.1.tgz", + "integrity": "sha512-tQ07wvtjUbHSvvhPPvWyZjYTSzVBTpC746ro5szLnniodvxtKkmP/N+R9KyFXfyH7wwaLIR1Scgq3XSGSppt+Q==", "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", + "@opentelemetry/semantic-conventions": "^1.0.0" }, "engines": { "node": ">=14" @@ -1582,14 +1360,6 @@ "@opentelemetry/api": "^1.3.0" } }, - "node_modules/@opentelemetry/instrumentation-redis/node_modules/import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "dependencies": { - "module-details-from-path": "^1.0.3" - } - }, "node_modules/@opentelemetry/otlp-exporter-base": { "version": "0.41.2", "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.41.2.tgz", @@ -1604,34 +1374,31 @@ "@opentelemetry/api": "^1.0.0" } }, - "node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/core": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", - "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", + "node_modules/@opentelemetry/otlp-transformer": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.41.2.tgz", + "integrity": "sha512-jJbPwB0tNu2v+Xi0c/v/R3YBLJKLonw1p+v3RVjT2VfzeUyzSp/tBeVdY7RZtL6dzZpA9XSmp8UEfWIFQo33yA==", "dependencies": { - "@opentelemetry/semantic-conventions": "1.15.2" + "@opentelemetry/api-logs": "0.41.2", + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/sdk-logs": "0.41.2", + "@opentelemetry/sdk-metrics": "1.15.2", + "@opentelemetry/sdk-trace-base": "1.15.2" }, "engines": { "node": ">=14" }, "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/otlp-exporter-base/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", - "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", - "engines": { - "node": ">=14" + "@opentelemetry/api": ">=1.3.0 <1.5.0" } }, "node_modules/@opentelemetry/propagator-b3": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.15.1.tgz", - "integrity": "sha512-Rgzp5CgxSLDLdtiUx/nv+1jkyyU/qbhTqTBxMUvk4fqPfddzQNZyllyJ9IMNp9Xh4pzYlPP5ZBlN5Sw5isjuaw==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.15.2.tgz", + "integrity": "sha512-ZSrL3DpMEDsjD8dPt9Ze3ue53nEXJt512KyxXlLgLWnSNbe1mrWaXWkh7OLDoVJh9LqFw+tlvAhDVt/x3DaFGg==", "dependencies": { - "@opentelemetry/core": "1.15.1" + "@opentelemetry/core": "1.15.2" }, "engines": { "node": ">=14" @@ -1641,11 +1408,11 @@ } }, "node_modules/@opentelemetry/propagator-jaeger": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.15.1.tgz", - "integrity": "sha512-27cljZFnbUv5e459e2BhcsHCn2yePYq+07dZNW51e6F05GDWHC86fpwdh+WKvrfKSRMddUMkufHyoBWxtUN/Vg==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.15.2.tgz", + "integrity": "sha512-6m1yu7PVDIRz6BwA36lacfBZJCfAEHKgu+kSyukNwVdVjsTNeyD9xNPQnkl0WN7Rvhk8/yWJ83tLPEyGhk1wCQ==", "dependencies": { - "@opentelemetry/core": "1.15.1" + "@opentelemetry/core": "1.15.2" }, "engines": { "node": ">=14" @@ -1655,20 +1422,20 @@ } }, "node_modules/@opentelemetry/redis-common": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.35.1.tgz", - "integrity": "sha512-qLXe7h9VzFLx3LaizFiUlpuohCRyvHlDW5b9synE6omHKTZr/n0EHEdmhp3GezBeAqMGI+q499Mht4SmStaSqQ==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.1.tgz", + "integrity": "sha512-YjfNEr7DK1Ymc5H0bzhmqVvMcCs+PUEUerzrpTFdHfZxj3HpnnjZTIFKx/gxiL/sajQ8dxycjlreoYTVYKBXlw==", "engines": { "node": ">=14" } }, "node_modules/@opentelemetry/resources": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.1.tgz", - "integrity": "sha512-15JcpyKZHhFYQ1uiC08vR02sRY/2seSnqSJ0tIUhcdYDzOhd0FrqPYpLj3WkLhVdQP6vgJ+pelAmSaOrCxCpKA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.2.tgz", + "integrity": "sha512-xmMRLenT9CXmm5HMbzpZ1hWhaUowQf8UB4jMjFlAxx1QzQcsD3KFNAVX/CAWzFPtllTyTplrA4JrQ7sCH3qmYw==", "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/semantic-conventions": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/semantic-conventions": "1.15.2" }, "engines": { "node": ">=14" @@ -1678,12 +1445,12 @@ } }, "node_modules/@opentelemetry/sdk-logs": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.41.1.tgz", - "integrity": "sha512-gXuAEw9mughtwc3pCAg8vcFQ7CP1mDi1tdbbRSp9VM+I/V8J6EzyjKAvthBDVUTIGs9//a7vJ15cm7r8CVItpA==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.41.2.tgz", + "integrity": "sha512-smqKIw0tTW15waj7BAPHFomii5c3aHnSE4LQYTszGoK5P9nZs8tEAIpu15UBxi3aG31ZfsLmm4EUQkjckdlFrw==", "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2" }, "engines": { "node": ">=14" @@ -1694,12 +1461,12 @@ } }, "node_modules/@opentelemetry/sdk-metrics": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.1.tgz", - "integrity": "sha512-ojcrzexOQfto83NvKfIvsJap4SHH3ZvLjsDGhQ04AfvWWGR7mPcqLSlLedoSkEdIe0k1H6uBEsHBtIprkMpTHA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.2.tgz", + "integrity": "sha512-9aIlcX8GnhcsAHW/Wl8bzk4ZnWTpNlLtud+fxUfBtFATu6OZ6TrGrF4JkT9EVrnoxwtPIDtjHdEsSjOqisY/iA==", "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1", + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2", "lodash.merge": "^4.6.2" }, "engines": { @@ -1710,13 +1477,13 @@ } }, "node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.1.tgz", - "integrity": "sha512-5hccBe2yXzzXyExJNkTsIzDe1AM7HK0al+y/D2yEpslJqS1HUzsUSuCMY7Z4+Sfz5Gf0kTa6KYEt1QUQppnoBA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.2.tgz", + "integrity": "sha512-BEaxGZbWtvnSPchV98qqqqa96AOcb41pjgvhfzDij10tkBhIu9m0Jd6tZ1tJB5ZHfHbTffqYVYE0AOGobec/EQ==", "dependencies": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/semantic-conventions": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/semantic-conventions": "1.15.2" }, "engines": { "node": ">=14" @@ -1726,15 +1493,15 @@ } }, "node_modules/@opentelemetry/sdk-trace-node": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.15.1.tgz", - "integrity": "sha512-aZDcuYHwh+qyOD/FLFAEAh32V2DlAp8Ubyaohh51oSssC3cxmN9JmpkyPbp2PQX3Mn48gBubwTXr9g++3+NB5w==", - "dependencies": { - "@opentelemetry/context-async-hooks": "1.15.1", - "@opentelemetry/core": "1.15.1", - "@opentelemetry/propagator-b3": "1.15.1", - "@opentelemetry/propagator-jaeger": "1.15.1", - "@opentelemetry/sdk-trace-base": "1.15.1", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.15.2.tgz", + "integrity": "sha512-5deakfKLCbPpKJRCE2GPI8LBE2LezyvR17y3t37ZI3sbaeogtyxmBaFV+slmG9fN8OaIT+EUsm1QAT1+z59gbQ==", + "dependencies": { + "@opentelemetry/context-async-hooks": "1.15.2", + "@opentelemetry/core": "1.15.2", + "@opentelemetry/propagator-b3": "1.15.2", + "@opentelemetry/propagator-jaeger": "1.15.2", + "@opentelemetry/sdk-trace-base": "1.15.2", "semver": "^7.5.1" }, "engines": { @@ -1745,9 +1512,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.1.tgz", - "integrity": "sha512-n8Kur1/CZlYG32YCEj30CoUqA8R7UyDVZzoEU6SDP+13+kXDT2kFVu6MpcnEUTyGP3i058ID6Qjp5h6IJxdPPQ==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", "engines": { "node": ">=14" } @@ -1834,9 +1601,9 @@ "dev": true }, "node_modules/@types/mysql": { - "version": "2.15.19", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.19.tgz", - "integrity": "sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==", + "version": "2.15.21", + "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz", + "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==", "dependencies": { "@types/node": "*" } @@ -2652,29 +2419,21 @@ } }, "node_modules/diagnostic-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-1.1.0.tgz", - "integrity": "sha512-fwujyMe1gj6rk6dYi9hMZm0c8Mz8NDMVl2LB4iaYh3+LIAThZC8RKFGXWG0IML2OxAit/ZFRgZhMkhQ3d/bobQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-1.1.1.tgz", + "integrity": "sha512-r2HV5qFkUICyoaKlBEpLKHjxMXATUf/l+h8UZPGBHGLy4DDiY2sOLcIctax4eRnTw5wH2jTMExLntGPJ8eOJxw==", "dependencies": { - "semver": "^5.3.0" + "semver": "^7.5.3" } }, "node_modules/diagnostic-channel-publishers": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.4.tgz", - "integrity": "sha512-GDRAOrcNTPk4DhYzM2BauMnq7nKdFWmSFjWnEu8dT8Xf/ZXUbpORrqNAhIWsy2tqRjHG7QkmYjMUL4/EGSM2GA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.7.tgz", + "integrity": "sha512-SEECbY5AiVt6DfLkhkaHNeshg1CogdLLANA8xlG/TKvS+XUgvIKl7VspJGYiEdL5OUyzMVnr7o0AwB7f+/Mjtg==", "peerDependencies": { "diagnostic-channel": "*" } }, - "node_modules/diagnostic-channel/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -5895,7 +5654,7 @@ }, "@azure/monitor-opentelemetry": { "version": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "integrity": "sha512-vDTEhdAOx/7N1ApyG4Zg2luHQ3oRXi3wClEfYDfOD1HwIuZnyNVRONPUryljBMRcTleyftx6VZSdoWD3BDYDxg==", + "integrity": "sha512-C6haw95i9HXaVJSImSI69wFZ8xN+/ye8ubtL9iuFGi7+C8EOBW26zVLjxFCG9YVCwqaerghCL1IJzXBqTGJW0Q==", "requires": { "@azure/functions": "^3.2.0", "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.14", @@ -5903,6 +5662,9 @@ "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", "@opentelemetry/core": "^1.15.2", + "@opentelemetry/exporter-logs-otlp-http": "^0.41.2", + "@opentelemetry/exporter-metrics-otlp-http": "^0.41.2", + "@opentelemetry/exporter-trace-otlp-http": "^0.41.2", "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/instrumentation-http": "^0.41.2", "@opentelemetry/instrumentation-mongodb": "^0.36.0", @@ -5910,6 +5672,7 @@ "@opentelemetry/instrumentation-pg": "^0.36.0", "@opentelemetry/instrumentation-redis": "^0.35.0", "@opentelemetry/instrumentation-redis-4": "^0.35.0", + "@opentelemetry/otlp-exporter-base": "^0.41.0", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", @@ -5917,87 +5680,6 @@ "@opentelemetry/sdk-trace-node": "^1.15.0", "@opentelemetry/semantic-conventions": "^1.15.0", "tslib": "^2.2.0" - }, - "dependencies": { - "@opentelemetry/core": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", - "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", - "requires": { - "@opentelemetry/semantic-conventions": "1.15.2" - } - }, - "@opentelemetry/instrumentation-mongodb": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.36.1.tgz", - "integrity": "sha512-//FdYXGcUO08Y1tVPXlcEvUYCnRU8tlBgYBe3ZMjF7E1GMaFti4Xy6sAHVreyl0ZQjBTaGtHdyORHIOTKUM4ZA==", - "requires": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/sdk-metrics": "^1.9.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - } - }, - "@opentelemetry/instrumentation-mysql": { - "version": "0.34.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.34.1.tgz", - "integrity": "sha512-zQq7hN3ILm1vIJCGeKHRc4pTK8LOmkTt8oKWf0v+whFs7axieIhXZMoCqIBm6BigLy3Trg5iaKyuSrx7kO6q2g==", - "requires": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/mysql": "2.15.21" - } - }, - "@opentelemetry/instrumentation-pg": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.36.1.tgz", - "integrity": "sha512-k8L7RSRTQ6e+DbHEXZB8Tmf/efkQnWKeClpZb3TEdb34Pvme4PmcpG2zb6JtM99nNrshNlVDLCZ90U3xDneTbw==", - "requires": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@opentelemetry/sql-common": "^0.40.0", - "@types/pg": "8.6.1", - "@types/pg-pool": "2.0.3" - } - }, - "@opentelemetry/instrumentation-redis": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.35.1.tgz", - "integrity": "sha512-zY7eTzGyJCMX/0o04Q9yLy7gllf7Zh4s+g7Kv1d2cMLtTt9zGSlncqj49uNCnneywnpMNRUIwcmd+Ch1bQeh+g==", - "requires": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - } - }, - "@opentelemetry/instrumentation-redis-4": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.35.1.tgz", - "integrity": "sha512-tQ07wvtjUbHSvvhPPvWyZjYTSzVBTpC746ro5szLnniodvxtKkmP/N+R9KyFXfyH7wwaLIR1Scgq3XSGSppt+Q==", - "requires": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - } - }, - "@opentelemetry/redis-common": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.1.tgz", - "integrity": "sha512-YjfNEr7DK1Ymc5H0bzhmqVvMcCs+PUEUerzrpTFdHfZxj3HpnnjZTIFKx/gxiL/sajQ8dxycjlreoYTVYKBXlw==" - }, - "@opentelemetry/semantic-conventions": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", - "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==" - }, - "@types/mysql": { - "version": "2.15.21", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz", - "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==", - "requires": { - "@types/node": "*" - } - } } }, "@azure/monitor-opentelemetry-exporter": { @@ -6084,38 +5766,16 @@ } }, "@azure/opentelemetry-instrumentation-azure-sdk": { - "version": "1.0.0-beta.4", - "resolved": "https://registry.npmjs.org/@azure/opentelemetry-instrumentation-azure-sdk/-/opentelemetry-instrumentation-azure-sdk-1.0.0-beta.4.tgz", - "integrity": "sha512-bSF2l47Od7kH+u/O67cmQCj5jmNeC+gUNDKr2cMfLBwSqk12T7B4JZQ34viEq2vhLWoKbZO7j6srPmKiSGPzNg==", + "version": "1.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@azure/opentelemetry-instrumentation-azure-sdk/-/opentelemetry-instrumentation-azure-sdk-1.0.0-beta.5.tgz", + "integrity": "sha512-fsUarKQDvjhmBO4nIfaZkfNSApm1hZBzcvpNbSrXdcUBxu7lRvKsV5DnwszX7cnhLyVOW9yl1uigtRQ1yDANjA==", "requires": { "@azure/core-tracing": "^1.0.0", "@azure/logger": "^1.0.0", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/core": "^1.14.0", - "@opentelemetry/instrumentation": "^0.40.0", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/instrumentation": "^0.41.2", "tslib": "^2.2.0" - }, - "dependencies": { - "@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "requires": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - } - }, - "import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "requires": { - "module-details-from-path": "^1.0.3" - } - } } }, "@babel/code-frame": { @@ -6713,17 +6373,52 @@ } }, "@opentelemetry/context-async-hooks": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.15.1.tgz", - "integrity": "sha512-JHPs/o15OO902lI5jkWWPz0JyOpQav7hfOY20MZFH/elq6kSvjBTw5cCu1v7SJwN0Ac3n08fOjYK+jtNlYP0LA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.15.2.tgz", + "integrity": "sha512-VAMHG67srGFQDG/N2ns5AyUT9vUcoKpZ/NpJ5fDQIPfJd7t3ju+aHwvDsMcrYBWuCh03U3Ky6o16+872CZchBg==", "requires": {} }, "@opentelemetry/core": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.1.tgz", - "integrity": "sha512-V6GoRTY6aANMDDOQ9CiHOiLWEK2b2b3OGZK+zk05Li5merb9jadFeV5ooTSGtjxfxVNMpQUaQERO1cdbdbeEGg==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", + "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", + "requires": { + "@opentelemetry/semantic-conventions": "1.15.2" + } + }, + "@opentelemetry/exporter-logs-otlp-http": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.41.2.tgz", + "integrity": "sha512-9nG6rvMK1toG3On7JAeKpEXJeaTmFzmMKDXE3+gvqye3SORqoRuJDbh+o3IXL2K7qmPn/34m9pl9PgArUei0nQ==", + "requires": { + "@opentelemetry/core": "1.15.2", + "@opentelemetry/otlp-exporter-base": "0.41.2", + "@opentelemetry/otlp-transformer": "0.41.2", + "@opentelemetry/sdk-logs": "0.41.2" + } + }, + "@opentelemetry/exporter-metrics-otlp-http": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.41.2.tgz", + "integrity": "sha512-+YeIcL4nuldWE89K8NBLImpXCvih04u1MBnn8EzvoywG2TKR5JC3CZEPepODIxlsfGSgP8W5khCEP1NHZzftYw==", + "requires": { + "@opentelemetry/core": "1.15.2", + "@opentelemetry/otlp-exporter-base": "0.41.2", + "@opentelemetry/otlp-transformer": "0.41.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/sdk-metrics": "1.15.2" + } + }, + "@opentelemetry/exporter-trace-otlp-http": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.41.2.tgz", + "integrity": "sha512-Y0fGLipjZXLMelWtlS1/MDtrPxf25oM408KukRdkN31a1MEFo4h/ZkNwS7ZfmqHGUa+4rWRt2bi6JBiqy7Ytgw==", "requires": { - "@opentelemetry/semantic-conventions": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/otlp-exporter-base": "0.41.2", + "@opentelemetry/otlp-transformer": "0.41.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/sdk-trace-base": "1.15.2" } }, "@opentelemetry/instrumentation": { @@ -6747,172 +6442,59 @@ "@opentelemetry/instrumentation": "0.41.2", "@opentelemetry/semantic-conventions": "1.15.2", "semver": "^7.5.1" - }, - "dependencies": { - "@opentelemetry/core": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", - "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", - "requires": { - "@opentelemetry/semantic-conventions": "1.15.2" - } - }, - "@opentelemetry/semantic-conventions": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", - "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==" - } } }, "@opentelemetry/instrumentation-mongodb": { - "version": "0.34.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.34.3.tgz", - "integrity": "sha512-QCsX5vGjmmUnqLOlT+eThfBQ35JbQ3bdZSOCFvYu24+vqDEzMf+sWmgQVZuSlEGooXJ9lhlyFszPyUrTk2jS3g==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.36.1.tgz", + "integrity": "sha512-//FdYXGcUO08Y1tVPXlcEvUYCnRU8tlBgYBe3ZMjF7E1GMaFti4Xy6sAHVreyl0ZQjBTaGtHdyORHIOTKUM4ZA==", "requires": { - "@opentelemetry/instrumentation": "^0.39.1", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/sdk-metrics": "^1.9.1", "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "dependencies": { - "@opentelemetry/instrumentation": { - "version": "0.39.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.39.1.tgz", - "integrity": "sha512-s7/9tPmM0l5KCd07VQizC4AO2/5UJdkXq5gMSHPdCeiMKSeBEdyDyQX7A+Cq+RYZM452qzFmrJ4ut628J5bnSg==", - "requires": { - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - } - } } }, "@opentelemetry/instrumentation-mysql": { - "version": "0.33.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.33.3.tgz", - "integrity": "sha512-nzKW1mtEHu0YlUD+dRq+oPAMMQHMML5hLNDGKDwK/mcGqrXKHzaQKukVIKHv3AS3tMVBoayQi4Rz2LdZ/kylwA==", + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.34.1.tgz", + "integrity": "sha512-zQq7hN3ILm1vIJCGeKHRc4pTK8LOmkTt8oKWf0v+whFs7axieIhXZMoCqIBm6BigLy3Trg5iaKyuSrx7kO6q2g==", "requires": { - "@opentelemetry/instrumentation": "^0.40.0", + "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/mysql": "2.15.19" - }, - "dependencies": { - "@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "requires": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - } - }, - "import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "requires": { - "module-details-from-path": "^1.0.3" - } - } + "@types/mysql": "2.15.21" } }, "@opentelemetry/instrumentation-pg": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.35.3.tgz", - "integrity": "sha512-Q37HiZJ1KsHH/gdzRHI8ixgiR1v7/+bFL+E/f6bi4BpPdJGJzer+sYYhdPyzpvGMFwlzRcGJpv9jYaQvCwJp9Q==", + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.36.1.tgz", + "integrity": "sha512-k8L7RSRTQ6e+DbHEXZB8Tmf/efkQnWKeClpZb3TEdb34Pvme4PmcpG2zb6JtM99nNrshNlVDLCZ90U3xDneTbw==", "requires": { "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.40.0", + "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/semantic-conventions": "^1.0.0", + "@opentelemetry/sql-common": "^0.40.0", "@types/pg": "8.6.1", "@types/pg-pool": "2.0.3" - }, - "dependencies": { - "@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "requires": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - } - }, - "import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "requires": { - "module-details-from-path": "^1.0.3" - } - } } }, "@opentelemetry/instrumentation-redis": { - "version": "0.34.7", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.34.7.tgz", - "integrity": "sha512-mDfoMi73SXC5TRn/Xt1LRrQKYcz7w7TVekM8QlbPpx3KI7xKAjwa9+38psO1snhbX/nXdXgtcrtbXhz8nUJ+Sg==", + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.35.1.tgz", + "integrity": "sha512-zY7eTzGyJCMX/0o04Q9yLy7gllf7Zh4s+g7Kv1d2cMLtTt9zGSlncqj49uNCnneywnpMNRUIwcmd+Ch1bQeh+g==", "requires": { - "@opentelemetry/instrumentation": "^0.40.0", - "@opentelemetry/redis-common": "^0.35.1", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "dependencies": { - "@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "requires": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - } - }, - "import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "requires": { - "module-details-from-path": "^1.0.3" - } - } } }, "@opentelemetry/instrumentation-redis-4": { - "version": "0.34.6", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.34.6.tgz", - "integrity": "sha512-owBvjxm5QjSLaJJT23yX0Wx6DzBEE0m+yq3wue4k3yGToGgYienS5ThfrWNtkoTKhECJNajR0LyqZCtC+CGHsw==", + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.35.1.tgz", + "integrity": "sha512-tQ07wvtjUbHSvvhPPvWyZjYTSzVBTpC746ro5szLnniodvxtKkmP/N+R9KyFXfyH7wwaLIR1Scgq3XSGSppt+Q==", "requires": { - "@opentelemetry/instrumentation": "^0.40.0", - "@opentelemetry/redis-common": "^0.35.1", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/redis-common": "^0.36.1", "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "dependencies": { - "@opentelemetry/instrumentation": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.40.0.tgz", - "integrity": "sha512-23TzBKPflUS1uEq5SXymnQKQDSda35KvHjnvxdcDQGE+wg6hwDHgScUCWiBmZW4sxAaPcANfs+Wc9B7yDuyT6Q==", - "requires": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.3.5", - "require-in-the-middle": "^7.1.0", - "semver": "^7.3.2", - "shimmer": "^1.2.1" - } - }, - "import-in-the-middle": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.3.5.tgz", - "integrity": "sha512-yzHlBqi1EBFrkieAnSt8eTgO5oLSl+YJ7qaOpUH/PMqQOMZoQ/RmDlwnTLQrwYto+gHYjRG+i/IbsB1eDx32NQ==", - "requires": { - "module-details-from-path": "^1.0.3" - } - } } }, "@opentelemetry/otlp-exporter-base": { @@ -6921,99 +6503,97 @@ "integrity": "sha512-pfwa6d+Dax3itZcGWiA0AoXeVaCuZbbqUTsCtOysd2re8C2PWXNxDONUfBWsn+KgxAdi+ljwTjJGiaVLDaIEvQ==", "requires": { "@opentelemetry/core": "1.15.2" - }, - "dependencies": { - "@opentelemetry/core": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", - "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", - "requires": { - "@opentelemetry/semantic-conventions": "1.15.2" - } - }, - "@opentelemetry/semantic-conventions": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", - "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==" - } + } + }, + "@opentelemetry/otlp-transformer": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.41.2.tgz", + "integrity": "sha512-jJbPwB0tNu2v+Xi0c/v/R3YBLJKLonw1p+v3RVjT2VfzeUyzSp/tBeVdY7RZtL6dzZpA9XSmp8UEfWIFQo33yA==", + "requires": { + "@opentelemetry/api-logs": "0.41.2", + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/sdk-logs": "0.41.2", + "@opentelemetry/sdk-metrics": "1.15.2", + "@opentelemetry/sdk-trace-base": "1.15.2" } }, "@opentelemetry/propagator-b3": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.15.1.tgz", - "integrity": "sha512-Rgzp5CgxSLDLdtiUx/nv+1jkyyU/qbhTqTBxMUvk4fqPfddzQNZyllyJ9IMNp9Xh4pzYlPP5ZBlN5Sw5isjuaw==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.15.2.tgz", + "integrity": "sha512-ZSrL3DpMEDsjD8dPt9Ze3ue53nEXJt512KyxXlLgLWnSNbe1mrWaXWkh7OLDoVJh9LqFw+tlvAhDVt/x3DaFGg==", "requires": { - "@opentelemetry/core": "1.15.1" + "@opentelemetry/core": "1.15.2" } }, "@opentelemetry/propagator-jaeger": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.15.1.tgz", - "integrity": "sha512-27cljZFnbUv5e459e2BhcsHCn2yePYq+07dZNW51e6F05GDWHC86fpwdh+WKvrfKSRMddUMkufHyoBWxtUN/Vg==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.15.2.tgz", + "integrity": "sha512-6m1yu7PVDIRz6BwA36lacfBZJCfAEHKgu+kSyukNwVdVjsTNeyD9xNPQnkl0WN7Rvhk8/yWJ83tLPEyGhk1wCQ==", "requires": { - "@opentelemetry/core": "1.15.1" + "@opentelemetry/core": "1.15.2" } }, "@opentelemetry/redis-common": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.35.1.tgz", - "integrity": "sha512-qLXe7h9VzFLx3LaizFiUlpuohCRyvHlDW5b9synE6omHKTZr/n0EHEdmhp3GezBeAqMGI+q499Mht4SmStaSqQ==" + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.1.tgz", + "integrity": "sha512-YjfNEr7DK1Ymc5H0bzhmqVvMcCs+PUEUerzrpTFdHfZxj3HpnnjZTIFKx/gxiL/sajQ8dxycjlreoYTVYKBXlw==" }, "@opentelemetry/resources": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.1.tgz", - "integrity": "sha512-15JcpyKZHhFYQ1uiC08vR02sRY/2seSnqSJ0tIUhcdYDzOhd0FrqPYpLj3WkLhVdQP6vgJ+pelAmSaOrCxCpKA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.2.tgz", + "integrity": "sha512-xmMRLenT9CXmm5HMbzpZ1hWhaUowQf8UB4jMjFlAxx1QzQcsD3KFNAVX/CAWzFPtllTyTplrA4JrQ7sCH3qmYw==", "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/semantic-conventions": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/semantic-conventions": "1.15.2" } }, "@opentelemetry/sdk-logs": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.41.1.tgz", - "integrity": "sha512-gXuAEw9mughtwc3pCAg8vcFQ7CP1mDi1tdbbRSp9VM+I/V8J6EzyjKAvthBDVUTIGs9//a7vJ15cm7r8CVItpA==", + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.41.2.tgz", + "integrity": "sha512-smqKIw0tTW15waj7BAPHFomii5c3aHnSE4LQYTszGoK5P9nZs8tEAIpu15UBxi3aG31ZfsLmm4EUQkjckdlFrw==", "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2" } }, "@opentelemetry/sdk-metrics": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.1.tgz", - "integrity": "sha512-ojcrzexOQfto83NvKfIvsJap4SHH3ZvLjsDGhQ04AfvWWGR7mPcqLSlLedoSkEdIe0k1H6uBEsHBtIprkMpTHA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.2.tgz", + "integrity": "sha512-9aIlcX8GnhcsAHW/Wl8bzk4ZnWTpNlLtud+fxUfBtFATu6OZ6TrGrF4JkT9EVrnoxwtPIDtjHdEsSjOqisY/iA==", "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1", + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2", "lodash.merge": "^4.6.2" } }, "@opentelemetry/sdk-trace-base": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.1.tgz", - "integrity": "sha512-5hccBe2yXzzXyExJNkTsIzDe1AM7HK0al+y/D2yEpslJqS1HUzsUSuCMY7Z4+Sfz5Gf0kTa6KYEt1QUQppnoBA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.2.tgz", + "integrity": "sha512-BEaxGZbWtvnSPchV98qqqqa96AOcb41pjgvhfzDij10tkBhIu9m0Jd6tZ1tJB5ZHfHbTffqYVYE0AOGobec/EQ==", "requires": { - "@opentelemetry/core": "1.15.1", - "@opentelemetry/resources": "1.15.1", - "@opentelemetry/semantic-conventions": "1.15.1" + "@opentelemetry/core": "1.15.2", + "@opentelemetry/resources": "1.15.2", + "@opentelemetry/semantic-conventions": "1.15.2" } }, "@opentelemetry/sdk-trace-node": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.15.1.tgz", - "integrity": "sha512-aZDcuYHwh+qyOD/FLFAEAh32V2DlAp8Ubyaohh51oSssC3cxmN9JmpkyPbp2PQX3Mn48gBubwTXr9g++3+NB5w==", - "requires": { - "@opentelemetry/context-async-hooks": "1.15.1", - "@opentelemetry/core": "1.15.1", - "@opentelemetry/propagator-b3": "1.15.1", - "@opentelemetry/propagator-jaeger": "1.15.1", - "@opentelemetry/sdk-trace-base": "1.15.1", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.15.2.tgz", + "integrity": "sha512-5deakfKLCbPpKJRCE2GPI8LBE2LezyvR17y3t37ZI3sbaeogtyxmBaFV+slmG9fN8OaIT+EUsm1QAT1+z59gbQ==", + "requires": { + "@opentelemetry/context-async-hooks": "1.15.2", + "@opentelemetry/core": "1.15.2", + "@opentelemetry/propagator-b3": "1.15.2", + "@opentelemetry/propagator-jaeger": "1.15.2", + "@opentelemetry/sdk-trace-base": "1.15.2", "semver": "^7.5.1" } }, "@opentelemetry/semantic-conventions": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.1.tgz", - "integrity": "sha512-n8Kur1/CZlYG32YCEj30CoUqA8R7UyDVZzoEU6SDP+13+kXDT2kFVu6MpcnEUTyGP3i058ID6Qjp5h6IJxdPPQ==" + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", + "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==" }, "@opentelemetry/sql-common": { "version": "0.40.0", @@ -7088,9 +6668,9 @@ "dev": true }, "@types/mysql": { - "version": "2.15.19", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.19.tgz", - "integrity": "sha512-wSRg2QZv14CWcZXkgdvHbbV2ACufNy5EgI8mBBxnJIptchv7DBy/h53VMa2jDhyo0C9MO4iowE6z9vF8Ja1DkQ==", + "version": "2.15.21", + "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz", + "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==", "requires": { "@types/node": "*" } @@ -7659,24 +7239,17 @@ "dev": true }, "diagnostic-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-1.1.0.tgz", - "integrity": "sha512-fwujyMe1gj6rk6dYi9hMZm0c8Mz8NDMVl2LB4iaYh3+LIAThZC8RKFGXWG0IML2OxAit/ZFRgZhMkhQ3d/bobQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-1.1.1.tgz", + "integrity": "sha512-r2HV5qFkUICyoaKlBEpLKHjxMXATUf/l+h8UZPGBHGLy4DDiY2sOLcIctax4eRnTw5wH2jTMExLntGPJ8eOJxw==", "requires": { - "semver": "^5.3.0" - }, - "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" - } + "semver": "^7.5.3" } }, "diagnostic-channel-publishers": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.4.tgz", - "integrity": "sha512-GDRAOrcNTPk4DhYzM2BauMnq7nKdFWmSFjWnEu8dT8Xf/ZXUbpORrqNAhIWsy2tqRjHG7QkmYjMUL4/EGSM2GA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.7.tgz", + "integrity": "sha512-SEECbY5AiVt6DfLkhkaHNeshg1CogdLLANA8xlG/TKvS+XUgvIKl7VspJGYiEdL5OUyzMVnr7o0AwB7f+/Mjtg==", "requires": {} }, "diff": { diff --git a/package.json b/package.json index e78137956..1dd626066 100644 --- a/package.json +++ b/package.json @@ -70,26 +70,26 @@ "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.1", + "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.41.0", - "@opentelemetry/core": "^1.15.0", - "@opentelemetry/instrumentation": "^0.41.0", - "@opentelemetry/instrumentation-http": "^0.41.0", - "@opentelemetry/instrumentation-mongodb": "^0.34.0", - "@opentelemetry/instrumentation-mysql": "^0.33.0", - "@opentelemetry/instrumentation-pg": "^0.35.0", - "@opentelemetry/instrumentation-redis": "^0.34.1", - "@opentelemetry/instrumentation-redis-4": "^0.34.1", + "@opentelemetry/api-logs": "^0.41.2", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/instrumentation": "^0.41.2", + "@opentelemetry/instrumentation-http": "^0.41.2", + "@opentelemetry/instrumentation-mongodb": "^0.36.0", + "@opentelemetry/instrumentation-mysql": "^0.34.1", + "@opentelemetry/instrumentation-pg": "^0.36.1", + "@opentelemetry/instrumentation-redis": "^0.35.1", + "@opentelemetry/instrumentation-redis-4": "^0.35.1", "@opentelemetry/otlp-exporter-base": "^0.41.2", - "@opentelemetry/resources": "^1.15.0", - "@opentelemetry/sdk-logs": "^0.41.0", - "@opentelemetry/sdk-metrics": "^1.15.0", - "@opentelemetry/sdk-trace-base": "^1.15.0", - "@opentelemetry/sdk-trace-node": "^1.15.0", - "@opentelemetry/semantic-conventions": "^1.15.0", - "diagnostic-channel": "1.1.0", - "diagnostic-channel-publishers": "1.0.4" + "@opentelemetry/resources": "^1.15.2", + "@opentelemetry/sdk-logs": "^0.41.2", + "@opentelemetry/sdk-metrics": "^1.15.2", + "@opentelemetry/sdk-trace-base": "^1.15.2", + "@opentelemetry/sdk-trace-node": "^1.15.2", + "@opentelemetry/semantic-conventions": "^1.15.2", + "diagnostic-channel": "1.1.1", + "diagnostic-channel-publishers": "1.0.7" }, "peerDependencies": { "applicationinsights-native-metrics": "*" diff --git a/src/applicationInsightsClient.ts b/src/applicationInsightsClient.ts index 8aac4068d..e26616af5 100644 --- a/src/applicationInsightsClient.ts +++ b/src/applicationInsightsClient.ts @@ -5,11 +5,9 @@ import { AzureMonitorOpenTelemetryClient } from "@azure/monitor-opentelemetry"; import { Logger } from "./shared/logging"; import { AutoCollectConsole } from "./logs/console"; -import { AutoCollectExceptions, parseStack } from "./logs/exceptions"; -import { ApplicationInsightsOptions, ExtendedMetricType } from "./types"; +import { AutoCollectExceptions } from "./logs/exceptions"; +import { ApplicationInsightsOptions } from "./types"; import { ApplicationInsightsConfig } from "./shared/configuration/config"; -import { IConfig } from "./shim/types"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; diff --git a/src/logs/api.ts b/src/logs/api.ts new file mode 100644 index 000000000..8d914e3c8 --- /dev/null +++ b/src/logs/api.ts @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Logger as OtelLogger, LogRecord, logs } from "@opentelemetry/api-logs"; +import { LogRecord as SDKLogRecord } from "@opentelemetry/sdk-logs"; +import { Attributes } from "@opentelemetry/api"; +import { IdGenerator, RandomIdGenerator } from "@opentelemetry/sdk-trace-base"; + +import * as Contracts from "../declarations/contracts"; +import { + AvailabilityData, + KnownSeverityLevel, + MessageData, + MonitorDomain, + PageViewData, + TelemetryEventData, + TelemetryExceptionData, + TelemetryExceptionDetails +} from "../declarations/generated"; +import { Logger } from "../shared/logging"; +import { Util } from "../shared/util"; +import { parseStack } from "./exceptions"; + +/** + * Log manual API to generate Application Insights telemetry + */ +export class LogApi { + private _idGenerator: IdGenerator; + private _logger: OtelLogger; + + /** + * Constructs a new client of LogApi + */ + constructor(logger: OtelLogger) { + this._idGenerator = new RandomIdGenerator(); + this._logger = logger; + } + + /** + * Log information about availability of an application + * @param telemetry Object encapsulating tracking options + */ + public trackAvailability(telemetry: Contracts.AvailabilityTelemetry): void { + try { + const logRecord = this._availabilityToLogRecord( + telemetry + ); + this._logger.emit(logRecord); + } catch (err) { + Logger.getInstance().error("Failed to send telemetry.", err); + } + } + + /** + * Log a page view + * @param telemetry Object encapsulating tracking options + */ + public trackPageView(telemetry: Contracts.PageViewTelemetry): void { + try { + const logRecord = this._pageViewToLogRecord( + telemetry + ); + this._logger.emit(logRecord); + } catch (err) { + Logger.getInstance().error("Failed to send telemetry.", err); + } + } + + /** + * Log a trace message + * @param telemetry Object encapsulating tracking options + */ + public trackTrace(telemetry: Contracts.TraceTelemetry): void { + try { + const logRecord = this._traceToLogRecord(telemetry) as SDKLogRecord; + this._logger.emit(logRecord); + } catch (err) { + Logger.getInstance().error("Failed to send telemetry.", err); + } + } + + /** + * Log an exception + * @param telemetry Object encapsulating tracking options + */ + public trackException(telemetry: Contracts.ExceptionTelemetry): void { + if (telemetry && telemetry.exception && !Util.getInstance().isError(telemetry.exception)) { + telemetry.exception = new Error(telemetry.exception.toString()); + } + try { + const logRecord = this._exceptionToLogRecord( + telemetry + ) as SDKLogRecord; + this._logger.emit(logRecord); + } catch (err) { + Logger.getInstance().error("Failed to send telemetry.", err); + } + } + + /** + * Log a user action or other occurrence. + * @param telemetry Object encapsulating tracking options + */ + public trackEvent(telemetry: Contracts.EventTelemetry): void { + try { + const logRecord = this._eventToLogRecord(telemetry); + this._logger.emit(logRecord); + } catch (err) { + Logger.getInstance().error("Failed to send telemetry.", err); + } + } + + private _telemetryToLogRecord( + telemetry: Contracts.Telemetry, + baseType: string, + baseData: MonitorDomain + ): LogRecord { + try { + const attributes: Attributes = { + ...telemetry.properties, + }; + const record: LogRecord = { attributes: attributes, body: Util.getInstance().stringify(baseData) }; + record.attributes["_MS.baseType"] = baseType; + return record; + } + catch (err) { + Logger.getInstance().warn("Failed to convert telemetry event to Log Record.", err); + } + } + + /** + * Availability Log to LogRecord parsing. + * @internal + */ + private _availabilityToLogRecord( + telemetry: Contracts.AvailabilityTelemetry + ): LogRecord { + const baseType = "AvailabilityData"; + const baseData: AvailabilityData = { + id: telemetry.id || this._idGenerator.generateSpanId(), + name: telemetry.name, + duration: Util.getInstance().msToTimeSpan(telemetry.duration), + success: telemetry.success, + runLocation: telemetry.runLocation, + message: telemetry.message, + measurements: telemetry.measurements, + version: 2, + }; + const record = this._telemetryToLogRecord(telemetry, baseType, baseData); + return record; + } + + /** + * Exception to LogRecord parsing. + * @internal + */ + private _exceptionToLogRecord( + telemetry: Contracts.ExceptionTelemetry + ): LogRecord { + const baseType = "ExceptionData"; + const stack = telemetry.exception["stack"]; + const parsedStack = parseStack(stack); + const exceptionDetails: TelemetryExceptionDetails = { + message: telemetry.exception.message, + typeName: telemetry.exception.name, + parsedStack: parsedStack, + hasFullStack: Util.getInstance().isArray(parsedStack) && parsedStack.length > 0, + }; + + const baseData: TelemetryExceptionData = { + severityLevel: telemetry.severity || KnownSeverityLevel.Error, + exceptions: [exceptionDetails], + measurements: telemetry.measurements, + version: 2, + }; + const record = this._telemetryToLogRecord(telemetry, baseType, baseData); + return record; + } + + /** + * Trace to LogRecord parsing. + * @internal + */ + private _traceToLogRecord(telemetry: Contracts.TraceTelemetry): LogRecord { + const baseType = "MessageData"; + const baseData: MessageData = { + message: telemetry.message, + severityLevel: telemetry.severity || KnownSeverityLevel.Information, + measurements: telemetry.measurements, + version: 2, + }; + const record = this._telemetryToLogRecord(telemetry, baseType, baseData); + return record; + } + + /** + * PageView to LogRecord parsing. + * @internal + */ + private _pageViewToLogRecord( + telemetry: Contracts.PageViewTelemetry + ): LogRecord { + const baseType = "PageViewData"; + const baseData: PageViewData = { + id: telemetry.id || this._idGenerator.generateSpanId(), + name: telemetry.name, + duration: Util.getInstance().msToTimeSpan(telemetry.duration), + url: telemetry.url, + referredUri: telemetry.referredUri, + measurements: telemetry.measurements, + version: 2, + }; + + const record = this._telemetryToLogRecord(telemetry, baseType, baseData); + return record; + } + + /** + * Event to LogRecord parsing. + * @internal + */ + private _eventToLogRecord(telemetry: Contracts.EventTelemetry): LogRecord { + const baseType = "EventData"; + const baseData: TelemetryEventData = { + name: telemetry.name, + measurements: telemetry.measurements, + version: 2, + }; + const record = this._telemetryToLogRecord(telemetry, baseType, baseData); + return record; + } +} diff --git a/src/logs/diagnostic-channel/bunyan.sub.ts b/src/logs/diagnostic-channel/bunyan.sub.ts index 715a687bb..4b771ed9c 100644 --- a/src/logs/diagnostic-channel/bunyan.sub.ts +++ b/src/logs/diagnostic-channel/bunyan.sub.ts @@ -3,9 +3,9 @@ import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { bunyan } from "diagnostic-channel-publishers"; import { KnownSeverityLevel } from "../../declarations/generated"; -import { ApplicationInsightsClient } from "../../applicationInsightsClient"; +import { LogApi } from "../api"; -let clients: ApplicationInsightsClient[] = []; +let clients: LogApi[] = []; // Mapping from bunyan levels defined at https://github.com/trentm/node-bunyan/blob/master/lib/bunyan.js#L256 const bunyanToAILevelMap: { [key: number]: string } = { @@ -35,7 +35,7 @@ const subscriber = (event: IStandardEvent) => { }); }; -export function enable(enabled: boolean, client: ApplicationInsightsClient) { +export function enable(enabled: boolean, client: LogApi) { if (enabled) { const handlerFound = clients.find((c) => c === client); if (handlerFound) { diff --git a/src/logs/diagnostic-channel/console.sub.ts b/src/logs/diagnostic-channel/console.sub.ts index 3c67d77f1..7850404a3 100644 --- a/src/logs/diagnostic-channel/console.sub.ts +++ b/src/logs/diagnostic-channel/console.sub.ts @@ -3,9 +3,9 @@ import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { console as consolePub } from "diagnostic-channel-publishers"; import { KnownSeverityLevel } from "../../declarations/generated"; -import { ApplicationInsightsClient } from "../../applicationInsightsClient"; +import { LogApi } from "../api"; -let clients: ApplicationInsightsClient[] = []; +let clients: LogApi[] = []; const subscriber = (event: IStandardEvent) => { let message = event.data.message as Error | string; @@ -27,7 +27,7 @@ const subscriber = (event: IStandardEvent) => { }); }; -export function enable(enabled: boolean, client: ApplicationInsightsClient) { +export function enable(enabled: boolean, client: LogApi) { if (enabled) { const handlerFound = clients.find((c) => c === client); if (handlerFound) { diff --git a/src/logs/diagnostic-channel/winston.sub.ts b/src/logs/diagnostic-channel/winston.sub.ts index 6b90bea03..0fd22fce8 100644 --- a/src/logs/diagnostic-channel/winston.sub.ts +++ b/src/logs/diagnostic-channel/winston.sub.ts @@ -3,9 +3,9 @@ import { channel, IStandardEvent, trueFilter } from "diagnostic-channel"; import { winston } from "diagnostic-channel-publishers"; import { KnownSeverityLevel } from "../../declarations/generated"; -import { ApplicationInsightsClient } from "../../applicationInsightsClient"; +import { LogApi } from "../api"; -let clients: ApplicationInsightsClient[] = []; +let clients: LogApi[] = []; const winstonToAILevelMap: { [key: string]: (og: string) => string } = { syslog(og: string) { @@ -58,7 +58,7 @@ const subscriber = (event: IStandardEvent) => { }); }; -export function enable(enabled: boolean, client: ApplicationInsightsClient) { +export function enable(enabled: boolean, client: LogApi) { if (enabled) { const handlerFound = clients.find((c) => c === client); if (handlerFound) { diff --git a/src/logs/exceptions.ts b/src/logs/exceptions.ts index f58a270f3..06c203e7d 100644 --- a/src/logs/exceptions.ts +++ b/src/logs/exceptions.ts @@ -1,5 +1,7 @@ -import { ApplicationInsightsClient } from "../applicationInsightsClient"; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for details. import { Util } from "../shared/util"; +import { LogApi } from "./api"; type ExceptionHandle = "uncaughtExceptionMonitor" | "uncaughtException" | "unhandledRejection"; const UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME: ExceptionHandle = "uncaughtExceptionMonitor"; @@ -12,9 +14,9 @@ export class AutoCollectExceptions { private _canUseUncaughtExceptionMonitor = false; private _exceptionListenerHandle?: (error: Error | undefined) => void; private _rejectionListenerHandle?: (error: Error | undefined) => void; - private _client: ApplicationInsightsClient; + private _client: LogApi; - constructor(client: ApplicationInsightsClient) { + constructor(client: LogApi) { this._client = client; // Only use for 13.7.0+ const nodeVer = process.versions.node.split("."); @@ -91,7 +93,6 @@ export class AutoCollectExceptions { ) { if (this._client) { this._client.trackException({ exception: error }); - this._client.flush(); // only rethrow when we are the only listener if (reThrow && name && process.listeners(name as any).length === 1) { // eslint-disable-next-line no-console diff --git a/src/shim/telemetryClient.ts b/src/shim/telemetryClient.ts index 6a26d1ca7..5bde79f8e 100644 --- a/src/shim/telemetryClient.ts +++ b/src/shim/telemetryClient.ts @@ -1,15 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Logger as OtelLogger, LogRecord, logs } from "@opentelemetry/api-logs"; -import { LogRecord as SDKLogRecord } from "@opentelemetry/sdk-logs"; import { Attributes, context, DiagLogLevel, SpanKind, SpanOptions, SpanStatusCode } from "@opentelemetry/api"; import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; -import { IdGenerator, RandomIdGenerator } from "@opentelemetry/sdk-trace-base"; import { SemanticAttributes } from "@opentelemetry/semantic-conventions"; - import * as Contracts from "../declarations/contracts"; -import { AvailabilityData, TelemetryItem as Envelope, KnownSeverityLevel, MessageData, MonitorDomain, PageViewData, TelemetryEventData, TelemetryExceptionData, TelemetryExceptionDetails } from "../declarations/generated"; +import { TelemetryItem as Envelope } from "../declarations/generated"; import { Context } from "./context"; import { Logger } from "../shared/logging"; import { Util } from "../shared/util"; @@ -19,6 +15,7 @@ import Config = require("./config"); import { dispose, Configuration, _setupCalled } from "./shim-applicationinsights"; import ConfigHelper = require("../shared/util/configHelper"); import { ApplicationInsightsClient } from "../applicationInsightsClient"; +import { LogApi } from "../logs/api"; /** * Application Insights telemetry client provides interface to track telemetry items, register telemetry initializers and @@ -27,14 +24,12 @@ import { ApplicationInsightsClient } from "../applicationInsightsClient"; export class TelemetryClient { private _options: ApplicationInsightsOptions; private _client: ApplicationInsightsClient; - private _idGenerator: IdGenerator; - private _logger: OtelLogger; public context: Context; public commonProperties: { [key: string]: string }; // TODO: Add setter so Resources are updated public config: IConfig; /** - * Constructs a new client of the client + * Constructs a new instance of TelemetryClient * @param setupString the Connection String or Instrumentation Key to use (read from environment variable if not specified) */ constructor(input?: string | ApplicationInsightsOptions) { @@ -44,7 +39,6 @@ export class TelemetryClient { this.commonProperties = {}; this.context = new Context(); - this._idGenerator = new RandomIdGenerator(); if (input) { if (typeof (input) === "object") { this._options = input; @@ -265,14 +259,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackAvailability(telemetry: Contracts.AvailabilityTelemetry): void { - try { - const logRecord = this._availabilityToLogRecord( - telemetry - ); - this._logger.emit(logRecord); - } catch (err) { - Logger.getInstance().error("Failed to send telemetry.", err); - } + LogApi.getInstance().trackAvailability(telemetry); } /** @@ -280,14 +267,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackPageView(telemetry: Contracts.PageViewTelemetry): void { - try { - const logRecord = this._pageViewToLogRecord( - telemetry - ); - this._logger.emit(logRecord); - } catch (err) { - Logger.getInstance().error("Failed to send telemetry.", err); - } + LogApi.getInstance().trackPageView(telemetry); } /** @@ -295,12 +275,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackTrace(telemetry: Contracts.TraceTelemetry): void { - try { - const logRecord = this._traceToLogRecord(telemetry) as SDKLogRecord; - this._logger.emit(logRecord); - } catch (err) { - Logger.getInstance().error("Failed to send telemetry.", err); - } + LogApi.getInstance().trackTrace(telemetry); } /** @@ -308,17 +283,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackException(telemetry: Contracts.ExceptionTelemetry): void { - if (telemetry && telemetry.exception && !Util.getInstance().isError(telemetry.exception)) { - telemetry.exception = new Error(telemetry.exception.toString()); - } - try { - const logRecord = this._exceptionToLogRecord( - telemetry - ) as SDKLogRecord; - this._logger.emit(logRecord); - } catch (err) { - Logger.getInstance().error("Failed to send telemetry.", err); - } + LogApi.getInstance().trackException(telemetry); } /** @@ -326,12 +291,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackEvent(telemetry: Contracts.EventTelemetry): void { - try { - const logRecord = this._eventToLogRecord(telemetry); - this._logger.emit(logRecord); - } catch (err) { - Logger.getInstance().error("Failed to send telemetry.", err); - } + LogApi.getInstance().trackEvent(telemetry); } /** @@ -498,124 +458,4 @@ export class TelemetryClient { public trackNodeHttpDependency(telemetry: Contracts.NodeHttpRequestTelemetry) { Logger.getInstance().warn("trackNodeHttpDependency is not implemented and is a no-op. Please use trackDependency instead."); } - - private _telemetryToLogRecord( - telemetry: Contracts.Telemetry, - baseType: string, - baseData: MonitorDomain - ): LogRecord { - try { - const attributes: Attributes = { - ...telemetry.properties, - }; - const record: LogRecord = { attributes: attributes, body: Util.getInstance().stringify(baseData) }; - record.attributes["_MS.baseType"] = baseType; - return record; - } - catch (err) { - Logger.getInstance().warn("Failed to convert telemetry event to Log Record.", err); - } - } - - /** - * Availability Log to LogRecord parsing. - * @internal - */ - private _availabilityToLogRecord( - telemetry: Contracts.AvailabilityTelemetry - ): LogRecord { - const baseType = "AvailabilityData"; - const baseData: AvailabilityData = { - id: telemetry.id || this._idGenerator.generateSpanId(), - name: telemetry.name, - duration: Util.getInstance().msToTimeSpan(telemetry.duration), - success: telemetry.success, - runLocation: telemetry.runLocation, - message: telemetry.message, - measurements: telemetry.measurements, - version: 2, - }; - const record = this._telemetryToLogRecord(telemetry, baseType, baseData); - return record; - } - - /** - * Exception to LogRecord parsing. - * @internal - */ - private _exceptionToLogRecord( - telemetry: Contracts.ExceptionTelemetry - ): LogRecord { - const baseType = "ExceptionData"; - const stack = telemetry.exception["stack"]; - const parsedStack = parseStack(stack); - const exceptionDetails: TelemetryExceptionDetails = { - message: telemetry.exception.message, - typeName: telemetry.exception.name, - parsedStack: parsedStack, - hasFullStack: Util.getInstance().isArray(parsedStack) && parsedStack.length > 0, - }; - - const baseData: TelemetryExceptionData = { - severityLevel: telemetry.severity || KnownSeverityLevel.Error, - exceptions: [exceptionDetails], - measurements: telemetry.measurements, - version: 2, - }; - const record = this._telemetryToLogRecord(telemetry, baseType, baseData); - return record; - } - - /** - * Trace to LogRecord parsing. - * @internal - */ - private _traceToLogRecord(telemetry: Contracts.TraceTelemetry): LogRecord { - const baseType = "MessageData"; - const baseData: MessageData = { - message: telemetry.message, - severityLevel: telemetry.severity || KnownSeverityLevel.Information, - measurements: telemetry.measurements, - version: 2, - }; - const record = this._telemetryToLogRecord(telemetry, baseType, baseData); - return record; - } - - /** - * PageView to LogRecord parsing. - * @internal - */ - private _pageViewToLogRecord( - telemetry: Contracts.PageViewTelemetry - ): LogRecord { - const baseType = "PageViewData"; - const baseData: PageViewData = { - id: telemetry.id || this._idGenerator.generateSpanId(), - name: telemetry.name, - duration: Util.getInstance().msToTimeSpan(telemetry.duration), - url: telemetry.url, - referredUri: telemetry.referredUri, - measurements: telemetry.measurements, - version: 2, - }; - - const record = this._telemetryToLogRecord(telemetry, baseType, baseData); - return record; - } - - /** - * Event to LogRecord parsing. - * @internal - */ - private _eventToLogRecord(telemetry: Contracts.EventTelemetry): LogRecord { - const baseType = "EventData"; - const baseData: TelemetryEventData = { - name: telemetry.name, - measurements: telemetry.measurements, - version: 2, - }; - const record = this._telemetryToLogRecord(telemetry, baseType, baseData); - return record; - } } From d210e4ae5338897f7dc311293130de5aaa76b7e1 Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 23 Aug 2023 11:05:02 -0700 Subject: [PATCH 04/14] Fix tests --- package-lock.json | 276 ++----------------- package.json | 1 + src/agent/agentLoader.ts | 10 +- src/applicationInsightsClient.ts | 33 +-- src/logs/console.ts | 12 +- src/shim/telemetryClient.ts | 50 ++-- test/unitTests/agent/azureFunctionsLoader.ts | 1 - test/unitTests/logs/api.tests.ts | 173 ++++++++++++ test/unitTests/logs/bunyan.tests.ts | 60 ++-- test/unitTests/logs/console.tests.ts | 59 ++-- test/unitTests/logs/winston.tests.ts | 58 ++-- test/unitTests/shim/config.tests.ts | 4 +- test/unitTests/shim/telemetryClient.tests.ts | 264 ++++-------------- 13 files changed, 373 insertions(+), 628 deletions(-) create mode 100644 test/unitTests/logs/api.tests.ts diff --git a/package-lock.json b/package-lock.json index a3a4c7bdd..3119b3e3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", + "@azure/monitor-opentelemetry-exporter": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5", "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", @@ -222,7 +223,7 @@ "node_modules/@azure/monitor-opentelemetry": { "version": "1.0.0-beta.2", "resolved": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "integrity": "sha512-C6haw95i9HXaVJSImSI69wFZ8xN+/ye8ubtL9iuFGi7+C8EOBW26zVLjxFCG9YVCwqaerghCL1IJzXBqTGJW0Q==", + "integrity": "sha512-cUpvYBQJPKFhFyw4hs/IJbRAm8R+6HQtWMrqRdZvWdHOJyv3F229Xlxh8/u/WI0E8Im1uz7hEso8k1+shumVJA==", "license": "MIT", "dependencies": { "@azure/functions": "^3.2.0", @@ -231,9 +232,6 @@ "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", "@opentelemetry/core": "^1.15.2", - "@opentelemetry/exporter-logs-otlp-http": "^0.41.2", - "@opentelemetry/exporter-metrics-otlp-http": "^0.41.2", - "@opentelemetry/exporter-trace-otlp-http": "^0.41.2", "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/instrumentation-http": "^0.41.2", "@opentelemetry/instrumentation-mongodb": "^0.36.0", @@ -241,7 +239,6 @@ "@opentelemetry/instrumentation-pg": "^0.36.0", "@opentelemetry/instrumentation-redis": "^0.35.0", "@opentelemetry/instrumentation-redis-4": "^0.35.0", - "@opentelemetry/otlp-exporter-base": "^0.41.0", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", @@ -256,90 +253,27 @@ }, "node_modules/@azure/monitor-opentelemetry-exporter": { "version": "1.0.0-beta.14", - "resolved": "https://registry.npmjs.org/@azure/monitor-opentelemetry-exporter/-/monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", - "integrity": "sha512-x70ejapAASC/Y/kZOvb1bf2OM0nF1Vymu+W7/Fh/y1aO0HWEcRbGc/NJBHE93e51u3vx2N/2Yfxl75b7DQRSkg==", + "resolved": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", + "integrity": "sha512-1srRw6wDgFUMu7F1UtnuXPBwNlOi9jkyP+avNSvbl7uQJDnF4Y3IprUPAvEr5V//luPIxAUTzyNtE+SNquDlqg==", + "license": "MIT", "dependencies": { "@azure/core-auth": "^1.3.0", "@azure/core-client": "^1.0.0", "@azure/core-rest-pipeline": "^1.1.0", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.40.0", - "@opentelemetry/core": "^1.14.0", - "@opentelemetry/resources": "^1.14.0", - "@opentelemetry/sdk-logs": "^0.40.0", - "@opentelemetry/sdk-metrics": "^1.14.0", - "@opentelemetry/sdk-trace-base": "^1.14.0", - "@opentelemetry/semantic-conventions": "^1.14.0", + "@opentelemetry/api-logs": "^0.41.2", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/resources": "^1.15.2", + "@opentelemetry/sdk-logs": "^0.41.2", + "@opentelemetry/sdk-metrics": "^1.15.2", + "@opentelemetry/sdk-trace-base": "^1.15.2", + "@opentelemetry/semantic-conventions": "^1.15.2", "tslib": "^2.2.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@azure/monitor-opentelemetry-exporter/node_modules/@opentelemetry/api-logs": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.40.0.tgz", - "integrity": "sha512-8WRuvGnfnbeR9ifGjLN8kklk2fkd0gBT6aN7NHO9zeYF/6qacAViD3bwAKqGXKnJgl39l1EU41I9diqUjamEEQ==", - "dependencies": { - "@opentelemetry/api": "^1.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@azure/monitor-opentelemetry-exporter/node_modules/@opentelemetry/core": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.14.0.tgz", - "integrity": "sha512-MnMZ+sxsnlzloeuXL2nm5QcNczt/iO82UOeQQDHhV83F2fP3sgntW2evvtoxJki0MBLxEsh5ADD7PR/Hn5uzjw==", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.14.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@azure/monitor-opentelemetry-exporter/node_modules/@opentelemetry/resources": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.14.0.tgz", - "integrity": "sha512-qRfWIgBxxl3z47E036Aey0Lj2ZjlFb27Q7Xnj1y1z/P293RXJZGLtcfn/w8JF7v1Q2hs3SDGxz7Wb9Dko1YUQA==", - "dependencies": { - "@opentelemetry/core": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@azure/monitor-opentelemetry-exporter/node_modules/@opentelemetry/sdk-logs": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.40.0.tgz", - "integrity": "sha512-/JG7DOLo/Y3VR9azPXlXNRGQff3gp7nQbWl5cFD2SmlYqUrzMq1OjbksZLVztDu1+ynbFunseUG11SxhoxvSRg==", - "dependencies": { - "@opentelemetry/core": "1.14.0", - "@opentelemetry/resources": "1.14.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.4.0 <1.5.0", - "@opentelemetry/api-logs": ">=0.39.1" - } - }, - "node_modules/@azure/monitor-opentelemetry-exporter/node_modules/@opentelemetry/semantic-conventions": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.14.0.tgz", - "integrity": "sha512-rJfCY8rCWz3cb4KI6pEofnytvMPuj3YLQwoscCCYZ5DkdiPjo15IQ0US7+mjcWy9H3fcZIzf2pbJZ7ck/h4tug==", - "engines": { - "node": ">=14" - } - }, "node_modules/@azure/msal-browser": { "version": "2.38.0", "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.38.0.tgz", @@ -1189,59 +1123,6 @@ "@opentelemetry/api": ">=1.0.0 <1.5.0" } }, - "node_modules/@opentelemetry/exporter-logs-otlp-http": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.41.2.tgz", - "integrity": "sha512-9nG6rvMK1toG3On7JAeKpEXJeaTmFzmMKDXE3+gvqye3SORqoRuJDbh+o3IXL2K7qmPn/34m9pl9PgArUei0nQ==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/otlp-exporter-base": "0.41.2", - "@opentelemetry/otlp-transformer": "0.41.2", - "@opentelemetry/sdk-logs": "0.41.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api-logs": ">=0.38.0" - } - }, - "node_modules/@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.41.2.tgz", - "integrity": "sha512-+YeIcL4nuldWE89K8NBLImpXCvih04u1MBnn8EzvoywG2TKR5JC3CZEPepODIxlsfGSgP8W5khCEP1NHZzftYw==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/otlp-exporter-base": "0.41.2", - "@opentelemetry/otlp-transformer": "0.41.2", - "@opentelemetry/resources": "1.15.2", - "@opentelemetry/sdk-metrics": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/exporter-trace-otlp-http": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.41.2.tgz", - "integrity": "sha512-Y0fGLipjZXLMelWtlS1/MDtrPxf25oM408KukRdkN31a1MEFo4h/ZkNwS7ZfmqHGUa+4rWRt2bi6JBiqy7Ytgw==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/otlp-exporter-base": "0.41.2", - "@opentelemetry/otlp-transformer": "0.41.2", - "@opentelemetry/resources": "1.15.2", - "@opentelemetry/sdk-trace-base": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0" - } - }, "node_modules/@opentelemetry/instrumentation": { "version": "0.41.2", "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz", @@ -1374,25 +1255,6 @@ "@opentelemetry/api": "^1.0.0" } }, - "node_modules/@opentelemetry/otlp-transformer": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.41.2.tgz", - "integrity": "sha512-jJbPwB0tNu2v+Xi0c/v/R3YBLJKLonw1p+v3RVjT2VfzeUyzSp/tBeVdY7RZtL6dzZpA9XSmp8UEfWIFQo33yA==", - "dependencies": { - "@opentelemetry/api-logs": "0.41.2", - "@opentelemetry/core": "1.15.2", - "@opentelemetry/resources": "1.15.2", - "@opentelemetry/sdk-logs": "0.41.2", - "@opentelemetry/sdk-metrics": "1.15.2", - "@opentelemetry/sdk-trace-base": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.5.0" - } - }, "node_modules/@opentelemetry/propagator-b3": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.15.2.tgz", @@ -5654,7 +5516,7 @@ }, "@azure/monitor-opentelemetry": { "version": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "integrity": "sha512-C6haw95i9HXaVJSImSI69wFZ8xN+/ye8ubtL9iuFGi7+C8EOBW26zVLjxFCG9YVCwqaerghCL1IJzXBqTGJW0Q==", + "integrity": "sha512-cUpvYBQJPKFhFyw4hs/IJbRAm8R+6HQtWMrqRdZvWdHOJyv3F229Xlxh8/u/WI0E8Im1uz7hEso8k1+shumVJA==", "requires": { "@azure/functions": "^3.2.0", "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.14", @@ -5662,9 +5524,6 @@ "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", "@opentelemetry/core": "^1.15.2", - "@opentelemetry/exporter-logs-otlp-http": "^0.41.2", - "@opentelemetry/exporter-metrics-otlp-http": "^0.41.2", - "@opentelemetry/exporter-trace-otlp-http": "^0.41.2", "@opentelemetry/instrumentation": "^0.41.2", "@opentelemetry/instrumentation-http": "^0.41.2", "@opentelemetry/instrumentation-mongodb": "^0.36.0", @@ -5672,7 +5531,6 @@ "@opentelemetry/instrumentation-pg": "^0.36.0", "@opentelemetry/instrumentation-redis": "^0.35.0", "@opentelemetry/instrumentation-redis-4": "^0.35.0", - "@opentelemetry/otlp-exporter-base": "^0.41.0", "@opentelemetry/resources": "^1.15.0", "@opentelemetry/sdk-logs": "^0.41.0", "@opentelemetry/sdk-metrics": "^1.15.0", @@ -5683,63 +5541,21 @@ } }, "@azure/monitor-opentelemetry-exporter": { - "version": "1.0.0-beta.14", - "resolved": "https://registry.npmjs.org/@azure/monitor-opentelemetry-exporter/-/monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", - "integrity": "sha512-x70ejapAASC/Y/kZOvb1bf2OM0nF1Vymu+W7/Fh/y1aO0HWEcRbGc/NJBHE93e51u3vx2N/2Yfxl75b7DQRSkg==", + "version": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", + "integrity": "sha512-1srRw6wDgFUMu7F1UtnuXPBwNlOi9jkyP+avNSvbl7uQJDnF4Y3IprUPAvEr5V//luPIxAUTzyNtE+SNquDlqg==", "requires": { "@azure/core-auth": "^1.3.0", "@azure/core-client": "^1.0.0", "@azure/core-rest-pipeline": "^1.1.0", "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.40.0", - "@opentelemetry/core": "^1.14.0", - "@opentelemetry/resources": "^1.14.0", - "@opentelemetry/sdk-logs": "^0.40.0", - "@opentelemetry/sdk-metrics": "^1.14.0", - "@opentelemetry/sdk-trace-base": "^1.14.0", - "@opentelemetry/semantic-conventions": "^1.14.0", + "@opentelemetry/api-logs": "^0.41.2", + "@opentelemetry/core": "^1.15.2", + "@opentelemetry/resources": "^1.15.2", + "@opentelemetry/sdk-logs": "^0.41.2", + "@opentelemetry/sdk-metrics": "^1.15.2", + "@opentelemetry/sdk-trace-base": "^1.15.2", + "@opentelemetry/semantic-conventions": "^1.15.2", "tslib": "^2.2.0" - }, - "dependencies": { - "@opentelemetry/api-logs": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.40.0.tgz", - "integrity": "sha512-8WRuvGnfnbeR9ifGjLN8kklk2fkd0gBT6aN7NHO9zeYF/6qacAViD3bwAKqGXKnJgl39l1EU41I9diqUjamEEQ==", - "requires": { - "@opentelemetry/api": "^1.0.0" - } - }, - "@opentelemetry/core": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.14.0.tgz", - "integrity": "sha512-MnMZ+sxsnlzloeuXL2nm5QcNczt/iO82UOeQQDHhV83F2fP3sgntW2evvtoxJki0MBLxEsh5ADD7PR/Hn5uzjw==", - "requires": { - "@opentelemetry/semantic-conventions": "1.14.0" - } - }, - "@opentelemetry/resources": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.14.0.tgz", - "integrity": "sha512-qRfWIgBxxl3z47E036Aey0Lj2ZjlFb27Q7Xnj1y1z/P293RXJZGLtcfn/w8JF7v1Q2hs3SDGxz7Wb9Dko1YUQA==", - "requires": { - "@opentelemetry/core": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" - } - }, - "@opentelemetry/sdk-logs": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.40.0.tgz", - "integrity": "sha512-/JG7DOLo/Y3VR9azPXlXNRGQff3gp7nQbWl5cFD2SmlYqUrzMq1OjbksZLVztDu1+ynbFunseUG11SxhoxvSRg==", - "requires": { - "@opentelemetry/core": "1.14.0", - "@opentelemetry/resources": "1.14.0" - } - }, - "@opentelemetry/semantic-conventions": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.14.0.tgz", - "integrity": "sha512-rJfCY8rCWz3cb4KI6pEofnytvMPuj3YLQwoscCCYZ5DkdiPjo15IQ0US7+mjcWy9H3fcZIzf2pbJZ7ck/h4tug==" - } } }, "@azure/msal-browser": { @@ -6386,41 +6202,6 @@ "@opentelemetry/semantic-conventions": "1.15.2" } }, - "@opentelemetry/exporter-logs-otlp-http": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-logs-otlp-http/-/exporter-logs-otlp-http-0.41.2.tgz", - "integrity": "sha512-9nG6rvMK1toG3On7JAeKpEXJeaTmFzmMKDXE3+gvqye3SORqoRuJDbh+o3IXL2K7qmPn/34m9pl9PgArUei0nQ==", - "requires": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/otlp-exporter-base": "0.41.2", - "@opentelemetry/otlp-transformer": "0.41.2", - "@opentelemetry/sdk-logs": "0.41.2" - } - }, - "@opentelemetry/exporter-metrics-otlp-http": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-metrics-otlp-http/-/exporter-metrics-otlp-http-0.41.2.tgz", - "integrity": "sha512-+YeIcL4nuldWE89K8NBLImpXCvih04u1MBnn8EzvoywG2TKR5JC3CZEPepODIxlsfGSgP8W5khCEP1NHZzftYw==", - "requires": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/otlp-exporter-base": "0.41.2", - "@opentelemetry/otlp-transformer": "0.41.2", - "@opentelemetry/resources": "1.15.2", - "@opentelemetry/sdk-metrics": "1.15.2" - } - }, - "@opentelemetry/exporter-trace-otlp-http": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-trace-otlp-http/-/exporter-trace-otlp-http-0.41.2.tgz", - "integrity": "sha512-Y0fGLipjZXLMelWtlS1/MDtrPxf25oM408KukRdkN31a1MEFo4h/ZkNwS7ZfmqHGUa+4rWRt2bi6JBiqy7Ytgw==", - "requires": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/otlp-exporter-base": "0.41.2", - "@opentelemetry/otlp-transformer": "0.41.2", - "@opentelemetry/resources": "1.15.2", - "@opentelemetry/sdk-trace-base": "1.15.2" - } - }, "@opentelemetry/instrumentation": { "version": "0.41.2", "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz", @@ -6505,19 +6286,6 @@ "@opentelemetry/core": "1.15.2" } }, - "@opentelemetry/otlp-transformer": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-transformer/-/otlp-transformer-0.41.2.tgz", - "integrity": "sha512-jJbPwB0tNu2v+Xi0c/v/R3YBLJKLonw1p+v3RVjT2VfzeUyzSp/tBeVdY7RZtL6dzZpA9XSmp8UEfWIFQo33yA==", - "requires": { - "@opentelemetry/api-logs": "0.41.2", - "@opentelemetry/core": "1.15.2", - "@opentelemetry/resources": "1.15.2", - "@opentelemetry/sdk-logs": "0.41.2", - "@opentelemetry/sdk-metrics": "1.15.2", - "@opentelemetry/sdk-trace-base": "1.15.2" - } - }, "@opentelemetry/propagator-b3": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.15.2.tgz", diff --git a/package.json b/package.json index 1dd626066..e4fe57d12 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", + "@azure/monitor-opentelemetry-exporter": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5", "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", diff --git a/src/agent/agentLoader.ts b/src/agent/agentLoader.ts index 809b4b851..bc4ee2922 100644 --- a/src/agent/agentLoader.ts +++ b/src/agent/agentLoader.ts @@ -2,7 +2,7 @@ // Licensed under the MIT license. import { ManagedIdentityCredential } from "@azure/identity"; -import { AzureMonitorOpenTelemetryClient } from "@azure/monitor-opentelemetry"; +import { useAzureMonitor } from "@azure/monitor-opentelemetry"; import { Util } from "../shared/util"; import { ConsoleWriter } from "./diagnostics/writers/consoleWriter"; import { DiagnosticLogger } from "./diagnostics/diagnosticLogger"; @@ -109,7 +109,7 @@ export class AgentLoader { this._diagnosticLogger = logger; } - public initialize(): AzureMonitorOpenTelemetryClient { + public initialize() { if (!this._canLoad) { const msg = `Cannot load Azure Monitor Application Insights Distro because of unsupported Node.js runtime, currently running in version ${NODE_JS_RUNTIME_MAJOR_VERSION}`; console.log(msg); @@ -118,8 +118,8 @@ export class AgentLoader { if (this._validate()) { try { // Initialize Distro - this._options.azureMonitorExporterConfig.aadTokenCredential = this._aadCredential; - const appInsightsClient = new AzureMonitorOpenTelemetryClient(this._options); + this._options.azureMonitorExporterConfig.credential = this._aadCredential; + useAzureMonitor(this._options); // Agent successfully initialized const diagnosticLog: IDiagnosticLog = { message: "Azure Monitor Application Insights Distro was started succesfully.", @@ -129,8 +129,6 @@ export class AgentLoader { this._statusLogger.logStatus({ AgentInitializedSuccessfully: true }); - return appInsightsClient; - } catch (error) { const msg = `Error initializaing Azure Monitor Application Insights Distro.${Util.getInstance().dumpObj(error)}`; diff --git a/src/applicationInsightsClient.ts b/src/applicationInsightsClient.ts index e26616af5..7ce0ff02b 100644 --- a/src/applicationInsightsClient.ts +++ b/src/applicationInsightsClient.ts @@ -2,40 +2,42 @@ // Licensed under the MIT license. -import { AzureMonitorOpenTelemetryClient } from "@azure/monitor-opentelemetry"; +import { shutdownAzureMonitor, useAzureMonitor } from "@azure/monitor-opentelemetry"; +import { metrics, trace } from "@opentelemetry/api"; +import { MeterProvider } from "@opentelemetry/sdk-metrics"; +import { logs } from "@opentelemetry/api-logs"; +import { LoggerProvider } from "@opentelemetry/sdk-logs"; +import { BasicTracerProvider } from "@opentelemetry/sdk-trace-node"; + import { Logger } from "./shared/logging"; import { AutoCollectConsole } from "./logs/console"; import { AutoCollectExceptions } from "./logs/exceptions"; import { ApplicationInsightsOptions } from "./types"; import { ApplicationInsightsConfig } from "./shared/configuration/config"; +import { LogApi } from "./logs/api"; export class ApplicationInsightsClient { private _internalConfig: ApplicationInsightsConfig; - private _client: AzureMonitorOpenTelemetryClient; private _console: AutoCollectConsole; private _exceptions: AutoCollectExceptions; - + private _logApi: LogApi; - /** * Constructs a new client * @param options ApplicationInsightsOptions */ constructor(options?: ApplicationInsightsOptions) { - + useAzureMonitor(options); this._internalConfig = new ApplicationInsightsConfig(options); - this._client = new AzureMonitorOpenTelemetryClient(options); - this._console = new AutoCollectConsole(this); + this._console = new AutoCollectConsole(this._logApi); + this._logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); if (this._internalConfig.enableAutoCollectExceptions) { - this._exceptions = new AutoCollectExceptions(this); + this._exceptions = new AutoCollectExceptions(this._logApi); } - this._console.enable(this._internalConfig.logInstrumentationOptions); - - } /** @@ -43,7 +45,9 @@ export class ApplicationInsightsClient { */ public async flush(): Promise { try { - await this._client.flush(); + await (metrics.getMeterProvider() as MeterProvider).forceFlush(); + await (trace.getTracerProvider() as BasicTracerProvider).forceFlush(); + await (logs.getLoggerProvider() as LoggerProvider).forceFlush(); } catch (err) { Logger.getInstance().error("Failed to flush telemetry", err); } @@ -53,13 +57,10 @@ export class ApplicationInsightsClient { * Shutdown client */ public async shutdown(): Promise { - this._client.shutdown(); + shutdownAzureMonitor(); this._console.shutdown(); this._console = null; this._exceptions?.shutdown(); this._exceptions = null; } - - - } diff --git a/src/logs/console.ts b/src/logs/console.ts index 9aa61c40c..c26af461d 100644 --- a/src/logs/console.ts +++ b/src/logs/console.ts @@ -1,22 +1,22 @@ -import { ApplicationInsightsClient } from "../applicationInsightsClient"; import { LogInstrumentationOptions } from "../types"; +import { LogApi } from "./api"; import { enablePublishers } from "./diagnostic-channel/initialization"; enablePublishers(); export class AutoCollectConsole { - private _client: ApplicationInsightsClient; + private _client: LogApi; - constructor(client: ApplicationInsightsClient) { + constructor(client: LogApi) { this._client = client; } public enable(options: LogInstrumentationOptions) { // eslint-disable-next-line @typescript-eslint/no-var-requires - require("./diagnostic-channel/console.sub").enable(options.console.enabled, this._client); + require("./diagnostic-channel/console.sub").enable(options.console?.enabled, this._client); // eslint-disable-next-line @typescript-eslint/no-var-requires - require("./diagnostic-channel/bunyan.sub").enable(options.bunyan.enabled, this._client); + require("./diagnostic-channel/bunyan.sub").enable(options.bunyan?.enabled, this._client); // eslint-disable-next-line @typescript-eslint/no-var-requires - require("./diagnostic-channel/winston.sub").enable(options.winston.enabled, this._client); + require("./diagnostic-channel/winston.sub").enable(options.winston?.enabled, this._client); } public shutdown() { diff --git a/src/shim/telemetryClient.ts b/src/shim/telemetryClient.ts index 5bde79f8e..6f476b161 100644 --- a/src/shim/telemetryClient.ts +++ b/src/shim/telemetryClient.ts @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Attributes, context, DiagLogLevel, SpanKind, SpanOptions, SpanStatusCode } from "@opentelemetry/api"; +import { Attributes, context, DiagLogLevel, SpanKind, SpanOptions, SpanStatusCode, trace } from "@opentelemetry/api"; +import { logs } from "@opentelemetry/api-logs"; import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; import { SemanticAttributes } from "@opentelemetry/semantic-conventions"; import * as Contracts from "../declarations/contracts"; @@ -12,7 +13,7 @@ import { Util } from "../shared/util"; import { ApplicationInsightsOptions, ExtendedMetricType } from "../types"; import { IConfig } from "../shim/types"; import Config = require("./config"); -import { dispose, Configuration, _setupCalled } from "./shim-applicationinsights"; +import { dispose, Configuration } from "./shim-applicationinsights"; import ConfigHelper = require("../shared/util/configHelper"); import { ApplicationInsightsClient } from "../applicationInsightsClient"; import { LogApi } from "../logs/api"; @@ -24,6 +25,7 @@ import { LogApi } from "../logs/api"; export class TelemetryClient { private _options: ApplicationInsightsOptions; private _client: ApplicationInsightsClient; + private _logApi: LogApi; public context: Context; public commonProperties: { [key: string]: string }; // TODO: Add setter so Resources are updated public config: IConfig; @@ -36,6 +38,7 @@ export class TelemetryClient { // If the user does not pass a new connectionString, use the one defined in the _options const config = new Config(typeof (input) === "string" ? input : input?.azureMonitorExporterConfig?.connectionString); this.config = config; + this._logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); this.commonProperties = {}; this.context = new Context(); @@ -51,10 +54,6 @@ export class TelemetryClient { }; } } - // If not running the shim, we should start the AzureMonitorClient as a part of the constructor - if (!_setupCalled) { - this.start(); - } } /** @@ -86,7 +85,7 @@ export class TelemetryClient { } if (this.config.aadTokenCredential) { - this._options.azureMonitorExporterConfig.aadTokenCredential = this.config.aadTokenCredential; + this._options.azureMonitorExporterConfig.credential = this.config.aadTokenCredential; } if (typeof (this.config.enableAutoCollectConsole) === "boolean") { @@ -247,11 +246,8 @@ export class TelemetryClient { * @param input Set of options to configure the Azure Monitor Client */ public start(input?: ApplicationInsightsOptions) { - // Only parse config if we're running the shim - if (_setupCalled) { - this._parseConfig(input); - } - + this._parseConfig(input); + this._client = new ApplicationInsightsClient(this._options); } /** @@ -259,7 +255,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackAvailability(telemetry: Contracts.AvailabilityTelemetry): void { - LogApi.getInstance().trackAvailability(telemetry); + this._logApi.trackAvailability(telemetry); } /** @@ -267,7 +263,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackPageView(telemetry: Contracts.PageViewTelemetry): void { - LogApi.getInstance().trackPageView(telemetry); + this._logApi.trackPageView(telemetry); } /** @@ -275,7 +271,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackTrace(telemetry: Contracts.TraceTelemetry): void { - LogApi.getInstance().trackTrace(telemetry); + this._logApi.trackTrace(telemetry); } /** @@ -283,7 +279,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackException(telemetry: Contracts.ExceptionTelemetry): void { - LogApi.getInstance().trackException(telemetry); + this._logApi.trackException(telemetry); } /** @@ -291,7 +287,7 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackEvent(telemetry: Contracts.EventTelemetry): void { - LogApi.getInstance().trackEvent(telemetry); + this._logApi.trackEvent(telemetry); } /** @@ -331,8 +327,7 @@ export class TelemetryClient { attributes: attributes, startTime: startTime, }; - const span: any = this._client - .getTracer() + const span: any = trace.getTracer("ApplicationInsightsTracer") .startSpan(telemetry.name, options, ctx); span.setStatus({ code: telemetry.success ? SpanStatusCode.OK : SpanStatusCode.ERROR, @@ -384,8 +379,7 @@ export class TelemetryClient { attributes: attributes, startTime: startTime, }; - const span: any = this._client - .getTracer() + const span: any = trace.getTracer("ApplicationInsightsTracer") .startSpan(telemetry.name, options, ctx); span.setStatus({ code: telemetry.success ? SpanStatusCode.OK : SpanStatusCode.ERROR, @@ -458,4 +452,18 @@ export class TelemetryClient { public trackNodeHttpDependency(telemetry: Contracts.NodeHttpRequestTelemetry) { Logger.getInstance().warn("trackNodeHttpDependency is not implemented and is a no-op. Please use trackDependency instead."); } + + /** + * Immediately send all queued telemetry. + */ + public async flush(): Promise { + this._client.flush(); + } + + /** + * Shutdown client + */ + public async shutdown(): Promise { + this._client.shutdown(); + } } diff --git a/test/unitTests/agent/azureFunctionsLoader.ts b/test/unitTests/agent/azureFunctionsLoader.ts index 0d826d6fe..d95152254 100644 --- a/test/unitTests/agent/azureFunctionsLoader.ts +++ b/test/unitTests/agent/azureFunctionsLoader.ts @@ -55,7 +55,6 @@ describe("agent/AzureFunctionsLoader", () => { // Agent Loader called assert.ok(stub.calledOnce); // Custom config - assert.equal(agent["_options"].enableAutoCollectStandardMetrics, false); assert.equal(agent["_options"].enableAutoCollectPerformance, false); }); diff --git a/test/unitTests/logs/api.tests.ts b/test/unitTests/logs/api.tests.ts new file mode 100644 index 000000000..083d44177 --- /dev/null +++ b/test/unitTests/logs/api.tests.ts @@ -0,0 +1,173 @@ +import * as assert from "assert"; +import * as sinon from "sinon"; +import * as nock from "nock"; +import { Logger } from "@opentelemetry/api-logs"; +import { LogRecord } from "@opentelemetry/sdk-logs"; + +import { + AvailabilityTelemetry, + EventTelemetry, + ExceptionTelemetry, + PageViewTelemetry, + Telemetry, + TraceTelemetry +} from "../../../src/declarations/contracts"; +import { DEFAULT_BREEZE_ENDPOINT } from "../../../src/declarations/constants"; +import { AvailabilityData, MessageData, MonitorDomain, PageViewData, TelemetryEventData, TelemetryExceptionData } from "../../../src/declarations/generated"; +import { LogApi } from "../../../src/logs/api"; + +describe("logs/API", () => { + let sandbox: sinon.SinonSandbox; + + before(() => { + sandbox = sinon.createSandbox(); + nock(DEFAULT_BREEZE_ENDPOINT) + .post("/v2.1/track", (body: string) => true) + .reply(200, {}) + .persist(); + nock.disableNetConnect(); + }); + + afterEach(() => { + sandbox.restore(); + }); + + after(() => { + nock.cleanAll(); + nock.enableNetConnect(); + }); + + class TestLogger implements Logger { + + public logsEmited: Array = []; + + emit(logRecord: LogRecord): void { + this.logsEmited.push(logRecord); + } + } + + describe("#manual track APIs", () => { + it("_logToEnvelope", () => { + let testLogger = new TestLogger(); + let logApi = new LogApi(testLogger); + const telemetry: Telemetry = { + properties: { "testAttribute": "testValue" } + }; + const data: MonitorDomain = {}; + const logRecord = logApi["_telemetryToLogRecord"]( + telemetry, + "TestData", + data, + ) as LogRecord; + assert.equal(logRecord.body, "{}"); + assert.equal(logRecord.attributes["testAttribute"], "testValue"); + assert.equal(logRecord.attributes["_MS.baseType"], "TestData"); + }); + + it("trackAvailability", () => { + let testLogger = new TestLogger(); + let logApi = new LogApi(testLogger); + const telemetry: AvailabilityTelemetry = { + name: "TestName", + duration: 2000, //2 seconds + id: "testId", + runLocation: "testRunLocation", + message: "testMessage", + success: false, + }; + logApi.trackAvailability(telemetry); + const logs = testLogger.logsEmited; + assert.equal(logs.length, 1); + let baseData = JSON.parse(logs[0].body) as AvailabilityData; + assert.equal(baseData.version, 2); + assert.equal(baseData.id, "testId"); + assert.equal(baseData.name, "TestName"); + assert.equal(baseData.duration, "00:00:02.000"); + assert.equal(baseData.success, false); + assert.equal(baseData.runLocation, "testRunLocation"); + assert.equal(baseData.message, "testMessage"); + assert.equal(logs[0].attributes["_MS.baseType"], "AvailabilityData"); + }); + + it("trackPageView", () => { + let testLogger = new TestLogger(); + let logApi = new LogApi(testLogger); + const telemetry: PageViewTelemetry = { + name: "TestName", + duration: 2000, //2 seconds + id: "testId", + referredUri: "testReferredUri", + url: "testUrl", + }; + logApi.trackPageView(telemetry); + const logs = testLogger.logsEmited; + assert.equal(logs.length, 1); + let baseData = JSON.parse(logs[0].body) as PageViewData; + assert.equal(baseData.version, 2); + assert.equal(baseData.id, "testId"); + assert.equal(baseData.name, "TestName"); + assert.equal(baseData.duration, "00:00:02.000"); + assert.equal(baseData.referredUri, "testReferredUri"); + assert.equal(baseData.url, "testUrl"); + assert.equal(logs[0].attributes["_MS.baseType"], "PageViewData"); + }); + + it("trackTrace", () => { + let testLogger = new TestLogger(); + let logApi = new LogApi(testLogger); + const telemetry: TraceTelemetry = { + message: "testMessage", + severity: "Information", + }; + logApi.trackTrace(telemetry); + const logs = testLogger.logsEmited; + assert.equal(logs.length, 1); + let baseData = JSON.parse(logs[0].body) as MessageData; + assert.equal(baseData.version, 2); + assert.equal(baseData.message, "testMessage"); + assert.equal(baseData.severityLevel, "Information"); + assert.equal(logs[0].attributes["_MS.baseType"], "MessageData"); + }); + + it("trackException", () => { + let testLogger = new TestLogger(); + let logApi = new LogApi(testLogger); + const measurements: { [key: string]: number } = {}; + measurements["test"] = 123; + const telemetry: ExceptionTelemetry = { + exception: new Error("TestError"), + severity: "Critical", + measurements: measurements, + }; + logApi.trackException(telemetry); + const logs = testLogger.logsEmited; + assert.equal(logs.length, 1); + let baseData = JSON.parse(logs[0].body) as TelemetryExceptionData; + assert.equal(baseData.version, 2); + assert.equal(baseData.severityLevel, "Critical"); + assert.equal(baseData.exceptions[0].message, "TestError"); + assert.equal(baseData.exceptions[0].typeName, "Error"); + assert.equal(baseData.measurements["test"], 123); + assert.equal(logs[0].attributes["_MS.baseType"], "ExceptionData"); + }); + + it("trackEvent", () => { + let testLogger = new TestLogger(); + let logApi = new LogApi(testLogger); + const measurements: { [key: string]: number } = {}; + measurements["test"] = 123; + const telemetry: EventTelemetry = { + name: "TestName", + measurements: measurements, + }; + logApi.trackEvent(telemetry); + const logs = testLogger.logsEmited; + assert.equal(logs.length, 1); + let baseData = JSON.parse(logs[0].body) as TelemetryEventData; + assert.equal(baseData.version, 2); + assert.equal(baseData.name, "TestName"); + assert.equal(baseData.measurements["test"], 123); + assert.equal(logs[0].attributes["_MS.baseType"], "EventData"); + }); + }); +}); diff --git a/test/unitTests/logs/bunyan.tests.ts b/test/unitTests/logs/bunyan.tests.ts index 67f01332b..b5dba4255 100644 --- a/test/unitTests/logs/bunyan.tests.ts +++ b/test/unitTests/logs/bunyan.tests.ts @@ -2,11 +2,12 @@ import * as assert from "assert"; import * as sinon from "sinon"; import { channel } from "diagnostic-channel"; import { bunyan } from "diagnostic-channel-publishers"; - +import { logs } from "@opentelemetry/api-logs"; import { enable, dispose } from "../../../src/logs/diagnostic-channel/bunyan.sub"; import { Util } from "../../../src/shared/util"; -import { ApplicationInsightsClient } from "../../../src"; -import { ApplicationInsightsOptions } from "../../../src/types"; +import { AutoCollectConsole } from "../../../src/logs/console"; +import { LogApi } from "../../../src/logs/api"; + describe("diagnostic-channel/bunyan", () => { let sandbox: sinon.SinonSandbox; @@ -21,16 +22,12 @@ describe("diagnostic-channel/bunyan", () => { }); it("should call trackException for errors", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - bunyan: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackException"); + let logApi = new LogApi(logs.getLogger("testLogger")); + let autoCollect = new AutoCollectConsole(logApi); + autoCollect.enable({ + bunyan: { enabled: true } + }); + const stub = sandbox.stub(logApi, "trackException"); const dummyError = { stack: "Test error" }; const bunyanJson = Util.getInstance().stringify({ err: dummyError }); const errorEvent: bunyan.IBunyanData = { @@ -43,16 +40,12 @@ describe("diagnostic-channel/bunyan", () => { }); it("should call trackTrace for logs", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - bunyan: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackTrace"); + let logApi = new LogApi(logs.getLogger("testLogger")); + let autoCollect = new AutoCollectConsole(logApi); + autoCollect.enable({ + bunyan: { enabled: true } + }); + const stub = sandbox.stub(logApi, "trackTrace"); const logEvent: bunyan.IBunyanData = { result: "test log", level: 50, // Error should still log as MessageData @@ -63,20 +56,13 @@ describe("diagnostic-channel/bunyan", () => { }); it("should notify multiple handlers", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - bunyan: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const secondClient = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackTrace"); - const secondStub = sandbox.stub(secondClient, "trackTrace"); - enable(true, client); - enable(true, secondClient); + let logApi = new LogApi(logs.getLogger("testLogger")); + let secondLogApi = new LogApi(logs.getLogger("testLogger")); + + const stub = sandbox.stub(logApi, "trackTrace"); + const secondStub = sandbox.stub(secondLogApi, "trackTrace"); + enable(true, logApi); + enable(true, secondLogApi); const logEvent: bunyan.IBunyanData = { result: "test log", level: 50, // Error should still log as MessageData diff --git a/test/unitTests/logs/console.tests.ts b/test/unitTests/logs/console.tests.ts index eb3d07d95..717b29409 100644 --- a/test/unitTests/logs/console.tests.ts +++ b/test/unitTests/logs/console.tests.ts @@ -2,10 +2,11 @@ import * as assert from "assert"; import * as sinon from "sinon"; import { channel } from "diagnostic-channel"; import { console } from "diagnostic-channel-publishers"; - +import { logs } from "@opentelemetry/api-logs"; import { enable, dispose } from "../../../src/logs/diagnostic-channel/console.sub"; -import { ApplicationInsightsClient } from "../../../src"; -import { ApplicationInsightsOptions } from "../../../src/types"; +import { LogApi } from "../../../src/logs/api"; +import { AutoCollectConsole } from "../../../src/logs/console"; + describe("AutoCollection/Console", () => { let sandbox: sinon.SinonSandbox; @@ -21,16 +22,12 @@ describe("AutoCollection/Console", () => { describe("#log and #error()", () => { it("should call trackException for errors", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - console: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackException"); + let logApi = new LogApi(logs.getLogger("testLogger")); + let autoCollect = new AutoCollectConsole(logApi); + autoCollect.enable({ + console: { enabled: true } + }); + const stub = sandbox.stub(logApi, "trackException"); const dummyError = new Error("test error"); const errorEvent: console.IConsoleData = { message: dummyError as any, @@ -43,16 +40,12 @@ describe("AutoCollection/Console", () => { }); it("should call trackTrace for logs", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - console: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackTrace"); + let logApi = new LogApi(logs.getLogger("testLogger")); + let autoCollect = new AutoCollectConsole(logApi); + autoCollect.enable({ + console: { enabled: true } + }); + const stub = sandbox.stub(logApi, "trackTrace"); const logEvent: console.IConsoleData = { message: "test log", stderr: true, // should log as MessageData regardless of this setting @@ -63,20 +56,12 @@ describe("AutoCollection/Console", () => { }); it("should notify multiple handlers", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - console: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const secondClient = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackTrace"); - const secondStub = sandbox.stub(secondClient, "trackTrace"); - enable(true, client); - enable(true, secondClient); + let logApi = new LogApi(logs.getLogger("testLogger")); + let secondLogApi = new LogApi(logs.getLogger("testLogger")); + const stub = sandbox.stub(logApi, "trackTrace"); + const secondStub = sandbox.stub(secondLogApi, "trackTrace"); + enable(true, logApi); + enable(true, secondLogApi); const logEvent: console.IConsoleData = { message: "test log", stderr: true, // should log as MessageData regardless of this setting diff --git a/test/unitTests/logs/winston.tests.ts b/test/unitTests/logs/winston.tests.ts index 9a8c98bb3..78c63cf90 100644 --- a/test/unitTests/logs/winston.tests.ts +++ b/test/unitTests/logs/winston.tests.ts @@ -2,10 +2,10 @@ import * as assert from "assert"; import * as sinon from "sinon"; import { channel } from "diagnostic-channel"; import { winston } from "diagnostic-channel-publishers"; - +import { logs } from "@opentelemetry/api-logs"; import { enable, dispose } from "../../../src/logs/diagnostic-channel/winston.sub"; -import { ApplicationInsightsClient } from "../../../src"; -import { ApplicationInsightsOptions } from "../../../src/types"; +import { LogApi } from "../../../src/logs/api"; +import { AutoCollectConsole } from "../../../src/logs/console"; describe("diagnostic-channel/winston", () => { let sandbox: sinon.SinonSandbox; @@ -20,16 +20,12 @@ describe("diagnostic-channel/winston", () => { }); it("should call trackException for errors", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - winston: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackException"); + let logApi = new LogApi(logs.getLogger("testLogger")); + let autoCollect = new AutoCollectConsole(logApi); + autoCollect.enable({ + winston: { enabled: true } + }); + const stub = sandbox.stub(logApi, "trackException"); const dummyError = new Error("test error"); const errorEvent: winston.IWinstonData = { message: dummyError as any, @@ -43,16 +39,12 @@ describe("diagnostic-channel/winston", () => { }); it("should call trackTrace for logs", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - winston: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackTrace"); + let logApi = new LogApi(logs.getLogger("testLogger")); + let autoCollect = new AutoCollectConsole(logApi); + autoCollect.enable({ + winston: { enabled: true } + }); + const stub = sandbox.stub(logApi, "trackTrace"); const logEvent: winston.IWinstonData = { message: "test log", meta: {}, @@ -65,20 +57,12 @@ describe("diagnostic-channel/winston", () => { }); it("should notify multiple handlers", () => { - const config: ApplicationInsightsOptions = { - azureMonitorExporterConfig: { - connectionString: "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;" - }, - logInstrumentationOptions: { - winston: { enabled: true } - } - }; - const client = new ApplicationInsightsClient(config); - const secondClient = new ApplicationInsightsClient(config); - const stub = sandbox.stub(client, "trackTrace"); - const secondStub = sandbox.stub(secondClient, "trackTrace"); - enable(true, client); - enable(true, secondClient); + let logApi = new LogApi(logs.getLogger("testLogger")); + let secondLogApi = new LogApi(logs.getLogger("testLogger")); + const stub = sandbox.stub(logApi, "trackTrace"); + const secondStub = sandbox.stub(secondLogApi, "trackTrace"); + enable(true, logApi); + enable(true, secondLogApi); const logEvent: winston.IWinstonData = { message: "test log", meta: {}, diff --git a/test/unitTests/shim/config.tests.ts b/test/unitTests/shim/config.tests.ts index a62d0c3d0..723eac769 100644 --- a/test/unitTests/shim/config.tests.ts +++ b/test/unitTests/shim/config.tests.ts @@ -2,7 +2,7 @@ import assert = require('assert'); import sinon = require('sinon'); import { TelemetryClient } from '../../..'; import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http'; -const applicationInsights = require('../../../applicationinsights'); +const applicationInsights = require('../../../index'); import azureCoreAuth = require("@azure/core-auth"); import { Logger } from "../../../src/shared/logging" import { DiagLogLevel } from '@opentelemetry/api'; @@ -76,7 +76,7 @@ describe("shim/configuration/config", () => { assert.equal(JSON.stringify(telemetryClient["_options"].extendedMetrics), JSON.stringify({ gc: true, heap: true, loop: true })); assert.equal(telemetryClient["_options"].instrumentationOptions.http.hasOwnProperty("ignoreIncomingRequestHook"), true); assert.equal(telemetryClient["_options"].instrumentationOptions.http.hasOwnProperty("ignoreOutgoingRequestHook"), true); - assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.aadTokenCredential, telemetryClient.config.aadTokenCredential); + assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.credential, telemetryClient.config.aadTokenCredential); assert.equal( JSON.stringify(telemetryClient["_options"].otlpTraceExporterConfig), JSON.stringify({timeoutMillis: 1000}) diff --git a/test/unitTests/shim/telemetryClient.tests.ts b/test/unitTests/shim/telemetryClient.tests.ts index 971e9d6cc..0024709cf 100644 --- a/test/unitTests/shim/telemetryClient.tests.ts +++ b/test/unitTests/shim/telemetryClient.tests.ts @@ -1,23 +1,16 @@ import * as assert from "assert"; import * as sinon from "sinon"; import * as nock from "nock"; -import { ExportResultCode } from "@opentelemetry/core"; -import { LogRecord } from "@opentelemetry/sdk-logs"; -import { - AvailabilityTelemetry, DependencyTelemetry, - EventTelemetry, ExceptionTelemetry, - PageViewTelemetry, RequestTelemetry, Telemetry, - TraceTelemetry -} from "../../../src/declarations/contracts"; +import { Context, trace } from "@opentelemetry/api"; +import { BasicTracerProvider, ReadableSpan, Span, SpanProcessor } from "@opentelemetry/sdk-trace-base"; +import { DependencyTelemetry, RequestTelemetry } from "../../../src/declarations/contracts"; import { TelemetryClient } from "../../../src/shim/telemetryClient"; import { DEFAULT_BREEZE_ENDPOINT } from "../../../src/declarations/constants"; -import { AvailabilityData, MessageData, MonitorDomain, PageViewData, TelemetryEventData, TelemetryExceptionData } from "../../../src/declarations/generated"; + describe("shim/TelemetryClient", () => { let sandbox: sinon.SinonSandbox; let client: TelemetryClient; - let traceExportStub: sinon.SinonStub; - let logExportStub: sinon.SinonStub; before(() => { sandbox = sinon.createSandbox(); @@ -28,6 +21,10 @@ describe("shim/TelemetryClient", () => { nock.disableNetConnect(); }); + beforeEach(() => { + trace.disable(); + }); + afterEach(() => { sandbox.restore(); client.shutdown(); @@ -38,34 +35,32 @@ describe("shim/TelemetryClient", () => { nock.enableNetConnect(); }); - function createTelemetryClient() { - client = new TelemetryClient( - "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333" - ); - client.start(); - traceExportStub = sinon.stub(client.getAzureMonitorOpenTelemetryClient()["_traceHandler"]["_azureExporter"], "export").callsFake( - (data: any, resultCallback: any) => - new Promise((resolve) => { - resultCallback({ - code: ExportResultCode.SUCCESS, - }); - resolve(data); - }) - ); - logExportStub = sinon.stub(client.getAzureMonitorOpenTelemetryClient()["_logHandler"]["_azureExporter"], "export").callsFake( - (data: any, resultCallback: any) => - new Promise((resolve) => { - resultCallback({ - code: ExportResultCode.SUCCESS, - }); - resolve(data); - }) - ); + class TestSpanProcessor implements SpanProcessor { + public spansProcessed: Array = []; + + forceFlush(): Promise { + return Promise.resolve(); + } + onStart(span: Span, parentContext: Context): void { + } + onEnd(span: ReadableSpan): void { + this.spansProcessed.push(span); + } + shutdown(): Promise { + return Promise.resolve(); + } } + describe("#manual track APIs", () => { it("trackDependency http", (done) => { - createTelemetryClient(); + client = new TelemetryClient( + "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333" + ); + let testTracerProvider = new BasicTracerProvider(); + let testProcessor = new TestSpanProcessor(); + testTracerProvider.addSpanProcessor(testProcessor); + testTracerProvider.register(); const telemetry: DependencyTelemetry = { name: "TestName", duration: 2000, //2 seconds @@ -76,11 +71,10 @@ describe("shim/TelemetryClient", () => { success: false, }; client.trackDependency(telemetry); - client - .flush() + testTracerProvider + .forceFlush() .then(() => { - assert.ok(traceExportStub.calledOnce, "Export called"); - const spans = traceExportStub.args[0][0]; + const spans = testProcessor.spansProcessed; assert.equal(spans.length, 1); assert.equal(spans[0].name, "TestName"); assert.equal(spans[0].endTime[0] - spans[0].startTime[0], 2); // hrTime UNIX Epoch time in seconds @@ -97,7 +91,13 @@ describe("shim/TelemetryClient", () => { }); it("trackDependency DB", (done) => { - createTelemetryClient(); + client = new TelemetryClient( + "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333" + ); + let testTracerProvider = new BasicTracerProvider(); + let testProcessor = new TestSpanProcessor(); + testTracerProvider.addSpanProcessor(testProcessor); + testTracerProvider.register(); const telemetry: DependencyTelemetry = { name: "TestName", duration: 2000, //2 seconds @@ -108,11 +108,10 @@ describe("shim/TelemetryClient", () => { success: false, }; client.trackDependency(telemetry); - client - .flush() + testTracerProvider + .forceFlush() .then(() => { - assert.ok(traceExportStub.calledOnce, "Export called"); - const spans = traceExportStub.args[0][0]; + const spans = testProcessor.spansProcessed; assert.equal(spans.length, 1); assert.equal(spans[0].name, "TestName"); assert.equal(spans[0].kind, 2, "Span Kind"); // Outgoing @@ -126,7 +125,13 @@ describe("shim/TelemetryClient", () => { }); it("trackRequest", (done) => { - createTelemetryClient(); + client = new TelemetryClient( + "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333" + ); + let testTracerProvider = new BasicTracerProvider(); + let testProcessor = new TestSpanProcessor(); + testTracerProvider.addSpanProcessor(testProcessor); + testTracerProvider.register(); const telemetry: RequestTelemetry = { id: "123456", name: "TestName", @@ -136,11 +141,10 @@ describe("shim/TelemetryClient", () => { success: false, }; client.trackRequest(telemetry); - client - .flush() + testTracerProvider + .forceFlush() .then(() => { - assert.ok(traceExportStub.calledOnce, "Export called"); - const spans = traceExportStub.args[0][0]; + const spans = testProcessor.spansProcessed; assert.equal(spans.length, 1); assert.equal(spans[0].name, "TestName"); assert.equal(spans[0].endTime[0] - spans[0].startTime[0], 2); // hrTime UNIX Epoch time in seconds @@ -154,167 +158,5 @@ describe("shim/TelemetryClient", () => { done(error); }); }); - - it("_logToEnvelope", () => { - createTelemetryClient(); - const telemetry: Telemetry = { - properties: { "testAttribute": "testValue" } - }; - const data: MonitorDomain = {}; - const logRecord = client["_telemetryToLogRecord"]( - telemetry, - "TestData", - data, - ) as LogRecord; - assert.equal(logRecord.body, "{}"); - assert.equal(logRecord.attributes["testAttribute"], "testValue"); - assert.equal(logRecord.attributes["_MS.baseType"], "TestData"); - }); - - it("trackAvailability", (done) => { - createTelemetryClient(); - const telemetry: AvailabilityTelemetry = { - name: "TestName", - duration: 2000, //2 seconds - id: "testId", - runLocation: "testRunLocation", - message: "testMessage", - success: false, - }; - client.trackAvailability(telemetry); - client.getAzureMonitorOpenTelemetryClient()["_logHandler"].flush() - .then(() => { - assert.ok(logExportStub.calledOnce, "Export called"); - const logs = logExportStub.args[0][0]; - assert.equal(logs.length, 1); - let baseData = JSON.parse(logs[0].body) as AvailabilityData; - assert.equal(baseData.version, 2); - assert.equal(baseData.id, "testId"); - assert.equal(baseData.name, "TestName"); - assert.equal(baseData.duration, "00:00:02.000"); - assert.equal(baseData.success, false); - assert.equal(baseData.runLocation, "testRunLocation"); - assert.equal(baseData.message, "testMessage"); - assert.equal(logs[0].attributes["_MS.baseType"], "AvailabilityData"); - assert.equal(logs[0].instrumentationScope.name, "AzureMonitorLogger"); - done(); - }) - .catch((error: Error) => { - done(error); - }); - }); - - it("trackPageView", (done) => { - createTelemetryClient(); - const telemetry: PageViewTelemetry = { - name: "TestName", - duration: 2000, //2 seconds - id: "testId", - referredUri: "testReferredUri", - url: "testUrl", - }; - client.trackPageView(telemetry); - client.getAzureMonitorOpenTelemetryClient()["_logHandler"].flush() - .then(() => { - assert.ok(logExportStub.calledOnce, "Export called"); - const logs = logExportStub.args[0][0]; - assert.equal(logs.length, 1); - let baseData = JSON.parse(logs[0].body) as PageViewData; - assert.equal(baseData.version, 2); - assert.equal(baseData.id, "testId"); - assert.equal(baseData.name, "TestName"); - assert.equal(baseData.duration, "00:00:02.000"); - assert.equal(baseData.referredUri, "testReferredUri"); - assert.equal(baseData.url, "testUrl"); - assert.equal(logs[0].attributes["_MS.baseType"], "PageViewData"); - assert.equal(logs[0].instrumentationScope.name, "AzureMonitorLogger"); - done(); - }) - .catch((error: Error) => { - done(error); - }); - }); - - it("trackTrace", (done) => { - createTelemetryClient(); - const telemetry: TraceTelemetry = { - message: "testMessage", - severity: "Information", - }; - client.trackTrace(telemetry); - client.getAzureMonitorOpenTelemetryClient()["_logHandler"].flush() - .then(() => { - assert.ok(logExportStub.calledOnce, "Export called"); - const logs = logExportStub.args[0][0]; - assert.equal(logs.length, 1); - let baseData = JSON.parse(logs[0].body) as MessageData; - assert.equal(baseData.version, 2); - assert.equal(baseData.message, "testMessage"); - assert.equal(baseData.severityLevel, "Information"); - assert.equal(logs[0].attributes["_MS.baseType"], "MessageData"); - assert.equal(logs[0].instrumentationScope.name, "AzureMonitorLogger"); - done(); - }) - .catch((error: Error) => { - done(error); - }); - }); - - it("trackException", (done) => { - createTelemetryClient(); - const measurements: { [key: string]: number } = {}; - measurements["test"] = 123; - const telemetry: ExceptionTelemetry = { - exception: new Error("TestError"), - severity: "Critical", - measurements: measurements, - }; - client.trackException(telemetry); - client.getAzureMonitorOpenTelemetryClient()["_logHandler"].flush() - .then(() => { - assert.ok(logExportStub.calledOnce, "Export called"); - const logs = logExportStub.args[0][0]; - assert.equal(logs.length, 1); - let baseData = JSON.parse(logs[0].body) as TelemetryExceptionData; - assert.equal(baseData.version, 2); - assert.equal(baseData.severityLevel, "Critical"); - assert.equal(baseData.exceptions[0].message, "TestError"); - assert.equal(baseData.exceptions[0].typeName, "Error"); - assert.equal(baseData.measurements["test"], 123); - assert.equal(logs[0].attributes["_MS.baseType"], "ExceptionData"); - assert.equal(logs[0].instrumentationScope.name, "AzureMonitorLogger"); - done(); - }) - .catch((error: Error) => { - done(error); - }); - }); - - it("trackEvent", (done) => { - createTelemetryClient(); - const measurements: { [key: string]: number } = {}; - measurements["test"] = 123; - const telemetry: EventTelemetry = { - name: "TestName", - measurements: measurements, - }; - client.trackEvent(telemetry); - client.getAzureMonitorOpenTelemetryClient()["_logHandler"].flush() - .then(() => { - assert.ok(logExportStub.calledOnce, "Export called"); - const logs = logExportStub.args[0][0]; - assert.equal(logs.length, 1); - let baseData = JSON.parse(logs[0].body) as TelemetryEventData; - assert.equal(baseData.version, 2); - assert.equal(baseData.name, "TestName"); - assert.equal(baseData.measurements["test"], 123); - assert.equal(logs[0].attributes["_MS.baseType"], "EventData"); - assert.equal(logs[0].instrumentationScope.name, "AzureMonitorLogger"); - done(); - }) - .catch((error: Error) => { - done(error); - }); - }); }); }); From 03dc68bd145c603b9c4e85bf07f95b3e2b5945c4 Mon Sep 17 00:00:00 2001 From: Hector Date: Thu, 24 Aug 2023 15:35:29 -0700 Subject: [PATCH 05/14] Update --- index.ts | 2 +- src/logs/exceptions.ts | 4 +- src/shared/configuration/internal.ts | 103 ---- src/shared/util/configHelper.ts | 30 +- ...tioninsights.ts => applicationinsights.ts} | 110 ++-- src/shim/config.ts | 300 +++++++++-- .../{shim-jsonConfig.ts => jsonConfig.ts} | 46 +- src/shim/{NodeClient.ts => nodeClient.ts} | 2 +- src/shim/telemetryClient.ts | 464 ++-------------- src/shim/types.ts | 19 - test/unitTests/shim/config.json | 41 +- test/unitTests/shim/config.tests.ts | 106 ++-- .../shim/correlationContextManger.tests.ts | 500 +++++++++--------- test/unitTests/shim/jsonConfig.tests.ts | 287 ++++++---- 14 files changed, 867 insertions(+), 1147 deletions(-) delete mode 100644 src/shared/configuration/internal.ts rename src/shim/{shim-applicationinsights.ts => applicationinsights.ts} (73%) rename src/shim/{shim-jsonConfig.ts => jsonConfig.ts} (80%) rename src/shim/{NodeClient.ts => nodeClient.ts} (95%) diff --git a/index.ts b/index.ts index 57fa1eda1..31be6e2e7 100644 --- a/index.ts +++ b/index.ts @@ -11,4 +11,4 @@ export { HttpRequest, TelemetryClient, dispose, -} from "./src/shim/shim-applicationinsights"; \ No newline at end of file +} from "./src/shim/applicationinsights"; \ No newline at end of file diff --git a/src/logs/exceptions.ts b/src/logs/exceptions.ts index e9c9ce9ba..3e4970f33 100644 --- a/src/logs/exceptions.ts +++ b/src/logs/exceptions.ts @@ -1,7 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. +import { logs } from "@opentelemetry/api-logs"; import { Util } from "../shared/util"; import { LogApi } from "./api"; +import { LoggerProvider } from "@opentelemetry/sdk-logs"; type ExceptionHandle = "uncaughtExceptionMonitor" | "uncaughtException" | "unhandledRejection"; const UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME: ExceptionHandle = "uncaughtExceptionMonitor"; @@ -93,7 +95,7 @@ export class AutoCollectExceptions { ) { if (this._client) { this._client.trackException({ exception: error }); - this._client.flush(); + (logs.getLoggerProvider() as LoggerProvider).forceFlush(); // only rethrow when we are the only listener if (reThrow && name && process.listeners(name as any).length === 1) { // eslint-disable-next-line no-console diff --git a/src/shared/configuration/internal.ts b/src/shared/configuration/internal.ts deleted file mode 100644 index db7239337..000000000 --- a/src/shared/configuration/internal.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { JsonConfig } from "./jsonConfig"; -import { Logger } from "../logging"; -import { ApplicationInsightsOptions, ExtendedMetricType, LogInstrumentationsConfig } from "../../types"; - - -export class InternalConfig implements ApplicationInsightsOptions { - private _logInstrumentations: LogInstrumentationsConfig; - public enableAutoCollectExceptions: boolean; - public extendedMetrics: { [type: string]: boolean }; - - constructor(options?: ApplicationInsightsOptions) { - this.extendedMetrics = {}; - // Load config values from env variables and JSON if available - this._loadDefaultValues(); - this._mergeConfig(); - // This will take precedence over other settings - if (options) { - this.enableAutoCollectExceptions = - options.enableAutoCollectExceptions || this.enableAutoCollectExceptions; - this.logInstrumentations = options.logInstrumentations || this.logInstrumentations; - } - } - - public set logInstrumentations(value: LogInstrumentationsConfig) { - this._logInstrumentations = Object.assign(this._logInstrumentations, value); - } - - public get logInstrumentations(): LogInstrumentationsConfig { - return this._logInstrumentations; - } - - /** - * Get Instrumentation Key - * @deprecated This method should not be used - */ - public getDisableStatsbeat(): boolean { - return false; - } - - private _loadDefaultValues() { - this.enableAutoCollectExceptions = - this.enableAutoCollectExceptions !== undefined - ? this.enableAutoCollectExceptions - : true; - this._logInstrumentations = { - console: { enabled: false }, - bunyan: { enabled: false }, - winston: { enabled: false }, - }; - this.extendedMetrics[ExtendedMetricType.gc] = false; - this.extendedMetrics[ExtendedMetricType.heap] = false; - this.extendedMetrics[ExtendedMetricType.loop] = false; - } - - private _mergeConfig() { - try { - const jsonConfig = JsonConfig.getInstance(); - this.enableAutoCollectExceptions = - jsonConfig.enableAutoCollectExceptions !== undefined - ? jsonConfig.enableAutoCollectExceptions - : this.enableAutoCollectExceptions; - if (jsonConfig.logInstrumentations) { - if ( - jsonConfig.logInstrumentations.console && - jsonConfig.logInstrumentations.console.enabled !== undefined - ) { - this.logInstrumentations.console.enabled = - jsonConfig.logInstrumentations.console.enabled; - } - if ( - jsonConfig.logInstrumentations.bunyan && - jsonConfig.logInstrumentations.bunyan.enabled !== undefined - ) { - this.logInstrumentations.bunyan.enabled = - jsonConfig.logInstrumentations.bunyan.enabled; - } - if ( - jsonConfig.logInstrumentations.winston && - jsonConfig.logInstrumentations.winston.enabled !== undefined - ) { - this.logInstrumentations.winston.enabled = - jsonConfig.logInstrumentations.winston.enabled; - } - } - if (jsonConfig.extendedMetrics) { - if (jsonConfig.extendedMetrics[ExtendedMetricType.gc] !== undefined) { - this.extendedMetrics[ExtendedMetricType.gc] = - jsonConfig.extendedMetrics[ExtendedMetricType.gc]; - } - if (jsonConfig.extendedMetrics[ExtendedMetricType.heap] !== undefined) { - this.extendedMetrics[ExtendedMetricType.heap] = - jsonConfig.extendedMetrics[ExtendedMetricType.heap]; - } - if (jsonConfig.extendedMetrics[ExtendedMetricType.loop] !== undefined) { - this.extendedMetrics[ExtendedMetricType.loop] = - jsonConfig.extendedMetrics[ExtendedMetricType.loop]; - } - } - } catch (error) { - Logger.getInstance().error("Failed to load JSON config file values.", error); - } - } -} diff --git a/src/shared/util/configHelper.ts b/src/shared/util/configHelper.ts index f962c8491..bad4860fa 100644 --- a/src/shared/util/configHelper.ts +++ b/src/shared/util/configHelper.ts @@ -77,42 +77,20 @@ export function setAutoCollectConsole(options: ApplicationInsightsOptions, value } export function enableAutoCollectExternalLoggers(options: ApplicationInsightsOptions, value: boolean) { - options.logInstrumentations = { - ...options.logInstrumentations, + options.logInstrumentationOptions = { + ...options.logInstrumentationOptions, winston: { enabled: value }, bunyan: { enabled: value }, } } export function enableAutoCollectConsole(options: ApplicationInsightsOptions, value: boolean) { - options.logInstrumentations = { - ...options.logInstrumentations, + options.logInstrumentationOptions = { + ...options.logInstrumentationOptions, console: { enabled: value }, } } -export function enableAutoCollectExtendedMetrics(options: ApplicationInsightsOptions, value: boolean) { - options.extendedMetrics = { - [ExtendedMetricType.gc]: value, - [ExtendedMetricType.heap]: value, - [ExtendedMetricType.loop]: value, - } -} - -export function setMaxBatchIntervalMs(options: ApplicationInsightsOptions, value: number) { - options.otlpTraceExporterConfig = { ...options.otlpTraceExporterConfig, timeoutMillis: value }; - options.otlpMetricExporterConfig = { ...options.otlpMetricExporterConfig, timeoutMillis: value }; - options.otlpLogExporterConfig = { ...options.otlpLogExporterConfig, timeoutMillis: value }; -} - -export function setProxyUrl(options: ApplicationInsightsOptions, proxyUrlString: string) { - const proxyUrl = new URL(proxyUrlString); - options.azureMonitorExporterConfig.proxyOptions = { - host: proxyUrl.hostname, - port: Number(proxyUrl.port), - } -} - export function setExtendedMetricDisablers(options: ApplicationInsightsOptions, disablers: string) { const extendedMetricDisablers: string[] = disablers.split(","); for (const extendedMetricDisabler of extendedMetricDisablers) { diff --git a/src/shim/shim-applicationinsights.ts b/src/shim/applicationinsights.ts similarity index 73% rename from src/shim/shim-applicationinsights.ts rename to src/shim/applicationinsights.ts index 696271226..976ade889 100644 --- a/src/shim/shim-applicationinsights.ts +++ b/src/shim/applicationinsights.ts @@ -1,16 +1,12 @@ import * as http from "http"; import * as azureFunctionsTypes from "@azure/functions"; -import { DiagLogLevel, SpanContext } from "@opentelemetry/api"; +import { SpanContext } from "@opentelemetry/api"; import { Span } from "@opentelemetry/sdk-trace-base"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; import { CorrelationContextManager } from "./correlationContextManager"; -import { Logger } from "../shared/logging"; import { ICorrelationContext, HttpRequest, DistributedTracingModes } from "./types"; import { TelemetryClient } from "./telemetryClient"; import * as Contracts from "../declarations/contracts"; -import { ApplicationInsightsOptions } from "../types"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; -import ConfigHelper = require("../shared/util/configHelper"); + // We export these imports so that SDK users may use these classes directly. // They're exposed using "export import" so that types are passed along as expected @@ -22,16 +18,8 @@ export { Contracts, DistributedTracingModes, HttpRequest, TelemetryClient }; */ export let defaultClient: TelemetryClient; -/** - * Flag to let the TelemetryClient know that setup has been called from the shim - */ -export let _setupCalled = false; // export let liveMetricsClient: QuickPulseStateManager; - -let _setupString: string | undefined; -let _options: ApplicationInsightsOptions; - /** * Initializes the default client. Should be called after setting * configuration options. @@ -43,15 +31,7 @@ let _options: ApplicationInsightsOptions; * and start the SDK. */ export function setup(setupString?: string) { - _setupCalled = true; - // Save the setup string and create a config to modify with other functions in this file - _setupString = setupString; - if (!_options) { - _options = { azureMonitorExporterConfig: { connectionString: _setupString } }; - } else { - Logger.getInstance().info("Cannot run applicationinsights.setup() more than once."); - } - defaultClient = new TelemetryClient(_options); + defaultClient = new TelemetryClient(setupString); return Configuration; } @@ -62,13 +42,7 @@ export function setup(setupString?: string) { * @returns {ApplicationInsights} this class */ export function start() { - // Creates a new TelemetryClient that uses the _config we configure via the other functions in this file - const httpOptions: HttpInstrumentationConfig | undefined = _options?.instrumentationOptions?.http; - if (httpOptions?.ignoreIncomingRequestHook && httpOptions?.ignoreOutgoingRequestHook) { - _options.instrumentationOptions.http.enabled = false; - Logger.getInstance().info("Both ignoreIncomingRequestHook and ignoreOutgoingRequestHook are set to true. Disabling http instrumentation."); - } - defaultClient.start(_options); + defaultClient.initialize(); return Configuration; } @@ -122,7 +96,10 @@ export class Configuration { */ // eslint-disable-next-line @typescript-eslint/no-unused-vars public static setDistributedTracingMode(value: number) { - Logger.getInstance().info("Setting distributedTracingMode will not affect correlation headers as only W3C is currently supported."); + if (defaultClient) { + defaultClient.config.distributedTracingMode = value; + } + return Configuration; } /** @@ -132,12 +109,9 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectConsole(value: boolean, collectConsoleLog = false) { - if (_options) { - _options.logInstrumentationOptions = { - bunyan: { enabled: value }, - winston: { enabled: value }, - console: { enabled: collectConsoleLog }, - } + if (defaultClient) { + defaultClient.config.enableAutoCollectExternalLoggers = value; + defaultClient.config.enableAutoCollectConsole = collectConsoleLog; } return Configuration; } @@ -148,8 +122,8 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectExceptions(value: boolean) { - if (_options) { - _options.enableAutoCollectExceptions = value; + if (defaultClient) { + defaultClient.config.enableAutoCollectExceptions = value; } return Configuration; } @@ -161,7 +135,9 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectPerformance(value: boolean, collectExtendedMetrics: any) { - ConfigHelper.setAutoCollectPerformance(_options, value, collectExtendedMetrics); + if (defaultClient) { + defaultClient.config.enableAutoCollectPerformance = value; + } return Configuration; } @@ -171,9 +147,8 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectPreAggregatedMetrics(value: boolean) { - if (_options) { - // TODO: Add support to disable - process.env["APPLICATION_INSIGHTS_NO_STANDARD_METRICS "] = "disable"; + if (defaultClient) { + defaultClient.config.enableAutoCollectPreAggregatedMetrics = value; } return Configuration; } @@ -184,7 +159,9 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectHeartbeat(value: boolean) { - Logger.getInstance().info("Heartbeat is not implemented and this method is a no-op."); + if (defaultClient) { + defaultClient.config.enableAutoCollectHeartbeat = value; + } return Configuration; } @@ -195,7 +172,10 @@ export class Configuration { * @returns {Configuration} this class */ public static enableWebInstrumentation(value: boolean, WebSnippetConnectionString?: string) { - Logger.getInstance().info("Web snippet injection is not implemented and this method is a no-op."); + if (defaultClient) { + defaultClient.config.enableWebInstrumentation = value; + defaultClient.config.webInstrumentationConnectionString = WebSnippetConnectionString; + } return Configuration; } @@ -205,7 +185,9 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectRequests(value: boolean) { - ConfigHelper.setAutoCollectRequests(_options, value); + if (defaultClient) { + defaultClient.config.enableAutoCollectRequests = value; + } return Configuration; } @@ -215,7 +197,9 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectDependencies(value: boolean) { - ConfigHelper.setAutoCollectDependencies(_options, value); + if (defaultClient) { + defaultClient.config.enableAutoCollectDependencies = value; + } return Configuration; } @@ -226,11 +210,9 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoDependencyCorrelation(value: boolean, useAsyncHooks?: boolean) { - if (!value) { - CorrelationContextManager.disable(); - } - if (useAsyncHooks === false) { - Logger.getInstance().warn("The use of non async hooks is no longer supported."); + if (defaultClient) { + defaultClient.config.enableAutoDependencyCorrelation = value; + defaultClient.config.enableUseAsyncHooks = useAsyncHooks; } return Configuration; } @@ -247,7 +229,9 @@ export class Configuration { */ public static setUseDiskRetryCaching(value: boolean, resendInterval?: number, maxBytesOnDisk?: number) { if (defaultClient) { - defaultClient.setUseDiskRetryCaching(value, resendInterval, maxBytesOnDisk); + defaultClient.config.enableUseDiskRetryCaching = value; + defaultClient.config.enableResendInterval = resendInterval; + defaultClient.config.enableMaxBytesOnDisk = maxBytesOnDisk; } return Configuration; } @@ -259,16 +243,10 @@ export class Configuration { * @returns {Configuration} this class */ public static setInternalLogging(enableDebugLogger = false, enableWarningLogger = true) { - if (enableDebugLogger) { - Logger.getInstance().updateLogLevel(DiagLogLevel.DEBUG); - return Configuration; - } - if (enableWarningLogger) { - Logger.getInstance().updateLogLevel(DiagLogLevel.WARN); - return Configuration; + if (defaultClient) { + defaultClient.config.enableInternalDebugLogging = enableDebugLogger; + defaultClient.config.enableInternalWarningLogging = enableWarningLogger; } - // Default - Logger.getInstance().updateLogLevel(DiagLogLevel.INFO); return Configuration; } @@ -278,7 +256,9 @@ export class Configuration { * @returns {Configuration} this class */ public static setAutoCollectIncomingRequestAzureFunctions(value: boolean) { - Logger.getInstance().info("Auto collect incoming request is not implemented and this method is a no-op."); + if (defaultClient) { + defaultClient.config.enableAutoCollectIncomingRequestAzureFunctions = value; + } return Configuration; } @@ -287,7 +267,9 @@ export class Configuration { * @param enable if true, enables communication with the live metrics service */ public static setSendLiveMetrics(enable = false) { - Logger.getInstance().info("Live Metrics is not implemented and this method is a no-op."); + if (defaultClient) { + defaultClient.config.enableSendLiveMetrics = enable; + } return Configuration; } } diff --git a/src/shim/config.ts b/src/shim/config.ts index 20253302e..f4ff3a27a 100644 --- a/src/shim/config.ts +++ b/src/shim/config.ts @@ -1,12 +1,17 @@ -import { DistributedTracingModes, IConfig, IDisabledExtendedMetrics, IWebInstrumentationConfig } from "./types"; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for details. import http = require("http"); import https = require("https"); import azureCoreAuth = require("@azure/core-auth"); +import { DiagLogLevel } from "@opentelemetry/api"; +import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; +import { DistributedTracingModes, IConfig, IDisabledExtendedMetrics, IWebInstrumentationConfig } from "./types"; import { Logger } from "../shared/logging"; -import constants = require("../declarations/constants"); +import { ShimJsonConfig } from "./jsonConfig"; +import { ApplicationInsightsOptions, ExtendedMetricType } from "../types"; -class config implements IConfig { +class Config implements IConfig { public static ENV_azurePrefix = "APPSETTING_"; // Azure adds this prefix to all environment variables public static ENV_iKey = "APPINSIGHTS_INSTRUMENTATIONKEY"; // This key is provided in the readme @@ -14,12 +19,12 @@ class config implements IConfig { public static ENV_profileQueryEndpoint = "APPINSIGHTS_PROFILE_QUERY_ENDPOINT"; public static ENV_quickPulseHost = "APPINSIGHTS_QUICKPULSE_HOST"; + public connectionString: string; public endpointUrl: string; public maxBatchSize: number; public maxBatchIntervalMs: number; public disableAppInsights: boolean; public samplingPercentage: number; - public correlationIdRetryIntervalMs: number; public correlationHeaderExcludedDomains: string[]; public proxyHttpUrl: string; public proxyHttpsUrl: string; @@ -49,36 +54,24 @@ class config implements IConfig { public enableInternalDebugLogging: boolean; public enableInternalWarningLogging: boolean; public disableAllExtendedMetrics: boolean; - public disableStatsbeat: boolean; // TODO: Implement this as a way to shutoff statsbeat public extendedMetricDisablers: string; - public quickPulseHost: string; // TODO: This is not noted in the README + public quickPulseHost: string; public enableWebInstrumentation: boolean; public webInstrumentationConfig: IWebInstrumentationConfig[]; public webInstrumentationSrc: string; + public webInstrumentationConnectionString?: string; public noPatchModules: string; - public noHttpAgentKeepAlive: boolean; - - // To Be deprecated. - public enableAutoWebSnippetInjection: boolean; - - public correlationId: string; // TODO: Should be private NOTE: This is not noted in the README - private _connectionString: string; - private _endpointBase: string = constants.DEFAULT_BREEZE_ENDPOINT; - private _instrumentationKey: string; - public _webInstrumentationConnectionString: string; - - // Added to maintain parity between JSON config and setting manually in the shim - public noDiagnosticChannel: boolean; + /** + * Creates a new Config instance + * @param setupString Connection String, instrumentationKey is no longer supported here + */ constructor(setupString?: string) { - this.instrumentationKey = setupString; + // Load config values from env variables and JSON if available + this._mergeConfig(); - this.maxBatchSize = this.maxBatchSize || 250; - this.maxBatchIntervalMs = this.maxBatchIntervalMs || 15000; - this.disableAppInsights = this.disableAppInsights || false; - this.samplingPercentage = this.samplingPercentage || 100; - this.correlationIdRetryIntervalMs = this.correlationIdRetryIntervalMs || 30 * 1000; + this.connectionString = setupString; // this.enableWebInstrumentation = this.enableWebInstrumentation || this.enableAutoWebSnippetInjection || false; this.webInstrumentationConfig = this.webInstrumentationConfig || null; // this.enableAutoWebSnippetInjection = this.enableWebInstrumentation; @@ -95,35 +88,246 @@ class config implements IConfig { ]; this.ignoreLegacyHeaders = true; - this.webInstrumentationConnectionString = this.webInstrumentationConnectionString || this._webInstrumentationConnectionString || ""; - this.webSnippetConnectionString = this.webInstrumentationConnectionString; - } - - public set instrumentationKey(iKey: string) { - if (!config._validateInstrumentationKey(iKey)) { - Logger.getInstance().warn("An invalid instrumentation key was provided. There may be resulting telemetry loss", this.instrumentationKey); - } - this._instrumentationKey = iKey; + this.webInstrumentationConnectionString = this.webInstrumentationConnectionString || ""; } - public get instrumentationKey(): string { - return this._instrumentationKey; + private _mergeConfig() { + let jsonConfig = ShimJsonConfig.getInstance(); + this.connectionString = jsonConfig.connectionString; + this.correlationHeaderExcludedDomains = jsonConfig.correlationHeaderExcludedDomains; + this.disableAllExtendedMetrics = jsonConfig.disableAllExtendedMetrics; + this.disableAppInsights = jsonConfig.disableAppInsights; + this.distributedTracingMode = jsonConfig.distributedTracingMode; + this.enableAutoCollectConsole = jsonConfig.enableAutoCollectConsole; + this.enableLoggerErrorToTrace = jsonConfig.enableLoggerErrorToTrace; + this.enableAutoCollectDependencies = jsonConfig.enableAutoCollectDependencies; + this.enableAutoCollectIncomingRequestAzureFunctions = jsonConfig.enableAutoCollectIncomingRequestAzureFunctions; + this.enableAutoCollectExceptions = jsonConfig.enableAutoCollectExceptions; + this.enableAutoCollectExtendedMetrics = jsonConfig.enableAutoCollectExtendedMetrics; + this.enableAutoCollectExternalLoggers = jsonConfig.enableAutoCollectExternalLoggers; + this.enableAutoCollectHeartbeat = jsonConfig.enableAutoCollectHeartbeat; + this.enableAutoCollectPerformance = jsonConfig.enableAutoCollectPerformance; + this.enableAutoCollectPreAggregatedMetrics = jsonConfig.enableAutoCollectPreAggregatedMetrics; + this.enableAutoCollectRequests = jsonConfig.enableAutoCollectRequests; + this.enableAutoDependencyCorrelation = jsonConfig.enableAutoDependencyCorrelation; + this.enableInternalDebugLogging = jsonConfig.enableInternalDebugLogging; + this.enableInternalWarningLogging = jsonConfig.enableInternalWarningLogging; + this.enableResendInterval = jsonConfig.enableResendInterval; + this.enableMaxBytesOnDisk = jsonConfig.enableMaxBytesOnDisk; + this.enableSendLiveMetrics = jsonConfig.enableSendLiveMetrics; + this.enableUseAsyncHooks = jsonConfig.enableUseAsyncHooks; + this.enableUseDiskRetryCaching = jsonConfig.enableUseDiskRetryCaching; + this.endpointUrl = jsonConfig.endpointUrl; + this.extendedMetricDisablers = jsonConfig.extendedMetricDisablers; + this.ignoreLegacyHeaders = jsonConfig.ignoreLegacyHeaders; + this.maxBatchIntervalMs = jsonConfig.maxBatchIntervalMs; + this.maxBatchSize = jsonConfig.maxBatchSize; + this.proxyHttpUrl = jsonConfig.proxyHttpUrl; + this.proxyHttpsUrl = jsonConfig.proxyHttpsUrl; + this.quickPulseHost = jsonConfig.quickPulseHost; + this.samplingPercentage = jsonConfig.samplingPercentage; + this.enableWebInstrumentation = jsonConfig.enableWebInstrumentation; + this.webInstrumentationConnectionString = jsonConfig.webInstrumentationConnectionString; + this.webInstrumentationConfig = jsonConfig.webInstrumentationConfig; + this.webInstrumentationSrc = jsonConfig.webInstrumentationSrc; } - public set webSnippetConnectionString(connectionString: string) { - this._webInstrumentationConnectionString = connectionString; - } + /** + * Parse the config property to set the appropriate values on the ApplicationInsightsOptions + */ + public parseConfig(): ApplicationInsightsOptions { + let options: ApplicationInsightsOptions = { + azureMonitorExporterConfig: { + connectionString: this.connectionString + }, + instrumentationOptions: {}, + logInstrumentationOptions: {}, + otlpTraceExporterConfig: {}, + otlpMetricExporterConfig: {}, + otlpLogExporterConfig: {}, + extendedMetrics: {}, + }; + if (this.samplingPercentage) { + options.samplingRatio = this.samplingPercentage / 100; + } + options.instrumentationOptions = { + ...options.instrumentationOptions, + http: { + ...options.instrumentationOptions?.http, + ignoreOutgoingUrls: this.correlationHeaderExcludedDomains, /// TODO: Deprecated configuration + } as HttpInstrumentationConfig, + } + if (this.aadTokenCredential) { + options.azureMonitorExporterConfig.credential = this.aadTokenCredential; + } + if (typeof (this.enableAutoCollectConsole) === "boolean") { + const setting: boolean = this.enableAutoCollectConsole; + options.logInstrumentationOptions = { + ...options.logInstrumentationOptions, + console: { enabled: setting }, + }; + } + if (typeof (this.enableAutoCollectExceptions) === "boolean") { + options.enableAutoCollectExceptions = this.enableAutoCollectExceptions; + } - public get webSnippetConnectionString(): string { - return this._webInstrumentationConnectionString; - } + if (this.enableAutoCollectDependencies === false && this.enableAutoCollectRequests === false) { + options.instrumentationOptions.http.enabled = false; + } + else { + if (typeof (this.enableAutoCollectDependencies) === "boolean") { + if (this.enableAutoCollectDependencies === false) { + options.instrumentationOptions = { + http: { + ...options.instrumentationOptions?.http, + enabled: true, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + ignoreOutgoingRequestHook: (request: http.RequestOptions) => true, + } as HttpInstrumentationConfig + }; + } + } + if (typeof (this.enableAutoCollectRequests) === "boolean") { + if (this.enableAutoCollectRequests === false) { + options.instrumentationOptions = { + http: { + ...options.instrumentationOptions?.http, + enabled: true, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + ignoreIncomingRequestHook: (request: http.RequestOptions) => true, + } as HttpInstrumentationConfig + }; + } + } + } + if (typeof (this.enableAutoCollectPerformance) === "boolean") { + options.enableAutoCollectPerformance = this.enableAutoCollectPerformance; + } + if (typeof (this.enableAutoCollectExternalLoggers) === "boolean") { + options.logInstrumentationOptions = { + ...options.logInstrumentationOptions, + winston: { enabled: this.enableAutoCollectExternalLoggers }, + bunyan: { enabled: this.enableAutoCollectExternalLoggers }, + } + } + if (this.enableUseDiskRetryCaching === false) { + options.azureMonitorExporterConfig.disableOfflineStorage = true; + } + if (this.proxyHttpUrl || this.proxyHttpsUrl) { + try { + const proxyUrl = new URL(this.proxyHttpsUrl || this.proxyHttpUrl); + options.azureMonitorExporterConfig.proxyOptions = { + host: proxyUrl.hostname, + port: Number(proxyUrl.port), + }; + } + catch (err) { } + } + if (this.maxBatchIntervalMs) { + options.otlpTraceExporterConfig = { ...options.otlpTraceExporterConfig, timeoutMillis: this.maxBatchIntervalMs }; + options.otlpMetricExporterConfig = { ...options.otlpMetricExporterConfig, timeoutMillis: this.maxBatchIntervalMs }; + options.otlpLogExporterConfig = { ...options.otlpLogExporterConfig, timeoutMillis: this.maxBatchIntervalMs }; + } + if (typeof (this.enableInternalDebugLogging) === "boolean") { + Logger.getInstance().updateLogLevel(DiagLogLevel.DEBUG); + } + if (typeof (this.enableInternalWarningLogging) === "boolean") { + Logger.getInstance().updateLogLevel(DiagLogLevel.WARN); + } + if (this.enableAutoCollectPreAggregatedMetrics === false) { + process.env["APPLICATION_INSIGHTS_NO_STANDARD_METRICS"] = "disable"; + } + // NATIVE METRICS + if (typeof (this.enableAutoCollectExtendedMetrics) === "boolean") { + options.extendedMetrics = { + [ExtendedMetricType.gc]: this.enableAutoCollectExtendedMetrics, + [ExtendedMetricType.heap]: this.enableAutoCollectExtendedMetrics, + [ExtendedMetricType.loop]: this.enableAutoCollectExtendedMetrics, + }; + } + // Disable specific native metrics if provided + if (this.extendedMetricDisablers) { + const extendedMetricDisablers: string[] = this.extendedMetricDisablers.split(","); + for (const extendedMetricDisabler of extendedMetricDisablers) { + if (extendedMetricDisabler === "gc") { + options.extendedMetrics = { + ...options.extendedMetrics, + [ExtendedMetricType.gc]: false + }; + } + if (extendedMetricDisabler === "heap") { + options.extendedMetrics = { + ...options.extendedMetrics, + [ExtendedMetricType.heap]: false + }; + } + if (extendedMetricDisabler === "loop") { + options.extendedMetrics = { + ...options.extendedMetrics, + [ExtendedMetricType.loop]: false + }; + } + } + } + // Disable all native metrics + if (this.disableAllExtendedMetrics === true) { + options.extendedMetrics = { + ...options.extendedMetrics, + [ExtendedMetricType.gc]: false, + [ExtendedMetricType.heap]: false, + [ExtendedMetricType.loop]: false, + }; + } - public set webInstrumentationConnectionString(connectionString: string) { - this._webInstrumentationConnectionString = connectionString; - } + // NOT SUPPORTED CONFIGURATION OPTIONS + if (this.disableAppInsights) { + Logger.getInstance().warn("disableAppInsights cohnfiguration no longer supported."); + } + if (this.enableAutoCollectHeartbeat) { + Logger.getInstance().warn("Heartbeat metris are no longer supported."); + } + if (this.enableAutoDependencyCorrelation === false) { + Logger.getInstance().warn("Auto dependency correlation cannot be turned off anymore."); + } + if (typeof (this.enableAutoCollectIncomingRequestAzureFunctions) === "boolean") { + Logger.getInstance().warn("Auto request generation in Azure Functions is no longer supported."); + } + if (typeof (this.enableSendLiveMetrics) === "boolean") { + Logger.getInstance().warn("Live Metrics is currently not supported."); + } + if (this.enableUseAsyncHooks === false) { + Logger.getInstance().warn("The use of non async hooks is no longer supported."); + } + if (typeof (this.distributedTracingMode) === "boolean") { + if (this.distributedTracingMode == DistributedTracingModes.AI) { + Logger.getInstance().warn("AI only distributed tracing mode is no longer supported."); + } + } + if (this.enableResendInterval) { + Logger.getInstance().warn("The resendInterval configuration option is not supported by the shim."); + } + if (this.enableMaxBytesOnDisk) { + Logger.getInstance().warn("The maxBatchOnDisk configuration option is not supported by the shim."); + } + if (this.ignoreLegacyHeaders === false) { + Logger.getInstance().warn("LegacyHeaders are not supported by the shim."); + } - public get webInstrumentationConnectionString() { - return this._webInstrumentationConnectionString; + if (this.maxBatchSize) { + Logger.getInstance().warn("The maxBatchSize configuration option is not supported by the shim."); + } + if (this.enableLoggerErrorToTrace) { + Logger.getInstance().warn("The enableLoggerErrorToTrace configuration option is not supported by the shim."); + } + if (this.httpAgent || this.httpsAgent) { + Logger.getInstance().warn("The httpAgent and httpsAgent configuration options are not supported by the shim."); + } + if ( + this.enableWebInstrumentation || this.webInstrumentationConfig || this.webInstrumentationSrc || this.webInstrumentationConnectionString + ) { + Logger.getInstance().warn("The webInstrumentation configuration options are not supported by the shim."); + } + return options; } /** @@ -152,4 +356,4 @@ class config implements IConfig { } } -export = config; \ No newline at end of file +export = Config; \ No newline at end of file diff --git a/src/shim/shim-jsonConfig.ts b/src/shim/jsonConfig.ts similarity index 80% rename from src/shim/shim-jsonConfig.ts rename to src/shim/jsonConfig.ts index a0aeb4ad1..e2906ea90 100644 --- a/src/shim/shim-jsonConfig.ts +++ b/src/shim/jsonConfig.ts @@ -8,39 +8,34 @@ import * as azureCoreAuth from "@azure/core-auth"; const ENV_CONFIGURATION_FILE = "APPLICATIONINSIGHTS_CONFIGURATION_FILE"; const ENV_CONTENT = "APPLICATIONINSIGHTS_CONFIGURATION_CONTENT"; - const ENV_connectionString = "APPLICATIONINSIGHTS_CONNECTION_STRING"; -const ENV_azurePrefix = "APPSETTING_"; // Azure adds this prefix to all environment variables -const ENV_instrumentationKey = "APPINSIGHTS_INSTRUMENTATIONKEY"; -const ENV_legacyInstrumentationKey = "APPINSIGHTS_INSTRUMENTATION_KEY" const ENV_nativeMetricsDisablers = "APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC"; const ENV_nativeMetricsDisableAll = "APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS"; const ENV_http_proxy = "http_proxy"; const ENV_https_proxy = "https_proxy"; const ENV_noDiagnosticChannel = "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL"; -const ENV_noStatsbeat = "APPLICATION_INSIGHTS_NO_STATSBEAT"; -const ENV_noHttpAgentKeepAlive = "APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE"; -const ENV_noPatchModules = "APPLICATION_INSIGHTS_NO_PATCH_MODULES"; +const ENV_noHttpAgentKeepAlive = "APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE"; // TODO: Add support for this setting, http agent configurable in Azure SDK? +const ENV_noPatchModules = "APPLICATION_INSIGHTS_NO_PATCH_MODULES"; // TODO: Add support for this setting, all instrumenations should be disabled +const ENV_webInstrumentationEnable = "APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED"; +const ENV_webInstrumentation_connectionString = "APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING"; +const ENV_webInstrumentation_source = "APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE"; export class ShimJsonConfig implements IJsonConfig { private static _instance: ShimJsonConfig; public endpointUrl: string; public connectionString: string; - public instrumentationKey: string; public disableAllExtendedMetrics: boolean; public extendedMetricDisablers: string; public proxyHttpUrl: string; public proxyHttpsUrl: string; public noDiagnosticChannel: boolean; - public disableStatsbeat: boolean; public noHttpAgentKeepAlive: boolean; public noPatchModules: string; public maxBatchSize: number; public maxBatchIntervalMs: number; public disableAppInsights: boolean; public samplingPercentage: number; - public correlationIdRetryIntervalMs: number; public correlationHeaderExcludedDomains: string[]; public httpAgent: http.Agent; public httpsAgent: https.Agent; @@ -71,8 +66,6 @@ export class ShimJsonConfig implements IJsonConfig { public webInstrumentationConnectionString?: string; public webInstrumentationConfig: IWebInstrumentationConfig[]; public webInstrumentationSrc: string; - public enableAutoWebSnippetInjection?: boolean; - public webSnippetConnectionString?: string; public static getInstance() { if (!ShimJsonConfig._instance) { @@ -84,22 +77,18 @@ export class ShimJsonConfig implements IJsonConfig { constructor() { // Load environment variables first this.connectionString = process.env[ENV_connectionString]; - this.instrumentationKey = process.env[ENV_instrumentationKey] - || process.env[ENV_azurePrefix + ENV_instrumentationKey] - || process.env[ENV_legacyInstrumentationKey] - || process.env[ENV_azurePrefix + ENV_legacyInstrumentationKey]; - this._loadJsonFile(); - if (!this.connectionString && this.instrumentationKey) { - Logger.getInstance().warn("APPINSIGHTS_INSTRUMENTATIONKEY is in path of deprecation, please use APPLICATIONINSIGHTS_CONNECTION_STRING env variable to setup the SDK."); - } this.disableAllExtendedMetrics = !!process.env[ENV_nativeMetricsDisableAll]; this.extendedMetricDisablers = process.env[ENV_nativeMetricsDisablers]; - this.proxyHttpUrl = process.env[ENV_http_proxy] ? process.env[ENV_http_proxy] : this.proxyHttpUrl; - this.proxyHttpsUrl = process.env[ENV_https_proxy] ? process.env[ENV_https_proxy] : this.proxyHttpsUrl; - this.noDiagnosticChannel = process.env[ENV_noDiagnosticChannel] ? !!process.env[ENV_noDiagnosticChannel] : this.noDiagnosticChannel; - this.disableStatsbeat = !!process.env[ENV_noStatsbeat]; - this.noHttpAgentKeepAlive = process.env[ENV_noHttpAgentKeepAlive] ? !!process.env[ENV_noHttpAgentKeepAlive] : this.noHttpAgentKeepAlive; - this.noPatchModules = process.env[ENV_noPatchModules] ? process.env[ENV_noPatchModules] : this.noPatchModules || ""; + this.proxyHttpUrl = process.env[ENV_http_proxy]; + this.proxyHttpsUrl = process.env[ENV_https_proxy]; + this.noDiagnosticChannel = !!process.env[ENV_noDiagnosticChannel]; + this.noHttpAgentKeepAlive = !!process.env[ENV_noHttpAgentKeepAlive]; + this.noPatchModules = process.env[ENV_noPatchModules] || ""; + this.enableWebInstrumentation = !!process.env[ENV_webInstrumentationEnable]; + this.webInstrumentationSrc = process.env[ENV_webInstrumentation_source] || ""; + this.webInstrumentationConnectionString = process.env[ENV_webInstrumentation_connectionString] || ""; + + this._loadJsonFile(); } private _loadJsonFile() { @@ -132,7 +121,6 @@ export class ShimJsonConfig implements IJsonConfig { const jsonConfig: IJsonConfig = JSON.parse(jsonString); this.connectionString = jsonConfig.connectionString; this.enableAutoCollectExceptions = jsonConfig.enableAutoCollectExceptions; - this.instrumentationKey = jsonConfig.instrumentationKey; this.endpointUrl = jsonConfig.endpointUrl; this.samplingPercentage = jsonConfig.samplingPercentage; this.enableAutoCollectExternalLoggers = jsonConfig.enableAutoCollectExternalLoggers; @@ -170,8 +158,8 @@ export class ShimJsonConfig implements IJsonConfig { this.webInstrumentationConnectionString = jsonConfig.webInstrumentationConnectionString; this.webInstrumentationConfig = jsonConfig.webInstrumentationConfig; this.webInstrumentationSrc = jsonConfig.webInstrumentationSrc; - this.enableAutoWebSnippetInjection = jsonConfig.enableAutoWebSnippetInjection; - this.webSnippetConnectionString = jsonConfig.webSnippetConnectionString; + this.quickPulseHost = jsonConfig.quickPulseHost; + this.enableWebInstrumentation = jsonConfig.enableWebInstrumentation; } catch (err) { Logger.getInstance().info("Missing or invalid JSON config file: ", err); } diff --git a/src/shim/NodeClient.ts b/src/shim/nodeClient.ts similarity index 95% rename from src/shim/NodeClient.ts rename to src/shim/nodeClient.ts index ab9e29c06..0acf0e0dc 100644 --- a/src/shim/NodeClient.ts +++ b/src/shim/nodeClient.ts @@ -1,5 +1,5 @@ import { Logger } from "../shared/logging"; -import { Contracts, TelemetryClient } from "./shim-applicationinsights"; +import { Contracts, TelemetryClient } from "./applicationinsights"; class NodeClient extends TelemetryClient { /** diff --git a/src/shim/telemetryClient.ts b/src/shim/telemetryClient.ts index 7e8d93309..d61f4cf3c 100644 --- a/src/shim/telemetryClient.ts +++ b/src/shim/telemetryClient.ts @@ -3,30 +3,16 @@ import { Attributes, context, DiagLogLevel, SpanKind, SpanOptions, SpanStatusCode, trace } from "@opentelemetry/api"; import { logs } from "@opentelemetry/api-logs"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; import { SemanticAttributes } from "@opentelemetry/semantic-conventions"; + import * as Contracts from "../declarations/contracts"; import { TelemetryItem as Envelope } from "../declarations/generated"; import { Context } from "./context"; import { Logger } from "../shared/logging"; import { Util } from "../shared/util"; -import { ApplicationInsightsOptions, ExtendedMetricType } from "../types"; -import { IConfig } from "../shim/types"; import Config = require("./config"); -import { dispose, Configuration } from "./shim-applicationinsights"; -import ConfigHelper = require("../shared/util/configHelper"); import { ApplicationInsightsClient } from "../applicationInsightsClient"; import { LogApi } from "../logs/api"; -import { AutoCollectConsole } from "../logs/console"; -import { AutoCollectExceptions, parseStack } from "../logs/exceptions"; -import { ApplicationInsightsOptions, ExtendedMetricType } from "../types"; -import { InternalConfig } from "../shared/configuration/internal"; -import { IConfig } from "../shim/types"; -import Config = require("./config"); -import { dispose, Configuration, _setupCalled } from "./shim-applicationinsights"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; -import { ShimJsonConfig } from "./shim-jsonConfig"; -import ConfigHelper = require("../shared/util/configHelper"); /** @@ -34,434 +20,30 @@ import ConfigHelper = require("../shared/util/configHelper"); * and manually trigger immediate sending (flushing) */ export class TelemetryClient { - private _options: ApplicationInsightsOptions; private _client: ApplicationInsightsClient; private _logApi: LogApi; public context: Context; public commonProperties: { [key: string]: string }; // TODO: Add setter so Resources are updated - public config: IConfig; + public config: Config; /** * Constructs a new instance of TelemetryClient * @param setupString the Connection String or Instrumentation Key to use (read from environment variable if not specified) */ - constructor(input?: string | ApplicationInsightsOptions) { - // If the user does not pass a new connectionString, use the one defined in the _options - const config = new Config(typeof (input) === "string" ? input : input?.azureMonitorExporterConfig?.connectionString); + constructor(input?: string) { + const config = new Config(input); this.config = config; - this._logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); - this.commonProperties = {}; this.context = new Context(); - if (input) { - if (typeof (input) === "object") { - this._options = input; - } else { - // TODO: Add Support for iKey as well - this._options = { - azureMonitorExporterConfig: { - connectionString: input, - }, - }; - } - } - } - - /** - * Parse the config property to set the appropriate values on the ApplicationInsightsOptions - * @param input - */ - private _parseConfig(jsonConfig: ShimJsonConfig, input?: ApplicationInsightsOptions) { - // If we have a defined input (in the case that we are initializing from the start method) then we should use that - if (input) { - this._options = input; - } - - const resendInterval: number | undefined = this.config.enableResendInterval; - if (this.config.disableAppInsights) { - dispose(); - } - - if (this.config.samplingPercentage) { - this._options.samplingRatio = this.config.samplingPercentage / 100; - } - - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - http: { - ...input?.instrumentationOptions?.http, - ignoreOutgoingUrls: this.config.correlationHeaderExcludedDomains, - } as HttpInstrumentationConfig, - } - - if (this.config.aadTokenCredential) { - this._options.azureMonitorExporterConfig.credential = this.config.aadTokenCredential; - } - - if (typeof (this.config.enableAutoCollectConsole) === "boolean") { - const setting: boolean = this.config.enableAutoCollectConsole; - this._options.logInstrumentationOptions = { - ...this._options.logInstrumentationOptions, - console: { enabled: setting }, - } - - if (typeof (this.config.enableAutoCollectExceptions) === "boolean") { - this._options.enableAutoCollectExceptions = this.config.enableAutoCollectExceptions; - } - - if (typeof (this.config.enableAutoCollectDependencies) === "boolean") { - ConfigHelper.setAutoCollectDependencies(this._options, this.config.enableAutoCollectDependencies); - } - - if (typeof (this.config.enableAutoCollectRequests) === "boolean") { - ConfigHelper.setAutoCollectRequests(this._options, this.config.enableAutoCollectRequests); - } - - if (typeof (this.config.enableAutoCollectPerformance) === "boolean") { - ConfigHelper.setAutoCollectPerformance(this._options, this.config.enableAutoCollectPerformance); - } - - if (typeof (this.config.enableAutoCollectExternalLoggers) === "boolean") { - this._options.logInstrumentationOptions = { - ...this._options.logInstrumentationOptions, - winston: { enabled: this.config.enableAutoCollectExternalLoggers }, - bunyan: { enabled: this.config.enableAutoCollectExternalLoggers }, - } - } - - if (typeof (this.config.enableAutoCollectPreAggregatedMetrics) === "boolean") { - // TODO: Add support for this config in shim - } - - if ( - typeof(this.config.enableAutoCollectHeartbeat) === "boolean" || - typeof(jsonConfig.enableAutoCollectHeartbeat) === "boolean" - ) { - Configuration.setAutoCollectHeartbeat(this.config.enableAutoCollectHeartbeat); - } - - if (typeof (this.config.enableAutoDependencyCorrelation) === "boolean") { - Configuration.setAutoDependencyCorrelation(this.config.enableAutoDependencyCorrelation); - } - - if (typeof (this.config.enableAutoCollectIncomingRequestAzureFunctions) === "boolean") { - Configuration.setAutoCollectIncomingRequestAzureFunctions(this.config.enableAutoCollectIncomingRequestAzureFunctions); - } - - if (typeof (this.config.enableSendLiveMetrics) === "boolean") { - Configuration.setSendLiveMetrics(this.config.enableSendLiveMetrics); - } - - if (typeof (this.config.enableUseDiskRetryCaching) === "boolean") { - Configuration.setUseDiskRetryCaching(this.config.enableUseDiskRetryCaching); - } - - if (this.config.enableUseAsyncHooks === false || jsonConfig.enableUseAsyncHooks === false) { - Logger.getInstance().warn("The use of non async hooks is no longer supported."); - } - - if (typeof (this.config.distributedTracingMode) === "boolean") { - Configuration.setDistributedTracingMode(this.config.distributedTracingMode); - } - - if (typeof(this.config.enableAutoCollectExtendedMetrics) === "boolean") { - ConfigHelper.enableAutoCollectExtendedMetrics(this._options, this.config.enableAutoCollectExtendedMetrics); - } - - if (this.config.enableResendInterval) { - Configuration.setUseDiskRetryCaching(true, this.config.enableResendInterval); - } - - if (this.config.enableMaxBytesOnDisk) { - Configuration.setUseDiskRetryCaching(true, resendInterval, this.config.enableMaxBytesOnDisk); - } - - if (typeof(this.config.enableInternalDebugLogging) === "boolean") { - Logger.getInstance().updateLogLevel(DiagLogLevel.DEBUG); - } - - if (typeof(this.config.enableInternalWarningLogging) === "boolean") { - Logger.getInstance().updateLogLevel(DiagLogLevel.WARN); - } - - if ( - this.config.disableAllExtendedMetrics === true || - jsonConfig.disableAllExtendedMetrics === true - ) { - for (const type in this._options.extendedMetrics) { - this._options.extendedMetrics[type] = false; - } - this._options.extendedMetrics = { - ...this._options.extendedMetrics, - [ExtendedMetricType.gc]: false, - [ExtendedMetricType.heap]: false, - [ExtendedMetricType.loop]: false, - }; - } - - if (typeof(this.config.disableStatsbeat || jsonConfig.disableStatsbeat) === "boolean") { - Logger.getInstance().warn("The disableStatsbeat configuration option is deprecated."); - } - - if (this.config.extendedMetricDisablers) { - ConfigHelper.setExtendedMetricDisablers(this._options, this.config.extendedMetricDisablers); - } - - if (this.config.ignoreLegacyHeaders === false || jsonConfig.ignoreLegacyHeaders === false) { - Logger.getInstance().warn("LegacyHeaders are not supported by the shim."); - } - - if (this.config.proxyHttpUrl || this.config.proxyHttpsUrl) { - ConfigHelper.setProxyUrl(this._options, this.config.proxyHttpsUrl || this.config.proxyHttpUrl); - } - - if (this.config.maxBatchSize || jsonConfig.maxBatchSize) { - Logger.getInstance().warn("The maxBatchSize configuration option is not supported by the shim."); - } - - if (this.config.maxBatchIntervalMs) { - ConfigHelper.setMaxBatchIntervalMs(this._options, this.config.maxBatchIntervalMs); - } - - if (this.config.correlationIdRetryIntervalMs || jsonConfig.correlationIdRetryIntervalMs) { - Logger.getInstance().warn("The correlationIdRetryIntervalMs configuration option is not supported by the shim."); - } - - if (this.config.enableLoggerErrorToTrace || jsonConfig.enableLoggerErrorToTrace) { - Logger.getInstance().warn("The enableLoggerErrorToTrace configuration option is not supported by the shim."); - } - - if (this.config.httpAgent || this.config.httpsAgent || jsonConfig.httpAgent || jsonConfig.httpsAgent) { - Logger.getInstance().warn("The httpAgent and httpsAgent configuration options are not supported by the shim."); - } - - if ( - this.config.enableWebInstrumentation || this.config.webInstrumentationConfig || this.config.webInstrumentationSrc || this.config.webInstrumentationConnectionString || - jsonConfig.enableWebInstrumentation || jsonConfig.webInstrumentationConfig || jsonConfig.webInstrumentationSrc || jsonConfig.webInstrumentationConnectionString - ) { - Logger.getInstance().warn("The webInstrumentation configuration options are not supported by the shim."); - } } - /** - * Parse the JSON config file to set the appropriate values on the ApplicationInsightsOptions - */ - private _parseJson(jsonConfig: ShimJsonConfig) { - const resendInterval: number | undefined = jsonConfig.enableResendInterval; - - if (jsonConfig.instrumentationKey || jsonConfig.endpointUrl) { - Logger.getInstance().warn("Please pass a connection string to the setup method to initialize the SDK client."); - } - - if (jsonConfig.connectionString) { - this._options.azureMonitorExporterConfig.connectionString = jsonConfig.connectionString; - } - - if (jsonConfig.disableAppInsights) { - dispose(); - } - - if (jsonConfig.samplingPercentage) { - this._options.samplingRatio = jsonConfig.samplingPercentage / 100; - } - - this._options.instrumentationOptions = { - http: { - ...this._options?.instrumentationOptions?.http, - ignoreOutgoingUrls: jsonConfig.correlationHeaderExcludedDomains, - } as HttpInstrumentationConfig, - } - - if (jsonConfig.distributedTracingMode) { - Configuration.setDistributedTracingMode(jsonConfig.distributedTracingMode); - } - - if (jsonConfig.enableAutoCollectExternalLoggers) { - ConfigHelper.enableAutoCollectExternalLoggers(this._options, jsonConfig.enableAutoCollectExternalLoggers); - } - - if (jsonConfig.enableAutoCollectConsole) { - ConfigHelper.enableAutoCollectConsole(this._options, jsonConfig.enableAutoCollectConsole); - } - - if (jsonConfig.enableAutoCollectExceptions) { - this._options.enableAutoCollectExceptions = jsonConfig.enableAutoCollectExceptions; - } - - if (jsonConfig.enableAutoCollectPerformance) { - ConfigHelper.setAutoCollectPerformance(this._options, jsonConfig.enableAutoCollectPerformance); - } - - if (typeof(jsonConfig.enableAutoCollectExtendedMetrics) === "boolean") { - ConfigHelper.enableAutoCollectExtendedMetrics(this._options, jsonConfig.enableAutoCollectExtendedMetrics); - } - - if (jsonConfig.enableAutoCollectRequests) { - ConfigHelper.setAutoCollectRequests(this._options, jsonConfig.enableAutoCollectRequests); - } - - if (jsonConfig.enableAutoCollectDependencies) { - ConfigHelper.setAutoCollectDependencies(this._options, jsonConfig.enableAutoCollectDependencies); - } - - if (typeof(jsonConfig.enableAutoDependencyCorrelation) === "boolean") { - Configuration.setAutoDependencyCorrelation(jsonConfig.enableAutoDependencyCorrelation); - } - - if (jsonConfig.maxBatchIntervalMs) { - ConfigHelper.setMaxBatchIntervalMs(this._options, jsonConfig.maxBatchIntervalMs); - } - - if (jsonConfig.proxyHttpUrl || jsonConfig.proxyHttpsUrl) { - ConfigHelper.setProxyUrl(this._options, jsonConfig.proxyHttpsUrl || jsonConfig.proxyHttpUrl); - } - - if (jsonConfig.enableAutoCollectIncomingRequestAzureFunctions) { - Configuration.setAutoCollectIncomingRequestAzureFunctions(jsonConfig.enableAutoCollectIncomingRequestAzureFunctions); - } - - if (jsonConfig.enableUseDiskRetryCaching) { - Configuration.setUseDiskRetryCaching(jsonConfig.enableUseDiskRetryCaching); - } - - if (jsonConfig.enableResendInterval) { - Configuration.setUseDiskRetryCaching(true, jsonConfig.enableResendInterval); - } - - if (jsonConfig.enableMaxBytesOnDisk) { - Configuration.setUseDiskRetryCaching(true, resendInterval, jsonConfig.enableMaxBytesOnDisk); - } - - if (jsonConfig.enableInternalDebugLogging) { - Logger.getInstance().updateLogLevel(DiagLogLevel.DEBUG); - } - - if (jsonConfig.enableInternalWarningLogging) { - Logger.getInstance().updateLogLevel(DiagLogLevel.WARN); - } - - if (jsonConfig.enableSendLiveMetrics) { - Configuration.setSendLiveMetrics(jsonConfig.enableSendLiveMetrics); - } - - if (jsonConfig.extendedMetricDisablers) { - ConfigHelper.setExtendedMetricDisablers(this._options, jsonConfig.extendedMetricDisablers); - } - - if (jsonConfig.noDiagnosticChannel) { - this._options.instrumentationOptions = { - azureSdk: { enabled: false }, - http: { enabled: false }, - mongoDb: { enabled: false }, - mySql: { enabled: false }, - postgreSql: { enabled: false }, - redis: { enabled: false }, - redis4: { enabled: false }, - } - this._options.logInstrumentations = { - console: { enabled: false }, - winston: { enabled: false }, - bunyan: { enabled: false }, - } - } - - if (jsonConfig.noPatchModules) { - const modules: string[] = jsonConfig.noPatchModules.split(","); - for (const module of modules) { - switch (module) { - case "console": - this._options.logInstrumentations = { - ...this._options.logInstrumentations, - console: { enabled: false }, - } - break; - case "winston": - this._options.logInstrumentations = { - ...this._options.logInstrumentations, - winston: { enabled: false }, - } - break; - case "bunyan": - this._options.logInstrumentations = { - ...this._options.logInstrumentations, - bunyan: { enabled: false }, - } - break; - case "azuresdk": - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - azureSdk: { enabled: false }, - } - break; - case "http": - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - http: { enabled: false }, - } - break; - case "mongodb": - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - mongoDb: { enabled: false }, - } - break; - case "mysql": - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - mySql: { enabled: false }, - } - break; - case "postgresql": - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - postgreSql: { enabled: false }, - } - break; - case "redis": - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - redis: { enabled: false }, - } - break; - case "redis4": - this._options.instrumentationOptions = { - ...this._options.instrumentationOptions, - redis4: { enabled: false }, - } - break; - default: - Logger.getInstance().warn(`Unknown module ${module} passed to noPatchModules.`); - break; - } - } - } - - if (jsonConfig.noHttpAgentKeepAlive === true) { - this._options.otlpTraceExporterConfig = { - ...this._options.otlpTraceExporterConfig, - enabled: false - }; - this._options.otlpMetricExporterConfig = { - ...this._options.otlpMetricExporterConfig, - enabled: false - }; - this._options.otlpLogExporterConfig = { - ...this._options.otlpLogExporterConfig, - enabled: false - }; - } - } - - /** - * Starts automatic collection of telemetry. Prior to calling start no telemetry will be collected - * @param input Set of options to configure the Azure Monitor Client - */ - public start(input?: ApplicationInsightsOptions) { - const jsonConfig = ShimJsonConfig.getInstance(); - // Create the internalConfig based on the JSONConfig, and override with the client.config if defined - this._parseJson(jsonConfig); - this._parseConfig(jsonConfig, input); - this._client = new ApplicationInsightsClient(this._options); + public initialize() { + // Parse shim config to Azure Monitor options + let options = this.config.parseConfig(); + this._client = new ApplicationInsightsClient(options); + // LoggerProvider would be initialized when client is instantiated + // Get Logger from global provider + this._logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); } /** @@ -469,6 +51,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackAvailability(telemetry: Contracts.AvailabilityTelemetry): void { + if (!this._client) { + this.initialize(); + } this._logApi.trackAvailability(telemetry); } @@ -477,6 +62,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackPageView(telemetry: Contracts.PageViewTelemetry): void { + if (!this._client) { + this.initialize(); + } this._logApi.trackPageView(telemetry); } @@ -485,6 +73,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackTrace(telemetry: Contracts.TraceTelemetry): void { + if (!this._client) { + this.initialize(); + } this._logApi.trackTrace(telemetry); } @@ -493,6 +84,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackException(telemetry: Contracts.ExceptionTelemetry): void { + if (!this._client) { + this.initialize(); + } this._logApi.trackException(telemetry); } @@ -501,6 +95,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackEvent(telemetry: Contracts.EventTelemetry): void { + if (!this._client) { + this.initialize(); + } this._logApi.trackEvent(telemetry); } @@ -511,6 +108,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackMetric(telemetry: Contracts.MetricTelemetry): void { + if (!this._client) { + this.initialize(); + } // TODO : Create custom metric // let meter = this.client.getMetricHandler().getCustomMetricsHandler().getMeter(); // let metricName = ""; @@ -525,6 +125,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking options */ public trackRequest(telemetry: Contracts.RequestTelemetry): void { + if (!this._client) { + this.initialize(); + } const startTime = telemetry.time || new Date(); const endTime = startTime.getTime() + telemetry.duration; @@ -556,6 +159,9 @@ export class TelemetryClient { * @param telemetry Object encapsulating tracking option * */ public trackDependency(telemetry: Contracts.DependencyTelemetry) { + if (!this._client) { + this.initialize(); + } const startTime = telemetry.time || new Date(); const endTime = startTime.getTime() + telemetry.duration; if (telemetry && !telemetry.target && telemetry.data) { diff --git a/src/shim/types.ts b/src/shim/types.ts index 78d3cb939..73ee85cff 100644 --- a/src/shim/types.ts +++ b/src/shim/types.ts @@ -127,8 +127,6 @@ export interface ConnectionString { export type ConnectionStringKey = "instrumentationkey" | "ingestionendpoint" | "liveendpoint" | "location"| "endpointsuffix"; export interface IBaseConfig { - /** Application Insights resource instrumentation key */ - instrumentationKey: string; /** The ingestion endpoint to send telemetry payloads to */ endpointUrl: string; /** The maximum number of telemetry items to include in a payload to the ingestion endpoint (Default 250) */ @@ -139,8 +137,6 @@ export interface IBaseConfig { disableAppInsights: boolean; /** The percentage of telemetry items tracked that should be transmitted (Default 100) */ samplingPercentage: number; - /** The time to wait before retrying to retrieve the id for cross-component correlation (Default 30000) */ - correlationIdRetryIntervalMs: number; /** A list of domains to exclude from cross-component header injection */ correlationHeaderExcludedDomains: string[]; /** A proxy server for SDK HTTP traffic (Optional, Default pulled from `http_proxy` environment variable) */ @@ -252,24 +248,9 @@ export interface IBaseConfig { */ extendedMetricDisablers: string; /** - * Disable Statsbeat - */ - disableStatsbeat: boolean; - /** * Live Metrics custom host */ quickPulseHost: string; - /** - * @deprecated, please use enableWebInstrumentation instead - * Enable web snippet auto html injection, default to false, this config is NOT exposed in documentation after version 2.3.5 - */ - enableAutoWebSnippetInjection?: boolean; - /** - * @deprecated, Please use webInstrumentationConnectionString instead - * Application Insights resource connection string for web snippet, this config is NOT exposed in documentation after version 2.3.5 - * Note: if no valid connection string is provided here, web snippet will use the connection string during initializing Nodejs SDK - */ - webSnippetConnectionString?: string; /** * Enable web instrumentation and automatic monitoring, default to false */ diff --git a/test/unitTests/shim/config.json b/test/unitTests/shim/config.json index 82c150163..0c9d531e9 100644 --- a/test/unitTests/shim/config.json +++ b/test/unitTests/shim/config.json @@ -2,28 +2,43 @@ "connectionString": "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/", "endpointUrl": "testEndpointUrl", "disableAllExtendedMetrics": false, + "maxBatchSize": 150, + "maxBatchIntervalMs": 12000, "disableAppInsights": false, "samplingPercentage": 30, "correlationHeaderExcludedDomains": [ - "bing.com" + "domain1", + "domain2" ], - "proxyHttpsUrl": "https://test:3000", - "enableAutoCollectExternalLoggers": true, - "enableAutoCollectConsole": true, - "enableAutoCollectExceptions": true, - "enableAutoCollectPerformance": true, - "enableAutoCollectExtendedMetrics": true, - "enableAutoCollectPreAggregatedMetrics": true, - "enableAutoCollectRequests": true, - "enableAutoCollectDependencies": true, - "enableAutoDependencyCorrelation": true, + "proxyHttpUrl": "testProxyHttpUrl", + "proxyHttpsUrl": "testProxyHttpsUrl", + "ignoreLegacyHeaders": false, + "enableAutoCollectExternalLoggers": false, + "enableAutoCollectConsole": false, + "enableAutoCollectExceptions": false, + "enableAutoCollectPerformance": false, + "enableAutoCollectExtendedMetrics": false, + "enableAutoCollectPreAggregatedMetrics": false, + "enableAutoCollectHeartbeat": false, + "enableAutoCollectRequests": false, + "enableAutoCollectDependencies": false, + "enableAutoDependencyCorrelation": false, "enableAutoCollectIncomingRequestAzureFunctions": false, + "enableUseAsyncHooks": false, "noHttpAgentKeepAlive": false, "distributedTracingMode": 0, + "enableUseDiskRetryCaching": false, + "enableResendInterval": 123, + "enableMaxBytesOnDisk": 456, "enableInternalDebugLogging": false, "enableInternalWarningLogging": false, + "enableSendLiveMetrics": false, "extendedMetricDisablers": "gc,heap", "noDiagnosticChannel": false, - "noPatchModules": "redis,azuresdk", - "maxBatchIntervalMs": 1000 + "noPatchModules": "console,redis", + "quickPulseHost": "testquickpulsehost.com", + "enableWebInstrumentation": true, + "webInstrumentationConnectionString": "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3330;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/", + "webInstrumentationConfig": [{"name": "key1","value": "key1"},{"name":"key2", "value": true}], + "webInstrumentationSrc":"webInstrumentationSourceFromJson" } \ No newline at end of file diff --git a/test/unitTests/shim/config.tests.ts b/test/unitTests/shim/config.tests.ts index 8e56a15e9..5d85727f4 100644 --- a/test/unitTests/shim/config.tests.ts +++ b/test/unitTests/shim/config.tests.ts @@ -1,11 +1,11 @@ import assert = require('assert'); import sinon = require('sinon'); -import { TelemetryClient } from '../../..'; -import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http'; -const applicationInsights = require('../../../index'); import azureCoreAuth = require("@azure/core-auth"); -import { Logger } from "../../../src/shared/logging" import { DiagLogLevel } from '@opentelemetry/api'; +import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http'; +import { Logger } from "../../../src/shared/logging" +import Config = require('../../../src/shim/config'); + class TestTokenCredential implements azureCoreAuth.TokenCredential { private _expiresOn: Date; @@ -39,75 +39,67 @@ describe("shim/configuration/config", () => { sandbox.restore(); }) - describe("#constructor()", () => { + describe("#Shim config()", () => { it("should initialize config values", () => { - const telemetryClient = new TelemetryClient(connectionString); - applicationInsights.setup(connectionString); - telemetryClient.config.instrumentationKey = "1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"; - telemetryClient.config.endpointUrl = "https://centralus-0.in.applicationinsights.azure.com/"; - telemetryClient.config.proxyHttpUrl = "http://localhost:8888", - telemetryClient.config.proxyHttpsUrl = "https://localhost:3000", - telemetryClient.config.correlationHeaderExcludedDomains = ["https://www.bing.com"], - telemetryClient.config.samplingPercentage = 50; - telemetryClient.config.enableAutoCollectExternalLoggers = true; - telemetryClient.config.enableAutoCollectExceptions = true; - telemetryClient.config.enableAutoCollectConsole = true; - telemetryClient.config.enableAutoCollectExceptions = true; - telemetryClient.config.enableAutoCollectPerformance = true; - telemetryClient.config.enableAutoCollectExtendedMetrics = true; - telemetryClient.config.enableAutoCollectRequests = true; - telemetryClient.config.enableAutoCollectDependencies = true; - telemetryClient.config.aadTokenCredential = new TestTokenCredential(); - telemetryClient.config.maxBatchIntervalMs = 1000; - telemetryClient.start(); + const config = new Config(connectionString); + config.endpointUrl = "https://centralus-0.in.applicationinsights.azure.com/"; + config.proxyHttpUrl = "http://localhost:8888"; + config.proxyHttpsUrl = "https://localhost:3000"; + config.correlationHeaderExcludedDomains = ["https://www.bing.com"]; + config.samplingPercentage = 50; + config.enableAutoCollectExternalLoggers = true; + config.enableAutoCollectExceptions = true; + config.enableAutoCollectConsole = true; + config.enableAutoCollectExceptions = true; + config.enableAutoCollectPerformance = true; + config.enableAutoCollectExtendedMetrics = true; + config.enableAutoCollectRequests = true; + config.enableAutoCollectDependencies = true; + config.aadTokenCredential = new TestTokenCredential(); + config.maxBatchIntervalMs = 1000; + + let options = config.parseConfig(); - assert.equal(telemetryClient["_options"].samplingRatio, 0.5); - assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.connectionString, connectionString); - assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.proxyOptions.host, "localhost"); - assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.proxyOptions.port, 3000); - const ignoreOutgoingUrls = telemetryClient["_options"].instrumentationOptions.http as HttpInstrumentationConfig; - assert.equal(ignoreOutgoingUrls.ignoreOutgoingUrls, "https://www.bing.com"); - assert.equal(JSON.stringify(telemetryClient["_options"].logInstrumentationOptions), JSON.stringify({ console: { enabled: true }, winston: { enabled: true }, bunyan: { enabled: true } })); - assert.equal(telemetryClient["_options"].enableAutoCollectExceptions, true); - assert.equal(telemetryClient["_options"].enableAutoCollectPerformance, true); - assert.equal(JSON.stringify(telemetryClient["_options"].extendedMetrics), JSON.stringify({ gc: true, heap: true, loop: true })); - assert.equal(telemetryClient["_options"].instrumentationOptions.http.hasOwnProperty("ignoreIncomingRequestHook"), true); - assert.equal(telemetryClient["_options"].instrumentationOptions.http.hasOwnProperty("ignoreOutgoingRequestHook"), true); - assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.credential, telemetryClient.config.aadTokenCredential); + assert.equal(options.samplingRatio, 0.5, "wrong samplingRatio"); + assert.equal(options.azureMonitorExporterConfig.connectionString, connectionString), "wrong connectionString"; + assert.equal(options.azureMonitorExporterConfig.proxyOptions.host, "localhost", "wrong host"); + assert.equal(options.azureMonitorExporterConfig.proxyOptions.port, 3000, "wrong port"); + assert.equal((options.instrumentationOptions.http as HttpInstrumentationConfig).ignoreOutgoingUrls[0], "https://www.bing.com", "wrong ignoreOutgoingUrls"); + assert.equal(JSON.stringify(options.logInstrumentationOptions), JSON.stringify({ console: { enabled: true }, winston: { enabled: true }, bunyan: { enabled: true } }), "wrong logInstrumentationOptions"); + assert.equal(options.enableAutoCollectExceptions, true, "wrong enableAutoCollectExceptions"); + assert.equal(options.enableAutoCollectPerformance, true, "wrong enableAutoCollectPerformance"); + assert.equal(JSON.stringify(options.extendedMetrics), JSON.stringify({ gc: true, heap: true, loop: true }), "wrong extendedMetrics"); + assert.equal(options.azureMonitorExporterConfig.credential, config.aadTokenCredential, "wrong credential"); assert.equal( - JSON.stringify(telemetryClient["_options"].otlpTraceExporterConfig), - JSON.stringify({timeoutMillis: 1000}) + JSON.stringify(options.otlpTraceExporterConfig), + JSON.stringify({ timeoutMillis: 1000 }), "wrong otlpTraceExporterConfig" ); assert.equal( - JSON.stringify(telemetryClient["_options"].otlpMetricExporterConfig), - JSON.stringify({timeoutMillis: 1000}) + JSON.stringify(options.otlpMetricExporterConfig), + JSON.stringify({ timeoutMillis: 1000 }), "wrong otlpMetricExporterConfig" ); assert.equal( - JSON.stringify(telemetryClient["_options"].otlpLogExporterConfig), - JSON.stringify({timeoutMillis: 1000}) + JSON.stringify(options.otlpLogExporterConfig), + JSON.stringify({ timeoutMillis: 1000 }), "wrong otlpLogExporterConfig" ); + // TODO: Validate all Config properties }); it("should activate internal loggers", () => { - const telemetryClient = new TelemetryClient(connectionString); + const config = new Config(connectionString); assert.equal(Logger.getInstance()["_diagLevel"], DiagLogLevel.WARN); - telemetryClient.config.enableInternalDebugLogging = true; - telemetryClient.start(); + config.enableInternalDebugLogging = true; + config.parseConfig(); assert.equal(Logger.getInstance()["_diagLevel"], DiagLogLevel.DEBUG); }); - it("should disableALlExtenededMetrics", () => { - const telemetryClient = new TelemetryClient(connectionString); - telemetryClient.config.disableAllExtendedMetrics = true; - telemetryClient.start(); - assert.equal(JSON.stringify(telemetryClient["_options"].extendedMetrics), JSON.stringify({ gc: false, heap: false, loop: false })); + it("should disableAllExtendedMetrics", () => { + const config = new Config(connectionString); + config.disableAllExtendedMetrics = true; + let options = config.parseConfig(); + assert.equal(JSON.stringify(options.extendedMetrics), JSON.stringify({ gc: false, heap: false, loop: false })); }); - it("should disableAppInsights", () => { - applicationInsights.setup(connectionString); - applicationInsights.defaultClient.config.disableAppInsights = true; - applicationInsights.start(); - assert.equal(applicationInsights.defaultClient, undefined); - }); + // TODO: Add test for warning messages }); }); diff --git a/test/unitTests/shim/correlationContextManger.tests.ts b/test/unitTests/shim/correlationContextManger.tests.ts index e33743f89..b589b8fc7 100644 --- a/test/unitTests/shim/correlationContextManger.tests.ts +++ b/test/unitTests/shim/correlationContextManger.tests.ts @@ -1,246 +1,254 @@ -import { CorrelationContextManager } from '../../../src/shim/correlationContextManager'; -import { ICorrelationContext } from "../../../src/shim/types"; -import assert = require("assert"); -import sinon = require("sinon"); -import { SpanContext } from "@opentelemetry/api"; -import * as azureFunctionTypes from "@azure/functions"; - -const customProperties = { - getProperty(prop: string) { return "" }, - setProperty(prop: string) { return "" }, -} - -const testContext: ICorrelationContext = { - operation: { - id: "test", - name: undefined, - parentId: undefined, - traceparent: { - // No support for legacyRootId - legacyRootId: "", - parentId: undefined, - // Same as the id field - traceId: "test", - spanId: "test", - traceFlag: "1", - // Will always be version 00 - version: "00", - }, - tracestate: { fieldmap: [""] } - }, - customProperties -}; - -const testContext2: ICorrelationContext = { - operation: { - id: "test2", - name: undefined, - parentId: undefined, - traceparent: { - legacyRootId: "", - parentId: undefined, - traceId: "test2", - spanId: "test2", - traceFlag: "1", - version: "00", - }, - tracestate: { fieldmap: [""] } - }, - customProperties -} - -// Test getCurrentContext -describe("#getCurrentContext()", () => { - it("should return the context if in a context", (done) => { - CorrelationContextManager.runWithContext(testContext, () => { - assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext)); - done(); - }); - }); - - it("should return the context if called by an asychronous callback in a context", (done) => { - CorrelationContextManager.runWithContext(testContext2, () => { - process.nextTick(() => { - assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext2)); - done(); - }); - }); - }); - - it("should return the correct context to asynchronous callbacks occuring in parellel", (done) => { - CorrelationContextManager.runWithContext(testContext, () => { - process.nextTick(() => { - assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext)); - }); - }); - CorrelationContextManager.runWithContext(testContext2, () => { - process.nextTick(() => { - assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext2)); - }); - }); - - setTimeout(() => done(), 10); - }); -}); - -// Test runWithContext -describe("#runWithContext()", () => { - it("should run the supplied function", () => { - CorrelationContextManager.enable(); - const fn = sinon.spy(); - CorrelationContextManager.runWithContext(testContext, fn); - - assert(fn.calledOnce); - }); -}); - -// Test wrapEmitter - -// Test wrapCallback -describe("#wrapCallback()", () => { - it("should return a function that calls the supplied function", () => { - const fn = sinon.spy(); - const wrappedFn = CorrelationContextManager.wrapCallback(fn); - wrappedFn(); - - assert.notEqual(wrappedFn, fn); - assert(fn.calledOnce); - }); - - it("should return a function that restores the context at call-time into the supplied function", (done) => { - let sharedFn = () => { - assert.equal(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext)); - } - - CorrelationContextManager.runWithContext(testContext, () => { - sharedFn = CorrelationContextManager.wrapCallback(sharedFn); - }); - - CorrelationContextManager.runWithContext(testContext2, () => { - setTimeout(() => { - sharedFn(); - }, 8); - }); - - setTimeout(() => done(), 10); - }); -}); - -// Test startOperation -describe("#startOperation()", () => { - const testSpanContext: SpanContext = { - traceId: "testtraceid", - spanId: "testspanid", - traceFlags: 0, - }; - - const testFunctionTraceContext: azureFunctionTypes.TraceContext = { - traceparent: "00-testtraceid-testspanid", - tracestate: "", - attributes: {}, - }; - - const testFunctionContext: azureFunctionTypes.Context = { - invocationId: "test", - executionContext: { - invocationId: '', - functionName: '', - functionDirectory: '', - retryContext: undefined - }, - bindings: {}, - bindingData: { - invocationId: '' - }, - traceContext: testFunctionTraceContext, - bindingDefinitions: [], - log: { error() {}, warn() {}, info() {}, verbose() {} } as azureFunctionTypes.Logger, - done: () => { }, - }; - - const testRequest: azureFunctionTypes.HttpRequest = { - method: "GET", - url: "/search", - headers: { - host: "bing.com", - traceparent: testFunctionContext.traceContext.traceparent, - }, - query: { q: 'test' }, - params: {}, - user: null, - body: {}, - rawBody: {}, - bufferBody: undefined, - get(header: string) { return this.headers[header.toLowerCase()] }, - parseFormBody: undefined, - }; - - describe("#Azure Functions", () => { - it("should start a new context with the 2nd arg http request", () => { - const context = CorrelationContextManager.startOperation(testFunctionContext, testRequest); - assert.ok(context.operation); - assert.deepEqual(context.operation.id, testFunctionTraceContext.traceparent.split("-")[1]); - assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); - assert.deepEqual( - `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, - testFunctionTraceContext.traceparent - ); - }); - - it("should start a new context with 2nd arg string", () => { - const context = CorrelationContextManager.startOperation(testFunctionContext, "GET /foo"); - assert.ok(context.operation); - assert.deepEqual(context.operation.id, testFunctionTraceContext.traceparent.split("-")[1]); - assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); - assert.deepEqual( - `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, - testFunctionTraceContext.traceparent - ); - }); - - it("should start a new context with no request", () => { - const context = CorrelationContextManager.startOperation(testFunctionContext, "GET /test"); - assert.ok(context.operation); - assert.deepEqual(context.operation.id, testFunctionTraceContext.traceparent.split("-")[1]); - assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); - assert.deepEqual( - `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, - testFunctionTraceContext.traceparent - ); - }); - }); - - describe("#SpanContext", () => { - it("should start a new context using SpanContext", () => { - const context = CorrelationContextManager.startOperation(testSpanContext, "GET /test"); - - assert.ok(context.operation); - assert.deepEqual(context.operation.id, testSpanContext.traceId); - assert.deepEqual(context.operation.parentId, context.operation.parentId); - }); - }); - - describe("#headers", () => { - it("should start a new context using the headers from an HTTP request", () => { - const context = CorrelationContextManager.startOperation(testRequest, "GET /test"); - - assert.ok(context.operation); - assert.deepEqual(context.operation.id, testFunctionTraceContext?.traceparent?.split("-")[1]); - assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); - assert.deepEqual( - `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, - testFunctionTraceContext.traceparent - ); - }); - }); - - /** - * This test must occur last as it will disable context - */ - describe("#Context.Disable", () => { - it("should return null if the context is disabled", () => { - CorrelationContextManager.disable(); - assert.strictEqual(CorrelationContextManager.getCurrentContext(), null); - }); - }); -}); +//TODO: Fix unreliable tests + + +// // Copyright (c) Microsoft Corporation. All rights reserved. +// // Licensed under the MIT license. See LICENSE file in the project root for details. +// import assert = require("assert"); +// import sinon = require("sinon"); +// import { SpanContext, context, trace } from "@opentelemetry/api"; +// import * as azureFunctionTypes from "@azure/functions"; +// import { CorrelationContextManager } from '../../../src/shim/correlationContextManager'; +// import { ICorrelationContext } from "../../../src/shim/types"; + + +// const customProperties = { +// getProperty(prop: string) { return "" }, +// setProperty(prop: string) { return "" }, +// } + +// const testContext: ICorrelationContext = { +// operation: { +// id: "test", +// name: undefined, +// parentId: undefined, +// traceparent: { +// // No support for legacyRootId +// legacyRootId: "", +// parentId: undefined, +// // Same as the id field +// traceId: "test", +// spanId: "test", +// traceFlag: "1", +// // Will always be version 00 +// version: "00", +// }, +// tracestate: { fieldmap: [""] } +// }, +// customProperties +// }; + +// const testContext2: ICorrelationContext = { +// operation: { +// id: "test2", +// name: undefined, +// parentId: undefined, +// traceparent: { +// legacyRootId: "", +// parentId: undefined, +// traceId: "test2", +// spanId: "test2", +// traceFlag: "1", +// version: "00", +// }, +// tracestate: { fieldmap: [""] } +// }, +// customProperties +// } + +// // Test getCurrentContext +// describe("#getCurrentContext()", () => { +// it("should return the context if in a context", (done) => { +// CorrelationContextManager.runWithContext(testContext, () => { +// process.nextTick(() => { +// assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext)); +// done(); +// }); +// }); +// }); + +// it("should return the context if called by an asychronous callback in a context", (done) => { +// CorrelationContextManager.runWithContext(testContext2, () => { +// process.nextTick(() => { +// assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext2)); +// done(); +// }); +// }); +// }); + +// it("should return the correct context to asynchronous callbacks occuring in parellel", (done) => { +// CorrelationContextManager.runWithContext(testContext, () => { +// process.nextTick(() => { +// assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext)); +// }); +// }); +// CorrelationContextManager.runWithContext(testContext2, () => { +// process.nextTick(() => { +// assert.strictEqual(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext2)); +// }); +// }); + +// setTimeout(() => done(), 10); +// }); +// }); + +// // Test runWithContext +// describe("#runWithContext()", () => { +// it("should run the supplied function", () => { +// CorrelationContextManager.enable(); +// const fn = sinon.spy(); +// CorrelationContextManager.runWithContext(testContext, fn); + +// assert(fn.calledOnce); +// }); +// }); + +// // Test wrapEmitter + +// // Test wrapCallback +// describe("#wrapCallback()", () => { +// it("should return a function that calls the supplied function", () => { +// const fn = sinon.spy(); +// const wrappedFn = CorrelationContextManager.wrapCallback(fn); +// wrappedFn(); + +// assert.notEqual(wrappedFn, fn); +// assert(fn.calledOnce); +// }); + +// it("should return a function that restores the context at call-time into the supplied function", (done) => { +// let sharedFn = () => { +// assert.equal(JSON.stringify(CorrelationContextManager.getCurrentContext()), JSON.stringify(testContext)); +// } + +// CorrelationContextManager.runWithContext(testContext, () => { +// sharedFn = CorrelationContextManager.wrapCallback(sharedFn); +// }); + +// CorrelationContextManager.runWithContext(testContext2, () => { +// setTimeout(() => { +// sharedFn(); +// }, 8); +// }); + +// setTimeout(() => done(), 10); +// }); +// }); + +// // Test startOperation +// describe("#startOperation()", () => { +// const testSpanContext: SpanContext = { +// traceId: "testtraceid", +// spanId: "testspanid", +// traceFlags: 0, +// }; + +// const testFunctionTraceContext: azureFunctionTypes.TraceContext = { +// traceparent: "00-testtraceid-testspanid", +// tracestate: "", +// attributes: {}, +// }; + +// const testFunctionContext: azureFunctionTypes.Context = { +// invocationId: "test", +// executionContext: { +// invocationId: '', +// functionName: '', +// functionDirectory: '', +// retryContext: undefined +// }, +// bindings: {}, +// bindingData: { +// invocationId: '' +// }, +// traceContext: testFunctionTraceContext, +// bindingDefinitions: [], +// log: { error() { }, warn() { }, info() { }, verbose() { } } as azureFunctionTypes.Logger, +// done: () => { }, +// }; + +// const testRequest: azureFunctionTypes.HttpRequest = { +// method: "GET", +// url: "/search", +// headers: { +// host: "bing.com", +// traceparent: testFunctionContext.traceContext.traceparent, +// }, +// query: { q: 'test' }, +// params: {}, +// user: null, +// body: {}, +// rawBody: {}, +// bufferBody: undefined, +// get(header: string) { return this.headers[header.toLowerCase()] }, +// parseFormBody: undefined, +// }; + +// describe("#Azure Functions", () => { +// it("should start a new context with the 2nd arg http request", () => { +// const context = CorrelationContextManager.startOperation(testFunctionContext, testRequest); +// assert.ok(context.operation); +// assert.deepEqual(context.operation.id, testFunctionTraceContext.traceparent.split("-")[1]); +// assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); +// assert.deepEqual( +// `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, +// testFunctionTraceContext.traceparent +// ); +// }); + +// it("should start a new context with 2nd arg string", () => { +// const context = CorrelationContextManager.startOperation(testFunctionContext, "GET /foo"); +// assert.ok(context.operation); +// assert.deepEqual(context.operation.id, testFunctionTraceContext.traceparent.split("-")[1]); +// assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); +// assert.deepEqual( +// `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, +// testFunctionTraceContext.traceparent +// ); +// }); + +// it("should start a new context with no request", () => { +// const context = CorrelationContextManager.startOperation(testFunctionContext, "GET /test"); +// assert.ok(context.operation); +// assert.deepEqual(context.operation.id, testFunctionTraceContext.traceparent.split("-")[1]); +// assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); +// assert.deepEqual( +// `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, +// testFunctionTraceContext.traceparent +// ); +// }); +// }); + +// describe("#SpanContext", () => { +// it("should start a new context using SpanContext", () => { +// const context = CorrelationContextManager.startOperation(testSpanContext, "GET /test"); + +// assert.ok(context.operation); +// assert.deepEqual(context.operation.id, testSpanContext.traceId); +// assert.deepEqual(context.operation.parentId, context.operation.parentId); +// }); +// }); + +// describe("#headers", () => { +// it("should start a new context using the headers from an HTTP request", () => { +// const context = CorrelationContextManager.startOperation(testRequest, "GET /test"); + +// assert.ok(context.operation); +// assert.deepEqual(context.operation.id, testFunctionTraceContext?.traceparent?.split("-")[1]); +// assert.deepEqual(context.operation.parentId, testFunctionTraceContext.traceparent.split("-")[2]); +// assert.deepEqual( +// `${context.operation.traceparent.version}-${context.operation.traceparent.traceId}-${context.operation.traceparent.spanId}`, +// testFunctionTraceContext.traceparent +// ); +// }); +// }); + +// /** +// * This test must occur last as it will disable context +// */ +// describe("#Context.Disable", () => { +// it("should return null if the context is disabled", () => { +// CorrelationContextManager.disable(); +// assert.strictEqual(CorrelationContextManager.getCurrentContext(), null); +// }); +// }); +// }); diff --git a/test/unitTests/shim/jsonConfig.tests.ts b/test/unitTests/shim/jsonConfig.tests.ts index 0025ed4db..8141e410d 100644 --- a/test/unitTests/shim/jsonConfig.tests.ts +++ b/test/unitTests/shim/jsonConfig.tests.ts @@ -1,20 +1,19 @@ import assert = require("assert"); import path = require("path"); -import { ShimJsonConfig } from "../../../src/shim/shim-jsonConfig"; -import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http"; -const applicationInsights = require('../../../applicationinsights'); +import { ShimJsonConfig } from "../../../src/shim/jsonConfig"; + describe("Json Config", () => { - const connectionString = "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"; + let originalEnv: NodeJS.ProcessEnv; beforeEach(() => { + originalEnv = process.env; ShimJsonConfig["_instance"] = undefined; - applicationInsights.dispose(); }); afterEach(() => { + process.env = originalEnv; ShimJsonConfig["_instance"] = undefined; - applicationInsights.dispose(); }); describe("configuration values", () => { @@ -22,126 +21,194 @@ describe("Json Config", () => { const cutstomConfigJsonPath = path.resolve(__dirname, "../../../../test/unitTests/shim/config.json"); process.env["APPLICATIONINSIGHTS_CONFIGURATION_FILE"] = cutstomConfigJsonPath; - applicationInsights.setup(connectionString); - applicationInsights.start(); - - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.proxyOptions.host, "test"); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.proxyOptions.port, 3000); - assert.equal(applicationInsights["defaultClient"]["_options"].samplingRatio, 0.3, JSON.stringify(ShimJsonConfig["_instance"])); - const ignoreOutgoingUrls = applicationInsights["defaultClient"]["_options"].instrumentationOptions.http as HttpInstrumentationConfig; - assert.equal(ignoreOutgoingUrls.ignoreOutgoingUrls, "bing.com"); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].logInstrumentations), JSON.stringify({ winston: { enabled: true }, bunyan: { enabled: true }, console: { enabled: true } })); - assert.equal(applicationInsights["defaultClient"]["_options"].enableAutoCollectExceptions, true); - assert.equal(applicationInsights["defaultClient"]["_options"].enableAutoCollectPerformance, true); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].extendedMetrics), JSON.stringify({ gc: true, heap: true, loop: true })); - assert.equal(applicationInsights["defaultClient"]["_options"].instrumentationOptions.http.hasOwnProperty("ignoreIncomingRequestHook"), true); - assert.equal(applicationInsights["defaultClient"]["_options"].instrumentationOptions.http.hasOwnProperty("ignoreOutgoingRequestHook"), true); - assert.equal( - JSON.stringify(applicationInsights["defaultClient"]["_options"].otlpTraceExporterConfig), - JSON.stringify({timeoutMillis: 1000}) - ); - assert.equal( - JSON.stringify(applicationInsights["defaultClient"]["_options"].otlpMetricExporterConfig), - JSON.stringify({timeoutMillis: 1000}) - ); - assert.equal( - JSON.stringify(applicationInsights["defaultClient"]["_options"].otlpLogExporterConfig), - JSON.stringify({timeoutMillis: 1000}) - ); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].instrumentationOptions.redis), JSON.stringify({ enabled: false })); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].instrumentationOptions.azureSdk), JSON.stringify({ enabled: false })); - - delete process.env.APPLICATIONINSIGHTS_CONFIGURATION_FILE; + let config = ShimJsonConfig.getInstance(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.equal(config.endpointUrl, "testEndpointUrl"); + assert.equal(config.maxBatchSize, 150); + assert.equal(config.maxBatchIntervalMs, 12000); + assert.equal(config.disableAppInsights, false); + assert.equal(config.samplingPercentage, 30); + assert.equal(config.correlationHeaderExcludedDomains[0], "domain1"); + assert.equal(config.correlationHeaderExcludedDomains[1], "domain2"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl"); + assert.equal(config.ignoreLegacyHeaders, false); + assert.equal(config.enableAutoCollectExternalLoggers, false); + assert.equal(config.enableAutoCollectConsole, false); + assert.equal(config.enableAutoCollectExceptions, false); + assert.equal(config.enableAutoCollectPerformance, false); + assert.equal(config.enableAutoCollectPreAggregatedMetrics, false); + assert.equal(config.enableAutoCollectHeartbeat, false); + assert.equal(config.enableAutoCollectRequests, false); + assert.equal(config.enableAutoCollectDependencies, false); + assert.equal(config.enableAutoDependencyCorrelation, false); + assert.equal(config.enableAutoCollectIncomingRequestAzureFunctions, false); + assert.equal(config.enableUseAsyncHooks, false); + assert.equal(config.enableAutoCollectExtendedMetrics, false); + assert.equal(config.noHttpAgentKeepAlive, false); + assert.equal(config.distributedTracingMode, 0); + assert.equal(config.enableUseDiskRetryCaching, false); + assert.equal(config.enableResendInterval, 123); + assert.equal(config.enableMaxBytesOnDisk, 456); + assert.equal(config.enableInternalDebugLogging, false); + assert.equal(config.enableInternalWarningLogging, false); + assert.equal(config.enableSendLiveMetrics, false); + assert.equal(config.extendedMetricDisablers, "gc,heap"); + assert.equal(config.noDiagnosticChannel, false); + assert.equal(config.noPatchModules, "console,redis"); + assert.equal(config.quickPulseHost, "testquickpulsehost.com"); + assert.equal(config.enableWebInstrumentation, true); + assert.equal(config.webInstrumentationConnectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3330;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.deepEqual(config.webInstrumentationConfig, [{ name: "key1", value: "key1" }, { name: "key2", value: true }],); + assert.equal(config.webInstrumentationSrc, "webInstrumentationSourceFromJson"); }); - it("should take configurations from environment variables", () => { - process.env["APPLICATIONINSIGHTS_CONNECTION_STRING"] = connectionString; - process.env["APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC"] = "gc"; - process.env["APPLICATION_INSIGHTS_NO_PATCH_MODULES"] = "azuresdk"; - process.env["APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS"] = "true"; - process.env["APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL"] = "true"; - process.env["APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE"] = "true"; - process.env["https_proxy"] = "https://testproxy:3000"; - - applicationInsights.setup(); - applicationInsights.start(); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.connectionString, connectionString); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].extendedMetrics), JSON.stringify({ gc: false, heap: false, loop: false }, applicationInsights["defaultClient"]["_options"].extendedMetrics)); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].instrumentationOptions.redis), JSON.stringify({ enabled: false })); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].instrumentationOptions.redis4), JSON.stringify({ enabled: false })); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].instrumentationOptions.postgreSql), JSON.stringify({ enabled: false })); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.proxyOptions.host, "testproxy"); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.proxyOptions.port, 3000); + it("Should take configurations from environment variables", () => { + const env = <{ [id: string]: string }>{}; + env["APPLICATIONINSIGHTS_CONNECTION_STRING"] = "TestConnectionString"; + env["APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC"] = "gc"; + env["APPLICATION_INSIGHTS_NO_PATCH_MODULES"] = "azuresdk"; + env["APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS"] = "true"; + env["http_proxy"] = "testProxyHttpUrl2"; + env["https_proxy"] = "testProxyHttpsUrl2"; + env["APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL"] = "disabled"; + env["APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE"] = "disabled"; + env["APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED"] = "true"; + env["APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING"] = "WebInstrumentationConnectionString"; + env["APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE"] = "WebInstrumentationTestSource"; + process.env = env; + const config = ShimJsonConfig.getInstance(); + assert.equal(config.connectionString, "TestConnectionString"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl2"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl2"); + assert.equal(config.extendedMetricDisablers, "gc"); + assert.equal(config.disableAllExtendedMetrics, true, "wrong disableAllExtendedMetrics"); + assert.equal(config.noDiagnosticChannel, true, "wrong noDiagnosticChannel"); + assert.equal(config.noHttpAgentKeepAlive, true, "wrong noHttpAgentKeepAlive"); + assert.equal(config.noPatchModules, "azuresdk"); + assert.equal(config.enableWebInstrumentation, true, "wrong enableWebInstrumentation"); + assert.equal(config.webInstrumentationConnectionString, "WebInstrumentationConnectionString"); + assert.equal(config.webInstrumentationSrc, "WebInstrumentationTestSource"); + }); - delete process.env.APPLICATIONINSIGHTS_CONNECTION_STRING; - delete process.env.APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC; - delete process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES; - delete process.env.APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS; - delete process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL; - delete process.env.APPLICATION_INSIGHTS_NO_HTTP_AGENT_KEEP_ALIVE; - delete process.env.https_proxy; + it("Should take configurations from JSON config file over environment variables if both are configured", () => { + const env = <{ [id: string]: string }>{}; + const cutstomConfigJsonPath = path.resolve(__dirname, "../../../../test/unitTests/shim/config.json"); + env["APPLICATIONINSIGHTS_CONFIGURATION_FILE"] = cutstomConfigJsonPath; + env["APPLICATIONINSIGHTS_CONNECTION_STRING"] = "TestConnectionString"; + env["APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC"] = "gc"; + env["APPLICATION_INSIGHTS_NO_PATCH_MODULES"] = "azuresdk"; + env["APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS"] = "true"; + env["http_proxy"] = "testProxyHttpUrl2"; + env["https_proxy"] = "testProxyHttpsUrl2"; + env["APPINSIGHTS_WEB_SNIPPET_ENABLED"] = "false"; + env["APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_ENABLED"] = "WebInstrumentationConnectionString"; + env["APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_CONNECTION_STRING"] = "true"; + env["APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE"] = "WebInstrumentationTestSource" + process.env = env; + const config = ShimJsonConfig.getInstance(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl"); + assert.equal(config.extendedMetricDisablers, "gc,heap"); + assert.equal(config.disableAllExtendedMetrics, false); + assert.equal(config.noDiagnosticChannel, false); + assert.equal(config.noHttpAgentKeepAlive, false); + assert.equal(config.noPatchModules, "console,redis"); + assert.equal(config.enableWebInstrumentation, true); + assert.equal(config.webInstrumentationConnectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3330;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.equal(config.webInstrumentationSrc, "webInstrumentationSourceFromJson"); }); - it("should take configuration from JSON string", () => { - const inputJson = { + it("Should take configuration from JSON string in APPLICATIONINSIGHTS_CONFIGURATION_CONTENT", () => { + const env = <{ [id: string]: string }>{}; + + let inputJson = { "connectionString": "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/", "endpointUrl": "testEndpointUrl", "disableAllExtendedMetrics": false, + "maxBatchSize": 150, + "maxBatchIntervalMs": 12000, "disableAppInsights": false, - "samplingPercentage": 60, - "correlationHeaderExcludedDomains": ["bing.com"], - "proxyHttpsUrl": "https://test:3000", - "enableAutoCollectExternalLoggers": true, - "enableAutoCollectConsole": true, - "enableAutoCollectExceptions": true, - "enableAutoCollectPerformance": true, - "enableAutoCollectExtendedMetrics": true, - "enableAutoCollectPreAggregatedMetrics": true, - "enableAutoCollectRequests": true, - "enableAutoCollectDependencies": true, - "enableAutoDependencyCorrelation": true, + "samplingPercentage": 30, + "correlationHeaderExcludedDomains": [ + "domain1", + "domain2" + ], + "proxyHttpUrl": "testProxyHttpUrl", + "proxyHttpsUrl": "testProxyHttpsUrl", + "ignoreLegacyHeaders": false, + "enableAutoCollectExternalLoggers": false, + "enableAutoCollectConsole": false, + "enableAutoCollectExceptions": false, + "enableAutoCollectPerformance": false, + "enableAutoCollectExtendedMetrics": false, + "enableAutoCollectPreAggregatedMetrics": false, + "enableAutoCollectHeartbeat": false, + "enableAutoCollectRequests": false, + "enableAutoCollectDependencies": false, + "enableAutoDependencyCorrelation": false, "enableAutoCollectIncomingRequestAzureFunctions": false, - "noHttpAgentKeepAlive": true, + "enableUseAsyncHooks": false, + "noHttpAgentKeepAlive": false, "distributedTracingMode": 0, + "enableUseDiskRetryCaching": false, + "enableResendInterval": 123, + "enableMaxBytesOnDisk": 456, "enableInternalDebugLogging": false, "enableInternalWarningLogging": false, + "enableSendLiveMetrics": false, "extendedMetricDisablers": "gc,heap", "noDiagnosticChannel": false, - "noPatchModules": "redis,azuresdk", - "maxBatchIntervalMs": 1500 + "noPatchModules": "console,redis", + "quickPulseHost": "testquickpulsehost.com", + "enableWebInstrumentation": true, + "webInstrumentationConnectionString": "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3330;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/", + "webInstrumentationConfig": [{"name": "key1","value": "key1"},{"name":"key2", "value": true}], + "webInstrumentationSrc":"webInstrumentationSourceFromJson" }; - process.env["APPLICATIONINSIGHTS_CONFIGURATION_CONTENT"] = JSON.stringify(inputJson); - applicationInsights.setup(); - applicationInsights.start(); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.proxyOptions.host, "test"); - assert.equal(applicationInsights["defaultClient"]["_options"].azureMonitorExporterConfig.proxyOptions.port, 3000); - assert.equal(applicationInsights["defaultClient"]["_options"].samplingRatio, 0.6, JSON.stringify(ShimJsonConfig["_instance"])); - const ignoreOutgoingUrls = applicationInsights["defaultClient"]["_options"].instrumentationOptions.http as HttpInstrumentationConfig; - assert.equal(ignoreOutgoingUrls.ignoreOutgoingUrls, "bing.com"); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].logInstrumentations), JSON.stringify({ console: { enabled: true }, winston: { enabled: true }, bunyan: { enabled: true } })); - assert.equal(applicationInsights["defaultClient"]["_options"].enableAutoCollectExceptions, true); - assert.equal(applicationInsights["defaultClient"]["_options"].enableAutoCollectPerformance, true); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].extendedMetrics), JSON.stringify({ gc: true, heap: true, loop: true })); - assert.equal(applicationInsights["defaultClient"]["_options"].instrumentationOptions.http.hasOwnProperty("ignoreIncomingRequestHook"), true); - assert.equal(applicationInsights["defaultClient"]["_options"].instrumentationOptions.http.hasOwnProperty("ignoreOutgoingRequestHook"), true); - assert.equal( - JSON.stringify(applicationInsights["defaultClient"]["_options"].otlpTraceExporterConfig), - JSON.stringify({ timeoutMillis: 1500, enabled: false }) - ); - assert.equal( - JSON.stringify(applicationInsights["defaultClient"]["_options"].otlpMetricExporterConfig), - JSON.stringify({ timeoutMillis: 1500, enabled: false }) - ); - assert.equal( - JSON.stringify(applicationInsights["defaultClient"]["_options"].otlpLogExporterConfig), - JSON.stringify({ timeoutMillis: 1500, enabled: false }) - ); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].instrumentationOptions.redis), JSON.stringify({ enabled: false })); - assert.equal(JSON.stringify(applicationInsights["defaultClient"]["_options"].instrumentationOptions.azureSdk), JSON.stringify({ enabled: false })); - - delete process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT; + env["APPLICATIONINSIGHTS_CONFIGURATION_CONTENT"] = JSON.stringify(inputJson); + process.env = env; + const config = ShimJsonConfig.getInstance(); + assert.equal(config.connectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.equal(config.endpointUrl, "testEndpointUrl"); + assert.equal(config.maxBatchSize, 150); + assert.equal(config.maxBatchIntervalMs, 12000); + assert.equal(config.disableAppInsights, false); + assert.equal(config.samplingPercentage, 30); + assert.equal(config.correlationHeaderExcludedDomains[0], "domain1"); + assert.equal(config.correlationHeaderExcludedDomains[1], "domain2"); + assert.equal(config.proxyHttpUrl, "testProxyHttpUrl"); + assert.equal(config.proxyHttpsUrl, "testProxyHttpsUrl"); + assert.equal(config.ignoreLegacyHeaders, false); + assert.equal(config.enableAutoCollectExternalLoggers, false); + assert.equal(config.enableAutoCollectConsole, false); + assert.equal(config.enableAutoCollectExceptions, false); + assert.equal(config.enableAutoCollectPerformance, false); + assert.equal(config.enableAutoCollectPreAggregatedMetrics, false); + assert.equal(config.enableAutoCollectHeartbeat, false); + assert.equal(config.enableAutoCollectRequests, false); + assert.equal(config.enableAutoCollectDependencies, false); + assert.equal(config.enableAutoDependencyCorrelation, false); + assert.equal(config.enableAutoCollectIncomingRequestAzureFunctions, false); + assert.equal(config.enableUseAsyncHooks, false); + assert.equal(config.enableAutoCollectExtendedMetrics, false); + assert.equal(config.noHttpAgentKeepAlive, false); + assert.equal(config.distributedTracingMode, 0); + assert.equal(config.enableUseDiskRetryCaching, false); + assert.equal(config.enableResendInterval, 123); + assert.equal(config.enableMaxBytesOnDisk, 456); + assert.equal(config.enableInternalDebugLogging, false); + assert.equal(config.enableInternalWarningLogging, false); + assert.equal(config.enableSendLiveMetrics, false); + assert.equal(config.extendedMetricDisablers, "gc,heap"); + assert.equal(config.noDiagnosticChannel, false); + assert.equal(config.noPatchModules, "console,redis"); + assert.equal(config.quickPulseHost, "testquickpulsehost.com"); + assert.equal(config.enableWebInstrumentation, true); + assert.equal(config.webInstrumentationConnectionString, "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3330;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/"); + assert.deepEqual(config.webInstrumentationConfig, [{ name: "key1", value: "key1" }, { name: "key2", value: true }],); + assert.equal(config.webInstrumentationSrc, "webInstrumentationSourceFromJson"); }); }); }); From d0c2b09f98d19f3b16eba399de8dacb6ecaffafd Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 11:04:06 -0700 Subject: [PATCH 06/14] Update dependencies --- package-lock.json | 7 +++--- package.json | 3 +-- src/applicationInsightsClient.ts | 3 --- src/index.ts | 39 +++++++++++++++++++++++++++++++- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3119b3e3f..ff246d5f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,8 +13,7 @@ "@azure/core-client": "^1.0.0", "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", - "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "@azure/monitor-opentelemetry-exporter": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", + "@azure/monitor-opentelemetry": "1.0.0-beta.2", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5", "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", @@ -5515,7 +5514,7 @@ } }, "@azure/monitor-opentelemetry": { - "version": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", + "version": "1.0.0-beta.2", "integrity": "sha512-cUpvYBQJPKFhFyw4hs/IJbRAm8R+6HQtWMrqRdZvWdHOJyv3F229Xlxh8/u/WI0E8Im1uz7hEso8k1+shumVJA==", "requires": { "@azure/functions": "^3.2.0", @@ -5541,7 +5540,7 @@ } }, "@azure/monitor-opentelemetry-exporter": { - "version": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", + "version": "1.0.0-beta.14", "integrity": "sha512-1srRw6wDgFUMu7F1UtnuXPBwNlOi9jkyP+avNSvbl7uQJDnF4Y3IprUPAvEr5V//luPIxAUTzyNtE+SNquDlqg==", "requires": { "@azure/core-auth": "^1.3.0", diff --git a/package.json b/package.json index e4fe57d12..91af8af0b 100644 --- a/package.json +++ b/package.json @@ -69,8 +69,7 @@ "@azure/core-client": "^1.0.0", "@azure/core-rest-pipeline": "^1.9.2", "@azure/identity": "^3.1.3", - "@azure/monitor-opentelemetry": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "@azure/monitor-opentelemetry-exporter": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", + "@azure/monitor-opentelemetry": "1.0.0-beta.2", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5", "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", diff --git a/src/applicationInsightsClient.ts b/src/applicationInsightsClient.ts index 6d370ea90..e63d3b5f3 100644 --- a/src/applicationInsightsClient.ts +++ b/src/applicationInsightsClient.ts @@ -7,7 +7,6 @@ import { MeterProvider } from "@opentelemetry/sdk-metrics"; import { logs } from "@opentelemetry/api-logs"; import { LoggerProvider } from "@opentelemetry/sdk-logs"; import { BasicTracerProvider } from "@opentelemetry/sdk-trace-node"; - import { Logger } from "./shared/logging"; import { AutoCollectConsole } from "./logs/console"; import { AutoCollectExceptions } from "./logs/exceptions"; @@ -16,14 +15,12 @@ import { ApplicationInsightsConfig } from "./shared/configuration/config"; import { LogApi } from "./logs/api"; - export class ApplicationInsightsClient { private _internalConfig: ApplicationInsightsConfig; private _console: AutoCollectConsole; private _exceptions: AutoCollectExceptions; private _logApi: LogApi; - /** * Constructs a new client * @param options ApplicationInsightsOptions diff --git a/src/index.ts b/src/index.ts index 05b4a6cb7..61b5753ff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,13 @@ // Copyright (c) Microsoft Corporation. + +import { shutdownAzureMonitor, useAzureMonitor } from "@azure/monitor-opentelemetry"; +import { ApplicationInsightsConfig } from "./shared/configuration/config"; +import { AutoCollectConsole } from "./logs/console"; +import { LogApi } from "./logs/api"; +import { logs } from "@opentelemetry/api-logs"; +import { AutoCollectExceptions } from "./logs/exceptions"; +import { ApplicationInsightsOptions } from "./types"; + // Licensed under the MIT license. export { TelemetryClient } from "./shim/telemetryClient"; export { ApplicationInsightsOptions } from "./types"; @@ -15,4 +24,32 @@ export { export { ApplicationInsightsClient } from "./applicationInsightsClient"; // To support the shim -export * from ".."; \ No newline at end of file +export * from ".."; + + +let console: AutoCollectConsole; +let exceptions: AutoCollectExceptions; + +/** + * Initialize Application Insights + * @param options Azure Monitor OpenTelemetry Options + */ +export function useApplicationInsights(options?: ApplicationInsightsOptions) { + useAzureMonitor(options); + const internalConfig = new ApplicationInsightsConfig(options); + console = new AutoCollectConsole(this._logApi); + const logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); + if (internalConfig.enableAutoCollectExceptions) { + exceptions = new AutoCollectExceptions(this._logApi); + } + console.enable(this._internalConfig.logInstrumentationOptions); +} + +/** +* Shutdown Application Insights +*/ +export function shutdownApplicationInsights() { + shutdownAzureMonitor(); + console.shutdown(); + exceptions?.shutdown(); +} From 67ad18d98034522a5ae3d5bf003b90904bbd8204 Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 11:05:47 -0700 Subject: [PATCH 07/14] Build update --- .github/workflows/backcompat.yml | 2 +- .github/workflows/integration.yml | 2 +- .github/workflows/node.js.yml | 2 +- .github/workflows/npm-publish.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/backcompat.yml b/.github/workflows/backcompat.yml index e57e541b5..5456dd3da 100644 --- a/.github/workflows/backcompat.yml +++ b/.github/workflows/backcompat.yml @@ -21,5 +21,5 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm ci + - run: npm i - run: npm run backcompattest diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e2e20204f..45df73bc1 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -22,5 +22,5 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm ci + - run: npm i - run: npm run functionaltest diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7929e7ee3..931d8c075 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -24,7 +24,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm run clean - - run: npm ci + - run: npm i - run: npm run build --if-present - run: npm run lint - run: npm test \ No newline at end of file diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3b4a39878..f8eab1ce0 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -29,7 +29,7 @@ jobs: with: node-version: 12 registry-url: https://registry.npmjs.org/ - - run: npm ci + - run: npm i - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} From cf152fc524ef084297883794e01274b048ae990e Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 11:11:24 -0700 Subject: [PATCH 08/14] Update package-lock --- package-lock.json | 5749 ++------------------------------------------- 1 file changed, 184 insertions(+), 5565 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff246d5f2..113c8466c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5395 +1,8 @@ { "name": "applicationinsights", "version": "3.0.0-beta.7", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "applicationinsights", - "version": "3.0.0-beta.7", - "license": "MIT", - "dependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.0.0", - "@azure/core-rest-pipeline": "^1.9.2", - "@azure/identity": "^3.1.3", - "@azure/monitor-opentelemetry": "1.0.0-beta.2", - "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.5", - "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.41.2", - "@opentelemetry/core": "^1.15.2", - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/instrumentation-http": "^0.41.2", - "@opentelemetry/instrumentation-mongodb": "^0.36.0", - "@opentelemetry/instrumentation-mysql": "^0.34.1", - "@opentelemetry/instrumentation-pg": "^0.36.1", - "@opentelemetry/instrumentation-redis": "^0.35.1", - "@opentelemetry/instrumentation-redis-4": "^0.35.1", - "@opentelemetry/otlp-exporter-base": "^0.41.2", - "@opentelemetry/resources": "^1.15.2", - "@opentelemetry/sdk-logs": "^0.41.2", - "@opentelemetry/sdk-metrics": "^1.15.2", - "@opentelemetry/sdk-trace-base": "^1.15.2", - "@opentelemetry/sdk-trace-node": "^1.15.2", - "@opentelemetry/semantic-conventions": "^1.15.2", - "diagnostic-channel": "1.1.1", - "diagnostic-channel-publishers": "1.0.7" - }, - "devDependencies": { - "@azure/functions": "^3.2.0", - "@types/long": "^4.0.2", - "@types/microsoft__typescript-etw": "^0.1.0", - "@types/mocha": "^7.0.2", - "@types/node": "^8.0.0", - "@types/semver": "7.3.9", - "@types/sinon": "^10.0.12", - "@typescript-eslint/eslint-plugin": "^5.37.0", - "@typescript-eslint/parser": "^5.37.0", - "applicationinsights-native-metrics": "0.0.8", - "eslint": "^8.0.0", - "eslint-plugin-node": "^11.1.0", - "mocha": "^10.0.0", - "nock": "^12.0.3", - "nyc": "^15.0.0", - "prettier": "^2.5.1", - "sinon": "^9.0.2", - "typescript": "~4.8.0" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependencies": { - "applicationinsights-native-metrics": "*" - }, - "peerDependenciesMeta": { - "applicationinsights-native-metrics": { - "optional": true - } - } - }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@azure/abort-controller": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", - "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz", - "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-client": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.7.3.tgz", - "integrity": "sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.9.1", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.0.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.0.tgz", - "integrity": "sha512-+MnSB0vGZjszSzr5AW8z93/9fkDu2RLtWmAN8gskURq7EW2sSwqy8jZa0V26rjuBVkwhdA3Hw8z3VWoeBUOw+A==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.3.0", - "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", - "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.4.0.tgz", - "integrity": "sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/functions": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@azure/functions/-/functions-3.5.1.tgz", - "integrity": "sha512-6UltvJiuVpvHSwLcK/Zc6NfUwlkDLOFFx97BHCJzlWNsfiWwzwmTsxJXg4kE/LemKTHxPpfoPE+kOJ8hAdiKFQ==", - "dependencies": { - "iconv-lite": "^0.6.3", - "long": "^4.0.0", - "uuid": "^8.3.0" - } - }, - "node_modules/@azure/identity": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-3.2.4.tgz", - "integrity": "sha512-t63oyi2LAn+ZAehYA7SDlhJDd1J0eLO3a21mxTaJcXqKW/tbRbKmo/BeyyTIXbBaoeTFn0xnyQHyomwndTqKUA==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.4.0", - "@azure/core-rest-pipeline": "^1.1.0", - "@azure/core-tracing": "^1.0.0", - "@azure/core-util": "^1.0.0", - "@azure/logger": "^1.0.0", - "@azure/msal-browser": "^2.37.1", - "@azure/msal-common": "^13.1.0", - "@azure/msal-node": "^1.17.3", - "events": "^3.0.0", - "jws": "^4.0.0", - "open": "^8.0.0", - "stoppable": "^1.1.0", - "tslib": "^2.2.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", - "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/monitor-opentelemetry": { - "version": "1.0.0-beta.2", - "resolved": "file:azure-monitor-opentelemetry-1.0.0-beta.2.tgz", - "integrity": "sha512-cUpvYBQJPKFhFyw4hs/IJbRAm8R+6HQtWMrqRdZvWdHOJyv3F229Xlxh8/u/WI0E8Im1uz7hEso8k1+shumVJA==", - "license": "MIT", - "dependencies": { - "@azure/functions": "^3.2.0", - "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.14", - "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.3", - "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.41.2", - "@opentelemetry/core": "^1.15.2", - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/instrumentation-http": "^0.41.2", - "@opentelemetry/instrumentation-mongodb": "^0.36.0", - "@opentelemetry/instrumentation-mysql": "^0.34.0", - "@opentelemetry/instrumentation-pg": "^0.36.0", - "@opentelemetry/instrumentation-redis": "^0.35.0", - "@opentelemetry/instrumentation-redis-4": "^0.35.0", - "@opentelemetry/resources": "^1.15.0", - "@opentelemetry/sdk-logs": "^0.41.0", - "@opentelemetry/sdk-metrics": "^1.15.0", - "@opentelemetry/sdk-trace-base": "^1.15.0", - "@opentelemetry/sdk-trace-node": "^1.15.0", - "@opentelemetry/semantic-conventions": "^1.15.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/monitor-opentelemetry-exporter": { - "version": "1.0.0-beta.14", - "resolved": "file:azure-monitor-opentelemetry-exporter-1.0.0-beta.14.tgz", - "integrity": "sha512-1srRw6wDgFUMu7F1UtnuXPBwNlOi9jkyP+avNSvbl7uQJDnF4Y3IprUPAvEr5V//luPIxAUTzyNtE+SNquDlqg==", - "license": "MIT", - "dependencies": { - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.0.0", - "@azure/core-rest-pipeline": "^1.1.0", - "@opentelemetry/api": "^1.4.1", - "@opentelemetry/api-logs": "^0.41.2", - "@opentelemetry/core": "^1.15.2", - "@opentelemetry/resources": "^1.15.2", - "@opentelemetry/sdk-logs": "^0.41.2", - "@opentelemetry/sdk-metrics": "^1.15.2", - "@opentelemetry/sdk-trace-base": "^1.15.2", - "@opentelemetry/semantic-conventions": "^1.15.2", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/msal-browser": { - "version": "2.38.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.38.0.tgz", - "integrity": "sha512-gxBh83IumHgEP9uMCm9pJLKLRwICMQTxG9TX3AytdNt3oLUI3tytm/szYD5u5zKJgSkhHvwFSM+NPnM04hYw3w==", - "dependencies": { - "@azure/msal-common": "13.2.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-common": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.2.0.tgz", - "integrity": "sha512-rnstQ7Zgn3fSTKNQO+/YNV34/QXJs0vni7IA0/3QB1EEyrJg14xyRmTqlw9ta+pdSuT5OJwUP8kI3D/rBwUIBw==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@azure/msal-node": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.0.tgz", - "integrity": "sha512-N6GX1Twxw524e7gaJvj7hKtrPRmZl9qGY7U4pmUdx4XzoWYRFfYk4H1ZjVhQ7pwb5Ks88NNhbXVCagsuYPTEFg==", - "dependencies": { - "@azure/msal-common": "13.2.0", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": "10 || 12 || 14 || 16 || 18" - } - }, - "node_modules/@azure/opentelemetry-instrumentation-azure-sdk": { - "version": "1.0.0-beta.5", - "resolved": "https://registry.npmjs.org/@azure/opentelemetry-instrumentation-azure-sdk/-/opentelemetry-instrumentation-azure-sdk-1.0.0-beta.5.tgz", - "integrity": "sha512-fsUarKQDvjhmBO4nIfaZkfNSApm1hZBzcvpNbSrXdcUBxu7lRvKsV5DnwszX7cnhLyVOW9yl1uigtRQ1yDANjA==", - "dependencies": { - "@azure/core-tracing": "^1.0.0", - "@azure/logger": "^1.0.0", - "@opentelemetry/api": "^1.4.1", - "@opentelemetry/core": "^1.15.2", - "@opentelemetry/instrumentation": "^0.41.2", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", - "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.22.10", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz", - "integrity": "sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz", - "integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-compilation-targets": "^7.22.10", - "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.10", - "@babel/parser": "^7.22.10", - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.10", - "@babel/types": "^7.22.10", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz", - "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.10", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz", - "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.22.9", - "@babel/helper-validator-option": "^7.22.5", - "browserslist": "^4.21.9", - "lru-cache": "^5.1.1", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", - "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", - "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", - "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz", - "integrity": "sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-module-imports": "^7.22.5", - "@babel/helper-simple-access": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/helper-validator-identifier": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", - "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", - "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz", - "integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.10", - "@babel/types": "^7.22.10" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", - "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", - "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.10", - "@babel/generator": "^7.22.10", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.10", - "@babel/types": "^7.22.10", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", - "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", - "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", - "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", - "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", - "dev": true, - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@opentelemetry/api": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.4.1.tgz", - "integrity": "sha512-O2yRJce1GOc6PAy3QxFM4NzFiWzvScDC1/5ihYBL6BUEVdq0XMWN01sppE+H6bBXbaFYipjwFLEWLg5PaSOThA==", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/api-logs": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.41.2.tgz", - "integrity": "sha512-JEV2RAqijAFdWeT6HddYymfnkiRu2ASxoTBr4WsnGJhOjWZkEy6vp+Sx9ozr1NaIODOa2HUyckExIqQjn6qywQ==", - "dependencies": { - "@opentelemetry/api": "^1.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/context-async-hooks": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.15.2.tgz", - "integrity": "sha512-VAMHG67srGFQDG/N2ns5AyUT9vUcoKpZ/NpJ5fDQIPfJd7t3ju+aHwvDsMcrYBWuCh03U3Ky6o16+872CZchBg==", - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/core": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-1.15.2.tgz", - "integrity": "sha512-+gBv15ta96WqkHZaPpcDHiaz0utiiHZVfm2YOYSqFGrUaJpPkMoSuLBB58YFQGi6Rsb9EHos84X6X5+9JspmLw==", - "dependencies": { - "@opentelemetry/semantic-conventions": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/instrumentation": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.41.2.tgz", - "integrity": "sha512-rxU72E0pKNH6ae2w5+xgVYZLzc5mlxAbGzF4shxMVK8YC2QQsfN38B2GPbj0jvrKWWNUElfclQ+YTykkNg/grw==", - "dependencies": { - "@types/shimmer": "^1.0.2", - "import-in-the-middle": "1.4.2", - "require-in-the-middle": "^7.1.1", - "semver": "^7.5.1", - "shimmer": "^1.2.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.41.2.tgz", - "integrity": "sha512-dzOC6xkfK0LM6Dzo91aInLdSbdIzKA0IgSDnyLi6YZ0Z7c1bfrFncFx/3gZs8vi+KXLALgfMlpzE7IYDW/cM3A==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/instrumentation": "0.41.2", - "@opentelemetry/semantic-conventions": "1.15.2", - "semver": "^7.5.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.36.1.tgz", - "integrity": "sha512-//FdYXGcUO08Y1tVPXlcEvUYCnRU8tlBgYBe3ZMjF7E1GMaFti4Xy6sAHVreyl0ZQjBTaGtHdyORHIOTKUM4ZA==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/sdk-metrics": "^1.9.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-mysql": { - "version": "0.34.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.34.1.tgz", - "integrity": "sha512-zQq7hN3ILm1vIJCGeKHRc4pTK8LOmkTt8oKWf0v+whFs7axieIhXZMoCqIBm6BigLy3Trg5iaKyuSrx7kO6q2g==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/mysql": "2.15.21" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-pg": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.36.1.tgz", - "integrity": "sha512-k8L7RSRTQ6e+DbHEXZB8Tmf/efkQnWKeClpZb3TEdb34Pvme4PmcpG2zb6JtM99nNrshNlVDLCZ90U3xDneTbw==", - "dependencies": { - "@opentelemetry/core": "^1.8.0", - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@opentelemetry/sql-common": "^0.40.0", - "@types/pg": "8.6.1", - "@types/pg-pool": "2.0.3" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-redis": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.35.1.tgz", - "integrity": "sha512-zY7eTzGyJCMX/0o04Q9yLy7gllf7Zh4s+g7Kv1d2cMLtTt9zGSlncqj49uNCnneywnpMNRUIwcmd+Ch1bQeh+g==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-redis-4": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis-4/-/instrumentation-redis-4-0.35.1.tgz", - "integrity": "sha512-tQ07wvtjUbHSvvhPPvWyZjYTSzVBTpC746ro5szLnniodvxtKkmP/N+R9KyFXfyH7wwaLIR1Scgq3XSGSppt+Q==", - "dependencies": { - "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/redis-common": "^0.36.1", - "@opentelemetry/semantic-conventions": "^1.0.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/otlp-exporter-base": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/otlp-exporter-base/-/otlp-exporter-base-0.41.2.tgz", - "integrity": "sha512-pfwa6d+Dax3itZcGWiA0AoXeVaCuZbbqUTsCtOysd2re8C2PWXNxDONUfBWsn+KgxAdi+ljwTjJGiaVLDaIEvQ==", - "dependencies": { - "@opentelemetry/core": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0" - } - }, - "node_modules/@opentelemetry/propagator-b3": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-1.15.2.tgz", - "integrity": "sha512-ZSrL3DpMEDsjD8dPt9Ze3ue53nEXJt512KyxXlLgLWnSNbe1mrWaXWkh7OLDoVJh9LqFw+tlvAhDVt/x3DaFGg==", - "dependencies": { - "@opentelemetry/core": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/propagator-jaeger": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-1.15.2.tgz", - "integrity": "sha512-6m1yu7PVDIRz6BwA36lacfBZJCfAEHKgu+kSyukNwVdVjsTNeyD9xNPQnkl0WN7Rvhk8/yWJ83tLPEyGhk1wCQ==", - "dependencies": { - "@opentelemetry/core": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/redis-common": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.36.1.tgz", - "integrity": "sha512-YjfNEr7DK1Ymc5H0bzhmqVvMcCs+PUEUerzrpTFdHfZxj3HpnnjZTIFKx/gxiL/sajQ8dxycjlreoYTVYKBXlw==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/resources": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-1.15.2.tgz", - "integrity": "sha512-xmMRLenT9CXmm5HMbzpZ1hWhaUowQf8UB4jMjFlAxx1QzQcsD3KFNAVX/CAWzFPtllTyTplrA4JrQ7sCH3qmYw==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/semantic-conventions": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/sdk-logs": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-logs/-/sdk-logs-0.41.2.tgz", - "integrity": "sha512-smqKIw0tTW15waj7BAPHFomii5c3aHnSE4LQYTszGoK5P9nZs8tEAIpu15UBxi3aG31ZfsLmm4EUQkjckdlFrw==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/resources": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.4.0 <1.5.0", - "@opentelemetry/api-logs": ">=0.39.1" - } - }, - "node_modules/@opentelemetry/sdk-metrics": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-1.15.2.tgz", - "integrity": "sha512-9aIlcX8GnhcsAHW/Wl8bzk4ZnWTpNlLtud+fxUfBtFATu6OZ6TrGrF4JkT9EVrnoxwtPIDtjHdEsSjOqisY/iA==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/resources": "1.15.2", - "lodash.merge": "^4.6.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-base": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.15.2.tgz", - "integrity": "sha512-BEaxGZbWtvnSPchV98qqqqa96AOcb41pjgvhfzDij10tkBhIu9m0Jd6tZ1tJB5ZHfHbTffqYVYE0AOGobec/EQ==", - "dependencies": { - "@opentelemetry/core": "1.15.2", - "@opentelemetry/resources": "1.15.2", - "@opentelemetry/semantic-conventions": "1.15.2" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-node": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-1.15.2.tgz", - "integrity": "sha512-5deakfKLCbPpKJRCE2GPI8LBE2LezyvR17y3t37ZI3sbaeogtyxmBaFV+slmG9fN8OaIT+EUsm1QAT1+z59gbQ==", - "dependencies": { - "@opentelemetry/context-async-hooks": "1.15.2", - "@opentelemetry/core": "1.15.2", - "@opentelemetry/propagator-b3": "1.15.2", - "@opentelemetry/propagator-jaeger": "1.15.2", - "@opentelemetry/sdk-trace-base": "1.15.2", - "semver": "^7.5.1" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.5.0" - } - }, - "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.15.2.tgz", - "integrity": "sha512-CjbOKwk2s+3xPIMcd5UNYQzsf+v94RczbdNix9/kQh38WiQkM90sUOi3if8eyHFgiBjBjhwXrA7W3ydiSQP9mw==", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/sql-common": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.40.0.tgz", - "integrity": "sha512-vSqRJYUPJVjMFQpYkQS3ruexCPSZJ8esne3LazLwtCPaPRvzZ7WG3tX44RouAn7w4wMp8orKguBqtt+ng2UTnw==", - "dependencies": { - "@opentelemetry/core": "^1.1.0" - }, - "engines": { - "node": ">=14" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0" - } - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.6", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", - "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", - "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", - "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", - "dev": true - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.12", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", - "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", - "dev": true - }, - "node_modules/@types/long": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", - "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==", - "dev": true - }, - "node_modules/@types/microsoft__typescript-etw": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@types/microsoft__typescript-etw/-/microsoft__typescript-etw-0.1.1.tgz", - "integrity": "sha512-zdgHyZJEwbFKI6zhOqWPsNMhlrAk6qMrn9VMA6VQtRt/F+jNJKeaHIMysuO9oTLv0fWcli0gwUrMv8MeFyb3Sw==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", - "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", - "dev": true - }, - "node_modules/@types/mysql": { - "version": "2.15.21", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.21.tgz", - "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" - }, - "node_modules/@types/pg": { - "version": "8.6.1", - "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.6.1.tgz", - "integrity": "sha512-1Kc4oAGzAl7uqUStZCDvaLFqZrW9qWSjXOmBfdgyBP5La7Us6Mg4GBvRlSoaZMhQF/zSj1C8CtKMBkoiT8eL8w==", - "dependencies": { - "@types/node": "*", - "pg-protocol": "*", - "pg-types": "^2.2.0" - } - }, - "node_modules/@types/pg-pool": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/pg-pool/-/pg-pool-2.0.3.tgz", - "integrity": "sha512-fwK5WtG42Yb5RxAwxm3Cc2dJ39FlgcaNiXKvtTLAwtCn642X7dgel+w1+cLWwpSOFImR3YjsZtbkfjxbHtFAeg==", - "dependencies": { - "@types/pg": "*" - } - }, - "node_modules/@types/semver": { - "version": "7.3.9", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.9.tgz", - "integrity": "sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ==", - "dev": true - }, - "node_modules/@types/shimmer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/shimmer/-/shimmer-1.0.2.tgz", - "integrity": "sha512-dKkr1bTxbEsFlh2ARpKzcaAmsYixqt9UyCdoEZk8rHyE4iQYcDCyvSjDSf7JUWJHlJiTtbIoQjxKh6ViywqDAg==" - }, - "node_modules/@types/sinon": { - "version": "10.0.16", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz", - "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==", - "dev": true, - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", - "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", - "dev": true - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", - "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/type-utils": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", - "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", - "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "5.62.0", - "@typescript-eslint/utils": "5.62.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/types": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", - "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", - "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/@typescript-eslint/utils/node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "dependencies": { - "default-require-extensions": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/applicationinsights-native-metrics": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/applicationinsights-native-metrics/-/applicationinsights-native-metrics-0.0.8.tgz", - "integrity": "sha512-3areRz2+Q1EPWbQYokfOgYXLkZyBzeReI9716nw97p697gFUfGqYgwJ5fCopftvHycW2zuRWTFJWmA70S5605A==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.8", - "nan": "^2.14.0" - }, - "engines": { - "node": ">=6.0.0", - "npm": ">=3.8.6" - } - }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "dev": true - }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", - "dev": true - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "dev": true, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/browserslist": { - "version": "4.21.10", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", - "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001517", - "electron-to-chromium": "^1.4.477", - "node-releases": "^2.0.13", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, - "node_modules/caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "dependencies": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001519", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz", - "integrity": "sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/cjs-module-lexer": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", - "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==" - }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/default-require-extensions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", - "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", - "dev": true, - "dependencies": { - "strip-bom": "^4.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "engines": { - "node": ">=8" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true - }, - "node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/diagnostic-channel": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/diagnostic-channel/-/diagnostic-channel-1.1.1.tgz", - "integrity": "sha512-r2HV5qFkUICyoaKlBEpLKHjxMXATUf/l+h8UZPGBHGLy4DDiY2sOLcIctax4eRnTw5wH2jTMExLntGPJ8eOJxw==", - "dependencies": { - "semver": "^7.5.3" - } - }, - "node_modules/diagnostic-channel-publishers": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.7.tgz", - "integrity": "sha512-SEECbY5AiVt6DfLkhkaHNeshg1CogdLLANA8xlG/TKvS+XUgvIKl7VspJGYiEdL5OUyzMVnr7o0AwB7f+/Mjtg==", - "peerDependencies": { - "diagnostic-channel": "*" - } - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.486", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.486.tgz", - "integrity": "sha512-9zn9/2lbMGY/mFhoUymD9ODYdLY3zjUW/IW9ihU/sJVeIlD70m2aAb86S35aRGF+iwqLuQP25epruayZjKNjBw==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", - "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.1", - "@eslint/js": "^8.46.0", - "@humanwhocodes/config-array": "^0.11.10", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.2", - "espree": "^9.6.1", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, - "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, - "node_modules/eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", - "dev": true, - "dependencies": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "peerDependencies": { - "eslint": ">=5.16.0" - } - }, - "node_modules/eslint-plugin-node/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", - "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs-minipass/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "dev": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "dev": true - }, - "node_modules/hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-in-the-middle": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-1.4.2.tgz", - "integrity": "sha512-9WOz1Yh/cvO/p69sxRmhyQwrIGGSp7EIdcb+fFNVi7CzQGQB8U1/1XrKVSbEd/GNOAeM0peJtmi7+qphe7NvAw==", - "dependencies": { - "acorn": "^8.8.2", - "acorn-import-assertions": "^1.9.0", - "cjs-module-lexer": "^1.2.2", - "module-details-from-path": "^1.0.3" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "dependencies": { - "append-transform": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/istanbul-lib-processinfo": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", - "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", - "dev": true, - "dependencies": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.3", - "istanbul-lib-coverage": "^3.2.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonwebtoken": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", - "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==", - "dependencies": { - "jws": "^3.2.2", - "lodash": "^4.17.21", - "ms": "^2.1.1", - "semver": "^7.3.8" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/jsonwebtoken/node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jsonwebtoken/node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "node_modules/jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "dependencies": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/module-details-from-path": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz", - "integrity": "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==" - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "node_modules/nise": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", - "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node_modules/nock": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/nock/-/nock-12.0.3.tgz", - "integrity": "sha512-QNb/j8kbFnKCiyqi9C5DD0jH/FubFGj5rt9NQFONXwQm3IPB0CULECg/eS3AU1KgZb/6SwUa4/DTRKhVxkGABw==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.13", - "propagate": "^2.0.0" - }, - "engines": { - "node": ">= 10.13" - } - }, - "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "dependencies": { - "process-on-spawn": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", - "dev": true - }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dev": true, - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "node_modules/nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "dependencies": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "bin": { - "nyc": "bin/nyc.js" - }, - "engines": { - "node": ">=8.9" - } - }, - "node_modules/nyc/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/nyc/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/nyc/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/nyc/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nyc/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", - "dev": true, - "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pg-protocol": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", - "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" - }, - "node_modules/pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "engines": { - "node": ">=4" - } - }, - "node_modules/postgres-bytea": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "dependencies": { - "xtend": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "dependencies": { - "fromentries": "^1.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/propagate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", - "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", - "dev": true, - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-in-the-middle": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-7.2.0.tgz", - "integrity": "sha512-3TLx5TGyAY6AOqLBoXmHkNql0HIf2RGbuMgCDT2WO/uGVAPJs6h7Kl+bN6TIZGd9bWhWPwnDnTHGtW8Iu77sdw==", - "dependencies": { - "debug": "^4.1.1", - "module-details-from-path": "^1.0.3", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/resolve": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", - "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shimmer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", - "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sinon": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", - "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.1", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/samsam": "^5.3.1", - "diff": "^4.0.2", - "nise": "^4.0.4", - "supports-color": "^7.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sinon/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "dependencies": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/tar": { - "version": "6.1.15", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz", - "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==", - "dev": true, - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tar/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, - "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, "dependencies": { "@aashutoshrathi/word-wrap": { "version": "1.2.6", @@ -5515,10 +128,11 @@ }, "@azure/monitor-opentelemetry": { "version": "1.0.0-beta.2", - "integrity": "sha512-cUpvYBQJPKFhFyw4hs/IJbRAm8R+6HQtWMrqRdZvWdHOJyv3F229Xlxh8/u/WI0E8Im1uz7hEso8k1+shumVJA==", + "resolved": "https://registry.npmjs.org/@azure/monitor-opentelemetry/-/monitor-opentelemetry-1.0.0-beta.2.tgz", + "integrity": "sha512-xDJluJF34NOJxY4maXx/asmxOVvH3H7EL2+SQ+cRlMm8JLKgduaUsG8UmX4BQa0l1FJIh8A5rrxzm73qHvgH1Q==", "requires": { "@azure/functions": "^3.2.0", - "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.14", + "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.15", "@azure/opentelemetry-instrumentation-azure-sdk": "^1.0.0-beta.3", "@opentelemetry/api": "^1.4.1", "@opentelemetry/api-logs": "^0.41.2", @@ -5540,8 +154,9 @@ } }, "@azure/monitor-opentelemetry-exporter": { - "version": "1.0.0-beta.14", - "integrity": "sha512-1srRw6wDgFUMu7F1UtnuXPBwNlOi9jkyP+avNSvbl7uQJDnF4Y3IprUPAvEr5V//luPIxAUTzyNtE+SNquDlqg==", + "version": "1.0.0-beta.15", + "resolved": "https://registry.npmjs.org/@azure/monitor-opentelemetry-exporter/-/monitor-opentelemetry-exporter-1.0.0-beta.15.tgz", + "integrity": "sha512-aKKVZpGU9ixCe9zuQ7i0XRVYBVSTbTJgBtwlY17Ab+TQWnU6Lh9QbaEr0kmlmhazfaE26K/ZSgtoL+VzZiuFzQ==", "requires": { "@azure/core-auth": "^1.3.0", "@azure/core-client": "^1.0.0", @@ -5558,24 +173,24 @@ } }, "@azure/msal-browser": { - "version": "2.38.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.38.0.tgz", - "integrity": "sha512-gxBh83IumHgEP9uMCm9pJLKLRwICMQTxG9TX3AytdNt3oLUI3tytm/szYD5u5zKJgSkhHvwFSM+NPnM04hYw3w==", + "version": "2.38.2", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.38.2.tgz", + "integrity": "sha512-71BeIn2we6LIgMplwCSaMq5zAwmalyJR3jFcVOZxNVfQ1saBRwOD+P77nLs5vrRCedVKTq8RMFhIOdpMLNno0A==", "requires": { - "@azure/msal-common": "13.2.0" + "@azure/msal-common": "13.3.0" } }, "@azure/msal-common": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.2.0.tgz", - "integrity": "sha512-rnstQ7Zgn3fSTKNQO+/YNV34/QXJs0vni7IA0/3QB1EEyrJg14xyRmTqlw9ta+pdSuT5OJwUP8kI3D/rBwUIBw==" + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.0.tgz", + "integrity": "sha512-/VFWTicjcJbrGp3yQP7A24xU95NiDMe23vxIU1U6qdRPFsprMDNUohMudclnd+WSHE4/McqkZs/nUU3sAKkVjg==" }, "@azure/msal-node": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.0.tgz", - "integrity": "sha512-N6GX1Twxw524e7gaJvj7hKtrPRmZl9qGY7U4pmUdx4XzoWYRFfYk4H1ZjVhQ7pwb5Ks88NNhbXVCagsuYPTEFg==", + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.2.tgz", + "integrity": "sha512-bLbuhF9Q5cgwj9tt8R7EV9MbCwGuFgZiv6Gw0VvHx5AcWHhh2m8hYginGagB4EucxKueFDwZP6aZVAxfuD/lUQ==", "requires": { - "@azure/msal-common": "13.2.0", + "@azure/msal-common": "13.3.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" } @@ -5668,9 +283,9 @@ "dev": true }, "@babel/core": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz", - "integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.11.tgz", + "integrity": "sha512-lh7RJrtPdhibbxndr6/xx0w8+CVlY5FJZiaSz908Fpy+G0xkBFTvwLcKJFF4PJxVfGhVWNebikpWGnOoC71juQ==", "dev": true, "requires": { "@ampproject/remapping": "^2.2.0", @@ -5678,15 +293,15 @@ "@babel/generator": "^7.22.10", "@babel/helper-compilation-targets": "^7.22.10", "@babel/helper-module-transforms": "^7.22.9", - "@babel/helpers": "^7.22.10", - "@babel/parser": "^7.22.10", + "@babel/helpers": "^7.22.11", + "@babel/parser": "^7.22.11", "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.10", - "@babel/types": "^7.22.10", + "@babel/traverse": "^7.22.11", + "@babel/types": "^7.22.11", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", + "json5": "^2.2.3", "semver": "^6.3.1" }, "dependencies": { @@ -5815,14 +430,14 @@ "dev": true }, "@babel/helpers": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz", - "integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.11.tgz", + "integrity": "sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==", "dev": true, "requires": { "@babel/template": "^7.22.5", - "@babel/traverse": "^7.22.10", - "@babel/types": "^7.22.10" + "@babel/traverse": "^7.22.11", + "@babel/types": "^7.22.11" } }, "@babel/highlight": { @@ -5895,9 +510,9 @@ } }, "@babel/parser": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz", - "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.11.tgz", + "integrity": "sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==", "dev": true }, "@babel/template": { @@ -5912,9 +527,9 @@ } }, "@babel/traverse": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz", - "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.11.tgz", + "integrity": "sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==", "dev": true, "requires": { "@babel/code-frame": "^7.22.10", @@ -5923,8 +538,8 @@ "@babel/helper-function-name": "^7.22.5", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.10", - "@babel/types": "^7.22.10", + "@babel/parser": "^7.22.11", + "@babel/types": "^7.22.11", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -5938,9 +553,9 @@ } }, "@babel/types": { - "version": "7.22.10", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz", - "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==", + "version": "7.22.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.11.tgz", + "integrity": "sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==", "dev": true, "requires": { "@babel/helper-string-parser": "^7.22.5", @@ -5958,15 +573,15 @@ } }, "@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.0.tgz", + "integrity": "sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==", "dev": true }, "@eslint/eslintrc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", - "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -5981,9 +596,9 @@ } }, "@eslint/js": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", - "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", "dev": true }, "@humanwhocodes/config-array": { @@ -6031,6 +646,12 @@ "sprintf-js": "~1.0.2" } }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6190,8 +811,7 @@ "@opentelemetry/context-async-hooks": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-1.15.2.tgz", - "integrity": "sha512-VAMHG67srGFQDG/N2ns5AyUT9vUcoKpZ/NpJ5fDQIPfJd7t3ju+aHwvDsMcrYBWuCh03U3Ky6o16+872CZchBg==", - "requires": {} + "integrity": "sha512-VAMHG67srGFQDG/N2ns5AyUT9vUcoKpZ/NpJ5fDQIPfJd7t3ju+aHwvDsMcrYBWuCh03U3Ky6o16+872CZchBg==" }, "@opentelemetry/core": { "version": "1.15.2", @@ -6612,15 +1232,13 @@ "acorn-import-assertions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "requires": {} + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==" }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "agent-base": { "version": "6.0.2", @@ -6814,15 +1432,15 @@ "dev": true }, "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, "caniuse-lite": { - "version": "1.0.30001519", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz", - "integrity": "sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==", + "version": "1.0.30001523", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", + "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==", "dev": true }, "chalk": { @@ -6849,17 +1467,6 @@ "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } } }, "chownr": { @@ -6963,9 +1570,9 @@ } }, "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true }, "deep-is": { @@ -7016,8 +1623,7 @@ "diagnostic-channel-publishers": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/diagnostic-channel-publishers/-/diagnostic-channel-publishers-1.0.7.tgz", - "integrity": "sha512-SEECbY5AiVt6DfLkhkaHNeshg1CogdLLANA8xlG/TKvS+XUgvIKl7VspJGYiEdL5OUyzMVnr7o0AwB7f+/Mjtg==", - "requires": {} + "integrity": "sha512-SEECbY5AiVt6DfLkhkaHNeshg1CogdLLANA8xlG/TKvS+XUgvIKl7VspJGYiEdL5OUyzMVnr7o0AwB7f+/Mjtg==" }, "diff": { "version": "5.0.0", @@ -7052,9 +1658,9 @@ } }, "electron-to-chromium": { - "version": "1.4.486", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.486.tgz", - "integrity": "sha512-9zn9/2lbMGY/mFhoUymD9ODYdLY3zjUW/IW9ihU/sJVeIlD70m2aAb86S35aRGF+iwqLuQP25epruayZjKNjBw==", + "version": "1.4.502", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.502.tgz", + "integrity": "sha512-xqeGw3Gr6o3uyHy/yKjdnDQHY2RQvXcGC2cfHjccK1IGkH6cX1WQBN8EeC/YpwPhGkBaikDTecJ8+ssxSVRQlw==", "dev": true }, "emoji-regex": { @@ -7141,6 +1747,15 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } } } }, @@ -7204,9 +1819,9 @@ } }, "eslint-visitor-keys": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", - "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { @@ -7294,17 +1909,6 @@ "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" - }, - "dependencies": { - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - } } }, "fast-json-stable-stringify": { @@ -7432,12 +2036,6 @@ "requires": { "yallist": "^4.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -7448,9 +2046,9 @@ "dev": true }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, @@ -7495,32 +2093,32 @@ "dev": true }, "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { - "is-glob": "^4.0.3" + "is-glob": "^4.0.1" } }, "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -7937,16 +2535,6 @@ "semver": "^7.3.8" }, "dependencies": { - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, "jws": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", @@ -7965,9 +2553,9 @@ "dev": true }, "jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", "requires": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -7981,6 +2569,18 @@ "requires": { "jwa": "^2.0.0", "safe-buffer": "^5.0.1" + }, + "dependencies": { + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + } } }, "levn": { @@ -8046,6 +2646,14 @@ "dev": true, "requires": { "yallist": "^3.0.2" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, "make-dir": { @@ -8127,12 +2735,6 @@ "requires": { "yallist": "^4.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -8171,13 +2773,29 @@ "yargs-unparser": "2.0.0" }, "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "requires": { - "balanced-match": "^1.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "minimatch": { @@ -8187,6 +2805,17 @@ "dev": true, "requires": { "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + } } }, "ms": { @@ -8266,9 +2895,9 @@ } }, "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, "requires": { "whatwg-url": "^5.0.0" @@ -8351,6 +2980,12 @@ "yargs": "^15.0.2" }, "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -8362,6 +2997,12 @@ "wrap-ansi": "^6.2.0" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -8967,15 +3608,6 @@ "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==" }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -8987,6 +3619,15 @@ "strip-ansi": "^6.0.1" } }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -9034,14 +3675,6 @@ "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" - }, - "dependencies": { - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } } }, "test-exclude": { @@ -9083,9 +3716,9 @@ "dev": true }, "tslib": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", - "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "tsutils": { "version": "3.21.0", @@ -9257,9 +3890,9 @@ "dev": true }, "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yargs": { @@ -9293,20 +3926,6 @@ "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" - }, - "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - } } }, "yocto-queue": { From a188f8e3a2527016e9a58e86360be7258afc539f Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 11:19:05 -0700 Subject: [PATCH 09/14] Fix circular dependency --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 61b5753ff..d300bd58c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,7 +24,7 @@ export { export { ApplicationInsightsClient } from "./applicationInsightsClient"; // To support the shim -export * from ".."; +export * from "./shim/applicationinsights"; let console: AutoCollectConsole; From 62e0bbf7a3d2d688a0640b6bbd14c7f1c7b5be29 Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 11:24:00 -0700 Subject: [PATCH 10/14] Lint --- src/shim/config.ts | 12 +++++++----- src/shim/telemetryClient.ts | 2 +- tsconfig.json | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/shim/config.ts b/src/shim/config.ts index f4ff3a27a..f1ae5f6d3 100644 --- a/src/shim/config.ts +++ b/src/shim/config.ts @@ -92,7 +92,7 @@ class Config implements IConfig { } private _mergeConfig() { - let jsonConfig = ShimJsonConfig.getInstance(); + const jsonConfig = ShimJsonConfig.getInstance(); this.connectionString = jsonConfig.connectionString; this.correlationHeaderExcludedDomains = jsonConfig.correlationHeaderExcludedDomains; this.disableAllExtendedMetrics = jsonConfig.disableAllExtendedMetrics; @@ -136,7 +136,7 @@ class Config implements IConfig { * Parse the config property to set the appropriate values on the ApplicationInsightsOptions */ public parseConfig(): ApplicationInsightsOptions { - let options: ApplicationInsightsOptions = { + const options: ApplicationInsightsOptions = { azureMonitorExporterConfig: { connectionString: this.connectionString }, @@ -154,7 +154,7 @@ class Config implements IConfig { ...options.instrumentationOptions, http: { ...options.instrumentationOptions?.http, - ignoreOutgoingUrls: this.correlationHeaderExcludedDomains, /// TODO: Deprecated configuration + ignoreOutgoingUrls: this.correlationHeaderExcludedDomains, /// TODO: Deprecated configuration } as HttpInstrumentationConfig, } if (this.aadTokenCredential) { @@ -221,7 +221,9 @@ class Config implements IConfig { port: Number(proxyUrl.port), }; } - catch (err) { } + catch (err) { + Logger.getInstance().warn("failed to parse proxy URL."); + } } if (this.maxBatchIntervalMs) { options.otlpTraceExporterConfig = { ...options.otlpTraceExporterConfig, timeoutMillis: this.maxBatchIntervalMs }; @@ -299,7 +301,7 @@ class Config implements IConfig { Logger.getInstance().warn("The use of non async hooks is no longer supported."); } if (typeof (this.distributedTracingMode) === "boolean") { - if (this.distributedTracingMode == DistributedTracingModes.AI) { + if (this.distributedTracingMode === DistributedTracingModes.AI) { Logger.getInstance().warn("AI only distributed tracing mode is no longer supported."); } } diff --git a/src/shim/telemetryClient.ts b/src/shim/telemetryClient.ts index d61f4cf3c..4a67dc36f 100644 --- a/src/shim/telemetryClient.ts +++ b/src/shim/telemetryClient.ts @@ -39,7 +39,7 @@ export class TelemetryClient { public initialize() { // Parse shim config to Azure Monitor options - let options = this.config.parseConfig(); + const options = this.config.parseConfig(); this._client = new ApplicationInsightsClient(options); // LoggerProvider would be initialized when client is instantiated // Get Logger from global provider diff --git a/tsconfig.json b/tsconfig.json index 7627f92f7..bb3f26ec3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,7 @@ ] }, "include": [ + "index.ts", "src/**/*.ts", "test/**/*.ts" ], From b9b69166468e0274fe553eb41ecba7518b154bfa Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 14:37:52 -0700 Subject: [PATCH 11/14] Update funcitonal tests --- test/functionalTests/testApp/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functionalTests/testApp/main.js b/test/functionalTests/testApp/main.js index e1eec32ea..cc8317839 100644 --- a/test/functionalTests/testApp/main.js +++ b/test/functionalTests/testApp/main.js @@ -2,7 +2,7 @@ var testconfig = require("./config"); var appInsights = null; if (testconfig.AppInsightsEnabled) { - const { TelemetryClient } = require("applicationinsights"); + const { ApplicationInsightsClient } = require("applicationinsights"); let options = { azureMonitorExporterConfig: { @@ -52,7 +52,7 @@ if (testconfig.AppInsightsEnabled) { } }; - appInsights = new TelemetryClient(options); + appInsights = new ApplicationInsightsClient(options); } var Tasks = require("./tasks"); From 5f60857fac29e92aa0bf9edda1d3d6c8d85f1bcc Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 14:47:25 -0700 Subject: [PATCH 12/14] Update test app --- test/functionalTests/testApp/config.js | 2 -- test/functionalTests/testApp/main.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/functionalTests/testApp/config.js b/test/functionalTests/testApp/config.js index a08b02c8d..9689420b7 100644 --- a/test/functionalTests/testApp/config.js +++ b/test/functionalTests/testApp/config.js @@ -1,5 +1,3 @@ -var appInsights = require("applicationinsights"); - var Config = { ServerPort: "9099", EndpointBaseAddress: "https://localhost:9091", diff --git a/test/functionalTests/testApp/main.js b/test/functionalTests/testApp/main.js index cc8317839..9e8d7acd8 100644 --- a/test/functionalTests/testApp/main.js +++ b/test/functionalTests/testApp/main.js @@ -2,7 +2,7 @@ var testconfig = require("./config"); var appInsights = null; if (testconfig.AppInsightsEnabled) { - const { ApplicationInsightsClient } = require("applicationinsights"); + const { ApplicationInsightsClient } = require("../../../out/src/index"); let options = { azureMonitorExporterConfig: { From 4fded7a5a9e8efd913cf143dabb050ecb02d327b Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 15:36:10 -0700 Subject: [PATCH 13/14] Update --- index.ts => applicationinsights.ts | 0 src/applicationInsightsClient.ts | 3 ++- src/index.ts | 4 ++-- tsconfig.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) rename index.ts => applicationinsights.ts (100%) diff --git a/index.ts b/applicationinsights.ts similarity index 100% rename from index.ts rename to applicationinsights.ts diff --git a/src/applicationInsightsClient.ts b/src/applicationInsightsClient.ts index e63d3b5f3..f5202680a 100644 --- a/src/applicationInsightsClient.ts +++ b/src/applicationInsightsClient.ts @@ -27,9 +27,10 @@ export class ApplicationInsightsClient { */ constructor(options?: ApplicationInsightsOptions) { useAzureMonitor(options); + this._logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); this._internalConfig = new ApplicationInsightsConfig(options); this._console = new AutoCollectConsole(this._logApi); - this._logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); + if (this._internalConfig.enableAutoCollectExceptions) { this._exceptions = new AutoCollectExceptions(this._logApi); } diff --git a/src/index.ts b/src/index.ts index d300bd58c..9c42a2851 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,9 +36,9 @@ let exceptions: AutoCollectExceptions; */ export function useApplicationInsights(options?: ApplicationInsightsOptions) { useAzureMonitor(options); - const internalConfig = new ApplicationInsightsConfig(options); - console = new AutoCollectConsole(this._logApi); const logApi = new LogApi(logs.getLogger("ApplicationInsightsLogger")); + const internalConfig = new ApplicationInsightsConfig(options); + console = new AutoCollectConsole(logApi); if (internalConfig.enableAutoCollectExceptions) { exceptions = new AutoCollectExceptions(this._logApi); } diff --git a/tsconfig.json b/tsconfig.json index bb3f26ec3..414442122 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,7 @@ ] }, "include": [ - "index.ts", + "applicationinsights.ts", "src/**/*.ts", "test/**/*.ts" ], From 5153e94365669eae7d124108954b3711df04e95d Mon Sep 17 00:00:00 2001 From: Hector Date: Fri, 25 Aug 2023 16:06:08 -0700 Subject: [PATCH 14/14] Add default config --- src/shim/config.ts | 57 ++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/src/shim/config.ts b/src/shim/config.ts index f1ae5f6d3..d81fc2478 100644 --- a/src/shim/config.ts +++ b/src/shim/config.ts @@ -140,8 +140,19 @@ class Config implements IConfig { azureMonitorExporterConfig: { connectionString: this.connectionString }, - instrumentationOptions: {}, - logInstrumentationOptions: {}, + instrumentationOptions: { + http: { enabled: true }, + azureSdk: { enabled: true }, + mongoDb: { enabled: true }, + mySql: { enabled: true }, + redis: { enabled: true }, + redis4: { enabled: true }, + }, + logInstrumentationOptions: { + console: { enabled: false }, + winston: { enabled: true }, + bunyan: { enabled: true } + }, otlpTraceExporterConfig: {}, otlpMetricExporterConfig: {}, otlpLogExporterConfig: {}, @@ -175,29 +186,25 @@ class Config implements IConfig { options.instrumentationOptions.http.enabled = false; } else { - if (typeof (this.enableAutoCollectDependencies) === "boolean") { - if (this.enableAutoCollectDependencies === false) { - options.instrumentationOptions = { - http: { - ...options.instrumentationOptions?.http, - enabled: true, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ignoreOutgoingRequestHook: (request: http.RequestOptions) => true, - } as HttpInstrumentationConfig - }; - } + if (this.enableAutoCollectDependencies === false) { + options.instrumentationOptions = { + http: { + ...options.instrumentationOptions?.http, + enabled: true, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + ignoreOutgoingRequestHook: (request: http.RequestOptions) => true, + } as HttpInstrumentationConfig + }; } - if (typeof (this.enableAutoCollectRequests) === "boolean") { - if (this.enableAutoCollectRequests === false) { - options.instrumentationOptions = { - http: { - ...options.instrumentationOptions?.http, - enabled: true, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ignoreIncomingRequestHook: (request: http.RequestOptions) => true, - } as HttpInstrumentationConfig - }; - } + if (this.enableAutoCollectRequests === false) { + options.instrumentationOptions = { + http: { + ...options.instrumentationOptions?.http, + enabled: true, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + ignoreIncomingRequestHook: (request: http.RequestOptions) => true, + } as HttpInstrumentationConfig + }; } } if (typeof (this.enableAutoCollectPerformance) === "boolean") { @@ -221,7 +228,7 @@ class Config implements IConfig { port: Number(proxyUrl.port), }; } - catch (err) { + catch (err) { Logger.getInstance().warn("failed to parse proxy URL."); } }