{"version":3,"sources":["../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/platform/node/globalThis.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/platform/node/index.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/platform/index.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/version.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/internal/semver.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/internal/global-utils.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/diag/ComponentLogger.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/diag/types.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/diag/internal/logLevelLogger.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/api/diag.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/baggage/internal/symbol.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/baggage/utils.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/context/context.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/diag/consoleLogger.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/context/NoopContextManager.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/api/context.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/trace_flags.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/invalid-span-constants.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/NonRecordingSpan.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/context-utils.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/spancontext-utils.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/NoopTracer.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/ProxyTracer.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/NoopTracerProvider.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace/ProxyTracerProvider.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/context-api.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/diag-api.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/api/trace.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/trace-api.ts","../../../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/src/index.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/types.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/execAsync.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-darwin.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-linux.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-bsd.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-win.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId-unsupported.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/is-export-retryable.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/transport/http-transport-utils.ts","../src/index.ts","../src/logger.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/OTLPExporterBase.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/configuration/shared-configuration.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/bounded-queue-export-promise-handler.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/trace/suppress-tracing.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/baggage/constants.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/baggage/utils.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/common/attributes.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/common/logging-error-handler.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/common/global-error-handler.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/platform/node/environment.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/platform/node/performance.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/version.ts","../../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.30.0/node_modules/@opentelemetry/semantic-conventions/src/resource/SemanticResourceAttributes.ts","../../../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.30.0/node_modules/@opentelemetry/semantic-conventions/src/stable_attributes.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/platform/node/sdk-info.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/platform/node/timer-util.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/common/time.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/ExportResult.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/utils/lodash.merge.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/utils/merge.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/utils/timeout.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/utils/promise.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/utils/callback.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/utils/configuration.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/internal/exporter.ts","../../../node_modules/.pnpm/@opentelemetry+core@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/src/index.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/otlp-export-delegate.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/logging-response-handler.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/src/common/hex-to-binary.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/src/common/utils.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/src/common/internal.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/src/logs/internal.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detect-resources.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/ResourceImpl.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/platform/node/default-service-name.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/utils.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/EnvDetector.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/HostDetector.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/machine-id/getMachineId.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/utils.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/OSDetector.ts","../../../node_modules/.pnpm/@opentelemetry+resources@2.0.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/src/detectors/platform/node/ProcessDetector.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/src/logs/json/logs.ts","../../../node_modules/.pnpm/@opentelemetry+exporter-logs-otlp-http@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/exporter-logs-otlp-http/src/version.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/transport/http-exporter-transport.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/retrying-transport.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/otlp-http-export-delegate.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/configuration/shared-env-configuration.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/util.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/configuration/otlp-http-configuration.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/configuration/otlp-http-env-configuration.ts","../../../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/src/configuration/convert-legacy-node-http-options.ts","../../../node_modules/.pnpm/@opentelemetry+exporter-logs-otlp-http@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/LoggerProvider.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/NoopLogger.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/NoopLoggerProvider.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/ProxyLogger.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/ProxyLoggerProvider.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/platform/node/globalThis.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/internal/global-utils.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/api/logs.ts","../../../node_modules/.pnpm/@opentelemetry+api-logs@0.200.0/node_modules/@opentelemetry/api-logs/src/index.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/Logger.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/LogRecord.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/config.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/MultiLogRecordProcessor.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/export/NoopLogRecordProcessor.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/internal/LoggerProviderSharedState.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/export/BatchLogRecordProcessorBase.ts","../../../node_modules/.pnpm/@opentelemetry+sdk-logs@0.200.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-logs/src/platform/node/export/BatchLogRecordProcessor.ts","../package.json","../src/debug.ts","../src/pino.ts","../src/utils.ts","../src/winston.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexport const _globalThis = typeof globalThis === 'object' ? globalThis : global;\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './globalThis';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './node';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '1.9.0';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { VERSION } from '../version';\n\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n *    - 1.x package cannot use global 2.x package\n *    - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n *    - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n *    - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nexport function _makeCompatibilityCheck(\n  ownVersion: string\n): (globalVersion: string) => boolean {\n  const acceptedVersions = new Set<string>([ownVersion]);\n  const rejectedVersions = new Set<string>();\n\n  const myVersionMatch = ownVersion.match(re);\n  if (!myVersionMatch) {\n    // we cannot guarantee compatibility so we always return noop\n    return () => false;\n  }\n\n  const ownVersionParsed = {\n    major: +myVersionMatch[1],\n    minor: +myVersionMatch[2],\n    patch: +myVersionMatch[3],\n    prerelease: myVersionMatch[4],\n  };\n\n  // if ownVersion has a prerelease tag, versions must match exactly\n  if (ownVersionParsed.prerelease != null) {\n    return function isExactmatch(globalVersion: string): boolean {\n      return globalVersion === ownVersion;\n    };\n  }\n\n  function _reject(v: string) {\n    rejectedVersions.add(v);\n    return false;\n  }\n\n  function _accept(v: string) {\n    acceptedVersions.add(v);\n    return true;\n  }\n\n  return function isCompatible(globalVersion: string): boolean {\n    if (acceptedVersions.has(globalVersion)) {\n      return true;\n    }\n\n    if (rejectedVersions.has(globalVersion)) {\n      return false;\n    }\n\n    const globalVersionMatch = globalVersion.match(re);\n    if (!globalVersionMatch) {\n      // cannot parse other version\n      // we cannot guarantee compatibility so we always noop\n      return _reject(globalVersion);\n    }\n\n    const globalVersionParsed = {\n      major: +globalVersionMatch[1],\n      minor: +globalVersionMatch[2],\n      patch: +globalVersionMatch[3],\n      prerelease: globalVersionMatch[4],\n    };\n\n    // if globalVersion has a prerelease tag, versions must match exactly\n    if (globalVersionParsed.prerelease != null) {\n      return _reject(globalVersion);\n    }\n\n    // major versions must match\n    if (ownVersionParsed.major !== globalVersionParsed.major) {\n      return _reject(globalVersion);\n    }\n\n    if (ownVersionParsed.major === 0) {\n      if (\n        ownVersionParsed.minor === globalVersionParsed.minor &&\n        ownVersionParsed.patch <= globalVersionParsed.patch\n      ) {\n        return _accept(globalVersion);\n      }\n\n      return _reject(globalVersion);\n    }\n\n    if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n      return _accept(globalVersion);\n    }\n\n    return _reject(globalVersion);\n  };\n}\n\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n *    - 1.x package cannot use global 2.x package\n *    - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n *    - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n *    - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexport const isCompatible = _makeCompatibilityCheck(VERSION);\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { MeterProvider } from '../metrics/MeterProvider';\nimport { ContextManager } from '../context/types';\nimport { DiagLogger } from '../diag/types';\nimport { _globalThis } from '../platform';\nimport { TextMapPropagator } from '../propagation/TextMapPropagator';\nimport type { TracerProvider } from '../trace/tracer_provider';\nimport { VERSION } from '../version';\nimport { isCompatible } from './semver';\n\nconst major = VERSION.split('.')[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\n  `opentelemetry.js.api.${major}`\n);\n\nconst _global = _globalThis as OTelGlobal;\n\nexport function registerGlobal<Type extends keyof OTelGlobalAPI>(\n  type: Type,\n  instance: OTelGlobalAPI[Type],\n  diag: DiagLogger,\n  allowOverride = false\n): boolean {\n  const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = _global[\n    GLOBAL_OPENTELEMETRY_API_KEY\n  ] ?? {\n    version: VERSION,\n  });\n\n  if (!allowOverride && api[type]) {\n    // already registered an API of this type\n    const err = new Error(\n      `@opentelemetry/api: Attempted duplicate registration of API: ${type}`\n    );\n    diag.error(err.stack || err.message);\n    return false;\n  }\n\n  if (api.version !== VERSION) {\n    // All registered APIs must be of the same version exactly\n    const err = new Error(\n      `@opentelemetry/api: Registration of version v${api.version} for ${type} does not match previously registered API v${VERSION}`\n    );\n    diag.error(err.stack || err.message);\n    return false;\n  }\n\n  api[type] = instance;\n  diag.debug(\n    `@opentelemetry/api: Registered a global for ${type} v${VERSION}.`\n  );\n\n  return true;\n}\n\nexport function getGlobal<Type extends keyof OTelGlobalAPI>(\n  type: Type\n): OTelGlobalAPI[Type] | undefined {\n  const globalVersion = _global[GLOBAL_OPENTELEMETRY_API_KEY]?.version;\n  if (!globalVersion || !isCompatible(globalVersion)) {\n    return;\n  }\n  return _global[GLOBAL_OPENTELEMETRY_API_KEY]?.[type];\n}\n\nexport function unregisterGlobal(type: keyof OTelGlobalAPI, diag: DiagLogger) {\n  diag.debug(\n    `@opentelemetry/api: Unregistering a global for ${type} v${VERSION}.`\n  );\n  const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n\n  if (api) {\n    delete api[type];\n  }\n}\n\ntype OTelGlobal = {\n  [GLOBAL_OPENTELEMETRY_API_KEY]?: OTelGlobalAPI;\n};\n\ntype OTelGlobalAPI = {\n  version: string;\n\n  diag?: DiagLogger;\n  trace?: TracerProvider;\n  context?: ContextManager;\n  metrics?: MeterProvider;\n  propagation?: TextMapPropagator;\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getGlobal } from '../internal/global-utils';\nimport { ComponentLoggerOptions, DiagLogger, DiagLogFunction } from './types';\n\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nexport class DiagComponentLogger implements DiagLogger {\n  private _namespace: string;\n\n  constructor(props: ComponentLoggerOptions) {\n    this._namespace = props.namespace || 'DiagComponentLogger';\n  }\n\n  public debug(...args: any[]): void {\n    return logProxy('debug', this._namespace, args);\n  }\n\n  public error(...args: any[]): void {\n    return logProxy('error', this._namespace, args);\n  }\n\n  public info(...args: any[]): void {\n    return logProxy('info', this._namespace, args);\n  }\n\n  public warn(...args: any[]): void {\n    return logProxy('warn', this._namespace, args);\n  }\n\n  public verbose(...args: any[]): void {\n    return logProxy('verbose', this._namespace, args);\n  }\n}\n\nfunction logProxy(\n  funcName: keyof DiagLogger,\n  namespace: string,\n  args: any\n): void {\n  const logger = getGlobal('diag');\n  // shortcut if logger not set\n  if (!logger) {\n    return;\n  }\n\n  args.unshift(namespace);\n  return logger[funcName](...(args as Parameters<DiagLogFunction>));\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type DiagLogFunction = (message: string, ...args: unknown[]) => void;\n\n/**\n * Defines an internal diagnostic logger interface which is used to log internal diagnostic\n * messages, you can set the default diagnostic logger via the {@link DiagAPI} setLogger function.\n * API provided implementations include :-\n * - a No-Op {@link createNoopDiagLogger}\n * - a {@link DiagLogLevel} filtering wrapper {@link createLogLevelDiagLogger}\n * - a general Console {@link DiagConsoleLogger} version.\n */\nexport interface DiagLogger {\n  /** Log an error scenario that was not expected and caused the requested operation to fail. */\n  error: DiagLogFunction;\n\n  /**\n   * Log a warning scenario to inform the developer of an issues that should be investigated.\n   * The requested operation may or may not have succeeded or completed.\n   */\n  warn: DiagLogFunction;\n\n  /**\n   * Log a general informational message, this should not affect functionality.\n   * This is also the default logging level so this should NOT be used for logging\n   * debugging level information.\n   */\n  info: DiagLogFunction;\n\n  /**\n   * Log a general debug message that can be useful for identifying a failure.\n   * Information logged at this level may include diagnostic details that would\n   * help identify a failure scenario.\n   * For example: Logging the order of execution of async operations.\n   */\n  debug: DiagLogFunction;\n\n  /**\n   * Log a detailed (verbose) trace level logging that can be used to identify failures\n   * where debug level logging would be insufficient, this level of tracing can include\n   * input and output parameters and as such may include PII information passing through\n   * the API. As such it is recommended that this level of tracing should not be enabled\n   * in a production environment.\n   */\n  verbose: DiagLogFunction;\n}\n\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nexport enum DiagLogLevel {\n  /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n  NONE = 0,\n\n  /** Identifies an error scenario */\n  ERROR = 30,\n\n  /** Identifies a warning scenario */\n  WARN = 50,\n\n  /** General informational log message */\n  INFO = 60,\n\n  /** General debug log message */\n  DEBUG = 70,\n\n  /**\n   * Detailed trace level logging should only be used for development, should only be set\n   * in a development environment.\n   */\n  VERBOSE = 80,\n\n  /** Used to set the logging level to include all logging */\n  ALL = 9999,\n}\n\n/**\n * Defines options for ComponentLogger\n */\nexport interface ComponentLoggerOptions {\n  namespace: string;\n}\n\nexport interface DiagLoggerOptions {\n  /**\n   * The {@link DiagLogLevel} used to filter logs sent to the logger.\n   *\n   * @defaultValue DiagLogLevel.INFO\n   */\n  logLevel?: DiagLogLevel;\n\n  /**\n   * Setting this value to `true` will suppress the warning message normally emitted when registering a logger when another logger is already registered.\n   */\n  suppressOverrideMessage?: boolean;\n}\n\nexport interface DiagLoggerApi {\n  /**\n   * Set the global DiagLogger and DiagLogLevel.\n   * If a global diag logger is already set, this will override it.\n   *\n   * @param logger - The {@link DiagLogger} instance to set as the default logger.\n   * @param options - A {@link DiagLoggerOptions} object. If not provided, default values will be set.\n   * @returns `true` if the logger was successfully registered, else `false`\n   */\n  setLogger(logger: DiagLogger, options?: DiagLoggerOptions): boolean;\n\n  /**\n   *\n   * @param logger - The {@link DiagLogger} instance to set as the default logger.\n   * @param logLevel - The {@link DiagLogLevel} used to filter logs sent to the logger. If not provided it will default to {@link DiagLogLevel.INFO}.\n   * @returns `true` if the logger was successfully registered, else `false`\n   */\n  setLogger(logger: DiagLogger, logLevel?: DiagLogLevel): boolean;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiagLogFunction, DiagLogger, DiagLogLevel } from '../types';\n\nexport function createLogLevelDiagLogger(\n  maxLevel: DiagLogLevel,\n  logger: DiagLogger\n): DiagLogger {\n  if (maxLevel < DiagLogLevel.NONE) {\n    maxLevel = DiagLogLevel.NONE;\n  } else if (maxLevel > DiagLogLevel.ALL) {\n    maxLevel = DiagLogLevel.ALL;\n  }\n\n  // In case the logger is null or undefined\n  logger = logger || {};\n\n  function _filterFunc(\n    funcName: keyof DiagLogger,\n    theLevel: DiagLogLevel\n  ): DiagLogFunction {\n    const theFunc = logger[funcName];\n\n    if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n      return theFunc.bind(logger);\n    }\n    return function () {};\n  }\n\n  return {\n    error: _filterFunc('error', DiagLogLevel.ERROR),\n    warn: _filterFunc('warn', DiagLogLevel.WARN),\n    info: _filterFunc('info', DiagLogLevel.INFO),\n    debug: _filterFunc('debug', DiagLogLevel.DEBUG),\n    verbose: _filterFunc('verbose', DiagLogLevel.VERBOSE),\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiagComponentLogger } from '../diag/ComponentLogger';\nimport { createLogLevelDiagLogger } from '../diag/internal/logLevelLogger';\nimport {\n  ComponentLoggerOptions,\n  DiagLogFunction,\n  DiagLogger,\n  DiagLoggerApi,\n  DiagLogLevel,\n} from '../diag/types';\nimport {\n  getGlobal,\n  registerGlobal,\n  unregisterGlobal,\n} from '../internal/global-utils';\n\nconst API_NAME = 'diag';\n\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nexport class DiagAPI implements DiagLogger, DiagLoggerApi {\n  private static _instance?: DiagAPI;\n\n  /** Get the singleton instance of the DiagAPI API */\n  public static instance(): DiagAPI {\n    if (!this._instance) {\n      this._instance = new DiagAPI();\n    }\n\n    return this._instance;\n  }\n\n  /**\n   * Private internal constructor\n   * @private\n   */\n  private constructor() {\n    function _logProxy(funcName: keyof DiagLogger): DiagLogFunction {\n      return function (...args) {\n        const logger = getGlobal('diag');\n        // shortcut if logger not set\n        if (!logger) return;\n        return logger[funcName](...args);\n      };\n    }\n\n    // Using self local variable for minification purposes as 'this' cannot be minified\n    const self = this;\n\n    // DiagAPI specific functions\n\n    const setLogger: DiagLoggerApi['setLogger'] = (\n      logger,\n      optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }\n    ) => {\n      if (logger === self) {\n        // There isn't much we can do here.\n        // Logging to the console might break the user application.\n        // Try to log to self. If a logger was previously registered it will receive the log.\n        const err = new Error(\n          'Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation'\n        );\n        self.error(err.stack ?? err.message);\n        return false;\n      }\n\n      if (typeof optionsOrLogLevel === 'number') {\n        optionsOrLogLevel = {\n          logLevel: optionsOrLogLevel,\n        };\n      }\n\n      const oldLogger = getGlobal('diag');\n      const newLogger = createLogLevelDiagLogger(\n        optionsOrLogLevel.logLevel ?? DiagLogLevel.INFO,\n        logger\n      );\n      // There already is an logger registered. We'll let it know before overwriting it.\n      if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n        const stack = new Error().stack ?? '<failed to generate stacktrace>';\n        oldLogger.warn(`Current logger will be overwritten from ${stack}`);\n        newLogger.warn(\n          `Current logger will overwrite one already registered from ${stack}`\n        );\n      }\n\n      return registerGlobal('diag', newLogger, self, true);\n    };\n\n    self.setLogger = setLogger;\n\n    self.disable = () => {\n      unregisterGlobal(API_NAME, self);\n    };\n\n    self.createComponentLogger = (options: ComponentLoggerOptions) => {\n      return new DiagComponentLogger(options);\n    };\n\n    self.verbose = _logProxy('verbose');\n    self.debug = _logProxy('debug');\n    self.info = _logProxy('info');\n    self.warn = _logProxy('warn');\n    self.error = _logProxy('error');\n  }\n\n  public setLogger!: DiagLoggerApi['setLogger'];\n  /**\n   *\n   */\n  public createComponentLogger!: (\n    options: ComponentLoggerOptions\n  ) => DiagLogger;\n\n  // DiagLogger implementation\n  public verbose!: DiagLogFunction;\n  public debug!: DiagLogFunction;\n  public info!: DiagLogFunction;\n  public warn!: DiagLogFunction;\n  public error!: DiagLogFunction;\n\n  /**\n   * Unregister the global logger and return to Noop\n   */\n  public disable!: () => void;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Symbol used to make BaggageEntryMetadata an opaque type\n */\nexport const baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiagAPI } from '../api/diag';\nimport { BaggageImpl } from './internal/baggage-impl';\nimport { baggageEntryMetadataSymbol } from './internal/symbol';\nimport { Baggage, BaggageEntry, BaggageEntryMetadata } from './types';\n\nconst diag = DiagAPI.instance();\n\n/**\n * Create a new Baggage with optional entries\n *\n * @param entries An array of baggage entries the new baggage should contain\n */\nexport function createBaggage(\n  entries: Record<string, BaggageEntry> = {}\n): Baggage {\n  return new BaggageImpl(new Map(Object.entries(entries)));\n}\n\n/**\n * Create a serializable BaggageEntryMetadata object from a string.\n *\n * @param str string metadata. Format is currently not defined by the spec and has no special meaning.\n *\n */\nexport function baggageEntryMetadataFromString(\n  str: string\n): BaggageEntryMetadata {\n  if (typeof str !== 'string') {\n    diag.error(\n      `Cannot create baggage metadata from unknown type: ${typeof str}`\n    );\n    str = '';\n  }\n\n  return {\n    __TYPE__: baggageEntryMetadataSymbol,\n    toString() {\n      return str;\n    },\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context } from './types';\n\n/** Get a key to uniquely identify a context value */\nexport function createContextKey(description: string) {\n  // The specification states that for the same input, multiple calls should\n  // return different keys. Due to the nature of the JS dependency management\n  // system, this creates problems where multiple versions of some package\n  // could hold different keys for the same property.\n  //\n  // Therefore, we use Symbol.for which returns the same key for the same input.\n  return Symbol.for(description);\n}\n\nclass BaseContext implements Context {\n  private _currentContext!: Map<symbol, unknown>;\n\n  /**\n   * Construct a new context which inherits values from an optional parent context.\n   *\n   * @param parentContext a context from which to inherit values\n   */\n  constructor(parentContext?: Map<symbol, unknown>) {\n    // for minification\n    const self = this;\n\n    self._currentContext = parentContext ? new Map(parentContext) : new Map();\n\n    self.getValue = (key: symbol) => self._currentContext.get(key);\n\n    self.setValue = (key: symbol, value: unknown): Context => {\n      const context = new BaseContext(self._currentContext);\n      context._currentContext.set(key, value);\n      return context;\n    };\n\n    self.deleteValue = (key: symbol): Context => {\n      const context = new BaseContext(self._currentContext);\n      context._currentContext.delete(key);\n      return context;\n    };\n  }\n\n  /**\n   * Get a value from the context.\n   *\n   * @param key key which identifies a context value\n   */\n  public getValue!: (key: symbol) => unknown;\n\n  /**\n   * Create a new context which inherits from this context and has\n   * the given key set to the given value.\n   *\n   * @param key context key for which to set the value\n   * @param value value to set for the given key\n   */\n  public setValue!: (key: symbol, value: unknown) => Context;\n\n  /**\n   * Return a new context which inherits from this context but does\n   * not contain a value for the given key.\n   *\n   * @param key context key for which to clear a value\n   */\n  public deleteValue!: (key: symbol) => Context;\n}\n\n/** The root context is used as the default parent context when there is no active context */\nexport const ROOT_CONTEXT: Context = new BaseContext();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiagLogger, DiagLogFunction } from './types';\n\ntype ConsoleMapKeys = 'error' | 'warn' | 'info' | 'debug' | 'trace';\nconst consoleMap: { n: keyof DiagLogger; c: ConsoleMapKeys }[] = [\n  { n: 'error', c: 'error' },\n  { n: 'warn', c: 'warn' },\n  { n: 'info', c: 'info' },\n  { n: 'debug', c: 'debug' },\n  { n: 'verbose', c: 'trace' },\n];\n\n/**\n * A simple Immutable Console based diagnostic logger which will output any messages to the Console.\n * If you want to limit the amount of logging to a specific level or lower use the\n * {@link createLogLevelDiagLogger}\n */\nexport class DiagConsoleLogger implements DiagLogger {\n  constructor() {\n    function _consoleFunc(funcName: ConsoleMapKeys): DiagLogFunction {\n      return function (...args) {\n        if (console) {\n          // Some environments only expose the console when the F12 developer console is open\n          // eslint-disable-next-line no-console\n          let theFunc = console[funcName];\n          if (typeof theFunc !== 'function') {\n            // Not all environments support all functions\n            // eslint-disable-next-line no-console\n            theFunc = console.log;\n          }\n\n          // One last final check\n          if (typeof theFunc === 'function') {\n            return theFunc.apply(console, args);\n          }\n        }\n      };\n    }\n\n    for (let i = 0; i < consoleMap.length; i++) {\n      this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);\n    }\n  }\n\n  /** Log an error scenario that was not expected and caused the requested operation to fail. */\n  public error!: DiagLogFunction;\n\n  /**\n   * Log a warning scenario to inform the developer of an issues that should be investigated.\n   * The requested operation may or may not have succeeded or completed.\n   */\n  public warn!: DiagLogFunction;\n\n  /**\n   * Log a general informational message, this should not affect functionality.\n   * This is also the default logging level so this should NOT be used for logging\n   * debugging level information.\n   */\n  public info!: DiagLogFunction;\n\n  /**\n   * Log a general debug message that can be useful for identifying a failure.\n   * Information logged at this level may include diagnostic details that would\n   * help identify a failure scenario. Useful scenarios would be to log the execution\n   * order of async operations\n   */\n  public debug!: DiagLogFunction;\n\n  /**\n   * Log a detailed (verbose) trace level logging that can be used to identify failures\n   * where debug level logging would be insufficient, this level of tracing can include\n   * input and output parameters and as such may include PII information passing through\n   * the API. As such it is recommended that this level of tracing should not be enabled\n   * in a production environment.\n   */\n  public verbose!: DiagLogFunction;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ROOT_CONTEXT } from './context';\nimport * as types from './types';\n\nexport class NoopContextManager implements types.ContextManager {\n  active(): types.Context {\n    return ROOT_CONTEXT;\n  }\n\n  with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(\n    _context: types.Context,\n    fn: F,\n    thisArg?: ThisParameterType<F>,\n    ...args: A\n  ): ReturnType<F> {\n    return fn.call(thisArg, ...args);\n  }\n\n  bind<T>(_context: types.Context, target: T): T {\n    return target;\n  }\n\n  enable(): this {\n    return this;\n  }\n\n  disable(): this {\n    return this;\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NoopContextManager } from '../context/NoopContextManager';\nimport { Context, ContextManager } from '../context/types';\nimport {\n  getGlobal,\n  registerGlobal,\n  unregisterGlobal,\n} from '../internal/global-utils';\nimport { DiagAPI } from './diag';\n\nconst API_NAME = 'context';\nconst NOOP_CONTEXT_MANAGER = new NoopContextManager();\n\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nexport class ContextAPI {\n  private static _instance?: ContextAPI;\n\n  /** Empty private constructor prevents end users from constructing a new instance of the API */\n  private constructor() {}\n\n  /** Get the singleton instance of the Context API */\n  public static getInstance(): ContextAPI {\n    if (!this._instance) {\n      this._instance = new ContextAPI();\n    }\n\n    return this._instance;\n  }\n\n  /**\n   * Set the current context manager.\n   *\n   * @returns true if the context manager was successfully registered, else false\n   */\n  public setGlobalContextManager(contextManager: ContextManager): boolean {\n    return registerGlobal(API_NAME, contextManager, DiagAPI.instance());\n  }\n\n  /**\n   * Get the currently active context\n   */\n  public active(): Context {\n    return this._getContextManager().active();\n  }\n\n  /**\n   * Execute a function with an active context\n   *\n   * @param context context to be active during function execution\n   * @param fn function to execute in a context\n   * @param thisArg optional receiver to be used for calling fn\n   * @param args optional arguments forwarded to fn\n   */\n  public with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(\n    context: Context,\n    fn: F,\n    thisArg?: ThisParameterType<F>,\n    ...args: A\n  ): ReturnType<F> {\n    return this._getContextManager().with(context, fn, thisArg, ...args);\n  }\n\n  /**\n   * Bind a context to a target function or event emitter\n   *\n   * @param context context to bind to the event emitter or function. Defaults to the currently active context\n   * @param target function or event emitter to bind\n   */\n  public bind<T>(context: Context, target: T): T {\n    return this._getContextManager().bind(context, target);\n  }\n\n  private _getContextManager(): ContextManager {\n    return getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER;\n  }\n\n  /** Disable and remove the global context manager */\n  public disable() {\n    this._getContextManager().disable();\n    unregisterGlobal(API_NAME, DiagAPI.instance());\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum TraceFlags {\n  /** Represents no flag set. */\n  NONE = 0x0,\n  /** Bit to represent whether trace is sampled in trace flags. */\n  SAMPLED = 0x1 << 0,\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { SpanContext } from './span_context';\nimport { TraceFlags } from './trace_flags';\n\nexport const INVALID_SPANID = '0000000000000000';\nexport const INVALID_TRACEID = '00000000000000000000000000000000';\nexport const INVALID_SPAN_CONTEXT: SpanContext = {\n  traceId: INVALID_TRACEID,\n  spanId: INVALID_SPANID,\n  traceFlags: TraceFlags.NONE,\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Exception } from '../common/Exception';\nimport { TimeInput } from '../common/Time';\nimport { SpanAttributes } from './attributes';\nimport { INVALID_SPAN_CONTEXT } from './invalid-span-constants';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\nimport { SpanStatus } from './status';\nimport { Link } from './link';\n\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nexport class NonRecordingSpan implements Span {\n  constructor(\n    private readonly _spanContext: SpanContext = INVALID_SPAN_CONTEXT\n  ) {}\n\n  // Returns a SpanContext.\n  spanContext(): SpanContext {\n    return this._spanContext;\n  }\n\n  // By default does nothing\n  setAttribute(_key: string, _value: unknown): this {\n    return this;\n  }\n\n  // By default does nothing\n  setAttributes(_attributes: SpanAttributes): this {\n    return this;\n  }\n\n  // By default does nothing\n  addEvent(_name: string, _attributes?: SpanAttributes): this {\n    return this;\n  }\n\n  addLink(_link: Link): this {\n    return this;\n  }\n\n  addLinks(_links: Link[]): this {\n    return this;\n  }\n\n  // By default does nothing\n  setStatus(_status: SpanStatus): this {\n    return this;\n  }\n\n  // By default does nothing\n  updateName(_name: string): this {\n    return this;\n  }\n\n  // By default does nothing\n  end(_endTime?: TimeInput): void {}\n\n  // isRecording always returns false for NonRecordingSpan.\n  isRecording(): boolean {\n    return false;\n  }\n\n  // By default does nothing\n  recordException(_exception: Exception, _time?: TimeInput): void {}\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createContextKey } from '../context/context';\nimport { Context } from '../context/types';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n\n/**\n * span key\n */\nconst SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context: Context): Span | undefined {\n  return (context.getValue(SPAN_KEY) as Span) || undefined;\n}\n\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan(): Span | undefined {\n  return getSpan(ContextAPI.getInstance().active());\n}\n\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nexport function setSpan(context: Context, span: Span): Context {\n  return context.setValue(SPAN_KEY, span);\n}\n\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context: Context): Context {\n  return context.deleteValue(SPAN_KEY);\n}\n\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nexport function setSpanContext(\n  context: Context,\n  spanContext: SpanContext\n): Context {\n  return setSpan(context, new NonRecordingSpan(spanContext));\n}\n\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nexport function getSpanContext(context: Context): SpanContext | undefined {\n  return getSpan(context)?.spanContext();\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPANID, INVALID_TRACEID } from './invalid-span-constants';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\n\nconst VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nconst VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\n\nexport function isValidTraceId(traceId: string): boolean {\n  return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\n\nexport function isValidSpanId(spanId: string): boolean {\n  return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\n}\n\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nexport function isSpanContextValid(spanContext: SpanContext): boolean {\n  return (\n    isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId)\n  );\n}\n\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nexport function wrapSpanContext(spanContext: SpanContext): Span {\n  return new NonRecordingSpan(spanContext);\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ContextAPI } from '../api/context';\nimport { Context } from '../context/types';\nimport { getSpanContext, setSpan } from '../trace/context-utils';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { Span } from './span';\nimport { isSpanContextValid } from './spancontext-utils';\nimport { SpanOptions } from './SpanOptions';\nimport { SpanContext } from './span_context';\nimport { Tracer } from './tracer';\n\nconst contextApi = ContextAPI.getInstance();\n\n/**\n * No-op implementations of {@link Tracer}.\n */\nexport class NoopTracer implements Tracer {\n  // startSpan starts a noop span.\n  startSpan(\n    name: string,\n    options?: SpanOptions,\n    context = contextApi.active()\n  ): Span {\n    const root = Boolean(options?.root);\n    if (root) {\n      return new NonRecordingSpan();\n    }\n\n    const parentFromContext = context && getSpanContext(context);\n\n    if (\n      isSpanContext(parentFromContext) &&\n      isSpanContextValid(parentFromContext)\n    ) {\n      return new NonRecordingSpan(parentFromContext);\n    } else {\n      return new NonRecordingSpan();\n    }\n  }\n\n  startActiveSpan<F extends (span: Span) => ReturnType<F>>(\n    name: string,\n    fn: F\n  ): ReturnType<F>;\n  startActiveSpan<F extends (span: Span) => ReturnType<F>>(\n    name: string,\n    opts: SpanOptions | undefined,\n    fn: F\n  ): ReturnType<F>;\n  startActiveSpan<F extends (span: Span) => ReturnType<F>>(\n    name: string,\n    opts: SpanOptions | undefined,\n    ctx: Context | undefined,\n    fn: F\n  ): ReturnType<F>;\n  startActiveSpan<F extends (span: Span) => ReturnType<F>>(\n    name: string,\n    arg2?: F | SpanOptions,\n    arg3?: F | Context,\n    arg4?: F\n  ): ReturnType<F> | undefined {\n    let opts: SpanOptions | undefined;\n    let ctx: Context | undefined;\n    let fn: F;\n\n    if (arguments.length < 2) {\n      return;\n    } else if (arguments.length === 2) {\n      fn = arg2 as F;\n    } else if (arguments.length === 3) {\n      opts = arg2 as SpanOptions | undefined;\n      fn = arg3 as F;\n    } else {\n      opts = arg2 as SpanOptions | undefined;\n      ctx = arg3 as Context | undefined;\n      fn = arg4 as F;\n    }\n\n    const parentContext = ctx ?? contextApi.active();\n    const span = this.startSpan(name, opts, parentContext);\n    const contextWithSpanSet = setSpan(parentContext, span);\n\n    return contextApi.with(contextWithSpanSet, fn, undefined, span);\n  }\n}\n\nfunction isSpanContext(spanContext: any): spanContext is SpanContext {\n  return (\n    typeof spanContext === 'object' &&\n    typeof spanContext['spanId'] === 'string' &&\n    typeof spanContext['traceId'] === 'string' &&\n    typeof spanContext['traceFlags'] === 'number'\n  );\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context } from '../context/types';\nimport { NoopTracer } from './NoopTracer';\nimport { Span } from './span';\nimport { SpanOptions } from './SpanOptions';\nimport { Tracer } from './tracer';\nimport { TracerOptions } from './tracer_options';\n\nconst NOOP_TRACER = new NoopTracer();\n\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nexport class ProxyTracer implements Tracer {\n  // When a real implementation is provided, this will be it\n  private _delegate?: Tracer;\n\n  constructor(\n    private _provider: TracerDelegator,\n    public readonly name: string,\n    public readonly version?: string,\n    public readonly options?: TracerOptions\n  ) {}\n\n  startSpan(name: string, options?: SpanOptions, context?: Context): Span {\n    return this._getTracer().startSpan(name, options, context);\n  }\n\n  startActiveSpan<F extends (span: Span) => unknown>(\n    _name: string,\n    _options: F | SpanOptions,\n    _context?: F | Context,\n    _fn?: F\n  ): ReturnType<F> {\n    const tracer = this._getTracer();\n    return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n  }\n\n  /**\n   * Try to get a tracer from the proxy tracer provider.\n   * If the proxy tracer provider has no delegate, return a noop tracer.\n   */\n  private _getTracer() {\n    if (this._delegate) {\n      return this._delegate;\n    }\n\n    const tracer = this._provider.getDelegateTracer(\n      this.name,\n      this.version,\n      this.options\n    );\n\n    if (!tracer) {\n      return NOOP_TRACER;\n    }\n\n    this._delegate = tracer;\n    return this._delegate;\n  }\n}\n\nexport interface TracerDelegator {\n  getDelegateTracer(\n    name: string,\n    version?: string,\n    options?: TracerOptions\n  ): Tracer | undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NoopTracer } from './NoopTracer';\nimport { Tracer } from './tracer';\nimport { TracerOptions } from './tracer_options';\nimport { TracerProvider } from './tracer_provider';\n\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nexport class NoopTracerProvider implements TracerProvider {\n  getTracer(\n    _name?: string,\n    _version?: string,\n    _options?: TracerOptions\n  ): Tracer {\n    return new NoopTracer();\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Tracer } from './tracer';\nimport { TracerProvider } from './tracer_provider';\nimport { ProxyTracer } from './ProxyTracer';\nimport { NoopTracerProvider } from './NoopTracerProvider';\nimport { TracerOptions } from './tracer_options';\n\nconst NOOP_TRACER_PROVIDER = new NoopTracerProvider();\n\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n *   When a delegate is set, traces are provided from the delegate.\n *   When a delegate is set after tracers have already been provided,\n *   all tracers already provided will use the provided delegate implementation.\n */\nexport class ProxyTracerProvider implements TracerProvider {\n  private _delegate?: TracerProvider;\n\n  /**\n   * Get a {@link ProxyTracer}\n   */\n  getTracer(name: string, version?: string, options?: TracerOptions): Tracer {\n    return (\n      this.getDelegateTracer(name, version, options) ??\n      new ProxyTracer(this, name, version, options)\n    );\n  }\n\n  getDelegate(): TracerProvider {\n    return this._delegate ?? NOOP_TRACER_PROVIDER;\n  }\n\n  /**\n   * Set the delegate tracer provider\n   */\n  setDelegate(delegate: TracerProvider) {\n    this._delegate = delegate;\n  }\n\n  getDelegateTracer(\n    name: string,\n    version?: string,\n    options?: TracerOptions\n  ): Tracer | undefined {\n    return this._delegate?.getTracer(name, version, options);\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { ContextAPI } from './api/context';\n/** Entrypoint for context API */\nexport const context = ContextAPI.getInstance();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { DiagAPI } from './api/diag';\n/**\n * Entrypoint for Diag API.\n * Defines Diagnostic handler used for internal diagnostic logging operations.\n * The default provides a Noop DiagLogger implementation which may be changed via the\n * diag.setLogger(logger: DiagLogger) function.\n */\nexport const diag = DiagAPI.instance();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  getGlobal,\n  registerGlobal,\n  unregisterGlobal,\n} from '../internal/global-utils';\nimport { ProxyTracerProvider } from '../trace/ProxyTracerProvider';\nimport {\n  isSpanContextValid,\n  wrapSpanContext,\n} from '../trace/spancontext-utils';\nimport { Tracer } from '../trace/tracer';\nimport { TracerProvider } from '../trace/tracer_provider';\nimport {\n  deleteSpan,\n  getActiveSpan,\n  getSpan,\n  getSpanContext,\n  setSpan,\n  setSpanContext,\n} from '../trace/context-utils';\nimport { DiagAPI } from './diag';\n\nconst API_NAME = 'trace';\n\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nexport class TraceAPI {\n  private static _instance?: TraceAPI;\n\n  private _proxyTracerProvider = new ProxyTracerProvider();\n\n  /** Empty private constructor prevents end users from constructing a new instance of the API */\n  private constructor() {}\n\n  /** Get the singleton instance of the Trace API */\n  public static getInstance(): TraceAPI {\n    if (!this._instance) {\n      this._instance = new TraceAPI();\n    }\n\n    return this._instance;\n  }\n\n  /**\n   * Set the current global tracer.\n   *\n   * @returns true if the tracer provider was successfully registered, else false\n   */\n  public setGlobalTracerProvider(provider: TracerProvider): boolean {\n    const success = registerGlobal(\n      API_NAME,\n      this._proxyTracerProvider,\n      DiagAPI.instance()\n    );\n    if (success) {\n      this._proxyTracerProvider.setDelegate(provider);\n    }\n    return success;\n  }\n\n  /**\n   * Returns the global tracer provider.\n   */\n  public getTracerProvider(): TracerProvider {\n    return getGlobal(API_NAME) || this._proxyTracerProvider;\n  }\n\n  /**\n   * Returns a tracer from the global tracer provider.\n   */\n  public getTracer(name: string, version?: string): Tracer {\n    return this.getTracerProvider().getTracer(name, version);\n  }\n\n  /** Remove the global tracer provider */\n  public disable() {\n    unregisterGlobal(API_NAME, DiagAPI.instance());\n    this._proxyTracerProvider = new ProxyTracerProvider();\n  }\n\n  public wrapSpanContext = wrapSpanContext;\n\n  public isSpanContextValid = isSpanContextValid;\n\n  public deleteSpan = deleteSpan;\n\n  public getSpan = getSpan;\n\n  public getActiveSpan = getActiveSpan;\n\n  public getSpanContext = getSpanContext;\n\n  public setSpan = setSpan;\n\n  public setSpanContext = setSpanContext;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { TraceAPI } from './api/trace';\n/** Entrypoint for trace API */\nexport const trace = TraceAPI.getInstance();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { BaggageEntry, BaggageEntryMetadata, Baggage } from './baggage/types';\nexport { baggageEntryMetadataFromString } from './baggage/utils';\nexport { Exception } from './common/Exception';\nexport { HrTime, TimeInput } from './common/Time';\nexport { Attributes, AttributeValue } from './common/Attributes';\n\n// Context APIs\nexport { createContextKey, ROOT_CONTEXT } from './context/context';\nexport { Context, ContextManager } from './context/types';\nexport type { ContextAPI } from './api/context';\n\n// Diag APIs\nexport { DiagConsoleLogger } from './diag/consoleLogger';\nexport {\n  DiagLogFunction,\n  DiagLogger,\n  DiagLogLevel,\n  ComponentLoggerOptions,\n  DiagLoggerOptions,\n} from './diag/types';\nexport type { DiagAPI } from './api/diag';\n\n// Metrics APIs\nexport { createNoopMeter } from './metrics/NoopMeter';\nexport { MeterOptions, Meter } from './metrics/Meter';\nexport { MeterProvider } from './metrics/MeterProvider';\nexport {\n  ValueType,\n  Counter,\n  Gauge,\n  Histogram,\n  MetricOptions,\n  Observable,\n  ObservableCounter,\n  ObservableGauge,\n  ObservableUpDownCounter,\n  UpDownCounter,\n  BatchObservableCallback,\n  MetricAdvice,\n  MetricAttributes,\n  MetricAttributeValue,\n  ObservableCallback,\n} from './metrics/Metric';\nexport {\n  BatchObservableResult,\n  ObservableResult,\n} from './metrics/ObservableResult';\nexport type { MetricsAPI } from './api/metrics';\n\n// Propagation APIs\nexport {\n  TextMapPropagator,\n  TextMapSetter,\n  TextMapGetter,\n  defaultTextMapGetter,\n  defaultTextMapSetter,\n} from './propagation/TextMapPropagator';\nexport type { PropagationAPI } from './api/propagation';\n\n// Trace APIs\nexport { SpanAttributes, SpanAttributeValue } from './trace/attributes';\nexport { Link } from './trace/link';\nexport { ProxyTracer, TracerDelegator } from './trace/ProxyTracer';\nexport { ProxyTracerProvider } from './trace/ProxyTracerProvider';\nexport { Sampler } from './trace/Sampler';\nexport { SamplingDecision, SamplingResult } from './trace/SamplingResult';\nexport { SpanContext } from './trace/span_context';\nexport { SpanKind } from './trace/span_kind';\nexport { Span } from './trace/span';\nexport { SpanOptions } from './trace/SpanOptions';\nexport { SpanStatus, SpanStatusCode } from './trace/status';\nexport { TraceFlags } from './trace/trace_flags';\nexport { TraceState } from './trace/trace_state';\nexport { createTraceState } from './trace/internal/utils';\nexport { TracerProvider } from './trace/tracer_provider';\nexport { Tracer } from './trace/tracer';\nexport { TracerOptions } from './trace/tracer_options';\nexport {\n  isSpanContextValid,\n  isValidTraceId,\n  isValidSpanId,\n} from './trace/spancontext-utils';\nexport {\n  INVALID_SPANID,\n  INVALID_TRACEID,\n  INVALID_SPAN_CONTEXT,\n} from './trace/invalid-span-constants';\nexport type { TraceAPI } from './api/trace';\n\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { context } from './context-api';\nimport { diag } from './diag-api';\nimport { metrics } from './metrics-api';\nimport { propagation } from './propagation-api';\nimport { trace } from './trace-api';\n\n// Named export.\nexport { context, diag, metrics, propagation, trace };\n// Default export.\nexport default {\n  context,\n  diag,\n  metrics,\n  propagation,\n  trace,\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Interface for handling error\n */\nexport class OTLPExporterError extends Error {\n  readonly code?: number;\n  override readonly name: string = 'OTLPExporterError';\n  readonly data?: string;\n\n  constructor(message?: string, code?: number, data?: string) {\n    super(message);\n    this.data = data;\n    this.code = code;\n  }\n}\n\n/**\n * Interface for handling export service errors\n */\nexport interface ExportServiceError {\n  name: string;\n  code: number;\n  details: string;\n  metadata: { [key: string]: unknown };\n  message: string;\n  stack: string;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as child_process from 'child_process';\nimport * as util from 'util';\n\nexport const execAsync = util.promisify(child_process.exec);\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n  try {\n    const result = await execAsync('ioreg -rd1 -c \"IOPlatformExpertDevice\"');\n\n    const idLine = result.stdout\n      .split('\\n')\n      .find(line => line.includes('IOPlatformUUID'));\n\n    if (!idLine) {\n      return undefined;\n    }\n\n    const parts = idLine.split('\" = \"');\n    if (parts.length === 2) {\n      return parts[1].slice(0, -1);\n    }\n  } catch (e) {\n    diag.debug(`error reading machine id: ${e}`);\n  }\n\n  return undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { promises as fs } from 'fs';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n  const paths = ['/etc/machine-id', '/var/lib/dbus/machine-id'];\n\n  for (const path of paths) {\n    try {\n      const result = await fs.readFile(path, { encoding: 'utf8' });\n      return result.trim();\n    } catch (e) {\n      diag.debug(`error reading machine id: ${e}`);\n    }\n  }\n\n  return undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { promises as fs } from 'fs';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n  try {\n    const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });\n    return result.trim();\n  } catch (e) {\n    diag.debug(`error reading machine id: ${e}`);\n  }\n\n  try {\n    const result = await execAsync('kenv -q smbios.system.uuid');\n    return result.stdout.trim();\n  } catch (e) {\n    diag.debug(`error reading machine id: ${e}`);\n  }\n\n  return undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as process from 'process';\nimport { execAsync } from './execAsync';\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n  const args =\n    'QUERY HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Cryptography /v MachineGuid';\n  let command = '%windir%\\\\System32\\\\REG.exe';\n  if (process.arch === 'ia32' && 'PROCESSOR_ARCHITEW6432' in process.env) {\n    command = '%windir%\\\\sysnative\\\\cmd.exe /c ' + command;\n  }\n\n  try {\n    const result = await execAsync(`${command} ${args}`);\n    const parts = result.stdout.split('REG_SZ');\n    if (parts.length === 2) {\n      return parts[1].trim();\n    }\n  } catch (e) {\n    diag.debug(`error reading machine id: ${e}`);\n  }\n\n  return undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\nexport async function getMachineId(): Promise<string | undefined> {\n  diag.debug('could not read machine-id: unsupported platform');\n  return undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function isExportRetryable(statusCode: number): boolean {\n  const retryCodes = [429, 502, 503, 504];\n  return retryCodes.includes(statusCode);\n}\n\nexport function parseRetryAfterToMills(\n  retryAfter?: string | undefined | null\n): number | undefined {\n  if (retryAfter == null) {\n    return undefined;\n  }\n\n  const seconds = Number.parseInt(retryAfter, 10);\n  if (Number.isInteger(seconds)) {\n    return seconds > 0 ? seconds * 1000 : -1;\n  }\n  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After#directives\n  const delay = new Date(retryAfter).getTime() - Date.now();\n\n  if (delay >= 0) {\n    return delay;\n  }\n  return 0;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as zlib from 'zlib';\nimport { Readable } from 'stream';\nimport { HttpRequestParameters } from './http-transport-types';\nimport { ExportResponse } from '../export-response';\nimport {\n  isExportRetryable,\n  parseRetryAfterToMills,\n} from '../is-export-retryable';\nimport { OTLPExporterError } from '../types';\n\n/**\n * Sends data using http\n * @param params\n * @param agent\n * @param data\n * @param onDone\n * @param timeoutMillis\n */\nexport function sendWithHttp(\n  params: HttpRequestParameters,\n  agent: http.Agent | https.Agent,\n  data: Uint8Array,\n  onDone: (response: ExportResponse) => void,\n  timeoutMillis: number\n): void {\n  const parsedUrl = new URL(params.url);\n  const nodeVersion = Number(process.versions.node.split('.')[0]);\n\n  const options: http.RequestOptions | https.RequestOptions = {\n    hostname: parsedUrl.hostname,\n    port: parsedUrl.port,\n    path: parsedUrl.pathname,\n    method: 'POST',\n    headers: {\n      ...params.headers(),\n    },\n    agent: agent,\n  };\n\n  const request = parsedUrl.protocol === 'http:' ? http.request : https.request;\n\n  const req = request(options, (res: http.IncomingMessage) => {\n    const responseData: Buffer[] = [];\n    res.on('data', chunk => responseData.push(chunk));\n\n    res.on('end', () => {\n      if (res.statusCode && res.statusCode < 299) {\n        onDone({\n          status: 'success',\n          data: Buffer.concat(responseData),\n        });\n      } else if (res.statusCode && isExportRetryable(res.statusCode)) {\n        onDone({\n          status: 'retryable',\n          retryInMillis: parseRetryAfterToMills(res.headers['retry-after']),\n        });\n      } else {\n        const error = new OTLPExporterError(\n          res.statusMessage,\n          res.statusCode,\n          Buffer.concat(responseData).toString()\n        );\n        onDone({\n          status: 'failure',\n          error,\n        });\n      }\n    });\n  });\n\n  req.setTimeout(timeoutMillis, () => {\n    req.destroy();\n    onDone({\n      status: 'failure',\n      error: new Error('Request Timeout'),\n    });\n  });\n  req.on('error', (error: Error) => {\n    onDone({\n      status: 'failure',\n      error,\n    });\n  });\n\n  const reportTimeoutErrorEvent = nodeVersion >= 14 ? 'close' : 'abort';\n  req.on(reportTimeoutErrorEvent, () => {\n    onDone({\n      status: 'failure',\n      error: new Error('Request timed out'),\n    });\n  });\n\n  compressAndSend(req, params.compression, data, (error: Error) => {\n    onDone({\n      status: 'failure',\n      error,\n    });\n  });\n}\n\nexport function compressAndSend(\n  req: http.ClientRequest,\n  compression: 'gzip' | 'none',\n  data: Uint8Array,\n  onError: (error: Error) => void\n) {\n  let dataStream = readableFromUint8Array(data);\n\n  if (compression === 'gzip') {\n    req.setHeader('Content-Encoding', 'gzip');\n    dataStream = dataStream\n      .on('error', onError)\n      .pipe(zlib.createGzip())\n      .on('error', onError);\n  }\n\n  dataStream.pipe(req).on('error', onError);\n}\n\nfunction readableFromUint8Array(buff: string | Uint8Array): Readable {\n  const readable = new Readable();\n  readable.push(buff);\n  readable.push(null);\n\n  return readable;\n}\n\nexport function createHttpAgent(\n  rawUrl: string,\n  agentOptions: http.AgentOptions | https.AgentOptions\n) {\n  const parsedUrl = new URL(rawUrl);\n  const Agent = parsedUrl.protocol === 'http:' ? http.Agent : https.Agent;\n  return new Agent(agentOptions);\n}\n","import { Logger as MXLLogger } from './logger'\nimport MXLPino, { getMixinFunction, type MXLPinoOptions } from './pino'\nimport MXLWinston, { type MXLWinstonOptions, parseWinstonLog } from './winston'\n\nexport type { MXLWinstonOptions, MXLPinoOptions }\nexport { MXLWinston, MXLLogger, parseWinstonLog, MXLPino, getMixinFunction }\n","import { type Attributes, diag, DiagConsoleLogger } from '@opentelemetry/api'\nimport type { Logger as OtelLogger } from '@opentelemetry/api-logs'\nimport { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http'\nimport {\n  defaultServiceName,\n  detectResources as detectOtelResources,\n  envDetector,\n  hostDetector,\n  osDetector,\n  processDetector,\n  resourceFromAttributes,\n} from '@opentelemetry/resources'\nimport {\n  BatchLogRecordProcessor,\n  LoggerProvider,\n} from '@opentelemetry/sdk-logs'\nimport { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions'\n\nimport { version as PKG_VERSION } from '../package.json'\nimport mxl, { LOG_PREFIX as _LOG_PREFIX } from './debug'\nimport {\n  diagLogLevelFromString,\n  getNumberFromEnv,\n  getStringFromEnv,\n} from '@opentelemetry/core' // DEBUG otel modules\n\n// DEBUG otel modules\nif (diagLogLevelFromString('OTEL_LOG_LEVEL')) {\n  diag.setLogger(new DiagConsoleLogger(), {\n    logLevel: diagLogLevelFromString('OTEL_LOG_LEVEL'),\n  })\n}\n\n// TO EXTRACT ENV VARS [https://github.com/open-telemetry/opentelemetry-js/blob/3ab4f765d8d696327b7d139ae6a45e7bd7edd924/experimental/packages/sdk-logs/src/export/BatchLogRecordProcessorBase.ts#L50]\n// TO EXTRACT DEFAULTS [https://github.com/open-telemetry/opentelemetry-js/blob/3ab4f765d8d696327b7d139ae6a45e7bd7edd924/experimental/packages/sdk-logs/src/types.ts#L49]\nconst DEFAULT_EXPORTER_BATCH_SIZE =\n  getNumberFromEnv('OTEL_BLRP_MAX_EXPORT_BATCH_SIZE') ?? 512\nconst DEFAULT_EXPORTER_TIMEOUT_MS =\n  getNumberFromEnv('OTEL_BLRP_EXPORT_TIMEOUT') ?? 30000\nconst DEFAULT_MAX_QUEUE_SIZE =\n  getNumberFromEnv('OTEL_BLRP_MAX_QUEUE_SIZE') ?? 2048\nconst DEFAULT_OTEL_LOGS_EXPORTER_URL =\n  getStringFromEnv('OTEL_EXPORTER_OTLP_LOGS_ENDPOINT') ??\n  (getStringFromEnv('OTEL_EXPORTER_OTLP_ENDPOINT')\n    ? `${getStringFromEnv('OTEL_EXPORTER_OTLP_ENDPOINT')}/v1/logs`\n    : 'http://mxl-otelcol.service-availability.apps.ocpthikadev01.safaricom.net/v1/logs')\nconst DEFAULT_SEND_INTERVAL_MS =\n  getNumberFromEnv('OTEL_BLRP_SCHEDULE_DELAY') ?? 2000\nconst DEFAULT_SERVICE_NAME =\n  getStringFromEnv('OTEL_SERVICE_NAME') ?? defaultServiceName()\n\nconst LOG_PREFIX = `!  ${_LOG_PREFIX}`\n\nexport type LoggerOptions = {\n  baseUrl?: string\n  bufferSize?: number\n  detectResources?: boolean\n  headers?: Record<string, string>\n  queueSize?: number\n  resourceAttributes?: Attributes\n  sendIntervalMs?: number\n  service?: string\n  timeout?: number // The read/write/connection timeout in milliseconds\n}\n\nexport class Logger {\n  private readonly logger: OtelLogger\n\n  private readonly processor: BatchLogRecordProcessor\n\n  constructor({\n    baseUrl,\n    bufferSize,\n    detectResources,\n    headers,\n    queueSize,\n    resourceAttributes,\n    sendIntervalMs,\n    service,\n    timeout,\n  }: LoggerOptions) {\n    if (!service) {\n      console.warn(\n        `${LOG_PREFIX} Service name not found. Use \"${DEFAULT_SERVICE_NAME}\"`\n      )\n    }\n\n    // sanity check bufferSize and queueSize\n    const maxExportBatchSize = bufferSize ?? DEFAULT_EXPORTER_BATCH_SIZE\n    let maxQueueSize = queueSize ?? DEFAULT_MAX_QUEUE_SIZE\n    if (maxExportBatchSize > maxQueueSize) {\n      console.error(\n        `${LOG_PREFIX} bufferSize must be smaller or equal to queueSize. Setting queueSize to ${maxExportBatchSize}`\n      )\n      maxQueueSize = maxExportBatchSize\n    }\n\n    const detectedResource = detectOtelResources({\n      detectors: detectResources\n        ? [envDetector, hostDetector, osDetector, processDetector]\n        : [],\n    })\n\n    const _url = baseUrl ?? DEFAULT_OTEL_LOGS_EXPORTER_URL\n\n    console.warn(`${LOG_PREFIX} Sending logs to ${_url}`)\n\n    const exporter = new OTLPLogExporter({\n      url: _url,\n      ...(headers && { headers }),\n    })\n    this.processor = new BatchLogRecordProcessor(exporter, {\n      /** The maximum batch size of every export. It must be smaller or equal to\n       * maxQueueSize. The default value is 512. */\n      maxExportBatchSize,\n      scheduledDelayMillis: sendIntervalMs ?? DEFAULT_SEND_INTERVAL_MS,\n      exportTimeoutMillis: timeout ?? DEFAULT_EXPORTER_TIMEOUT_MS,\n      maxQueueSize,\n    })\n    const loggerProvider = new LoggerProvider({\n      resource: detectedResource.merge(\n        resourceFromAttributes({\n          // TODO: should use otel semantic conventions\n          'mxl.distro.version': PKG_VERSION,\n          [ATTR_SERVICE_NAME]: service ?? DEFAULT_SERVICE_NAME,\n          ...resourceAttributes,\n        })\n      ),\n    })\n    loggerProvider.addLogRecordProcessor(this.processor)\n\n    this.logger = loggerProvider.getLogger('node-logger')\n    console.log(`${LOG_PREFIX} started!`)\n  }\n\n  shutdown() {\n    mxl('Shutting down MXL node logger')\n    return this.processor.shutdown()\n  }\n\n  forceFlush() {\n    mxl('Forcing flush of MXL node logger')\n    return this.processor.forceFlush()\n  }\n\n  postMessage(level: string, body: string, attributes: Attributes = {}): void {\n    mxl('Emitting log from MXL node logger')\n    this.logger.emit({\n      // TODO: should map to otel severity number\n      severityNumber: 0,\n      // TODO: set up the mapping between different downstream log levels\n      severityText: level,\n      body,\n      attributes,\n      timestamp: this.parseTimestamp(attributes),\n    })\n  }\n\n  private parseTimestamp(meta: Attributes): Date {\n    // pino\n    if (Number.isInteger(meta.time)) {\n      return new Date(meta.time as number)\n    }\n    // set to current time if not provided\n    return new Date()\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExportResult } from '@opentelemetry/core';\nimport { IOtlpExportDelegate } from './otlp-export-delegate';\n\nexport class OTLPExporterBase<Internal> {\n  constructor(private _delegate: IOtlpExportDelegate<Internal>) {}\n\n  /**\n   * Export items.\n   * @param items\n   * @param resultCallback\n   */\n  export(\n    items: Internal,\n    resultCallback: (result: ExportResult) => void\n  ): void {\n    this._delegate.export(items, resultCallback);\n  }\n\n  forceFlush(): Promise<void> {\n    return this._delegate.forceFlush();\n  }\n\n  shutdown(): Promise<void> {\n    return this._delegate.shutdown();\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Configuration shared across all OTLP exporters\n *\n * Implementation note: anything added here MUST be\n * - platform-agnostic\n * - signal-agnostic\n * - transport-agnostic\n */\nexport interface OtlpSharedConfiguration {\n  timeoutMillis: number;\n  concurrencyLimit: number;\n  compression: 'gzip' | 'none';\n}\n\nexport function validateTimeoutMillis(timeoutMillis: number) {\n  if (Number.isFinite(timeoutMillis) && timeoutMillis > 0) {\n    return timeoutMillis;\n  }\n  throw new Error(\n    `Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${timeoutMillis}')`\n  );\n}\n\nexport function wrapStaticHeadersInFunction(\n  headers: Record<string, string> | undefined\n): (() => Record<string, string>) | undefined {\n  if (headers == null) {\n    return undefined;\n  }\n\n  return () => headers;\n}\n\n/**\n * @param userProvidedConfiguration  Configuration options provided by the user in code.\n * @param fallbackConfiguration Fallback to use when the {@link userProvidedConfiguration} does not specify an option.\n * @param defaultConfiguration The defaults as defined by the exporter specification\n */\nexport function mergeOtlpSharedConfigurationWithDefaults(\n  userProvidedConfiguration: Partial<OtlpSharedConfiguration>,\n  fallbackConfiguration: Partial<OtlpSharedConfiguration>,\n  defaultConfiguration: OtlpSharedConfiguration\n): OtlpSharedConfiguration {\n  return {\n    timeoutMillis: validateTimeoutMillis(\n      userProvidedConfiguration.timeoutMillis ??\n        fallbackConfiguration.timeoutMillis ??\n        defaultConfiguration.timeoutMillis\n    ),\n    concurrencyLimit:\n      userProvidedConfiguration.concurrencyLimit ??\n      fallbackConfiguration.concurrencyLimit ??\n      defaultConfiguration.concurrencyLimit,\n    compression:\n      userProvidedConfiguration.compression ??\n      fallbackConfiguration.compression ??\n      defaultConfiguration.compression,\n  };\n}\n\nexport function getSharedConfigurationDefaults(): OtlpSharedConfiguration {\n  return {\n    timeoutMillis: 10000,\n    concurrencyLimit: 30,\n    compression: 'none',\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface IExportPromiseHandler {\n  pushPromise(promise: Promise<void>): void;\n  hasReachedLimit(): boolean;\n  awaitAll(): Promise<void>;\n}\n\nclass BoundedQueueExportPromiseHandler implements IExportPromiseHandler {\n  private readonly _concurrencyLimit: number;\n  private _sendingPromises: Promise<unknown>[] = [];\n\n  /**\n   * @param concurrencyLimit maximum promises allowed in a queue at the same time.\n   */\n  constructor(concurrencyLimit: number) {\n    this._concurrencyLimit = concurrencyLimit;\n  }\n\n  public pushPromise(promise: Promise<void>): void {\n    if (this.hasReachedLimit()) {\n      throw new Error('Concurrency Limit reached');\n    }\n\n    this._sendingPromises.push(promise);\n    const popPromise = () => {\n      const index = this._sendingPromises.indexOf(promise);\n      this._sendingPromises.splice(index, 1);\n    };\n    promise.then(popPromise, popPromise);\n  }\n\n  public hasReachedLimit(): boolean {\n    return this._sendingPromises.length >= this._concurrencyLimit;\n  }\n\n  public async awaitAll(): Promise<void> {\n    await Promise.all(this._sendingPromises);\n  }\n}\n\n/**\n * Promise queue for keeping track of export promises. Finished promises will be auto-dequeued.\n * Allows for awaiting all promises in the queue.\n */\nexport function createBoundedQueueExportPromiseHandler(options: {\n  concurrencyLimit: number;\n}): IExportPromiseHandler {\n  return new BoundedQueueExportPromiseHandler(options.concurrencyLimit);\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context, createContextKey } from '@opentelemetry/api';\n\nconst SUPPRESS_TRACING_KEY = createContextKey(\n  'OpenTelemetry SDK Context Key SUPPRESS_TRACING'\n);\n\nexport function suppressTracing(context: Context): Context {\n  return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\n\nexport function unsuppressTracing(context: Context): Context {\n  return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\n\nexport function isTracingSuppressed(context: Context): boolean {\n  return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexport const BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexport const BAGGAGE_ITEMS_SEPARATOR = ',';\n\n// Name of the http header used to propagate the baggage\nexport const BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexport const BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexport const BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexport const BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n  Baggage,\n  BaggageEntryMetadata,\n  baggageEntryMetadataFromString,\n} from '@opentelemetry/api';\nimport {\n  BAGGAGE_ITEMS_SEPARATOR,\n  BAGGAGE_PROPERTIES_SEPARATOR,\n  BAGGAGE_KEY_PAIR_SEPARATOR,\n  BAGGAGE_MAX_TOTAL_LENGTH,\n} from './constants';\n\ntype ParsedBaggageKeyValue = {\n  key: string;\n  value: string;\n  metadata: BaggageEntryMetadata | undefined;\n};\n\nexport function serializeKeyPairs(keyPairs: string[]): string {\n  return keyPairs.reduce((hValue: string, current: string) => {\n    const value = `${hValue}${\n      hValue !== '' ? BAGGAGE_ITEMS_SEPARATOR : ''\n    }${current}`;\n    return value.length > BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n  }, '');\n}\n\nexport function getKeyPairs(baggage: Baggage): string[] {\n  return baggage.getAllEntries().map(([key, value]) => {\n    let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n\n    // include opaque metadata if provided\n    // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n    if (value.metadata !== undefined) {\n      entry += BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n    }\n\n    return entry;\n  });\n}\n\nexport function parsePairKeyValue(\n  entry: string\n): ParsedBaggageKeyValue | undefined {\n  const valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR);\n  if (valueProps.length <= 0) return;\n  const keyPairPart = valueProps.shift();\n  if (!keyPairPart) return;\n  const separatorIndex = keyPairPart.indexOf(BAGGAGE_KEY_PAIR_SEPARATOR);\n  if (separatorIndex <= 0) return;\n  const key = decodeURIComponent(\n    keyPairPart.substring(0, separatorIndex).trim()\n  );\n  const value = decodeURIComponent(\n    keyPairPart.substring(separatorIndex + 1).trim()\n  );\n  let metadata;\n  if (valueProps.length > 0) {\n    metadata = baggageEntryMetadataFromString(\n      valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR)\n    );\n  }\n  return { key, value, metadata };\n}\n\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nexport function parseKeyPairsIntoRecord(\n  value?: string\n): Record<string, string> {\n  if (typeof value !== 'string' || value.length === 0) return {};\n  return value\n    .split(BAGGAGE_ITEMS_SEPARATOR)\n    .map(entry => {\n      return parsePairKeyValue(entry);\n    })\n    .filter(keyPair => keyPair !== undefined && keyPair.value.length > 0)\n    .reduce<Record<string, string>>((headers, keyPair) => {\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      headers[keyPair!.key] = keyPair!.value;\n      return headers;\n    }, {});\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag, AttributeValue, Attributes } from '@opentelemetry/api';\n\nexport function sanitizeAttributes(attributes: unknown): Attributes {\n  const out: Attributes = {};\n\n  if (typeof attributes !== 'object' || attributes == null) {\n    return out;\n  }\n\n  for (const [key, val] of Object.entries(attributes)) {\n    if (!isAttributeKey(key)) {\n      diag.warn(`Invalid attribute key: ${key}`);\n      continue;\n    }\n    if (!isAttributeValue(val)) {\n      diag.warn(`Invalid attribute value set for key: ${key}`);\n      continue;\n    }\n    if (Array.isArray(val)) {\n      out[key] = val.slice();\n    } else {\n      out[key] = val;\n    }\n  }\n\n  return out;\n}\n\nexport function isAttributeKey(key: unknown): key is string {\n  return typeof key === 'string' && key.length > 0;\n}\n\nexport function isAttributeValue(val: unknown): val is AttributeValue {\n  if (val == null) {\n    return true;\n  }\n\n  if (Array.isArray(val)) {\n    return isHomogeneousAttributeValueArray(val);\n  }\n\n  return isValidPrimitiveAttributeValue(val);\n}\n\nfunction isHomogeneousAttributeValueArray(arr: unknown[]): boolean {\n  let type: string | undefined;\n\n  for (const element of arr) {\n    // null/undefined elements are allowed\n    if (element == null) continue;\n\n    if (!type) {\n      if (isValidPrimitiveAttributeValue(element)) {\n        type = typeof element;\n        continue;\n      }\n      // encountered an invalid primitive\n      return false;\n    }\n\n    if (typeof element === type) {\n      continue;\n    }\n\n    return false;\n  }\n\n  return true;\n}\n\nfunction isValidPrimitiveAttributeValue(val: unknown): boolean {\n  switch (typeof val) {\n    case 'number':\n    case 'boolean':\n    case 'string':\n      return true;\n  }\n\n  return false;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag, Exception } from '@opentelemetry/api';\nimport { ErrorHandler } from './types';\n\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nexport function loggingErrorHandler(): ErrorHandler {\n  return (ex: Exception) => {\n    diag.error(stringifyException(ex));\n  };\n}\n\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex: Exception | string): string {\n  if (typeof ex === 'string') {\n    return ex;\n  } else {\n    return JSON.stringify(flattenException(ex));\n  }\n}\n\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex: Exception): Record<string, string> {\n  const result = {} as Record<string, string>;\n  let current = ex;\n\n  while (current !== null) {\n    Object.getOwnPropertyNames(current).forEach(propertyName => {\n      if (result[propertyName]) return;\n      const value = current[propertyName as keyof typeof current];\n      if (value) {\n        result[propertyName] = String(value);\n      }\n    });\n    current = Object.getPrototypeOf(current);\n  }\n\n  return result;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Exception } from '@opentelemetry/api';\nimport { loggingErrorHandler } from './logging-error-handler';\nimport { ErrorHandler } from './types';\n\n/** The global error handler delegate */\nlet delegateHandler = loggingErrorHandler();\n\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nexport function setGlobalErrorHandler(handler: ErrorHandler): void {\n  delegateHandler = handler;\n}\n\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nexport function globalErrorHandler(ex: Exception): void {\n  try {\n    delegateHandler(ex);\n  } catch {} // eslint-disable-line no-empty\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport { inspect } from 'util';\n\n/**\n * Retrieves a number from an environment variable.\n * - Returns `undefined` if the environment variable is empty, unset, contains only whitespace, or is not a number.\n * - Returns a number in all other cases.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {number | undefined} - The number value or `undefined`.\n */\nexport function getNumberFromEnv(key: string): number | undefined {\n  const raw = process.env[key];\n  if (raw == null || raw.trim() === '') {\n    return undefined;\n  }\n\n  const value = Number(raw);\n  if (isNaN(value)) {\n    diag.warn(\n      `Unknown value ${inspect(raw)} for ${key}, expected a number, using defaults`\n    );\n    return undefined;\n  }\n\n  return value;\n}\n\n/**\n * Retrieves a string from an environment variable.\n * - Returns `undefined` if the environment variable is empty, unset, or contains only whitespace.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {string | undefined} - The string value or `undefined`.\n */\nexport function getStringFromEnv(key: string): string | undefined {\n  const raw = process.env[key];\n  if (raw == null || raw.trim() === '') {\n    return undefined;\n  }\n  return raw;\n}\n\n/**\n * Retrieves a boolean value from an environment variable.\n * - Trims leading and trailing whitespace and ignores casing.\n * - Returns `false` if the environment variable is empty, unset, or contains only whitespace.\n * - Returns `false` for strings that cannot be mapped to a boolean.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {boolean} - The boolean value or `false` if the environment variable is unset empty, unset, or contains only whitespace.\n */\nexport function getBooleanFromEnv(key: string): boolean {\n  const raw = process.env[key]?.trim().toLowerCase();\n  if (raw == null || raw === '') {\n    // NOTE: falling back to `false` instead of `undefined` as required by the specification.\n    // If you have a use-case that requires `undefined`, consider using `getStringFromEnv()` and applying the necessary\n    // normalizations in the consuming code.\n    return false;\n  }\n  if (raw === 'true') {\n    return true;\n  } else if (raw === 'false') {\n    return false;\n  } else {\n    diag.warn(\n      `Unknown value ${inspect(raw)} for ${key}, expected 'true' or 'false', falling back to 'false' (default)`\n    );\n    return false;\n  }\n}\n\n/**\n * Retrieves a list of strings from an environment variable.\n * - Uses ',' as the delimiter.\n * - Trims leading and trailing whitespace from each entry.\n * - Excludes empty entries.\n * - Returns `undefined` if the environment variable is empty or contains only whitespace.\n * - Returns an empty array if all entries are empty or whitespace.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {string[] | undefined} - The list of strings or `undefined`.\n */\nexport function getStringListFromEnv(key: string): string[] | undefined {\n  return getStringFromEnv(key)\n    ?.split(',')\n    .map(v => v.trim())\n    .filter(s => s !== '');\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { performance } from 'perf_hooks';\n\nexport const otperformance = performance;\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '2.0.0';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createConstMap } from '../internal/utils';\n\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticResourceAttributes\n//----------------------------------------------------------------------------------------------------------\n\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_CLOUD_PROVIDER = 'cloud.provider';\nconst TMP_CLOUD_ACCOUNT_ID = 'cloud.account.id';\nconst TMP_CLOUD_REGION = 'cloud.region';\nconst TMP_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';\nconst TMP_CLOUD_PLATFORM = 'cloud.platform';\nconst TMP_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn';\nconst TMP_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn';\nconst TMP_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype';\nconst TMP_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn';\nconst TMP_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family';\nconst TMP_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision';\nconst TMP_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn';\nconst TMP_AWS_LOG_GROUP_NAMES = 'aws.log.group.names';\nconst TMP_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns';\nconst TMP_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';\nconst TMP_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns';\nconst TMP_CONTAINER_NAME = 'container.name';\nconst TMP_CONTAINER_ID = 'container.id';\nconst TMP_CONTAINER_RUNTIME = 'container.runtime';\nconst TMP_CONTAINER_IMAGE_NAME = 'container.image.name';\nconst TMP_CONTAINER_IMAGE_TAG = 'container.image.tag';\nconst TMP_DEPLOYMENT_ENVIRONMENT = 'deployment.environment';\nconst TMP_DEVICE_ID = 'device.id';\nconst TMP_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier';\nconst TMP_DEVICE_MODEL_NAME = 'device.model.name';\nconst TMP_FAAS_NAME = 'faas.name';\nconst TMP_FAAS_ID = 'faas.id';\nconst TMP_FAAS_VERSION = 'faas.version';\nconst TMP_FAAS_INSTANCE = 'faas.instance';\nconst TMP_FAAS_MAX_MEMORY = 'faas.max_memory';\nconst TMP_HOST_ID = 'host.id';\nconst TMP_HOST_NAME = 'host.name';\nconst TMP_HOST_TYPE = 'host.type';\nconst TMP_HOST_ARCH = 'host.arch';\nconst TMP_HOST_IMAGE_NAME = 'host.image.name';\nconst TMP_HOST_IMAGE_ID = 'host.image.id';\nconst TMP_HOST_IMAGE_VERSION = 'host.image.version';\nconst TMP_K8S_CLUSTER_NAME = 'k8s.cluster.name';\nconst TMP_K8S_NODE_NAME = 'k8s.node.name';\nconst TMP_K8S_NODE_UID = 'k8s.node.uid';\nconst TMP_K8S_NAMESPACE_NAME = 'k8s.namespace.name';\nconst TMP_K8S_POD_UID = 'k8s.pod.uid';\nconst TMP_K8S_POD_NAME = 'k8s.pod.name';\nconst TMP_K8S_CONTAINER_NAME = 'k8s.container.name';\nconst TMP_K8S_REPLICASET_UID = 'k8s.replicaset.uid';\nconst TMP_K8S_REPLICASET_NAME = 'k8s.replicaset.name';\nconst TMP_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';\nconst TMP_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name';\nconst TMP_K8S_STATEFULSET_UID = 'k8s.statefulset.uid';\nconst TMP_K8S_STATEFULSET_NAME = 'k8s.statefulset.name';\nconst TMP_K8S_DAEMONSET_UID = 'k8s.daemonset.uid';\nconst TMP_K8S_DAEMONSET_NAME = 'k8s.daemonset.name';\nconst TMP_K8S_JOB_UID = 'k8s.job.uid';\nconst TMP_K8S_JOB_NAME = 'k8s.job.name';\nconst TMP_K8S_CRONJOB_UID = 'k8s.cronjob.uid';\nconst TMP_K8S_CRONJOB_NAME = 'k8s.cronjob.name';\nconst TMP_OS_TYPE = 'os.type';\nconst TMP_OS_DESCRIPTION = 'os.description';\nconst TMP_OS_NAME = 'os.name';\nconst TMP_OS_VERSION = 'os.version';\nconst TMP_PROCESS_PID = 'process.pid';\nconst TMP_PROCESS_EXECUTABLE_NAME = 'process.executable.name';\nconst TMP_PROCESS_EXECUTABLE_PATH = 'process.executable.path';\nconst TMP_PROCESS_COMMAND = 'process.command';\nconst TMP_PROCESS_COMMAND_LINE = 'process.command_line';\nconst TMP_PROCESS_COMMAND_ARGS = 'process.command_args';\nconst TMP_PROCESS_OWNER = 'process.owner';\nconst TMP_PROCESS_RUNTIME_NAME = 'process.runtime.name';\nconst TMP_PROCESS_RUNTIME_VERSION = 'process.runtime.version';\nconst TMP_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description';\nconst TMP_SERVICE_NAME = 'service.name';\nconst TMP_SERVICE_NAMESPACE = 'service.namespace';\nconst TMP_SERVICE_INSTANCE_ID = 'service.instance.id';\nconst TMP_SERVICE_VERSION = 'service.version';\nconst TMP_TELEMETRY_SDK_NAME = 'telemetry.sdk.name';\nconst TMP_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';\nconst TMP_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';\nconst TMP_TELEMETRY_AUTO_VERSION = 'telemetry.auto.version';\nconst TMP_WEBENGINE_NAME = 'webengine.name';\nconst TMP_WEBENGINE_VERSION = 'webengine.version';\nconst TMP_WEBENGINE_DESCRIPTION = 'webengine.description';\n\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use ATTR_CLOUD_PROVIDER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER;\n\n/**\n * The cloud account ID the resource is assigned to.\n *\n * @deprecated Use ATTR_CLOUD_ACCOUNT_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID;\n\n/**\n * The geographical region the resource is running. Refer to your provider&#39;s docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n *\n * @deprecated Use ATTR_CLOUD_REGION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION;\n\n/**\n * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n *\n * Note: Availability zones are called &#34;zones&#34; on Alibaba Cloud and Google Cloud.\n *\n * @deprecated Use ATTR_CLOUD_AVAILABILITY_ZONE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use ATTR_CLOUD_PLATFORM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM;\n\n/**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n *\n * @deprecated Use ATTR_AWS_ECS_CONTAINER_ARN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN;\n\n/**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n *\n * @deprecated Use ATTR_AWS_ECS_CLUSTER_ARN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN;\n\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n *\n * @deprecated Use ATTR_AWS_ECS_LAUNCHTYPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE;\n\n/**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n *\n * @deprecated Use ATTR_AWS_ECS_TASK_ARN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN;\n\n/**\n * The task definition family this task definition is a member of.\n *\n * @deprecated Use ATTR_AWS_ECS_TASK_FAMILY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY;\n\n/**\n * The revision for this task definition.\n *\n * @deprecated Use ATTR_AWS_ECS_TASK_REVISION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION;\n\n/**\n * The ARN of an EKS cluster.\n *\n * @deprecated Use ATTR_AWS_EKS_CLUSTER_ARN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN;\n\n/**\n * The name(s) of the AWS log group(s) an application is writing to.\n *\n * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n *\n * @deprecated Use ATTR_AWS_LOG_GROUP_NAMES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES;\n\n/**\n * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n *\n * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n *\n * @deprecated Use ATTR_AWS_LOG_GROUP_ARNS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS;\n\n/**\n * The name(s) of the AWS log stream(s) an application is writing to.\n *\n * @deprecated Use ATTR_AWS_LOG_STREAM_NAMES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES;\n\n/**\n * The ARN(s) of the AWS log stream(s).\n *\n * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n *\n * @deprecated Use ATTR_AWS_LOG_STREAM_ARNS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS;\n\n/**\n * Container name.\n *\n * @deprecated Use ATTR_CONTAINER_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME;\n\n/**\n * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n *\n * @deprecated Use ATTR_CONTAINER_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID;\n\n/**\n * The container runtime managing this container.\n *\n * @deprecated Use ATTR_CONTAINER_RUNTIME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME;\n\n/**\n * Name of the image the container was built on.\n *\n * @deprecated Use ATTR_CONTAINER_IMAGE_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME;\n\n/**\n * Container image tag.\n *\n * @deprecated Use ATTR_CONTAINER_IMAGE_TAGS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG;\n\n/**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n *\n * @deprecated Use ATTR_DEPLOYMENT_ENVIRONMENT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT;\n\n/**\n * A unique identifier representing the device.\n *\n * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n *\n * @deprecated Use ATTR_DEVICE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID;\n\n/**\n * The model identifier for the device.\n *\n * Note: It&#39;s recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n *\n * @deprecated Use ATTR_DEVICE_MODEL_IDENTIFIER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER;\n\n/**\n * The marketing name for the device model.\n *\n * Note: It&#39;s recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n *\n * @deprecated Use ATTR_DEVICE_MODEL_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME;\n\n/**\n * The name of the single function that this runtime instance executes.\n *\n * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n *\n * @deprecated Use ATTR_FAAS_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME;\n\n/**\n* The unique ID of the single function that this runtime instance executes.\n*\n* Note: Depending on the cloud provider, use:\n\n* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\nTake care not to use the &#34;invoked ARN&#34; directly but replace any\n[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\ndifferent aliases.\n* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n\nOn some providers, it may not be possible to determine the full ID at startup,\nwhich is why this field cannot be made required. For example, on AWS the account ID\npart of the ARN is not available without calling another AWS API\nwhich may be deemed too slow for a short-running lambda function.\nAs an alternative, consider setting `faas.id` as a span attribute instead.\n*\n* @deprecated Use ATTR_CLOUD_RESOURCE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n*/\nexport const SEMRESATTRS_FAAS_ID = TMP_FAAS_ID;\n\n/**\n* The immutable version of the function being executed.\n*\n* Note: Depending on the cloud provider and platform, use:\n\n* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n  (an integer represented as a decimal string).\n* **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n  (i.e., the function name plus the revision suffix).\n* **Google Cloud Functions:** The value of the\n  [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n* **Azure Functions:** Not applicable. Do not set this attribute.\n*\n* @deprecated Use ATTR_FAAS_VERSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n*/\nexport const SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION;\n\n/**\n * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n *\n * Note: * **AWS Lambda:** Use the (full) log stream name.\n *\n * @deprecated Use ATTR_FAAS_INSTANCE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE;\n\n/**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It&#39;s recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n *\n * @deprecated Use ATTR_FAAS_MAX_MEMORY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY;\n\n/**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n *\n * @deprecated Use ATTR_HOST_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_HOST_ID = TMP_HOST_ID;\n\n/**\n * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n *\n * @deprecated Use ATTR_HOST_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_HOST_NAME = TMP_HOST_NAME;\n\n/**\n * Type of host. For Cloud, this must be the machine type.\n *\n * @deprecated Use ATTR_HOST_TYPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use ATTR_HOST_ARCH in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH;\n\n/**\n * Name of the VM image or OS install the host was instantiated from.\n *\n * @deprecated Use ATTR_HOST_IMAGE_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME;\n\n/**\n * VM image ID. For Cloud, this value is from the provider.\n *\n * @deprecated Use ATTR_HOST_IMAGE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID;\n\n/**\n * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes).\n *\n * @deprecated Use ATTR_HOST_IMAGE_VERSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION;\n\n/**\n * The name of the cluster.\n *\n * @deprecated Use ATTR_K8S_CLUSTER_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME;\n\n/**\n * The name of the Node.\n *\n * @deprecated Use ATTR_K8S_NODE_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME;\n\n/**\n * The UID of the Node.\n *\n * @deprecated Use ATTR_K8S_NODE_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID;\n\n/**\n * The name of the namespace that the pod is running in.\n *\n * @deprecated Use ATTR_K8S_NAMESPACE_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME;\n\n/**\n * The UID of the Pod.\n *\n * @deprecated Use ATTR_K8S_POD_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID;\n\n/**\n * The name of the Pod.\n *\n * @deprecated Use ATTR_K8S_POD_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME;\n\n/**\n * The name of the Container in a Pod template.\n *\n * @deprecated Use ATTR_K8S_CONTAINER_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME;\n\n/**\n * The UID of the ReplicaSet.\n *\n * @deprecated Use ATTR_K8S_REPLICASET_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID;\n\n/**\n * The name of the ReplicaSet.\n *\n * @deprecated Use ATTR_K8S_REPLICASET_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME;\n\n/**\n * The UID of the Deployment.\n *\n * @deprecated Use ATTR_K8S_DEPLOYMENT_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID;\n\n/**\n * The name of the Deployment.\n *\n * @deprecated Use ATTR_K8S_DEPLOYMENT_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME;\n\n/**\n * The UID of the StatefulSet.\n *\n * @deprecated Use ATTR_K8S_STATEFULSET_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID;\n\n/**\n * The name of the StatefulSet.\n *\n * @deprecated Use ATTR_K8S_STATEFULSET_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME;\n\n/**\n * The UID of the DaemonSet.\n *\n * @deprecated Use ATTR_K8S_DAEMONSET_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID;\n\n/**\n * The name of the DaemonSet.\n *\n * @deprecated Use ATTR_K8S_DAEMONSET_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME;\n\n/**\n * The UID of the Job.\n *\n * @deprecated Use ATTR_K8S_JOB_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID;\n\n/**\n * The name of the Job.\n *\n * @deprecated Use ATTR_K8S_JOB_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME;\n\n/**\n * The UID of the CronJob.\n *\n * @deprecated Use ATTR_K8S_CRONJOB_UID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID;\n\n/**\n * The name of the CronJob.\n *\n * @deprecated Use ATTR_K8S_CRONJOB_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME;\n\n/**\n * The operating system type.\n *\n * @deprecated Use ATTR_OS_TYPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_OS_TYPE = TMP_OS_TYPE;\n\n/**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n *\n * @deprecated Use ATTR_OS_DESCRIPTION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION;\n\n/**\n * Human readable operating system name.\n *\n * @deprecated Use ATTR_OS_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_OS_NAME = TMP_OS_NAME;\n\n/**\n * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes).\n *\n * @deprecated Use ATTR_OS_VERSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_OS_VERSION = TMP_OS_VERSION;\n\n/**\n * Process identifier (PID).\n *\n * @deprecated Use ATTR_PROCESS_PID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID;\n\n/**\n * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n *\n * @deprecated Use ATTR_PROCESS_EXECUTABLE_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME;\n\n/**\n * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n *\n * @deprecated Use ATTR_PROCESS_EXECUTABLE_PATH in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH;\n\n/**\n * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n *\n * @deprecated Use ATTR_PROCESS_COMMAND in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND;\n\n/**\n * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n *\n * @deprecated Use ATTR_PROCESS_COMMAND_LINE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE;\n\n/**\n * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n *\n * @deprecated Use ATTR_PROCESS_COMMAND_ARGS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS;\n\n/**\n * The username of the user that owns the process.\n *\n * @deprecated Use ATTR_PROCESS_OWNER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER;\n\n/**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n *\n * @deprecated Use ATTR_PROCESS_RUNTIME_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME;\n\n/**\n * The version of the runtime of this process, as returned by the runtime without modification.\n *\n * @deprecated Use ATTR_PROCESS_RUNTIME_VERSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION;\n\n/**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n *\n * @deprecated Use ATTR_PROCESS_RUNTIME_DESCRIPTION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION =\n  TMP_PROCESS_RUNTIME_DESCRIPTION;\n\n/**\n * Logical name of the service.\n *\n * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n *\n * @deprecated Use ATTR_SERVICE_NAME.\n */\nexport const SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME;\n\n/**\n * A namespace for `service.name`.\n *\n * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n *\n * @deprecated Use ATTR_SERVICE_NAMESPACE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE;\n\n/**\n * The string ID of the service instance.\n *\n * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n *\n * @deprecated Use ATTR_SERVICE_INSTANCE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID;\n\n/**\n * The version string of the service API or implementation.\n *\n * @deprecated Use ATTR_SERVICE_VERSION.\n */\nexport const SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION;\n\n/**\n * The name of the telemetry SDK as defined above.\n *\n * @deprecated Use ATTR_TELEMETRY_SDK_NAME.\n */\nexport const SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use ATTR_TELEMETRY_SDK_LANGUAGE.\n */\nexport const SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE;\n\n/**\n * The version string of the telemetry SDK.\n *\n * @deprecated Use ATTR_TELEMETRY_SDK_VERSION.\n */\nexport const SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION;\n\n/**\n * The version string of the auto instrumentation agent, if used.\n *\n * @deprecated Use ATTR_TELEMETRY_DISTRO_VERSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION;\n\n/**\n * The name of the web engine.\n *\n * @deprecated Use ATTR_WEBENGINE_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME;\n\n/**\n * The version of the web engine.\n *\n * @deprecated Use ATTR_WEBENGINE_VERSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION;\n\n/**\n * Additional description of the web engine (e.g. detailed version and edition information).\n *\n * @deprecated Use ATTR_WEBENGINE_DESCRIPTION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION;\n\n/**\n * Definition of available values for SemanticResourceAttributes\n * This type is used for backward compatibility, you should use the individual exported\n * constants SemanticResourceAttributes_XXXXX rather than the exported constant map. As any single reference\n * to a constant map value will result in all strings being included into your bundle.\n * @deprecated Use the SEMRESATTRS_XXXXX constants rather than the SemanticResourceAttributes.XXXXX for bundle minification.\n */\nexport type SemanticResourceAttributes = {\n  /**\n   * Name of the cloud provider.\n   */\n  CLOUD_PROVIDER: 'cloud.provider';\n\n  /**\n   * The cloud account ID the resource is assigned to.\n   */\n  CLOUD_ACCOUNT_ID: 'cloud.account.id';\n\n  /**\n   * The geographical region the resource is running. Refer to your provider&#39;s docs to see the available regions, for example [Alibaba Cloud regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), [Azure regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), or [Google Cloud regions](https://cloud.google.com/about/locations).\n   */\n  CLOUD_REGION: 'cloud.region';\n\n  /**\n   * Cloud regions often have multiple, isolated locations known as zones to increase availability. Availability zone represents the zone where the resource is running.\n   *\n   * Note: Availability zones are called &#34;zones&#34; on Alibaba Cloud and Google Cloud.\n   */\n  CLOUD_AVAILABILITY_ZONE: 'cloud.availability_zone';\n\n  /**\n   * The cloud platform in use.\n   *\n   * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n   */\n  CLOUD_PLATFORM: 'cloud.platform';\n\n  /**\n   * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n   */\n  AWS_ECS_CONTAINER_ARN: 'aws.ecs.container.arn';\n\n  /**\n   * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n   */\n  AWS_ECS_CLUSTER_ARN: 'aws.ecs.cluster.arn';\n\n  /**\n   * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n   */\n  AWS_ECS_LAUNCHTYPE: 'aws.ecs.launchtype';\n\n  /**\n   * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n   */\n  AWS_ECS_TASK_ARN: 'aws.ecs.task.arn';\n\n  /**\n   * The task definition family this task definition is a member of.\n   */\n  AWS_ECS_TASK_FAMILY: 'aws.ecs.task.family';\n\n  /**\n   * The revision for this task definition.\n   */\n  AWS_ECS_TASK_REVISION: 'aws.ecs.task.revision';\n\n  /**\n   * The ARN of an EKS cluster.\n   */\n  AWS_EKS_CLUSTER_ARN: 'aws.eks.cluster.arn';\n\n  /**\n   * The name(s) of the AWS log group(s) an application is writing to.\n   *\n   * Note: Multiple log groups must be supported for cases like multi-container applications, where a single application has sidecar containers, and each write to their own log group.\n   */\n  AWS_LOG_GROUP_NAMES: 'aws.log.group.names';\n\n  /**\n   * The Amazon Resource Name(s) (ARN) of the AWS log group(s).\n   *\n   * Note: See the [log group ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format).\n   */\n  AWS_LOG_GROUP_ARNS: 'aws.log.group.arns';\n\n  /**\n   * The name(s) of the AWS log stream(s) an application is writing to.\n   */\n  AWS_LOG_STREAM_NAMES: 'aws.log.stream.names';\n\n  /**\n   * The ARN(s) of the AWS log stream(s).\n   *\n   * Note: See the [log stream ARN format documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). One log group can contain several log streams, so these ARNs necessarily identify both a log group and a log stream.\n   */\n  AWS_LOG_STREAM_ARNS: 'aws.log.stream.arns';\n\n  /**\n   * Container name.\n   */\n  CONTAINER_NAME: 'container.name';\n\n  /**\n   * Container ID. Usually a UUID, as for example used to [identify Docker containers](https://docs.docker.com/engine/reference/run/#container-identification). The UUID might be abbreviated.\n   */\n  CONTAINER_ID: 'container.id';\n\n  /**\n   * The container runtime managing this container.\n   */\n  CONTAINER_RUNTIME: 'container.runtime';\n\n  /**\n   * Name of the image the container was built on.\n   */\n  CONTAINER_IMAGE_NAME: 'container.image.name';\n\n  /**\n   * Container image tag.\n   */\n  CONTAINER_IMAGE_TAG: 'container.image.tag';\n\n  /**\n   * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n   */\n  DEPLOYMENT_ENVIRONMENT: 'deployment.environment';\n\n  /**\n   * A unique identifier representing the device.\n   *\n   * Note: The device identifier MUST only be defined using the values outlined below. This value is not an advertising identifier and MUST NOT be used as such. On iOS (Swift or Objective-C), this value MUST be equal to the [vendor identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). On Android (Java or Kotlin), this value MUST be equal to the Firebase Installation ID or a globally unique UUID which is persisted across sessions in your application. More information can be found [here](https://developer.android.com/training/articles/user-data-ids) on best practices and exact implementation details. Caution should be taken when storing personal data or anything which can identify a user. GDPR and data protection laws may apply, ensure you do your own due diligence.\n   */\n  DEVICE_ID: 'device.id';\n\n  /**\n   * The model identifier for the device.\n   *\n   * Note: It&#39;s recommended this value represents a machine readable version of the model identifier rather than the market or consumer-friendly name of the device.\n   */\n  DEVICE_MODEL_IDENTIFIER: 'device.model.identifier';\n\n  /**\n   * The marketing name for the device model.\n   *\n   * Note: It&#39;s recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n   */\n  DEVICE_MODEL_NAME: 'device.model.name';\n\n  /**\n   * The name of the single function that this runtime instance executes.\n   *\n   * Note: This is the name of the function as configured/deployed on the FaaS platform and is usually different from the name of the callback function (which may be stored in the [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) span attributes).\n   */\n  FAAS_NAME: 'faas.name';\n\n  /**\n  * The unique ID of the single function that this runtime instance executes.\n  *\n  * Note: Depending on the cloud provider, use:\n\n* **AWS Lambda:** The function [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).\nTake care not to use the &#34;invoked ARN&#34; directly but replace any\n[alias suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) with the resolved function version, as the same runtime instance may be invokable with multiple\ndifferent aliases.\n* **GCP:** The [URI of the resource](https://cloud.google.com/iam/docs/full-resource-names)\n* **Azure:** The [Fully Qualified Resource ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id).\n\nOn some providers, it may not be possible to determine the full ID at startup,\nwhich is why this field cannot be made required. For example, on AWS the account ID\npart of the ARN is not available without calling another AWS API\nwhich may be deemed too slow for a short-running lambda function.\nAs an alternative, consider setting `faas.id` as a span attribute instead.\n  */\n  FAAS_ID: 'faas.id';\n\n  /**\n  * The immutable version of the function being executed.\n  *\n  * Note: Depending on the cloud provider and platform, use:\n\n* **AWS Lambda:** The [function version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html)\n  (an integer represented as a decimal string).\n* **Google Cloud Run:** The [revision](https://cloud.google.com/run/docs/managing/revisions)\n  (i.e., the function name plus the revision suffix).\n* **Google Cloud Functions:** The value of the\n  [`K_REVISION` environment variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically).\n* **Azure Functions:** Not applicable. Do not set this attribute.\n  */\n  FAAS_VERSION: 'faas.version';\n\n  /**\n   * The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.\n   *\n   * Note: * **AWS Lambda:** Use the (full) log stream name.\n   */\n  FAAS_INSTANCE: 'faas.instance';\n\n  /**\n   * The amount of memory available to the serverless function in MiB.\n   *\n   * Note: It&#39;s recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information.\n   */\n  FAAS_MAX_MEMORY: 'faas.max_memory';\n\n  /**\n   * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n   */\n  HOST_ID: 'host.id';\n\n  /**\n   * Name of the host. On Unix systems, it may contain what the hostname command returns, or the fully qualified hostname, or another name specified by the user.\n   */\n  HOST_NAME: 'host.name';\n\n  /**\n   * Type of host. For Cloud, this must be the machine type.\n   */\n  HOST_TYPE: 'host.type';\n\n  /**\n   * The CPU architecture the host system is running on.\n   */\n  HOST_ARCH: 'host.arch';\n\n  /**\n   * Name of the VM image or OS install the host was instantiated from.\n   */\n  HOST_IMAGE_NAME: 'host.image.name';\n\n  /**\n   * VM image ID. For Cloud, this value is from the provider.\n   */\n  HOST_IMAGE_ID: 'host.image.id';\n\n  /**\n   * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes).\n   */\n  HOST_IMAGE_VERSION: 'host.image.version';\n\n  /**\n   * The name of the cluster.\n   */\n  K8S_CLUSTER_NAME: 'k8s.cluster.name';\n\n  /**\n   * The name of the Node.\n   */\n  K8S_NODE_NAME: 'k8s.node.name';\n\n  /**\n   * The UID of the Node.\n   */\n  K8S_NODE_UID: 'k8s.node.uid';\n\n  /**\n   * The name of the namespace that the pod is running in.\n   */\n  K8S_NAMESPACE_NAME: 'k8s.namespace.name';\n\n  /**\n   * The UID of the Pod.\n   */\n  K8S_POD_UID: 'k8s.pod.uid';\n\n  /**\n   * The name of the Pod.\n   */\n  K8S_POD_NAME: 'k8s.pod.name';\n\n  /**\n   * The name of the Container in a Pod template.\n   */\n  K8S_CONTAINER_NAME: 'k8s.container.name';\n\n  /**\n   * The UID of the ReplicaSet.\n   */\n  K8S_REPLICASET_UID: 'k8s.replicaset.uid';\n\n  /**\n   * The name of the ReplicaSet.\n   */\n  K8S_REPLICASET_NAME: 'k8s.replicaset.name';\n\n  /**\n   * The UID of the Deployment.\n   */\n  K8S_DEPLOYMENT_UID: 'k8s.deployment.uid';\n\n  /**\n   * The name of the Deployment.\n   */\n  K8S_DEPLOYMENT_NAME: 'k8s.deployment.name';\n\n  /**\n   * The UID of the StatefulSet.\n   */\n  K8S_STATEFULSET_UID: 'k8s.statefulset.uid';\n\n  /**\n   * The name of the StatefulSet.\n   */\n  K8S_STATEFULSET_NAME: 'k8s.statefulset.name';\n\n  /**\n   * The UID of the DaemonSet.\n   */\n  K8S_DAEMONSET_UID: 'k8s.daemonset.uid';\n\n  /**\n   * The name of the DaemonSet.\n   */\n  K8S_DAEMONSET_NAME: 'k8s.daemonset.name';\n\n  /**\n   * The UID of the Job.\n   */\n  K8S_JOB_UID: 'k8s.job.uid';\n\n  /**\n   * The name of the Job.\n   */\n  K8S_JOB_NAME: 'k8s.job.name';\n\n  /**\n   * The UID of the CronJob.\n   */\n  K8S_CRONJOB_UID: 'k8s.cronjob.uid';\n\n  /**\n   * The name of the CronJob.\n   */\n  K8S_CRONJOB_NAME: 'k8s.cronjob.name';\n\n  /**\n   * The operating system type.\n   */\n  OS_TYPE: 'os.type';\n\n  /**\n   * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n   */\n  OS_DESCRIPTION: 'os.description';\n\n  /**\n   * Human readable operating system name.\n   */\n  OS_NAME: 'os.name';\n\n  /**\n   * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes).\n   */\n  OS_VERSION: 'os.version';\n\n  /**\n   * Process identifier (PID).\n   */\n  PROCESS_PID: 'process.pid';\n\n  /**\n   * The name of the process executable. On Linux based systems, can be set to the `Name` in `proc/[pid]/status`. On Windows, can be set to the base name of `GetProcessImageFileNameW`.\n   */\n  PROCESS_EXECUTABLE_NAME: 'process.executable.name';\n\n  /**\n   * The full path to the process executable. On Linux based systems, can be set to the target of `proc/[pid]/exe`. On Windows, can be set to the result of `GetProcessImageFileNameW`.\n   */\n  PROCESS_EXECUTABLE_PATH: 'process.executable.path';\n\n  /**\n   * The command used to launch the process (i.e. the command name). On Linux based systems, can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter extracted from `GetCommandLineW`.\n   */\n  PROCESS_COMMAND: 'process.command';\n\n  /**\n   * The full command used to launch the process as a single string representing the full command. On Windows, can be set to the result of `GetCommandLineW`. Do not set this if you have to assemble it just for monitoring; use `process.command_args` instead.\n   */\n  PROCESS_COMMAND_LINE: 'process.command_line';\n\n  /**\n   * All the command arguments (including the command/executable itself) as received by the process. On Linux-based systems (and some other Unixoid systems supporting procfs), can be set according to the list of null-delimited strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this would be the full argv vector passed to `main`.\n   */\n  PROCESS_COMMAND_ARGS: 'process.command_args';\n\n  /**\n   * The username of the user that owns the process.\n   */\n  PROCESS_OWNER: 'process.owner';\n\n  /**\n   * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n   */\n  PROCESS_RUNTIME_NAME: 'process.runtime.name';\n\n  /**\n   * The version of the runtime of this process, as returned by the runtime without modification.\n   */\n  PROCESS_RUNTIME_VERSION: 'process.runtime.version';\n\n  /**\n   * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n   */\n  PROCESS_RUNTIME_DESCRIPTION: 'process.runtime.description';\n\n  /**\n   * Logical name of the service.\n   *\n   * Note: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.\n   */\n  SERVICE_NAME: 'service.name';\n\n  /**\n   * A namespace for `service.name`.\n   *\n   * Note: A string value having a meaning that helps to distinguish a group of services, for example the team name that owns a group of services. `service.name` is expected to be unique within the same namespace. If `service.namespace` is not specified in the Resource then `service.name` is expected to be unique for all services that have no explicit namespace defined (so the empty/unspecified namespace is simply one more valid namespace). Zero-length namespace string is assumed equal to unspecified namespace.\n   */\n  SERVICE_NAMESPACE: 'service.namespace';\n\n  /**\n   * The string ID of the service instance.\n   *\n   * Note: MUST be unique for each instance of the same `service.namespace,service.name` pair (in other words `service.namespace,service.name,service.instance.id` triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).\n   */\n  SERVICE_INSTANCE_ID: 'service.instance.id';\n\n  /**\n   * The version string of the service API or implementation.\n   */\n  SERVICE_VERSION: 'service.version';\n\n  /**\n   * The name of the telemetry SDK as defined above.\n   */\n  TELEMETRY_SDK_NAME: 'telemetry.sdk.name';\n\n  /**\n   * The language of the telemetry SDK.\n   */\n  TELEMETRY_SDK_LANGUAGE: 'telemetry.sdk.language';\n\n  /**\n   * The version string of the telemetry SDK.\n   */\n  TELEMETRY_SDK_VERSION: 'telemetry.sdk.version';\n\n  /**\n   * The version string of the auto instrumentation agent, if used.\n   */\n  TELEMETRY_AUTO_VERSION: 'telemetry.auto.version';\n\n  /**\n   * The name of the web engine.\n   */\n  WEBENGINE_NAME: 'webengine.name';\n\n  /**\n   * The version of the web engine.\n   */\n  WEBENGINE_VERSION: 'webengine.version';\n\n  /**\n   * Additional description of the web engine (e.g. detailed version and edition information).\n   */\n  WEBENGINE_DESCRIPTION: 'webengine.description';\n};\n\n/**\n * Create exported Value Map for SemanticResourceAttributes values\n * @deprecated Use the SEMRESATTRS_XXXXX constants rather than the SemanticResourceAttributes.XXXXX for bundle minification\n */\nexport const SemanticResourceAttributes: SemanticResourceAttributes =\n  /*#__PURE__*/ createConstMap<SemanticResourceAttributes>([\n    TMP_CLOUD_PROVIDER,\n    TMP_CLOUD_ACCOUNT_ID,\n    TMP_CLOUD_REGION,\n    TMP_CLOUD_AVAILABILITY_ZONE,\n    TMP_CLOUD_PLATFORM,\n    TMP_AWS_ECS_CONTAINER_ARN,\n    TMP_AWS_ECS_CLUSTER_ARN,\n    TMP_AWS_ECS_LAUNCHTYPE,\n    TMP_AWS_ECS_TASK_ARN,\n    TMP_AWS_ECS_TASK_FAMILY,\n    TMP_AWS_ECS_TASK_REVISION,\n    TMP_AWS_EKS_CLUSTER_ARN,\n    TMP_AWS_LOG_GROUP_NAMES,\n    TMP_AWS_LOG_GROUP_ARNS,\n    TMP_AWS_LOG_STREAM_NAMES,\n    TMP_AWS_LOG_STREAM_ARNS,\n    TMP_CONTAINER_NAME,\n    TMP_CONTAINER_ID,\n    TMP_CONTAINER_RUNTIME,\n    TMP_CONTAINER_IMAGE_NAME,\n    TMP_CONTAINER_IMAGE_TAG,\n    TMP_DEPLOYMENT_ENVIRONMENT,\n    TMP_DEVICE_ID,\n    TMP_DEVICE_MODEL_IDENTIFIER,\n    TMP_DEVICE_MODEL_NAME,\n    TMP_FAAS_NAME,\n    TMP_FAAS_ID,\n    TMP_FAAS_VERSION,\n    TMP_FAAS_INSTANCE,\n    TMP_FAAS_MAX_MEMORY,\n    TMP_HOST_ID,\n    TMP_HOST_NAME,\n    TMP_HOST_TYPE,\n    TMP_HOST_ARCH,\n    TMP_HOST_IMAGE_NAME,\n    TMP_HOST_IMAGE_ID,\n    TMP_HOST_IMAGE_VERSION,\n    TMP_K8S_CLUSTER_NAME,\n    TMP_K8S_NODE_NAME,\n    TMP_K8S_NODE_UID,\n    TMP_K8S_NAMESPACE_NAME,\n    TMP_K8S_POD_UID,\n    TMP_K8S_POD_NAME,\n    TMP_K8S_CONTAINER_NAME,\n    TMP_K8S_REPLICASET_UID,\n    TMP_K8S_REPLICASET_NAME,\n    TMP_K8S_DEPLOYMENT_UID,\n    TMP_K8S_DEPLOYMENT_NAME,\n    TMP_K8S_STATEFULSET_UID,\n    TMP_K8S_STATEFULSET_NAME,\n    TMP_K8S_DAEMONSET_UID,\n    TMP_K8S_DAEMONSET_NAME,\n    TMP_K8S_JOB_UID,\n    TMP_K8S_JOB_NAME,\n    TMP_K8S_CRONJOB_UID,\n    TMP_K8S_CRONJOB_NAME,\n    TMP_OS_TYPE,\n    TMP_OS_DESCRIPTION,\n    TMP_OS_NAME,\n    TMP_OS_VERSION,\n    TMP_PROCESS_PID,\n    TMP_PROCESS_EXECUTABLE_NAME,\n    TMP_PROCESS_EXECUTABLE_PATH,\n    TMP_PROCESS_COMMAND,\n    TMP_PROCESS_COMMAND_LINE,\n    TMP_PROCESS_COMMAND_ARGS,\n    TMP_PROCESS_OWNER,\n    TMP_PROCESS_RUNTIME_NAME,\n    TMP_PROCESS_RUNTIME_VERSION,\n    TMP_PROCESS_RUNTIME_DESCRIPTION,\n    TMP_SERVICE_NAME,\n    TMP_SERVICE_NAMESPACE,\n    TMP_SERVICE_INSTANCE_ID,\n    TMP_SERVICE_VERSION,\n    TMP_TELEMETRY_SDK_NAME,\n    TMP_TELEMETRY_SDK_LANGUAGE,\n    TMP_TELEMETRY_SDK_VERSION,\n    TMP_TELEMETRY_AUTO_VERSION,\n    TMP_WEBENGINE_NAME,\n    TMP_WEBENGINE_VERSION,\n    TMP_WEBENGINE_DESCRIPTION,\n  ]);\n\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for CloudProviderValues enum definition\n *\n * Name of the cloud provider.\n * ---------------------------------------------------------------------------------------------------------- */\n\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nconst TMP_CLOUDPROVIDERVALUES_AWS = 'aws';\nconst TMP_CLOUDPROVIDERVALUES_AZURE = 'azure';\nconst TMP_CLOUDPROVIDERVALUES_GCP = 'gcp';\n\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_ALIBABA_CLOUD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPROVIDERVALUES_ALIBABA_CLOUD =\n  TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD;\n\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AWS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS;\n\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AZURE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE;\n\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_GCP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP;\n\n/**\n * Identifies the Values for CloudProviderValues enum definition\n *\n * Name of the cloud provider.\n * @deprecated Use the CLOUDPROVIDERVALUES_XXXXX constants rather than the CloudProviderValues.XXXXX for bundle minification.\n */\nexport type CloudProviderValues = {\n  /** Alibaba Cloud. */\n  ALIBABA_CLOUD: 'alibaba_cloud';\n\n  /** Amazon Web Services. */\n  AWS: 'aws';\n\n  /** Microsoft Azure. */\n  AZURE: 'azure';\n\n  /** Google Cloud Platform. */\n  GCP: 'gcp';\n};\n\n/**\n * The constant map of values for CloudProviderValues.\n * @deprecated Use the CLOUDPROVIDERVALUES_XXXXX constants rather than the CloudProviderValues.XXXXX for bundle minification.\n */\nexport const CloudProviderValues: CloudProviderValues =\n  /*#__PURE__*/ createConstMap<CloudProviderValues>([\n    TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD,\n    TMP_CLOUDPROVIDERVALUES_AWS,\n    TMP_CLOUDPROVIDERVALUES_AZURE,\n    TMP_CLOUDPROVIDERVALUES_GCP,\n  ]);\n\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for CloudPlatformValues enum definition\n *\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n * ---------------------------------------------------------------------------------------------------------- */\n\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs';\nconst TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc';\nconst TMP_CLOUDPLATFORMVALUES_AWS_EC2 = 'aws_ec2';\nconst TMP_CLOUDPLATFORMVALUES_AWS_ECS = 'aws_ecs';\nconst TMP_CLOUDPLATFORMVALUES_AWS_EKS = 'aws_eks';\nconst TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = 'aws_lambda';\nconst TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = 'aws_elastic_beanstalk';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_VM = 'azure_vm';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES =\n  'azure_container_instances';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_AKS = 'azure_aks';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = 'azure_functions';\nconst TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = 'azure_app_service';\nconst TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine';\nconst TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run';\nconst TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = 'gcp_kubernetes_engine';\nconst TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions';\nconst TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine';\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_ALIBABA_CLOUD_ECS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS =\n  TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_ALIBABA_CLOUD_FC in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC =\n  TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_EC2 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_ECS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_EKS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_LAMBDA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AWS_LAMBDA =\n  TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AWS_ELASTIC_BEANSTALK in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK =\n  TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_VM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_CONTAINER_INSTANCES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES =\n  TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_AKS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_FUNCTIONS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AZURE_FUNCTIONS =\n  TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_AZURE_APP_SERVICE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_AZURE_APP_SERVICE =\n  TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_COMPUTE_ENGINE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE =\n  TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_CLOUD_RUN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_GCP_CLOUD_RUN =\n  TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_KUBERNETES_ENGINE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE =\n  TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_CLOUD_FUNCTIONS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS =\n  TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS;\n\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n *\n * @deprecated Use CLOUD_PLATFORM_VALUE_GCP_APP_ENGINE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const CLOUDPLATFORMVALUES_GCP_APP_ENGINE =\n  TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE;\n\n/**\n * Identifies the Values for CloudPlatformValues enum definition\n *\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n * @deprecated Use the CLOUDPLATFORMVALUES_XXXXX constants rather than the CloudPlatformValues.XXXXX for bundle minification.\n */\nexport type CloudPlatformValues = {\n  /** Alibaba Cloud Elastic Compute Service. */\n  ALIBABA_CLOUD_ECS: 'alibaba_cloud_ecs';\n\n  /** Alibaba Cloud Function Compute. */\n  ALIBABA_CLOUD_FC: 'alibaba_cloud_fc';\n\n  /** AWS Elastic Compute Cloud. */\n  AWS_EC2: 'aws_ec2';\n\n  /** AWS Elastic Container Service. */\n  AWS_ECS: 'aws_ecs';\n\n  /** AWS Elastic Kubernetes Service. */\n  AWS_EKS: 'aws_eks';\n\n  /** AWS Lambda. */\n  AWS_LAMBDA: 'aws_lambda';\n\n  /** AWS Elastic Beanstalk. */\n  AWS_ELASTIC_BEANSTALK: 'aws_elastic_beanstalk';\n\n  /** Azure Virtual Machines. */\n  AZURE_VM: 'azure_vm';\n\n  /** Azure Container Instances. */\n  AZURE_CONTAINER_INSTANCES: 'azure_container_instances';\n\n  /** Azure Kubernetes Service. */\n  AZURE_AKS: 'azure_aks';\n\n  /** Azure Functions. */\n  AZURE_FUNCTIONS: 'azure_functions';\n\n  /** Azure App Service. */\n  AZURE_APP_SERVICE: 'azure_app_service';\n\n  /** Google Cloud Compute Engine (GCE). */\n  GCP_COMPUTE_ENGINE: 'gcp_compute_engine';\n\n  /** Google Cloud Run. */\n  GCP_CLOUD_RUN: 'gcp_cloud_run';\n\n  /** Google Cloud Kubernetes Engine (GKE). */\n  GCP_KUBERNETES_ENGINE: 'gcp_kubernetes_engine';\n\n  /** Google Cloud Functions (GCF). */\n  GCP_CLOUD_FUNCTIONS: 'gcp_cloud_functions';\n\n  /** Google Cloud App Engine (GAE). */\n  GCP_APP_ENGINE: 'gcp_app_engine';\n};\n\n/**\n * The constant map of values for CloudPlatformValues.\n * @deprecated Use the CLOUDPLATFORMVALUES_XXXXX constants rather than the CloudPlatformValues.XXXXX for bundle minification.\n */\nexport const CloudPlatformValues: CloudPlatformValues =\n  /*#__PURE__*/ createConstMap<CloudPlatformValues>([\n    TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS,\n    TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC,\n    TMP_CLOUDPLATFORMVALUES_AWS_EC2,\n    TMP_CLOUDPLATFORMVALUES_AWS_ECS,\n    TMP_CLOUDPLATFORMVALUES_AWS_EKS,\n    TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA,\n    TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK,\n    TMP_CLOUDPLATFORMVALUES_AZURE_VM,\n    TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES,\n    TMP_CLOUDPLATFORMVALUES_AZURE_AKS,\n    TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS,\n    TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE,\n    TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE,\n    TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN,\n    TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE,\n    TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS,\n    TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE,\n  ]);\n\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for AwsEcsLaunchtypeValues enum definition\n *\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n * ---------------------------------------------------------------------------------------------------------- */\n\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2';\nconst TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate';\n\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n *\n * @deprecated Use AWS_ECS_LAUNCHTYPE_VALUE_EC2 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2;\n\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n *\n * @deprecated Use AWS_ECS_LAUNCHTYPE_VALUE_FARGATE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const AWSECSLAUNCHTYPEVALUES_FARGATE =\n  TMP_AWSECSLAUNCHTYPEVALUES_FARGATE;\n\n/**\n * Identifies the Values for AwsEcsLaunchtypeValues enum definition\n *\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n * @deprecated Use the AWSECSLAUNCHTYPEVALUES_XXXXX constants rather than the AwsEcsLaunchtypeValues.XXXXX for bundle minification.\n */\nexport type AwsEcsLaunchtypeValues = {\n  /** ec2. */\n  EC2: 'ec2';\n\n  /** fargate. */\n  FARGATE: 'fargate';\n};\n\n/**\n * The constant map of values for AwsEcsLaunchtypeValues.\n * @deprecated Use the AWSECSLAUNCHTYPEVALUES_XXXXX constants rather than the AwsEcsLaunchtypeValues.XXXXX for bundle minification.\n */\nexport const AwsEcsLaunchtypeValues: AwsEcsLaunchtypeValues =\n  /*#__PURE__*/ createConstMap<AwsEcsLaunchtypeValues>([\n    TMP_AWSECSLAUNCHTYPEVALUES_EC2,\n    TMP_AWSECSLAUNCHTYPEVALUES_FARGATE,\n  ]);\n\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HostArchValues enum definition\n *\n * The CPU architecture the host system is running on.\n * ---------------------------------------------------------------------------------------------------------- */\n\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_HOSTARCHVALUES_AMD64 = 'amd64';\nconst TMP_HOSTARCHVALUES_ARM32 = 'arm32';\nconst TMP_HOSTARCHVALUES_ARM64 = 'arm64';\nconst TMP_HOSTARCHVALUES_IA64 = 'ia64';\nconst TMP_HOSTARCHVALUES_PPC32 = 'ppc32';\nconst TMP_HOSTARCHVALUES_PPC64 = 'ppc64';\nconst TMP_HOSTARCHVALUES_X86 = 'x86';\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_AMD64 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM32 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM64 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_IA64 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC32 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC64 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64;\n\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_X86 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86;\n\n/**\n * Identifies the Values for HostArchValues enum definition\n *\n * The CPU architecture the host system is running on.\n * @deprecated Use the HOSTARCHVALUES_XXXXX constants rather than the HostArchValues.XXXXX for bundle minification.\n */\nexport type HostArchValues = {\n  /** AMD64. */\n  AMD64: 'amd64';\n\n  /** ARM32. */\n  ARM32: 'arm32';\n\n  /** ARM64. */\n  ARM64: 'arm64';\n\n  /** Itanium. */\n  IA64: 'ia64';\n\n  /** 32-bit PowerPC. */\n  PPC32: 'ppc32';\n\n  /** 64-bit PowerPC. */\n  PPC64: 'ppc64';\n\n  /** 32-bit x86. */\n  X86: 'x86';\n};\n\n/**\n * The constant map of values for HostArchValues.\n * @deprecated Use the HOSTARCHVALUES_XXXXX constants rather than the HostArchValues.XXXXX for bundle minification.\n */\nexport const HostArchValues: HostArchValues =\n  /*#__PURE__*/ createConstMap<HostArchValues>([\n    TMP_HOSTARCHVALUES_AMD64,\n    TMP_HOSTARCHVALUES_ARM32,\n    TMP_HOSTARCHVALUES_ARM64,\n    TMP_HOSTARCHVALUES_IA64,\n    TMP_HOSTARCHVALUES_PPC32,\n    TMP_HOSTARCHVALUES_PPC64,\n    TMP_HOSTARCHVALUES_X86,\n  ]);\n\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for OsTypeValues enum definition\n *\n * The operating system type.\n * ---------------------------------------------------------------------------------------------------------- */\n\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_OSTYPEVALUES_WINDOWS = 'windows';\nconst TMP_OSTYPEVALUES_LINUX = 'linux';\nconst TMP_OSTYPEVALUES_DARWIN = 'darwin';\nconst TMP_OSTYPEVALUES_FREEBSD = 'freebsd';\nconst TMP_OSTYPEVALUES_NETBSD = 'netbsd';\nconst TMP_OSTYPEVALUES_OPENBSD = 'openbsd';\nconst TMP_OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd';\nconst TMP_OSTYPEVALUES_HPUX = 'hpux';\nconst TMP_OSTYPEVALUES_AIX = 'aix';\nconst TMP_OSTYPEVALUES_SOLARIS = 'solaris';\nconst TMP_OSTYPEVALUES_Z_OS = 'z_os';\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_WINDOWS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_LINUX in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DARWIN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_FREEBSD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_NETBSD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_OPENBSD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DRAGONFLYBSD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_HPUX in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_AIX in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_SOLARIS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS;\n\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_Z_OS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS;\n\n/**\n * Identifies the Values for OsTypeValues enum definition\n *\n * The operating system type.\n * @deprecated Use the OSTYPEVALUES_XXXXX constants rather than the OsTypeValues.XXXXX for bundle minification.\n */\nexport type OsTypeValues = {\n  /** Microsoft Windows. */\n  WINDOWS: 'windows';\n\n  /** Linux. */\n  LINUX: 'linux';\n\n  /** Apple Darwin. */\n  DARWIN: 'darwin';\n\n  /** FreeBSD. */\n  FREEBSD: 'freebsd';\n\n  /** NetBSD. */\n  NETBSD: 'netbsd';\n\n  /** OpenBSD. */\n  OPENBSD: 'openbsd';\n\n  /** DragonFly BSD. */\n  DRAGONFLYBSD: 'dragonflybsd';\n\n  /** HP-UX (Hewlett Packard Unix). */\n  HPUX: 'hpux';\n\n  /** AIX (Advanced Interactive eXecutive). */\n  AIX: 'aix';\n\n  /** Oracle Solaris. */\n  SOLARIS: 'solaris';\n\n  /** IBM z/OS. */\n  Z_OS: 'z_os';\n};\n\n/**\n * The constant map of values for OsTypeValues.\n * @deprecated Use the OSTYPEVALUES_XXXXX constants rather than the OsTypeValues.XXXXX for bundle minification.\n */\nexport const OsTypeValues: OsTypeValues =\n  /*#__PURE__*/ createConstMap<OsTypeValues>([\n    TMP_OSTYPEVALUES_WINDOWS,\n    TMP_OSTYPEVALUES_LINUX,\n    TMP_OSTYPEVALUES_DARWIN,\n    TMP_OSTYPEVALUES_FREEBSD,\n    TMP_OSTYPEVALUES_NETBSD,\n    TMP_OSTYPEVALUES_OPENBSD,\n    TMP_OSTYPEVALUES_DRAGONFLYBSD,\n    TMP_OSTYPEVALUES_HPUX,\n    TMP_OSTYPEVALUES_AIX,\n    TMP_OSTYPEVALUES_SOLARIS,\n    TMP_OSTYPEVALUES_Z_OS,\n  ]);\n\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for TelemetrySdkLanguageValues enum definition\n *\n * The language of the telemetry SDK.\n * ---------------------------------------------------------------------------------------------------------- */\n\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_GO = 'go';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = 'php';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby';\nconst TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs';\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_CPP.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_CPP =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_CPP;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_DOTNET =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_ERLANG =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_GO.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_JAVA.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_JAVA =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_NODEJS =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PHP.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_PHP =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_PHP;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_PYTHON =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_RUBY.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_RUBY =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY;\n\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS.\n */\nexport const TELEMETRYSDKLANGUAGEVALUES_WEBJS =\n  TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS;\n\n/**\n * Identifies the Values for TelemetrySdkLanguageValues enum definition\n *\n * The language of the telemetry SDK.\n * @deprecated Use the TELEMETRYSDKLANGUAGEVALUES_XXXXX constants rather than the TelemetrySdkLanguageValues.XXXXX for bundle minification.\n */\nexport type TelemetrySdkLanguageValues = {\n  /** cpp. */\n  CPP: 'cpp';\n\n  /** dotnet. */\n  DOTNET: 'dotnet';\n\n  /** erlang. */\n  ERLANG: 'erlang';\n\n  /** go. */\n  GO: 'go';\n\n  /** java. */\n  JAVA: 'java';\n\n  /** nodejs. */\n  NODEJS: 'nodejs';\n\n  /** php. */\n  PHP: 'php';\n\n  /** python. */\n  PYTHON: 'python';\n\n  /** ruby. */\n  RUBY: 'ruby';\n\n  /** webjs. */\n  WEBJS: 'webjs';\n};\n\n/**\n * The constant map of values for TelemetrySdkLanguageValues.\n * @deprecated Use the TELEMETRYSDKLANGUAGEVALUES_XXXXX constants rather than the TelemetrySdkLanguageValues.XXXXX for bundle minification.\n */\nexport const TelemetrySdkLanguageValues: TelemetrySdkLanguageValues =\n  /*#__PURE__*/ createConstMap<TelemetrySdkLanguageValues>([\n    TMP_TELEMETRYSDKLANGUAGEVALUES_CPP,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_GO,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_PHP,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY,\n    TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS,\n  ]);\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/registry/stable/attributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n\n/**\n * ASP.NET Core exception middleware handling result\n *\n * @example handled\n * @example unhandled\n */\nexport const ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = 'aspnetcore.diagnostics.exception.result' as const;\n\n/**\n  * Enum value \"aborted\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n  */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = \"aborted\" as const;\n\n/**\n  * Enum value \"handled\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n  */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = \"handled\" as const;\n\n/**\n  * Enum value \"skipped\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n  */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = \"skipped\" as const;\n\n/**\n  * Enum value \"unhandled\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n  */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = \"unhandled\" as const;\n\n/**\n * Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception.\n *\n * @example Contoso.MyHandler\n */\nexport const ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = 'aspnetcore.diagnostics.handler.type' as const;\n\n/**\n * Rate limiting policy name.\n *\n * @example fixed\n * @example sliding\n * @example token\n */\nexport const ATTR_ASPNETCORE_RATE_LIMITING_POLICY = 'aspnetcore.rate_limiting.policy' as const;\n\n/**\n * Rate-limiting result, shows whether the lease was acquired or contains a rejection reason\n *\n * @example acquired\n * @example request_canceled\n */\nexport const ATTR_ASPNETCORE_RATE_LIMITING_RESULT = 'aspnetcore.rate_limiting.result' as const;\n\n/**\n  * Enum value \"acquired\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n  */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = \"acquired\" as const;\n\n/**\n  * Enum value \"endpoint_limiter\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n  */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = \"endpoint_limiter\" as const;\n\n/**\n  * Enum value \"global_limiter\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n  */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = \"global_limiter\" as const;\n\n/**\n  * Enum value \"request_canceled\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n  */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = \"request_canceled\" as const;\n\n/**\n * Flag indicating if request was handled by the application pipeline.\n *\n * @example true\n */\nexport const ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = 'aspnetcore.request.is_unhandled' as const;\n\n/**\n * A value that indicates whether the matched route is a fallback route.\n *\n * @example true\n */\nexport const ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = 'aspnetcore.routing.is_fallback' as const;\n\n/**\n * Match result - success or failure\n *\n * @example success\n * @example failure\n */\nexport const ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = 'aspnetcore.routing.match_status' as const;\n\n/**\n  * Enum value \"failure\" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}.\n  */\nexport const ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = \"failure\" as const;\n\n/**\n  * Enum value \"success\" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}.\n  */\nexport const ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = \"success\" as const;\n\n/**\n * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n *\n * @example client.example.com\n * @example 10.1.2.80\n * @example /tmp/my.sock\n *\n * @note When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries,  for example proxies, if it's available.\n */\nexport const ATTR_CLIENT_ADDRESS = 'client.address' as const;\n\n/**\n * Client port number.\n *\n * @example 65123\n *\n * @note When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries,  for example proxies, if it's available.\n */\nexport const ATTR_CLIENT_PORT = 'client.port' as const;\n\n/**\n * Name of the garbage collector managed heap generation.\n *\n * @example gen0\n * @example gen1\n * @example gen2\n */\nexport const ATTR_DOTNET_GC_HEAP_GENERATION = 'dotnet.gc.heap.generation' as const;\n\n/**\n  * Enum value \"gen0\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n  */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_GEN0 = \"gen0\" as const;\n\n/**\n  * Enum value \"gen1\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n  */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_GEN1 = \"gen1\" as const;\n\n/**\n  * Enum value \"gen2\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n  */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_GEN2 = \"gen2\" as const;\n\n/**\n  * Enum value \"loh\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n  */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_LOH = \"loh\" as const;\n\n/**\n  * Enum value \"poh\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n  */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_POH = \"poh\" as const;\n\n/**\n * Describes a class of error the operation ended with.\n *\n * @example timeout\n * @example java.net.UnknownHostException\n * @example server_certificate_invalid\n * @example 500\n *\n * @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.\n *\n * When `error.type` is set to a type (e.g., an exception type), its\n * canonical class name identifying the type within the artifact **SHOULD** be used.\n *\n * Instrumentations **SHOULD** document the list of errors they report.\n *\n * The cardinality of `error.type` within one instrumentation library **SHOULD** be low.\n * Telemetry consumers that aggregate data from multiple instrumentation libraries and applications\n * should be prepared for `error.type` to have high cardinality at query time when no\n * additional filters are applied.\n *\n * If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.\n *\n * If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\n * it's **RECOMMENDED** to:\n *\n *   - Use a domain-specific attribute\n *   - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.\n */\nexport const ATTR_ERROR_TYPE = 'error.type' as const;\n\n/**\n  * Enum value \"_OTHER\" for attribute {@link ATTR_ERROR_TYPE}.\n  */\nexport const ERROR_TYPE_VALUE_OTHER = \"_OTHER\" as const;\n\n/**\n * Indicates that the exception is escaping the scope of the span.\n *\n * @deprecated It's no longer recommended to record exceptions that are handled and do not escape the scope of a span.\n */\nexport const ATTR_EXCEPTION_ESCAPED = 'exception.escaped' as const;\n\n/**\n * The exception message.\n *\n * @example Division by zero\n * @example Can't convert 'int' object to str implicitly\n */\nexport const ATTR_EXCEPTION_MESSAGE = 'exception.message' as const;\n\n/**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n *\n * @example \"Exception in thread \"main\" java.lang.RuntimeException: Test exception\\\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\\\\n\"\n */\nexport const ATTR_EXCEPTION_STACKTRACE = 'exception.stacktrace' as const;\n\n/**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n *\n * @example java.net.ConnectException\n * @example OSError\n */\nexport const ATTR_EXCEPTION_TYPE = 'exception.type' as const;\n\n/**\n * HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\n *\n * @example http.request.header.content-type=[\"application/json\"]\n * @example http.request.header.x-forwarded-for=[\"1.2.3.4\", \"1.2.3.5\"]\n *\n * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n * The `User-Agent` header is already captured in the `user_agent.original` attribute. Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended.\n * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.\n */\nexport const ATTR_HTTP_REQUEST_HEADER = (key: string) => `http.request.header.${key}`;\n\n/**\n * HTTP request method.\n *\n * @example GET\n * @example POST\n * @example HEAD\n *\n * @note HTTP request method value **SHOULD** be \"known\" to the instrumentation.\n * By default, this convention defines \"known\" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)\n * and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).\n *\n * If the HTTP request method is not known to instrumentation, it **MUST** set the `http.request.method` attribute to `_OTHER`.\n *\n * If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it **MUST** provide a way to override\n * the list of known HTTP methods. If this override is done via environment variable, then the environment variable **MUST** be named\n * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods\n * (this list **MUST** be a full override of the default known method, it is not a list of known methods in addition to the defaults).\n *\n * HTTP method names are case-sensitive and `http.request.method` attribute value **MUST** match a known HTTP method name exactly.\n * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, **SHOULD** populate a canonical equivalent.\n * Tracing instrumentations that do so, **MUST** also set `http.request.method_original` to the original value.\n */\nexport const ATTR_HTTP_REQUEST_METHOD = 'http.request.method' as const;\n\n/**\n  * Enum value \"_OTHER\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_OTHER = \"_OTHER\" as const;\n\n/**\n  * Enum value \"CONNECT\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_CONNECT = \"CONNECT\" as const;\n\n/**\n  * Enum value \"DELETE\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_DELETE = \"DELETE\" as const;\n\n/**\n  * Enum value \"GET\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_GET = \"GET\" as const;\n\n/**\n  * Enum value \"HEAD\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_HEAD = \"HEAD\" as const;\n\n/**\n  * Enum value \"OPTIONS\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_OPTIONS = \"OPTIONS\" as const;\n\n/**\n  * Enum value \"PATCH\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_PATCH = \"PATCH\" as const;\n\n/**\n  * Enum value \"POST\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_POST = \"POST\" as const;\n\n/**\n  * Enum value \"PUT\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_PUT = \"PUT\" as const;\n\n/**\n  * Enum value \"TRACE\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n  */\nexport const HTTP_REQUEST_METHOD_VALUE_TRACE = \"TRACE\" as const;\n\n/**\n * Original HTTP method sent by the client in the request line.\n *\n * @example GeT\n * @example ACL\n * @example foo\n */\nexport const ATTR_HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original' as const;\n\n/**\n * The ordinal number of request resending attempt (for any reason, including redirects).\n *\n * @example 3\n *\n * @note The resend count **SHOULD** be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).\n */\nexport const ATTR_HTTP_REQUEST_RESEND_COUNT = 'http.request.resend_count' as const;\n\n/**\n * HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\n *\n * @example http.response.header.content-type=[\"application/json\"]\n * @example http.response.header.my-custom-header=[\"abc\", \"def\"]\n *\n * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured. Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n * Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended.\n * The attribute value **MUST** consist of either multiple header values as an array of strings or a single-item array containing a possibly comma-concatenated string, depending on the way the HTTP library provides access to headers.\n */\nexport const ATTR_HTTP_RESPONSE_HEADER = (key: string) => `http.response.header.${key}`;\n\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n *\n * @example 200\n */\nexport const ATTR_HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code' as const;\n\n/**\n * The matched route, that is, the path template in the format used by the respective server framework.\n *\n * @example /users/:userID?\n * @example {controller}/{action}/{id?}\n *\n * @note **MUST NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.\n * **SHOULD** include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.\n */\nexport const ATTR_HTTP_ROUTE = 'http.route' as const;\n\n/**\n * Name of the garbage collector action.\n *\n * @example end of minor GC\n * @example end of major GC\n *\n * @note Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).\n */\nexport const ATTR_JVM_GC_ACTION = 'jvm.gc.action' as const;\n\n/**\n * Name of the garbage collector.\n *\n * @example G1 Young Generation\n * @example G1 Old Generation\n *\n * @note Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).\n */\nexport const ATTR_JVM_GC_NAME = 'jvm.gc.name' as const;\n\n/**\n * Name of the memory pool.\n *\n * @example G1 Old Gen\n * @example G1 Eden space\n * @example G1 Survivor Space\n *\n * @note Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).\n */\nexport const ATTR_JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name' as const;\n\n/**\n * The type of memory.\n *\n * @example heap\n * @example non_heap\n */\nexport const ATTR_JVM_MEMORY_TYPE = 'jvm.memory.type' as const;\n\n/**\n  * Enum value \"heap\" for attribute {@link ATTR_JVM_MEMORY_TYPE}.\n  */\nexport const JVM_MEMORY_TYPE_VALUE_HEAP = \"heap\" as const;\n\n/**\n  * Enum value \"non_heap\" for attribute {@link ATTR_JVM_MEMORY_TYPE}.\n  */\nexport const JVM_MEMORY_TYPE_VALUE_NON_HEAP = \"non_heap\" as const;\n\n/**\n * Whether the thread is daemon or not.\n */\nexport const ATTR_JVM_THREAD_DAEMON = 'jvm.thread.daemon' as const;\n\n/**\n * State of the thread.\n *\n * @example runnable\n * @example blocked\n */\nexport const ATTR_JVM_THREAD_STATE = 'jvm.thread.state' as const;\n\n/**\n  * Enum value \"blocked\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n  */\nexport const JVM_THREAD_STATE_VALUE_BLOCKED = \"blocked\" as const;\n\n/**\n  * Enum value \"new\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n  */\nexport const JVM_THREAD_STATE_VALUE_NEW = \"new\" as const;\n\n/**\n  * Enum value \"runnable\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n  */\nexport const JVM_THREAD_STATE_VALUE_RUNNABLE = \"runnable\" as const;\n\n/**\n  * Enum value \"terminated\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n  */\nexport const JVM_THREAD_STATE_VALUE_TERMINATED = \"terminated\" as const;\n\n/**\n  * Enum value \"timed_waiting\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n  */\nexport const JVM_THREAD_STATE_VALUE_TIMED_WAITING = \"timed_waiting\" as const;\n\n/**\n  * Enum value \"waiting\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n  */\nexport const JVM_THREAD_STATE_VALUE_WAITING = \"waiting\" as const;\n\n/**\n * Local address of the network connection - IP address or Unix domain socket name.\n *\n * @example 10.1.2.80\n * @example /tmp/my.sock\n */\nexport const ATTR_NETWORK_LOCAL_ADDRESS = 'network.local.address' as const;\n\n/**\n * Local port number of the network connection.\n *\n * @example 65123\n */\nexport const ATTR_NETWORK_LOCAL_PORT = 'network.local.port' as const;\n\n/**\n * Peer address of the network connection - IP address or Unix domain socket name.\n *\n * @example 10.1.2.80\n * @example /tmp/my.sock\n */\nexport const ATTR_NETWORK_PEER_ADDRESS = 'network.peer.address' as const;\n\n/**\n * Peer port number of the network connection.\n *\n * @example 65123\n */\nexport const ATTR_NETWORK_PEER_PORT = 'network.peer.port' as const;\n\n/**\n * [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.\n *\n * @example amqp\n * @example http\n * @example mqtt\n *\n * @note The value **SHOULD** be normalized to lowercase.\n */\nexport const ATTR_NETWORK_PROTOCOL_NAME = 'network.protocol.name' as const;\n\n/**\n * The actual version of the protocol used for network communication.\n *\n * @example 1.1\n * @example 2\n *\n * @note If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute **SHOULD** be set to the negotiated version. If the actual protocol version is not known, this attribute **SHOULD NOT** be set.\n */\nexport const ATTR_NETWORK_PROTOCOL_VERSION = 'network.protocol.version' as const;\n\n/**\n * [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).\n *\n * @example tcp\n * @example udp\n *\n * @note The value **SHOULD** be normalized to lowercase.\n *\n * Consider always setting the transport when setting a port number, since\n * a port number is ambiguous without knowing the transport. For example\n * different processes could be listening on TCP port 12345 and UDP port 12345.\n */\nexport const ATTR_NETWORK_TRANSPORT = 'network.transport' as const;\n\n/**\n  * Enum value \"pipe\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n  */\nexport const NETWORK_TRANSPORT_VALUE_PIPE = \"pipe\" as const;\n\n/**\n  * Enum value \"quic\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n  */\nexport const NETWORK_TRANSPORT_VALUE_QUIC = \"quic\" as const;\n\n/**\n  * Enum value \"tcp\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n  */\nexport const NETWORK_TRANSPORT_VALUE_TCP = \"tcp\" as const;\n\n/**\n  * Enum value \"udp\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n  */\nexport const NETWORK_TRANSPORT_VALUE_UDP = \"udp\" as const;\n\n/**\n  * Enum value \"unix\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n  */\nexport const NETWORK_TRANSPORT_VALUE_UNIX = \"unix\" as const;\n\n/**\n * [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.\n *\n * @example ipv4\n * @example ipv6\n *\n * @note The value **SHOULD** be normalized to lowercase.\n */\nexport const ATTR_NETWORK_TYPE = 'network.type' as const;\n\n/**\n  * Enum value \"ipv4\" for attribute {@link ATTR_NETWORK_TYPE}.\n  */\nexport const NETWORK_TYPE_VALUE_IPV4 = \"ipv4\" as const;\n\n/**\n  * Enum value \"ipv6\" for attribute {@link ATTR_NETWORK_TYPE}.\n  */\nexport const NETWORK_TYPE_VALUE_IPV6 = \"ipv6\" as const;\n\n/**\n * The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).\n *\n * @example io.opentelemetry.contrib.mongodb\n */\nexport const ATTR_OTEL_SCOPE_NAME = 'otel.scope.name' as const;\n\n/**\n * The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).\n *\n * @example 1.0.0\n */\nexport const ATTR_OTEL_SCOPE_VERSION = 'otel.scope.version' as const;\n\n/**\n * Name of the code, either \"OK\" or \"ERROR\". **MUST NOT** be set if the status code is UNSET.\n */\nexport const ATTR_OTEL_STATUS_CODE = 'otel.status_code' as const;\n\n/**\n  * Enum value \"ERROR\" for attribute {@link ATTR_OTEL_STATUS_CODE}.\n  */\nexport const OTEL_STATUS_CODE_VALUE_ERROR = \"ERROR\" as const;\n\n/**\n  * Enum value \"OK\" for attribute {@link ATTR_OTEL_STATUS_CODE}.\n  */\nexport const OTEL_STATUS_CODE_VALUE_OK = \"OK\" as const;\n\n/**\n * Description of the Status if it has a value, otherwise not set.\n *\n * @example resource not found\n */\nexport const ATTR_OTEL_STATUS_DESCRIPTION = 'otel.status_description' as const;\n\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n *\n * @example example.com\n * @example 10.1.2.80\n * @example /tmp/my.sock\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_SERVER_ADDRESS = 'server.address' as const;\n\n/**\n * Server port number.\n *\n * @example 80\n * @example 8080\n * @example 443\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_SERVER_PORT = 'server.port' as const;\n\n/**\n * Logical name of the service.\n *\n * @example shoppingcart\n *\n * @note **MUST** be the same for all instances of horizontally scaled services. If the value was not specified, SDKs **MUST** fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value **MUST** be set to `unknown_service`.\n */\nexport const ATTR_SERVICE_NAME = 'service.name' as const;\n\n/**\n * The version string of the service API or implementation. The format is not defined by these conventions.\n *\n * @example 2.0.0\n * @example a01dbef8a\n */\nexport const ATTR_SERVICE_VERSION = 'service.version' as const;\n\n/**\n * SignalR HTTP connection closure status.\n *\n * @example app_shutdown\n * @example timeout\n */\nexport const ATTR_SIGNALR_CONNECTION_STATUS = 'signalr.connection.status' as const;\n\n/**\n  * Enum value \"app_shutdown\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n  */\nexport const SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = \"app_shutdown\" as const;\n\n/**\n  * Enum value \"normal_closure\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n  */\nexport const SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = \"normal_closure\" as const;\n\n/**\n  * Enum value \"timeout\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n  */\nexport const SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = \"timeout\" as const;\n\n/**\n * [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)\n *\n * @example web_sockets\n * @example long_polling\n */\nexport const ATTR_SIGNALR_TRANSPORT = 'signalr.transport' as const;\n\n/**\n  * Enum value \"long_polling\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n  */\nexport const SIGNALR_TRANSPORT_VALUE_LONG_POLLING = \"long_polling\" as const;\n\n/**\n  * Enum value \"server_sent_events\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n  */\nexport const SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = \"server_sent_events\" as const;\n\n/**\n  * Enum value \"web_sockets\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n  */\nexport const SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = \"web_sockets\" as const;\n\n/**\n * The language of the telemetry SDK.\n */\nexport const ATTR_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language' as const;\n\n/**\n  * Enum value \"cpp\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_CPP = \"cpp\" as const;\n\n/**\n  * Enum value \"dotnet\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = \"dotnet\" as const;\n\n/**\n  * Enum value \"erlang\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = \"erlang\" as const;\n\n/**\n  * Enum value \"go\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_GO = \"go\" as const;\n\n/**\n  * Enum value \"java\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = \"java\" as const;\n\n/**\n  * Enum value \"nodejs\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = \"nodejs\" as const;\n\n/**\n  * Enum value \"php\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_PHP = \"php\" as const;\n\n/**\n  * Enum value \"python\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = \"python\" as const;\n\n/**\n  * Enum value \"ruby\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = \"ruby\" as const;\n\n/**\n  * Enum value \"rust\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_RUST = \"rust\" as const;\n\n/**\n  * Enum value \"swift\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = \"swift\" as const;\n\n/**\n  * Enum value \"webjs\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n  */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = \"webjs\" as const;\n\n/**\n * The name of the telemetry SDK as defined above.\n *\n * @example opentelemetry\n *\n * @note The OpenTelemetry SDK **MUST** set the `telemetry.sdk.name` attribute to `opentelemetry`.\n * If another SDK, like a fork or a vendor-provided implementation, is used, this SDK **MUST** set the\n * `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point\n * or another suitable identifier depending on the language.\n * The identifier `opentelemetry` is reserved and **MUST NOT** be used in this case.\n * All custom identifiers **SHOULD** be stable across different versions of an implementation.\n */\nexport const ATTR_TELEMETRY_SDK_NAME = 'telemetry.sdk.name' as const;\n\n/**\n * The version string of the telemetry SDK.\n *\n * @example 1.2.3\n */\nexport const ATTR_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version' as const;\n\n/**\n * The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component\n *\n * @example SemConv\n */\nexport const ATTR_URL_FRAGMENT = 'url.fragment' as const;\n\n/**\n * Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)\n *\n * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv\n * @example //localhost\n *\n * @note For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment\n * is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless.\n *\n * `url.full` **MUST NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`.\n * In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`.\n *\n * `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed).\n *\n * Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it.\n *\n *\n * Query string values for the following keys **SHOULD** be redacted by default and replaced by the\n * value `REDACTED`:\n *\n *   - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n *   - [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n *   - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\n *   - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\n *\n * This list is subject to change over time.\n *\n * When a query string value is redacted, the query string key **SHOULD** still be preserved, e.g.\n * `https://www.example.com/path?color=blue&sig=REDACTED`.\n */\nexport const ATTR_URL_FULL = 'url.full' as const;\n\n/**\n * The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component\n *\n * @example /search\n *\n * @note Sensitive content provided in `url.path` **SHOULD** be scrubbed when instrumentations can identify it.\n */\nexport const ATTR_URL_PATH = 'url.path' as const;\n\n/**\n * The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component\n *\n * @example q=OpenTelemetry\n *\n * @note Sensitive content provided in `url.query` **SHOULD** be scrubbed when instrumentations can identify it.\n *\n *\n * Query string values for the following keys **SHOULD** be redacted by default and replaced by the value `REDACTED`:\n *\n *   - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n *   - [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n *   - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\n *   - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\n *\n * This list is subject to change over time.\n *\n * When a query string value is redacted, the query string key **SHOULD** still be preserved, e.g.\n * `q=OpenTelemetry&sig=REDACTED`.\n */\nexport const ATTR_URL_QUERY = 'url.query' as const;\n\n/**\n * The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.\n *\n * @example https\n * @example ftp\n * @example telnet\n */\nexport const ATTR_URL_SCHEME = 'url.scheme' as const;\n\n/**\n * Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client.\n *\n * @example CERN-LineMode/2.15 libwww/2.17b3\n * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\n * @example YourApp/1.0.0 grpc-java-okhttp/1.27.2\n */\nexport const ATTR_USER_AGENT_ORIGINAL = 'user_agent.original' as const;\n\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { VERSION } from '../../version';\nimport {\n  SEMRESATTRS_TELEMETRY_SDK_NAME,\n  SEMRESATTRS_PROCESS_RUNTIME_NAME,\n  SEMRESATTRS_TELEMETRY_SDK_LANGUAGE,\n  TELEMETRYSDKLANGUAGEVALUES_NODEJS,\n  SEMRESATTRS_TELEMETRY_SDK_VERSION,\n} from '@opentelemetry/semantic-conventions';\n\n/** Constants describing the SDK in use */\nexport const SDK_INFO = {\n  [SEMRESATTRS_TELEMETRY_SDK_NAME]: 'opentelemetry',\n  [SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'node',\n  [SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]: TELEMETRYSDKLANGUAGEVALUES_NODEJS,\n  [SEMRESATTRS_TELEMETRY_SDK_VERSION]: VERSION,\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function unrefTimer(timer: NodeJS.Timer): void {\n  timer.unref();\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as api from '@opentelemetry/api';\nimport { otperformance as performance } from '../platform';\nimport { TimeOriginLegacy } from './types';\n\nconst NANOSECOND_DIGITS = 9;\nconst NANOSECOND_DIGITS_IN_MILLIS = 6;\nconst MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n\n/**\n * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).\n * @param epochMillis\n */\nexport function millisToHrTime(epochMillis: number): api.HrTime {\n  const epochSeconds = epochMillis / 1000;\n  // Decimals only.\n  const seconds = Math.trunc(epochSeconds);\n  // Round sub-nanosecond accuracy to nanosecond.\n  const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);\n  return [seconds, nanos];\n}\n\nexport function getTimeOrigin(): number {\n  let timeOrigin = performance.timeOrigin;\n  if (typeof timeOrigin !== 'number') {\n    const perf: TimeOriginLegacy = performance as unknown as TimeOriginLegacy;\n    timeOrigin = perf.timing && perf.timing.fetchStart;\n  }\n  return timeOrigin;\n}\n\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nexport function hrTime(performanceNow?: number): api.HrTime {\n  const timeOrigin = millisToHrTime(getTimeOrigin());\n  const now = millisToHrTime(\n    typeof performanceNow === 'number' ? performanceNow : performance.now()\n  );\n\n  return addHrTimes(timeOrigin, now);\n}\n\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nexport function timeInputToHrTime(time: api.TimeInput): api.HrTime {\n  // process.hrtime\n  if (isTimeInputHrTime(time)) {\n    return time as api.HrTime;\n  } else if (typeof time === 'number') {\n    // Must be a performance.now() if it's smaller than process start time.\n    if (time < getTimeOrigin()) {\n      return hrTime(time);\n    } else {\n      // epoch milliseconds or performance.timeOrigin\n      return millisToHrTime(time);\n    }\n  } else if (time instanceof Date) {\n    return millisToHrTime(time.getTime());\n  } else {\n    throw TypeError('Invalid input type');\n  }\n}\n\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nexport function hrTimeDuration(\n  startTime: api.HrTime,\n  endTime: api.HrTime\n): api.HrTime {\n  let seconds = endTime[0] - startTime[0];\n  let nanos = endTime[1] - startTime[1];\n\n  // overflow\n  if (nanos < 0) {\n    seconds -= 1;\n    // negate\n    nanos += SECOND_TO_NANOSECONDS;\n  }\n\n  return [seconds, nanos];\n}\n\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nexport function hrTimeToTimeStamp(time: api.HrTime): string {\n  const precision = NANOSECOND_DIGITS;\n  const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n  const nanoString = tmp.substring(tmp.length - precision - 1);\n  const date = new Date(time[0] * 1000).toISOString();\n  return date.replace('000Z', nanoString);\n}\n\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nexport function hrTimeToNanoseconds(time: api.HrTime): number {\n  return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nexport function hrTimeToMilliseconds(time: api.HrTime): number {\n  return time[0] * 1e3 + time[1] / 1e6;\n}\n\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nexport function hrTimeToMicroseconds(time: api.HrTime): number {\n  return time[0] * 1e6 + time[1] / 1e3;\n}\n\n/**\n * check if time is HrTime\n * @param value\n */\nexport function isTimeInputHrTime(value: unknown): value is api.HrTime {\n  return (\n    Array.isArray(value) &&\n    value.length === 2 &&\n    typeof value[0] === 'number' &&\n    typeof value[1] === 'number'\n  );\n}\n\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nexport function isTimeInput(\n  value: unknown\n): value is api.HrTime | number | Date {\n  return (\n    isTimeInputHrTime(value) ||\n    typeof value === 'number' ||\n    value instanceof Date\n  );\n}\n\n/**\n * Given 2 HrTime formatted times, return their sum as an HrTime.\n */\nexport function addHrTimes(time1: api.HrTime, time2: api.HrTime): api.HrTime {\n  const out = [time1[0] + time2[0], time1[1] + time2[1]] as api.HrTime;\n\n  // Nanoseconds\n  if (out[1] >= SECOND_TO_NANOSECONDS) {\n    out[1] -= SECOND_TO_NANOSECONDS;\n    out[0] += 1;\n  }\n\n  return out;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface ExportResult {\n  code: ExportResultCode;\n  error?: Error;\n}\n\nexport enum ExportResultCode {\n  SUCCESS,\n  FAILED,\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\n\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototypeOf = Object.getPrototypeOf;\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nexport function isPlainObject(value: any) {\n  if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n    return false;\n  }\n  const proto = getPrototypeOf(value);\n  if (proto === null) {\n    return true;\n  }\n  const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n  return (\n    typeof Ctor == 'function' &&\n    Ctor instanceof Ctor &&\n    funcToString.call(Ctor) === objectCtorString\n  );\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value: any) {\n  return value != null && typeof value == 'object';\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value: any) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return symToStringTag && symToStringTag in Object(value)\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value: any) {\n  const isOwn = hasOwnProperty.call(value, symToStringTag as any),\n    tag = value[symToStringTag as any];\n  let unmasked = false;\n\n  try {\n    value[symToStringTag as any] = undefined;\n    unmasked = true;\n  } catch (e) {\n    // silence\n  }\n\n  const result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag as any] = tag;\n    } else {\n      delete value[symToStringTag as any];\n    }\n  }\n  return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value: any) {\n  return nativeObjectToString.call(value);\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { isPlainObject } from './lodash.merge';\n\nconst MAX_LEVEL = 20;\n\ninterface ObjectInto {\n  obj: any;\n  key: string;\n}\n\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nexport function merge(...args: any[]): any {\n  let result: any = args.shift();\n  const objects: WeakMap<any, ObjectInto[]> | undefined = new WeakMap<\n    any,\n    ObjectInto[]\n  >();\n  while (args.length > 0) {\n    result = mergeTwoObjects(result, args.shift(), 0, objects);\n  }\n\n  return result;\n}\n\nfunction takeValue(value: any): any {\n  if (isArray(value)) {\n    return value.slice();\n  }\n  return value;\n}\n\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(\n  one: any,\n  two: any,\n  level = 0,\n  objects: WeakMap<any, ObjectInto[]>\n): any {\n  let result: any;\n  if (level > MAX_LEVEL) {\n    return undefined;\n  }\n  level++;\n  if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n    result = takeValue(two);\n  } else if (isArray(one)) {\n    result = one.slice();\n    if (isArray(two)) {\n      for (let i = 0, j = two.length; i < j; i++) {\n        result.push(takeValue(two[i]));\n      }\n    } else if (isObject(two)) {\n      const keys = Object.keys(two);\n      for (let i = 0, j = keys.length; i < j; i++) {\n        const key = keys[i];\n        result[key] = takeValue(two[key]);\n      }\n    }\n  } else if (isObject(one)) {\n    if (isObject(two)) {\n      if (!shouldMerge(one, two)) {\n        return two;\n      }\n      result = Object.assign({}, one);\n      const keys = Object.keys(two);\n\n      for (let i = 0, j = keys.length; i < j; i++) {\n        const key = keys[i];\n        const twoValue = two[key];\n\n        if (isPrimitive(twoValue)) {\n          if (typeof twoValue === 'undefined') {\n            delete result[key];\n          } else {\n            // result[key] = takeValue(twoValue);\n            result[key] = twoValue;\n          }\n        } else {\n          const obj1 = result[key];\n          const obj2 = twoValue;\n\n          if (\n            wasObjectReferenced(one, key, objects) ||\n            wasObjectReferenced(two, key, objects)\n          ) {\n            delete result[key];\n          } else {\n            if (isObject(obj1) && isObject(obj2)) {\n              const arr1 = objects.get(obj1) || [];\n              const arr2 = objects.get(obj2) || [];\n              arr1.push({ obj: one, key });\n              arr2.push({ obj: two, key });\n              objects.set(obj1, arr1);\n              objects.set(obj2, arr2);\n            }\n\n            result[key] = mergeTwoObjects(\n              result[key],\n              twoValue,\n              level,\n              objects\n            );\n          }\n        }\n      }\n    } else {\n      result = two;\n    }\n  }\n\n  return result;\n}\n\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(\n  obj: any,\n  key: string,\n  objects: WeakMap<any, ObjectInto[]>\n): boolean {\n  const arr = objects.get(obj[key]) || [];\n  for (let i = 0, j = arr.length; i < j; i++) {\n    const info = arr[i];\n    if (info.key === key && info.obj === obj) {\n      return true;\n    }\n  }\n  return false;\n}\n\nfunction isArray(value: any): boolean {\n  return Array.isArray(value);\n}\n\nfunction isFunction(value: any): boolean {\n  return typeof value === 'function';\n}\n\nfunction isObject(value: any): boolean {\n  return (\n    !isPrimitive(value) &&\n    !isArray(value) &&\n    !isFunction(value) &&\n    typeof value === 'object'\n  );\n}\n\nfunction isPrimitive(value: any): boolean {\n  return (\n    typeof value === 'string' ||\n    typeof value === 'number' ||\n    typeof value === 'boolean' ||\n    typeof value === 'undefined' ||\n    value instanceof Date ||\n    value instanceof RegExp ||\n    value === null\n  );\n}\n\nfunction shouldMerge(one: any, two: any): boolean {\n  if (!isPlainObject(one) || !isPlainObject(two)) {\n    return false;\n  }\n\n  return true;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Error that is thrown on timeouts.\n */\nexport class TimeoutError extends Error {\n  constructor(message?: string) {\n    super(message);\n\n    // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see:\n    // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n    Object.setPrototypeOf(this, TimeoutError.prototype);\n  }\n}\n\n/**\n * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise\n * rejects, and resolves if the specified promise resolves.\n *\n * <p> NOTE: this operation will continue even after it throws a {@link TimeoutError}.\n *\n * @param promise promise to use with timeout.\n * @param timeout the timeout in milliseconds until the returned promise is rejected.\n */\nexport function callWithTimeout<T>(\n  promise: Promise<T>,\n  timeout: number\n): Promise<T> {\n  let timeoutHandle: ReturnType<typeof setTimeout>;\n\n  const timeoutPromise = new Promise<never>(function timeoutFunction(\n    _resolve,\n    reject\n  ) {\n    timeoutHandle = setTimeout(function timeoutHandler() {\n      reject(new TimeoutError('Operation timed out.'));\n    }, timeout);\n  });\n\n  return Promise.race([promise, timeoutPromise]).then(\n    result => {\n      clearTimeout(timeoutHandle);\n      return result;\n    },\n    reason => {\n      clearTimeout(timeoutHandle);\n      throw reason;\n    }\n  );\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class Deferred<T> {\n  private _promise: Promise<T>;\n  private _resolve!: (val: T) => void;\n  private _reject!: (error: unknown) => void;\n  constructor() {\n    this._promise = new Promise((resolve, reject) => {\n      this._resolve = resolve;\n      this._reject = reject;\n    });\n  }\n\n  get promise() {\n    return this._promise;\n  }\n\n  resolve(val: T) {\n    this._resolve(val);\n  }\n\n  reject(err: unknown) {\n    this._reject(err);\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Deferred } from './promise';\n\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nexport class BindOnceFuture<\n  R,\n  This = unknown,\n  T extends (this: This, ...args: unknown[]) => R = () => R,\n> {\n  private _isCalled = false;\n  private _deferred = new Deferred<R>();\n  constructor(\n    private _callback: T,\n    private _that: This\n  ) {}\n\n  get isCalled() {\n    return this._isCalled;\n  }\n\n  get promise() {\n    return this._deferred.promise;\n  }\n\n  call(...args: Parameters<T>): Promise<R> {\n    if (!this._isCalled) {\n      this._isCalled = true;\n      try {\n        Promise.resolve(this._callback.call(this._that, ...args)).then(\n          val => this._deferred.resolve(val),\n          err => this._deferred.reject(err)\n        );\n      } catch (err) {\n        this._deferred.reject(err);\n      }\n    }\n    return this._deferred.promise;\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag, DiagLogLevel } from '@opentelemetry/api';\n\nconst logLevelMap: { [key: string]: DiagLogLevel } = {\n  ALL: DiagLogLevel.ALL,\n  VERBOSE: DiagLogLevel.VERBOSE,\n  DEBUG: DiagLogLevel.DEBUG,\n  INFO: DiagLogLevel.INFO,\n  WARN: DiagLogLevel.WARN,\n  ERROR: DiagLogLevel.ERROR,\n  NONE: DiagLogLevel.NONE,\n};\n\n/**\n * Convert a string to a {@link DiagLogLevel}, defaults to {@link DiagLogLevel} if the log level does not exist or undefined if the input is undefined.\n * @param value\n */\nexport function diagLogLevelFromString(\n  value: string | undefined\n): DiagLogLevel | undefined {\n  if (value == null) {\n    // don't fall back to default - no value set has different semantics for ús than an incorrect value (do not set vs. fall back to default)\n    return undefined;\n  }\n\n  const resolvedLogLevel = logLevelMap[value.toUpperCase()];\n\n  if (resolvedLogLevel == null) {\n    diag.warn(\n      `Unknown log level \"${value}\", expected one of ${Object.keys(logLevelMap)}, using default`\n    );\n    return DiagLogLevel.INFO;\n  }\n\n  return resolvedLogLevel;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { context } from '@opentelemetry/api';\nimport { ExportResult } from '../ExportResult';\nimport { suppressTracing } from '../trace/suppress-tracing';\n\nexport interface Exporter<T> {\n  export(arg: T, resultCallback: (result: ExportResult) => void): void;\n}\n\n/**\n * @internal\n * Shared functionality used by Exporters while exporting data, including suppression of Traces.\n */\nexport function _export<T>(\n  exporter: Exporter<T>,\n  arg: T\n): Promise<ExportResult> {\n  return new Promise(resolve => {\n    // prevent downstream exporter calls from generating spans\n    context.with(suppressTracing(context.active()), () => {\n      exporter.export(arg, (result: ExportResult) => {\n        resolve(result);\n      });\n    });\n  });\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { W3CBaggagePropagator } from './baggage/propagation/W3CBaggagePropagator';\nexport { AnchoredClock, Clock } from './common/anchored-clock';\nexport { isAttributeValue, sanitizeAttributes } from './common/attributes';\nexport {\n  globalErrorHandler,\n  setGlobalErrorHandler,\n} from './common/global-error-handler';\nexport { loggingErrorHandler } from './common/logging-error-handler';\nexport {\n  addHrTimes,\n  getTimeOrigin,\n  hrTime,\n  hrTimeDuration,\n  hrTimeToMicroseconds,\n  hrTimeToMilliseconds,\n  hrTimeToNanoseconds,\n  hrTimeToTimeStamp,\n  isTimeInput,\n  isTimeInputHrTime,\n  millisToHrTime,\n  timeInputToHrTime,\n} from './common/time';\nexport { ErrorHandler, InstrumentationScope } from './common/types';\nexport { ExportResult, ExportResultCode } from './ExportResult';\nexport { parseKeyPairsIntoRecord } from './baggage/utils';\nexport {\n  SDK_INFO,\n  _globalThis,\n  getStringFromEnv,\n  getBooleanFromEnv,\n  getNumberFromEnv,\n  getStringListFromEnv,\n  otperformance,\n  unrefTimer,\n} from './platform';\nexport {\n  CompositePropagator,\n  CompositePropagatorConfig,\n} from './propagation/composite';\nexport {\n  TRACE_PARENT_HEADER,\n  TRACE_STATE_HEADER,\n  W3CTraceContextPropagator,\n  parseTraceParent,\n} from './trace/W3CTraceContextPropagator';\nexport {\n  RPCMetadata,\n  RPCType,\n  deleteRPCMetadata,\n  getRPCMetadata,\n  setRPCMetadata,\n} from './trace/rpc-metadata';\nexport {\n  isTracingSuppressed,\n  suppressTracing,\n  unsuppressTracing,\n} from './trace/suppress-tracing';\nexport { TraceState } from './trace/TraceState';\nexport { merge } from './utils/merge';\nexport { TimeoutError, callWithTimeout } from './utils/timeout';\nexport { isUrlIgnored, urlMatches } from './utils/url';\nexport { BindOnceFuture } from './utils/callback';\nexport { diagLogLevelFromString } from './utils/configuration';\nimport { _export } from './internal/exporter';\nexport const internal = {\n  _export,\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExportResult, ExportResultCode } from '@opentelemetry/core';\nimport { IExporterTransport } from './exporter-transport';\nimport { IExportPromiseHandler } from './bounded-queue-export-promise-handler';\nimport { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { OTLPExporterError } from './types';\nimport { IOtlpResponseHandler } from './response-handler';\nimport { createLoggingPartialSuccessResponseHandler } from './logging-response-handler';\nimport { diag, DiagLogger } from '@opentelemetry/api';\n\n/**\n * Internally shared export logic for OTLP.\n */\nexport interface IOtlpExportDelegate<Internal> {\n  export(\n    internalRepresentation: Internal,\n    resultCallback: (result: ExportResult) => void\n  ): void;\n  forceFlush(): Promise<void>;\n  shutdown(): Promise<void>;\n}\n\nclass OTLPExportDelegate<Internal, Response>\n  implements IOtlpExportDelegate<Internal>\n{\n  private _diagLogger: DiagLogger;\n  constructor(\n    private _transport: IExporterTransport,\n    private _serializer: ISerializer<Internal, Response>,\n    private _responseHandler: IOtlpResponseHandler<Response>,\n    private _promiseQueue: IExportPromiseHandler,\n    private _timeout: number\n  ) {\n    this._diagLogger = diag.createComponentLogger({\n      namespace: 'OTLPExportDelegate',\n    });\n  }\n\n  export(\n    internalRepresentation: Internal,\n    resultCallback: (result: ExportResult) => void\n  ): void {\n    this._diagLogger.debug('items to be sent', internalRepresentation);\n\n    // don't do any work if too many exports are in progress.\n    if (this._promiseQueue.hasReachedLimit()) {\n      resultCallback({\n        code: ExportResultCode.FAILED,\n        error: new Error('Concurrent export limit reached'),\n      });\n      return;\n    }\n\n    const serializedRequest = this._serializer.serializeRequest(\n      internalRepresentation\n    );\n\n    if (serializedRequest == null) {\n      resultCallback({\n        code: ExportResultCode.FAILED,\n        error: new Error('Nothing to send'),\n      });\n      return;\n    }\n\n    this._promiseQueue.pushPromise(\n      this._transport.send(serializedRequest, this._timeout).then(\n        response => {\n          if (response.status === 'success') {\n            if (response.data != null) {\n              try {\n                this._responseHandler.handleResponse(\n                  this._serializer.deserializeResponse(response.data)\n                );\n              } catch (e) {\n                this._diagLogger.warn(\n                  'Export succeeded but could not deserialize response - is the response specification compliant?',\n                  e,\n                  response.data\n                );\n              }\n            }\n            // No matter the response, we can consider the export still successful.\n            resultCallback({\n              code: ExportResultCode.SUCCESS,\n            });\n            return;\n          } else if (response.status === 'failure' && response.error) {\n            resultCallback({\n              code: ExportResultCode.FAILED,\n              error: response.error,\n            });\n            return;\n          } else if (response.status === 'retryable') {\n            resultCallback({\n              code: ExportResultCode.FAILED,\n              error: new OTLPExporterError(\n                'Export failed with retryable status'\n              ),\n            });\n          } else {\n            resultCallback({\n              code: ExportResultCode.FAILED,\n              error: new OTLPExporterError('Export failed with unknown error'),\n            });\n          }\n        },\n        reason =>\n          resultCallback({\n            code: ExportResultCode.FAILED,\n            error: reason,\n          })\n      )\n    );\n  }\n\n  forceFlush(): Promise<void> {\n    return this._promiseQueue.awaitAll();\n  }\n\n  async shutdown(): Promise<void> {\n    this._diagLogger.debug('shutdown started');\n    await this.forceFlush();\n    this._transport.shutdown();\n  }\n}\n\n/**\n * Creates a generic delegate for OTLP exports which only contains parts of the OTLP export that are shared across all\n * signals.\n */\nexport function createOtlpExportDelegate<Internal, Response>(\n  components: {\n    transport: IExporterTransport;\n    serializer: ISerializer<Internal, Response>;\n    promiseHandler: IExportPromiseHandler;\n  },\n  settings: { timeout: number }\n): IOtlpExportDelegate<Internal> {\n  return new OTLPExportDelegate(\n    components.transport,\n    components.serializer,\n    createLoggingPartialSuccessResponseHandler(),\n    components.promiseHandler,\n    settings.timeout\n  );\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\nimport { IOtlpResponseHandler } from './response-handler';\n\nfunction isPartialSuccessResponse(\n  response: unknown\n): response is { partialSuccess: never } {\n  return Object.prototype.hasOwnProperty.call(response, 'partialSuccess');\n}\n\n/**\n * Default response handler that logs a partial success to the console.\n */\nexport function createLoggingPartialSuccessResponseHandler<\n  T,\n>(): IOtlpResponseHandler<T> {\n  return {\n    handleResponse(response: T) {\n      // Partial success MUST never be an empty object according the specification\n      // see https://opentelemetry.io/docs/specs/otlp/#partial-success\n      if (\n        response == null ||\n        !isPartialSuccessResponse(response) ||\n        response.partialSuccess == null ||\n        Object.keys(response.partialSuccess).length === 0\n      ) {\n        return;\n      }\n      diag.warn(\n        'Received Partial Success response:',\n        JSON.stringify(response.partialSuccess)\n      );\n    },\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nfunction intValue(charCode: number): number {\n  // 0-9\n  if (charCode >= 48 && charCode <= 57) {\n    return charCode - 48;\n  }\n\n  // a-f\n  if (charCode >= 97 && charCode <= 102) {\n    return charCode - 87;\n  }\n\n  // A-F\n  return charCode - 55;\n}\n\nexport function hexToBinary(hexStr: string): Uint8Array {\n  const buf = new Uint8Array(hexStr.length / 2);\n  let offset = 0;\n\n  for (let i = 0; i < hexStr.length; i += 2) {\n    const hi = intValue(hexStr.charCodeAt(i));\n    const lo = intValue(hexStr.charCodeAt(i + 1));\n    buf[offset++] = (hi << 4) | lo;\n  }\n\n  return buf;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { OtlpEncodingOptions, Fixed64, LongBits } from './internal-types';\nimport { HrTime } from '@opentelemetry/api';\nimport { hrTimeToNanoseconds } from '@opentelemetry/core';\nimport { hexToBinary } from './hex-to-binary';\n\nexport function hrTimeToNanos(hrTime: HrTime): bigint {\n  const NANOSECONDS = BigInt(1_000_000_000);\n  return BigInt(hrTime[0]) * NANOSECONDS + BigInt(hrTime[1]);\n}\n\nexport function toLongBits(value: bigint): LongBits {\n  const low = Number(BigInt.asUintN(32, value));\n  const high = Number(BigInt.asUintN(32, value >> BigInt(32)));\n  return { low, high };\n}\n\nexport function encodeAsLongBits(hrTime: HrTime): LongBits {\n  const nanos = hrTimeToNanos(hrTime);\n  return toLongBits(nanos);\n}\n\nexport function encodeAsString(hrTime: HrTime): string {\n  const nanos = hrTimeToNanos(hrTime);\n  return nanos.toString();\n}\n\nconst encodeTimestamp =\n  typeof BigInt !== 'undefined' ? encodeAsString : hrTimeToNanoseconds;\n\nexport type HrTimeEncodeFunction = (hrTime: HrTime) => Fixed64;\nexport type SpanContextEncodeFunction = (\n  spanContext: string\n) => string | Uint8Array;\nexport type OptionalSpanContextEncodeFunction = (\n  spanContext: string | undefined\n) => string | Uint8Array | undefined;\n\nexport interface Encoder {\n  encodeHrTime: HrTimeEncodeFunction;\n  encodeSpanContext: SpanContextEncodeFunction;\n  encodeOptionalSpanContext: OptionalSpanContextEncodeFunction;\n}\n\nfunction identity<T>(value: T): T {\n  return value;\n}\n\nfunction optionalHexToBinary(str: string | undefined): Uint8Array | undefined {\n  if (str === undefined) return undefined;\n  return hexToBinary(str);\n}\n\nconst DEFAULT_ENCODER: Encoder = {\n  encodeHrTime: encodeAsLongBits,\n  encodeSpanContext: hexToBinary,\n  encodeOptionalSpanContext: optionalHexToBinary,\n};\n\nexport function getOtlpEncoder(options?: OtlpEncodingOptions): Encoder {\n  if (options === undefined) {\n    return DEFAULT_ENCODER;\n  }\n\n  const useLongBits = options.useLongBits ?? true;\n  const useHex = options.useHex ?? false;\n  return {\n    encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp,\n    encodeSpanContext: useHex ? identity : hexToBinary,\n    encodeOptionalSpanContext: useHex ? identity : optionalHexToBinary,\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport type {\n  IAnyValue,\n  IInstrumentationScope,\n  IKeyValue,\n  Resource,\n} from './internal-types';\nimport { Attributes } from '@opentelemetry/api';\nimport { InstrumentationScope } from '@opentelemetry/core';\nimport { Resource as ISdkResource } from '@opentelemetry/resources';\n\nexport function createResource(resource: ISdkResource): Resource {\n  return {\n    attributes: toAttributes(resource.attributes),\n    droppedAttributesCount: 0,\n  };\n}\n\nexport function createInstrumentationScope(\n  scope: InstrumentationScope\n): IInstrumentationScope {\n  return {\n    name: scope.name,\n    version: scope.version,\n  };\n}\n\nexport function toAttributes(attributes: Attributes): IKeyValue[] {\n  return Object.keys(attributes).map(key => toKeyValue(key, attributes[key]));\n}\n\nexport function toKeyValue(key: string, value: unknown): IKeyValue {\n  return {\n    key: key,\n    value: toAnyValue(value),\n  };\n}\n\nexport function toAnyValue(value: unknown): IAnyValue {\n  const t = typeof value;\n  if (t === 'string') return { stringValue: value as string };\n  if (t === 'number') {\n    if (!Number.isInteger(value)) return { doubleValue: value as number };\n    return { intValue: value as number };\n  }\n  if (t === 'boolean') return { boolValue: value as boolean };\n  if (value instanceof Uint8Array) return { bytesValue: value };\n  if (Array.isArray(value))\n    return { arrayValue: { values: value.map(toAnyValue) } };\n  if (t === 'object' && value != null)\n    return {\n      kvlistValue: {\n        values: Object.entries(value as object).map(([k, v]) =>\n          toKeyValue(k, v)\n        ),\n      },\n    };\n\n  return {};\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ReadableLogRecord } from '@opentelemetry/sdk-logs';\nimport {\n  ESeverityNumber,\n  IExportLogsServiceRequest,\n  ILogRecord,\n  IResourceLogs,\n} from './internal-types';\nimport { Resource } from '@opentelemetry/resources';\nimport { Encoder, getOtlpEncoder } from '../common/utils';\nimport {\n  createInstrumentationScope,\n  createResource,\n  toAnyValue,\n  toKeyValue,\n} from '../common/internal';\nimport { SeverityNumber } from '@opentelemetry/api-logs';\nimport { OtlpEncodingOptions, IKeyValue } from '../common/internal-types';\nimport { LogAttributes } from '@opentelemetry/api-logs';\n\nexport function createExportLogsServiceRequest(\n  logRecords: ReadableLogRecord[],\n  options?: OtlpEncodingOptions\n): IExportLogsServiceRequest {\n  const encoder = getOtlpEncoder(options);\n  return {\n    resourceLogs: logRecordsToResourceLogs(logRecords, encoder),\n  };\n}\n\nfunction createResourceMap(\n  logRecords: ReadableLogRecord[]\n): Map<Resource, Map<string, ReadableLogRecord[]>> {\n  const resourceMap: Map<\n    Resource,\n    Map<string, ReadableLogRecord[]>\n  > = new Map();\n\n  for (const record of logRecords) {\n    const {\n      resource,\n      instrumentationScope: { name, version = '', schemaUrl = '' },\n    } = record;\n\n    let ismMap = resourceMap.get(resource);\n    if (!ismMap) {\n      ismMap = new Map();\n      resourceMap.set(resource, ismMap);\n    }\n\n    const ismKey = `${name}@${version}:${schemaUrl}`;\n    let records = ismMap.get(ismKey);\n    if (!records) {\n      records = [];\n      ismMap.set(ismKey, records);\n    }\n    records.push(record);\n  }\n  return resourceMap;\n}\n\nfunction logRecordsToResourceLogs(\n  logRecords: ReadableLogRecord[],\n  encoder: Encoder\n): IResourceLogs[] {\n  const resourceMap = createResourceMap(logRecords);\n  return Array.from(resourceMap, ([resource, ismMap]) => ({\n    resource: createResource(resource),\n    scopeLogs: Array.from(ismMap, ([, scopeLogs]) => {\n      return {\n        scope: createInstrumentationScope(scopeLogs[0].instrumentationScope),\n        logRecords: scopeLogs.map(log => toLogRecord(log, encoder)),\n        schemaUrl: scopeLogs[0].instrumentationScope.schemaUrl,\n      };\n    }),\n    schemaUrl: undefined,\n  }));\n}\n\nfunction toLogRecord(log: ReadableLogRecord, encoder: Encoder): ILogRecord {\n  return {\n    timeUnixNano: encoder.encodeHrTime(log.hrTime),\n    observedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved),\n    severityNumber: toSeverityNumber(log.severityNumber),\n    severityText: log.severityText,\n    body: toAnyValue(log.body),\n    attributes: toLogAttributes(log.attributes),\n    droppedAttributesCount: log.droppedAttributesCount,\n    flags: log.spanContext?.traceFlags,\n    traceId: encoder.encodeOptionalSpanContext(log.spanContext?.traceId),\n    spanId: encoder.encodeOptionalSpanContext(log.spanContext?.spanId),\n  };\n}\n\nfunction toSeverityNumber(\n  severityNumber: SeverityNumber | undefined\n): ESeverityNumber | undefined {\n  return severityNumber as number | undefined as ESeverityNumber | undefined;\n}\n\nexport function toLogAttributes(attributes: LogAttributes): IKeyValue[] {\n  return Object.keys(attributes).map(key => toKeyValue(key, attributes[key]));\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport { Resource } from './Resource';\nimport { emptyResource, resourceFromDetectedResource } from './ResourceImpl';\nimport { ResourceDetectionConfig } from './config';\n\n/**\n * Runs all resource detectors and returns the results merged into a single Resource.\n *\n * @param config Configuration for resource detection\n */\nexport const detectResources = (\n  config: ResourceDetectionConfig = {}\n): Resource => {\n  const resources: Resource[] = (config.detectors || []).map(d => {\n    try {\n      const resource = resourceFromDetectedResource(d.detect(config));\n      diag.debug(`${d.constructor.name} found resource.`, resource);\n      return resource;\n    } catch (e) {\n      diag.debug(`${d.constructor.name} failed: ${e.message}`);\n      return emptyResource();\n    }\n  });\n\n  // Future check if verbose logging is enabled issue #1903\n  logResources(resources);\n\n  return resources.reduce(\n    (acc, resource) => acc.merge(resource),\n    emptyResource()\n  );\n};\n\n/**\n * Writes debug information about the detected resources to the logger defined in the resource detection config, if one is provided.\n *\n * @param resources The array of {@link Resource} that should be logged. Empty entries will be ignored.\n */\nconst logResources = (resources: Array<Resource>) => {\n  resources.forEach(resource => {\n    // Print only populated resources\n    if (Object.keys(resource.attributes).length > 0) {\n      const resourceDebugString = JSON.stringify(resource.attributes, null, 4);\n      diag.verbose(resourceDebugString);\n    }\n  });\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, AttributeValue, diag } from '@opentelemetry/api';\nimport { SDK_INFO } from '@opentelemetry/core';\nimport {\n  ATTR_SERVICE_NAME,\n  ATTR_TELEMETRY_SDK_LANGUAGE,\n  ATTR_TELEMETRY_SDK_NAME,\n  ATTR_TELEMETRY_SDK_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport { Resource } from './Resource';\nimport { defaultServiceName } from './platform';\nimport {\n  DetectedResource,\n  DetectedResourceAttributes,\n  MaybePromise,\n  RawResourceAttribute,\n} from './types';\nimport { isPromiseLike } from './utils';\n\nclass ResourceImpl implements Resource {\n  private _rawAttributes: RawResourceAttribute[];\n  private _asyncAttributesPending = false;\n\n  private _memoizedAttributes?: Attributes;\n\n  static FromAttributeList(\n    attributes: [string, MaybePromise<AttributeValue | undefined>][]\n  ): Resource {\n    const res = new ResourceImpl({});\n    res._rawAttributes = attributes;\n    res._asyncAttributesPending =\n      attributes.filter(([_, val]) => isPromiseLike(val)).length > 0;\n    return res;\n  }\n\n  constructor(\n    /**\n     * A dictionary of attributes with string keys and values that provide\n     * information about the entity as numbers, strings or booleans\n     * TODO: Consider to add check/validation on attributes.\n     */\n    resource: DetectedResource\n  ) {\n    const attributes = resource.attributes ?? {};\n    this._rawAttributes = Object.entries(attributes).map(([k, v]) => {\n      if (isPromiseLike(v)) {\n        // side-effect\n        this._asyncAttributesPending = true;\n      }\n\n      return [k, v];\n    });\n  }\n\n  public get asyncAttributesPending(): boolean {\n    return this._asyncAttributesPending;\n  }\n\n  public async waitForAsyncAttributes(): Promise<void> {\n    if (!this.asyncAttributesPending) {\n      return;\n    }\n\n    for (let i = 0; i < this._rawAttributes.length; i++) {\n      const [k, v] = this._rawAttributes[i];\n      try {\n        this._rawAttributes[i] = [k, isPromiseLike(v) ? await v : v];\n      } catch (err) {\n        diag.debug(\"a resource's async attributes promise rejected: %s\", err);\n        this._rawAttributes[i] = [k, undefined];\n      }\n    }\n\n    this._asyncAttributesPending = false;\n  }\n\n  public get attributes(): Attributes {\n    if (this.asyncAttributesPending) {\n      diag.error(\n        'Accessing resource attributes before async attributes settled'\n      );\n    }\n\n    if (this._memoizedAttributes) {\n      return this._memoizedAttributes;\n    }\n\n    const attrs: Attributes = {};\n    for (const [k, v] of this._rawAttributes) {\n      if (isPromiseLike(v)) {\n        diag.debug(`Unsettled resource attribute ${k} skipped`);\n        continue;\n      }\n      if (v != null) {\n        attrs[k] ??= v;\n      }\n    }\n\n    // only memoize output if all attributes are settled\n    if (!this._asyncAttributesPending) {\n      this._memoizedAttributes = attrs;\n    }\n\n    return attrs;\n  }\n\n  public getRawAttributes(): RawResourceAttribute[] {\n    return this._rawAttributes;\n  }\n\n  public merge(resource: Resource | null): Resource {\n    if (resource == null) return this;\n\n    // Order is important\n    // Spec states incoming attributes override existing attributes\n    return ResourceImpl.FromAttributeList([\n      ...resource.getRawAttributes(),\n      ...this.getRawAttributes(),\n    ]);\n  }\n}\n\nexport function resourceFromAttributes(\n  attributes: DetectedResourceAttributes\n): Resource {\n  return ResourceImpl.FromAttributeList(Object.entries(attributes));\n}\n\nexport function resourceFromDetectedResource(\n  detectedResource: DetectedResource\n): Resource {\n  return new ResourceImpl(detectedResource);\n}\n\nexport function emptyResource(): Resource {\n  return resourceFromAttributes({});\n}\n\nexport function defaultResource(): Resource {\n  return resourceFromAttributes({\n    [ATTR_SERVICE_NAME]: defaultServiceName(),\n    [ATTR_TELEMETRY_SDK_LANGUAGE]: SDK_INFO[ATTR_TELEMETRY_SDK_LANGUAGE],\n    [ATTR_TELEMETRY_SDK_NAME]: SDK_INFO[ATTR_TELEMETRY_SDK_NAME],\n    [ATTR_TELEMETRY_SDK_VERSION]: SDK_INFO[ATTR_TELEMETRY_SDK_VERSION],\n  });\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport function defaultServiceName(): string {\n  return `unknown_service:${process.argv0}`;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport const isPromiseLike = <R>(val: unknown): val is PromiseLike<R> => {\n  return (\n    val !== null &&\n    typeof val === 'object' &&\n    typeof (val as Partial<PromiseLike<R>>).then === 'function'\n  );\n};\n\nexport function identity<T>(_: T): T {\n  return _;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, diag } from '@opentelemetry/api';\nimport { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions';\nimport { ResourceDetectionConfig } from '../config';\nimport { DetectedResource, ResourceDetector } from '../types';\nimport { getStringFromEnv } from '@opentelemetry/core';\n\n/**\n * EnvDetector can be used to detect the presence of and create a Resource\n * from the OTEL_RESOURCE_ATTRIBUTES environment variable.\n */\nclass EnvDetector implements ResourceDetector {\n  // Type, attribute keys, and attribute values should not exceed 256 characters.\n  private readonly _MAX_LENGTH = 255;\n\n  // OTEL_RESOURCE_ATTRIBUTES is a comma-separated list of attributes.\n  private readonly _COMMA_SEPARATOR = ',';\n\n  // OTEL_RESOURCE_ATTRIBUTES contains key value pair separated by '='.\n  private readonly _LABEL_KEY_VALUE_SPLITTER = '=';\n\n  private readonly _ERROR_MESSAGE_INVALID_CHARS =\n    'should be a ASCII string with a length greater than 0 and not exceed ' +\n    this._MAX_LENGTH +\n    ' characters.';\n\n  private readonly _ERROR_MESSAGE_INVALID_VALUE =\n    'should be a ASCII string with a length not exceed ' +\n    this._MAX_LENGTH +\n    ' characters.';\n\n  /**\n   * Returns a {@link Resource} populated with attributes from the\n   * OTEL_RESOURCE_ATTRIBUTES environment variable. Note this is an async\n   * function to conform to the Detector interface.\n   *\n   * @param config The resource detection config\n   */\n  detect(_config?: ResourceDetectionConfig): DetectedResource {\n    const attributes: Attributes = {};\n\n    const rawAttributes = getStringFromEnv('OTEL_RESOURCE_ATTRIBUTES');\n    const serviceName = getStringFromEnv('OTEL_SERVICE_NAME');\n\n    if (rawAttributes) {\n      try {\n        const parsedAttributes = this._parseResourceAttributes(rawAttributes);\n        Object.assign(attributes, parsedAttributes);\n      } catch (e) {\n        diag.debug(`EnvDetector failed: ${e.message}`);\n      }\n    }\n\n    if (serviceName) {\n      attributes[SEMRESATTRS_SERVICE_NAME] = serviceName;\n    }\n\n    return { attributes };\n  }\n\n  /**\n   * Creates an attribute map from the OTEL_RESOURCE_ATTRIBUTES environment\n   * variable.\n   *\n   * OTEL_RESOURCE_ATTRIBUTES: A comma-separated list of attributes describing\n   * the source in more detail, e.g. “key1=val1,key2=val2”. Domain names and\n   * paths are accepted as attribute keys. Values may be quoted or unquoted in\n   * general. If a value contains whitespace, =, or \" characters, it must\n   * always be quoted.\n   *\n   * @param rawEnvAttributes The resource attributes as a comma-separated list\n   * of key/value pairs.\n   * @returns The sanitized resource attributes.\n   */\n  private _parseResourceAttributes(rawEnvAttributes?: string): Attributes {\n    if (!rawEnvAttributes) return {};\n\n    const attributes: Attributes = {};\n    const rawAttributes: string[] = rawEnvAttributes.split(\n      this._COMMA_SEPARATOR,\n      -1\n    );\n    for (const rawAttribute of rawAttributes) {\n      const keyValuePair: string[] = rawAttribute.split(\n        this._LABEL_KEY_VALUE_SPLITTER,\n        -1\n      );\n      if (keyValuePair.length !== 2) {\n        continue;\n      }\n      let [key, value] = keyValuePair;\n      // Leading and trailing whitespaces are trimmed.\n      key = key.trim();\n      value = value.trim().split(/^\"|\"$/).join('');\n      if (!this._isValidAndNotEmpty(key)) {\n        throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);\n      }\n      if (!this._isValid(value)) {\n        throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);\n      }\n      attributes[key] = decodeURIComponent(value);\n    }\n    return attributes;\n  }\n\n  /**\n   * Determines whether the given String is a valid printable ASCII string with\n   * a length not exceed _MAX_LENGTH characters.\n   *\n   * @param str The String to be validated.\n   * @returns Whether the String is valid.\n   */\n  private _isValid(name: string): boolean {\n    return name.length <= this._MAX_LENGTH && this._isBaggageOctetString(name);\n  }\n\n  // https://www.w3.org/TR/baggage/#definition\n  private _isBaggageOctetString(str: string): boolean {\n    for (let i = 0; i < str.length; i++) {\n      const ch = str.charCodeAt(i);\n      if (ch < 0x21 || ch === 0x2c || ch === 0x3b || ch === 0x5c || ch > 0x7e) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * Determines whether the given String is a valid printable ASCII string with\n   * a length greater than 0 and not exceed _MAX_LENGTH characters.\n   *\n   * @param str The String to be validated.\n   * @returns Whether the String is valid and not empty.\n   */\n  private _isValidAndNotEmpty(str: string): boolean {\n    return str.length > 0 && this._isValid(str);\n  }\n}\n\nexport const envDetector = new EnvDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  SEMRESATTRS_HOST_ARCH,\n  SEMRESATTRS_HOST_ID,\n  SEMRESATTRS_HOST_NAME,\n} from '@opentelemetry/semantic-conventions';\nimport { arch, hostname } from 'os';\nimport { ResourceDetectionConfig } from '../../../config';\nimport {\n  DetectedResource,\n  DetectedResourceAttributes,\n  ResourceDetector,\n} from '../../../types';\nimport { getMachineId } from './machine-id/getMachineId';\nimport { normalizeArch } from './utils';\n\n/**\n * HostDetector detects the resources related to the host current process is\n * running on. Currently only non-cloud-based attributes are included.\n */\nclass HostDetector implements ResourceDetector {\n  detect(_config?: ResourceDetectionConfig): DetectedResource {\n    const attributes: DetectedResourceAttributes = {\n      [SEMRESATTRS_HOST_NAME]: hostname(),\n      [SEMRESATTRS_HOST_ARCH]: normalizeArch(arch()),\n      [SEMRESATTRS_HOST_ID]: getMachineId(),\n    };\n\n    return { attributes };\n  }\n}\n\nexport const hostDetector = new HostDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as process from 'process';\n\nlet getMachineId: () => Promise<string | undefined>;\n\nswitch (process.platform) {\n  case 'darwin':\n    ({ getMachineId } = require('./getMachineId-darwin'));\n    break;\n  case 'linux':\n    ({ getMachineId } = require('./getMachineId-linux'));\n    break;\n  case 'freebsd':\n    ({ getMachineId } = require('./getMachineId-bsd'));\n    break;\n  case 'win32':\n    ({ getMachineId } = require('./getMachineId-win'));\n    break;\n  default:\n    ({ getMachineId } = require('./getMachineId-unsupported'));\n}\n\nexport { getMachineId };\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const normalizeArch = (nodeArchString: string): string => {\n  // Maps from https://nodejs.org/api/os.html#osarch to arch values in spec:\n  // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/host.md\n  switch (nodeArchString) {\n    case 'arm':\n      return 'arm32';\n    case 'ppc':\n      return 'ppc32';\n    case 'x64':\n      return 'amd64';\n    default:\n      return nodeArchString;\n  }\n};\n\nexport const normalizeType = (nodePlatform: string): string => {\n  // Maps from https://nodejs.org/api/os.html#osplatform to arch values in spec:\n  // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/os.md\n  switch (nodePlatform) {\n    case 'sunos':\n      return 'solaris';\n    case 'win32':\n      return 'windows';\n    default:\n      return nodePlatform;\n  }\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes } from '@opentelemetry/api';\nimport {\n  SEMRESATTRS_OS_TYPE,\n  SEMRESATTRS_OS_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport { platform, release } from 'os';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { DetectedResource, ResourceDetector } from '../../../types';\nimport { normalizeType } from './utils';\n\n/**\n * OSDetector detects the resources related to the operating system (OS) on\n * which the process represented by this resource is running.\n */\nclass OSDetector implements ResourceDetector {\n  detect(_config?: ResourceDetectionConfig): DetectedResource {\n    const attributes: Attributes = {\n      [SEMRESATTRS_OS_TYPE]: normalizeType(platform()),\n      [SEMRESATTRS_OS_VERSION]: release(),\n    };\n    return { attributes };\n  }\n}\n\nexport const osDetector = new OSDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Attributes, diag } from '@opentelemetry/api';\nimport {\n  SEMRESATTRS_PROCESS_COMMAND,\n  SEMRESATTRS_PROCESS_COMMAND_ARGS,\n  SEMRESATTRS_PROCESS_EXECUTABLE_NAME,\n  SEMRESATTRS_PROCESS_EXECUTABLE_PATH,\n  SEMRESATTRS_PROCESS_OWNER,\n  SEMRESATTRS_PROCESS_PID,\n  SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION,\n  SEMRESATTRS_PROCESS_RUNTIME_NAME,\n  SEMRESATTRS_PROCESS_RUNTIME_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport * as os from 'os';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { DetectedResource, ResourceDetector } from '../../../types';\n\n/**\n * ProcessDetector will be used to detect the resources related current process running\n * and being instrumented from the NodeJS Process module.\n */\nclass ProcessDetector implements ResourceDetector {\n  detect(_config?: ResourceDetectionConfig): DetectedResource {\n    const attributes: Attributes = {\n      [SEMRESATTRS_PROCESS_PID]: process.pid,\n      [SEMRESATTRS_PROCESS_EXECUTABLE_NAME]: process.title,\n      [SEMRESATTRS_PROCESS_EXECUTABLE_PATH]: process.execPath,\n      [SEMRESATTRS_PROCESS_COMMAND_ARGS]: [\n        process.argv[0],\n        ...process.execArgv,\n        ...process.argv.slice(1),\n      ],\n      [SEMRESATTRS_PROCESS_RUNTIME_VERSION]: process.versions.node,\n      [SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'nodejs',\n      [SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',\n    };\n\n    if (process.argv.length > 1) {\n      attributes[SEMRESATTRS_PROCESS_COMMAND] = process.argv[1];\n    }\n\n    try {\n      const userInfo = os.userInfo();\n      attributes[SEMRESATTRS_PROCESS_OWNER] = userInfo.username;\n    } catch (e) {\n      diag.debug(`error obtaining process owner: ${e}`);\n    }\n\n    return { attributes };\n  }\n}\n\nexport const processDetector = new ProcessDetector();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ISerializer } from '../../i-serializer';\nimport { ReadableLogRecord } from '@opentelemetry/sdk-logs';\nimport { createExportLogsServiceRequest } from '../internal';\nimport { IExportLogsServiceResponse } from '../export-response';\n\n/*\n * @experimental this serializer may receive breaking changes in minor versions, pin this package's version when using this constant\n */\nexport const JsonLogsSerializer: ISerializer<\n  ReadableLogRecord[],\n  IExportLogsServiceResponse\n> = {\n  serializeRequest: (arg: ReadableLogRecord[]) => {\n    const request = createExportLogsServiceRequest(arg, {\n      useHex: true,\n      useLongBits: false,\n    });\n    const encoder = new TextEncoder();\n    return encoder.encode(JSON.stringify(request));\n  },\n  deserializeResponse: (arg: Uint8Array) => {\n    const decoder = new TextDecoder();\n    return JSON.parse(decoder.decode(arg)) as IExportLogsServiceResponse;\n  },\n};\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.200.0';\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n  HttpRequestParameters,\n  sendWithHttp,\n} from './http-transport-types';\n\n// NOTE: do not change these type imports to actual imports. Doing so WILL break `@opentelemetry/instrumentation-http`,\n// as they'd be imported before the http/https modules can be wrapped.\nimport type * as https from 'https';\nimport type * as http from 'http';\nimport { ExportResponse } from '../export-response';\nimport { IExporterTransport } from '../exporter-transport';\n\ninterface Utils {\n  agent: http.Agent | https.Agent;\n  send: sendWithHttp;\n}\n\nclass HttpExporterTransport implements IExporterTransport {\n  private _utils: Utils | null = null;\n\n  constructor(private _parameters: HttpRequestParameters) {}\n\n  async send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse> {\n    const { agent, send } = this._loadUtils();\n\n    return new Promise<ExportResponse>(resolve => {\n      send(\n        this._parameters,\n        agent,\n        data,\n        result => {\n          resolve(result);\n        },\n        timeoutMillis\n      );\n    });\n  }\n\n  shutdown() {\n    // intentionally left empty, nothing to do.\n  }\n\n  private _loadUtils(): Utils {\n    let utils = this._utils;\n\n    if (utils === null) {\n      // Lazy require to ensure that http/https is not required before instrumentations can wrap it.\n      const {\n        sendWithHttp,\n        createHttpAgent,\n        // eslint-disable-next-line @typescript-eslint/no-var-requires\n      } = require('./http-transport-utils');\n\n      utils = this._utils = {\n        agent: createHttpAgent(\n          this._parameters.url,\n          this._parameters.agentOptions\n        ),\n        send: sendWithHttp,\n      };\n    }\n\n    return utils;\n  }\n}\n\nexport function createHttpExporterTransport(\n  parameters: HttpRequestParameters\n): IExporterTransport {\n  return new HttpExporterTransport(parameters);\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { IExporterTransport } from './exporter-transport';\nimport { ExportResponse } from './export-response';\n\nconst MAX_ATTEMPTS = 5;\nconst INITIAL_BACKOFF = 1000;\nconst MAX_BACKOFF = 5000;\nconst BACKOFF_MULTIPLIER = 1.5;\nconst JITTER = 0.2;\n\n/**\n * Get a pseudo-random jitter that falls in the range of [-JITTER, +JITTER]\n */\nfunction getJitter() {\n  return Math.random() * (2 * JITTER) - JITTER;\n}\n\nclass RetryingTransport implements IExporterTransport {\n  constructor(private _transport: IExporterTransport) {}\n\n  private retry(\n    data: Uint8Array,\n    timeoutMillis: number,\n    inMillis: number\n  ): Promise<ExportResponse> {\n    return new Promise((resolve, reject) => {\n      setTimeout(() => {\n        this._transport.send(data, timeoutMillis).then(resolve, reject);\n      }, inMillis);\n    });\n  }\n\n  async send(data: Uint8Array, timeoutMillis: number): Promise<ExportResponse> {\n    const deadline = Date.now() + timeoutMillis;\n    let result = await this._transport.send(data, timeoutMillis);\n    let attempts = MAX_ATTEMPTS;\n    let nextBackoff = INITIAL_BACKOFF;\n\n    while (result.status === 'retryable' && attempts > 0) {\n      attempts--;\n\n      // use maximum of computed backoff and 0 to avoid negative timeouts\n      const backoff = Math.max(\n        Math.min(nextBackoff, MAX_BACKOFF) + getJitter(),\n        0\n      );\n      nextBackoff = nextBackoff * BACKOFF_MULTIPLIER;\n      const retryInMillis = result.retryInMillis ?? backoff;\n\n      // return when expected retry time is after the export deadline.\n      const remainingTimeoutMillis = deadline - Date.now();\n      if (retryInMillis > remainingTimeoutMillis) {\n        return result;\n      }\n\n      result = await this.retry(data, remainingTimeoutMillis, retryInMillis);\n    }\n\n    return result;\n  }\n\n  shutdown() {\n    return this._transport.shutdown();\n  }\n}\n\n/**\n * Creates an Exporter Transport that retries on 'retryable' response.\n */\nexport function createRetryingTransport(options: {\n  // Underlying transport to wrap.\n  transport: IExporterTransport;\n}): IExporterTransport {\n  return new RetryingTransport(options.transport);\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n  createOtlpExportDelegate,\n  IOtlpExportDelegate,\n} from './otlp-export-delegate';\nimport { OtlpHttpConfiguration } from './configuration/otlp-http-configuration';\nimport { ISerializer } from '@opentelemetry/otlp-transformer';\nimport { createHttpExporterTransport } from './transport/http-exporter-transport';\nimport { createBoundedQueueExportPromiseHandler } from './bounded-queue-export-promise-handler';\nimport { createRetryingTransport } from './retrying-transport';\n\nexport function createOtlpHttpExportDelegate<Internal, Response>(\n  options: OtlpHttpConfiguration,\n  serializer: ISerializer<Internal, Response>\n): IOtlpExportDelegate<Internal> {\n  return createOtlpExportDelegate(\n    {\n      transport: createRetryingTransport({\n        transport: createHttpExporterTransport(options),\n      }),\n      serializer: serializer,\n      promiseHandler: createBoundedQueueExportPromiseHandler(options),\n    },\n    { timeout: options.timeoutMillis }\n  );\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { OtlpSharedConfiguration } from './shared-configuration';\nimport { diag } from '@opentelemetry/api';\n\nfunction parseAndValidateTimeoutFromEnv(\n  timeoutEnvVar: string\n): number | undefined {\n  const envTimeout = process.env[timeoutEnvVar]?.trim();\n  if (envTimeout != null && envTimeout !== '') {\n    const definedTimeout = Number(envTimeout);\n    if (Number.isFinite(definedTimeout) && definedTimeout > 0) {\n      return definedTimeout;\n    }\n    diag.warn(\n      `Configuration: ${timeoutEnvVar} is invalid, expected number greater than 0 (actual: ${envTimeout})`\n    );\n  }\n  return undefined;\n}\n\nfunction getTimeoutFromEnv(signalIdentifier: string) {\n  const specificTimeout = parseAndValidateTimeoutFromEnv(\n    `OTEL_EXPORTER_OTLP_${signalIdentifier}_TIMEOUT`\n  );\n  const nonSpecificTimeout = parseAndValidateTimeoutFromEnv(\n    'OTEL_EXPORTER_OTLP_TIMEOUT'\n  );\n\n  return specificTimeout ?? nonSpecificTimeout;\n}\n\nfunction parseAndValidateCompressionFromEnv(\n  compressionEnvVar: string\n): 'none' | 'gzip' | undefined {\n  const compression = process.env[compressionEnvVar]?.trim();\n  if (compression === '') {\n    return undefined;\n  }\n\n  if (compression == null || compression === 'none' || compression === 'gzip') {\n    return compression;\n  }\n\n  diag.warn(\n    `Configuration: ${compressionEnvVar} is invalid, expected 'none' or 'gzip' (actual: '${compression}')`\n  );\n  return undefined;\n}\n\nfunction getCompressionFromEnv(\n  signalIdentifier: string\n): 'none' | 'gzip' | undefined {\n  const specificCompression = parseAndValidateCompressionFromEnv(\n    `OTEL_EXPORTER_OTLP_${signalIdentifier}_COMPRESSION`\n  );\n  const nonSpecificCompression = parseAndValidateCompressionFromEnv(\n    'OTEL_EXPORTER_OTLP_COMPRESSION'\n  );\n\n  return specificCompression ?? nonSpecificCompression;\n}\n\nexport function getSharedConfigurationFromEnvironment(\n  signalIdentifier: string\n): Partial<OtlpSharedConfiguration> {\n  return {\n    timeoutMillis: getTimeoutFromEnv(signalIdentifier),\n    compression: getCompressionFromEnv(signalIdentifier),\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\n\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nexport function validateAndNormalizeHeaders(\n  partialHeaders: (() => Record<string, string>) | undefined\n): () => Record<string, string> {\n  return () => {\n    const headers: Record<string, string> = {};\n    Object.entries(partialHeaders?.() ?? {}).forEach(([key, value]) => {\n      if (typeof value !== 'undefined') {\n        headers[key] = String(value);\n      } else {\n        diag.warn(\n          `Header \"${key}\" has invalid value (${value}) and will be ignored`\n        );\n      }\n    });\n    return headers;\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  getSharedConfigurationDefaults,\n  mergeOtlpSharedConfigurationWithDefaults,\n  OtlpSharedConfiguration,\n} from './shared-configuration';\nimport { validateAndNormalizeHeaders } from '../util';\n\n// NOTE: do not change these imports to be actual imports, otherwise they WILL break `@opentelemetry/instrumentation-http`\nimport type * as http from 'http';\nimport type * as https from 'https';\n\nexport interface OtlpHttpConfiguration extends OtlpSharedConfiguration {\n  url: string;\n  headers: () => Record<string, string>;\n  agentOptions: http.AgentOptions | https.AgentOptions;\n}\n\nfunction mergeHeaders(\n  userProvidedHeaders: (() => Record<string, string>) | undefined | null,\n  fallbackHeaders: (() => Record<string, string>) | undefined | null,\n  defaultHeaders: () => Record<string, string>\n): () => Record<string, string> {\n  const requiredHeaders = {\n    ...defaultHeaders(),\n  };\n  const headers = {};\n\n  return () => {\n    // add fallback ones first\n    if (fallbackHeaders != null) {\n      Object.assign(headers, fallbackHeaders());\n    }\n\n    // override with user-provided ones\n    if (userProvidedHeaders != null) {\n      Object.assign(headers, userProvidedHeaders());\n    }\n\n    // override required ones.\n    return Object.assign(headers, requiredHeaders);\n  };\n}\n\nfunction validateUserProvidedUrl(url: string | undefined): string | undefined {\n  if (url == null) {\n    return undefined;\n  }\n  try {\n    new URL(url);\n    return url;\n  } catch (e) {\n    throw new Error(\n      `Configuration: Could not parse user-provided export URL: '${url}'`\n    );\n  }\n}\n\n/**\n * @param userProvidedConfiguration  Configuration options provided by the user in code.\n * @param fallbackConfiguration Fallback to use when the {@link userProvidedConfiguration} does not specify an option.\n * @param defaultConfiguration The defaults as defined by the exporter specification\n */\nexport function mergeOtlpHttpConfigurationWithDefaults(\n  userProvidedConfiguration: Partial<OtlpHttpConfiguration>,\n  fallbackConfiguration: Partial<OtlpHttpConfiguration>,\n  defaultConfiguration: OtlpHttpConfiguration\n): OtlpHttpConfiguration {\n  return {\n    ...mergeOtlpSharedConfigurationWithDefaults(\n      userProvidedConfiguration,\n      fallbackConfiguration,\n      defaultConfiguration\n    ),\n    headers: mergeHeaders(\n      validateAndNormalizeHeaders(userProvidedConfiguration.headers),\n      fallbackConfiguration.headers,\n      defaultConfiguration.headers\n    ),\n    url:\n      validateUserProvidedUrl(userProvidedConfiguration.url) ??\n      fallbackConfiguration.url ??\n      defaultConfiguration.url,\n    agentOptions:\n      userProvidedConfiguration.agentOptions ??\n      fallbackConfiguration.agentOptions ??\n      defaultConfiguration.agentOptions,\n  };\n}\n\nexport function getHttpConfigurationDefaults(\n  requiredHeaders: Record<string, string>,\n  signalResourcePath: string\n): OtlpHttpConfiguration {\n  return {\n    ...getSharedConfigurationDefaults(),\n    headers: () => requiredHeaders,\n    url: 'http://localhost:4318/' + signalResourcePath,\n    agentOptions: { keepAlive: true },\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { parseKeyPairsIntoRecord } from '@opentelemetry/core';\nimport { diag } from '@opentelemetry/api';\nimport { getSharedConfigurationFromEnvironment } from './shared-env-configuration';\nimport { OtlpHttpConfiguration } from './otlp-http-configuration';\nimport { wrapStaticHeadersInFunction } from './shared-configuration';\n\nfunction getStaticHeadersFromEnv(\n  signalIdentifier: string\n): Record<string, string> | undefined {\n  const signalSpecificRawHeaders =\n    process.env[`OTEL_EXPORTER_OTLP_${signalIdentifier}_HEADERS`]?.trim();\n  const nonSignalSpecificRawHeaders =\n    process.env['OTEL_EXPORTER_OTLP_HEADERS']?.trim();\n\n  const signalSpecificHeaders = parseKeyPairsIntoRecord(\n    signalSpecificRawHeaders\n  );\n  const nonSignalSpecificHeaders = parseKeyPairsIntoRecord(\n    nonSignalSpecificRawHeaders\n  );\n\n  if (\n    Object.keys(signalSpecificHeaders).length === 0 &&\n    Object.keys(nonSignalSpecificHeaders).length === 0\n  ) {\n    return undefined;\n  }\n\n  // headers are combined instead of overwritten, with the specific headers taking precedence over\n  // the non-specific ones.\n  return Object.assign(\n    {},\n    parseKeyPairsIntoRecord(nonSignalSpecificRawHeaders),\n    parseKeyPairsIntoRecord(signalSpecificRawHeaders)\n  );\n}\n\nfunction appendRootPathToUrlIfNeeded(url: string): string | undefined {\n  try {\n    const parsedUrl = new URL(url);\n    // This will automatically append '/' if there's no root path.\n    return parsedUrl.toString();\n  } catch {\n    diag.warn(\n      `Configuration: Could not parse environment-provided export URL: '${url}', falling back to undefined`\n    );\n    return undefined;\n  }\n}\n\nfunction appendResourcePathToUrl(\n  url: string,\n  path: string\n): string | undefined {\n  try {\n    // just try to parse, if it fails we catch and warn.\n    new URL(url);\n  } catch {\n    diag.warn(\n      `Configuration: Could not parse environment-provided export URL: '${url}', falling back to undefined`\n    );\n    return undefined;\n  }\n\n  if (!url.endsWith('/')) {\n    url = url + '/';\n  }\n  url += path;\n\n  try {\n    // just try to parse, if it fails we catch and warn.\n    new URL(url);\n  } catch {\n    diag.warn(\n      `Configuration: Provided URL appended with '${path}' is not a valid URL, using 'undefined' instead of '${url}'`\n    );\n    return undefined;\n  }\n\n  return url;\n}\n\nfunction getNonSpecificUrlFromEnv(\n  signalResourcePath: string\n): string | undefined {\n  const envUrl = process.env.OTEL_EXPORTER_OTLP_ENDPOINT?.trim();\n  if (envUrl == null || envUrl === '') {\n    return undefined;\n  }\n  return appendResourcePathToUrl(envUrl, signalResourcePath);\n}\n\nfunction getSpecificUrlFromEnv(signalIdentifier: string): string | undefined {\n  const envUrl =\n    process.env[`OTEL_EXPORTER_OTLP_${signalIdentifier}_ENDPOINT`]?.trim();\n  if (envUrl == null || envUrl === '') {\n    return undefined;\n  }\n  return appendRootPathToUrlIfNeeded(envUrl);\n}\n\n/**\n * Reads and returns configuration from the environment\n *\n * @param signalIdentifier all caps part in environment variables that identifies the signal (e.g.: METRICS, TRACES, LOGS)\n * @param signalResourcePath signal resource path to append if necessary (e.g.: v1/metrics, v1/traces, v1/logs)\n */\nexport function getHttpConfigurationFromEnvironment(\n  signalIdentifier: string,\n  signalResourcePath: string\n): Partial<OtlpHttpConfiguration> {\n  return {\n    ...getSharedConfigurationFromEnvironment(signalIdentifier),\n    url:\n      getSpecificUrlFromEnv(signalIdentifier) ??\n      getNonSpecificUrlFromEnv(signalResourcePath),\n    headers: wrapStaticHeadersInFunction(\n      getStaticHeadersFromEnv(signalIdentifier)\n    ),\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { OTLPExporterNodeConfigBase } from './legacy-node-configuration';\nimport {\n  getHttpConfigurationDefaults,\n  mergeOtlpHttpConfigurationWithDefaults,\n  OtlpHttpConfiguration,\n} from './otlp-http-configuration';\nimport { getHttpConfigurationFromEnvironment } from './otlp-http-env-configuration';\nimport type * as http from 'http';\nimport type * as https from 'https';\nimport { diag } from '@opentelemetry/api';\nimport { wrapStaticHeadersInFunction } from './shared-configuration';\n\nfunction convertLegacyAgentOptions(\n  config: OTLPExporterNodeConfigBase\n): http.AgentOptions | https.AgentOptions | undefined {\n  // populate keepAlive for use with new settings\n  if (config?.keepAlive != null) {\n    if (config.httpAgentOptions != null) {\n      if (config.httpAgentOptions.keepAlive == null) {\n        // specific setting is not set, populate with non-specific setting.\n        config.httpAgentOptions.keepAlive = config.keepAlive;\n      }\n      // do nothing, use specific setting otherwise\n    } else {\n      // populate specific option if AgentOptions does not exist.\n      config.httpAgentOptions = {\n        keepAlive: config.keepAlive,\n      };\n    }\n  }\n\n  return config.httpAgentOptions;\n}\n\n/**\n * @deprecated this will be removed in 2.0\n * @param config\n * @param signalIdentifier\n * @param signalResourcePath\n * @param requiredHeaders\n */\nexport function convertLegacyHttpOptions(\n  config: OTLPExporterNodeConfigBase,\n  signalIdentifier: string,\n  signalResourcePath: string,\n  requiredHeaders: Record<string, string>\n): OtlpHttpConfiguration {\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  if ((config as any).metadata) {\n    diag.warn('Metadata cannot be set when using http');\n  }\n\n  return mergeOtlpHttpConfigurationWithDefaults(\n    {\n      url: config.url,\n      headers: wrapStaticHeadersInFunction(config.headers),\n      concurrencyLimit: config.concurrencyLimit,\n      timeoutMillis: config.timeoutMillis,\n      compression: config.compression,\n      agentOptions: convertLegacyAgentOptions(config),\n    },\n    getHttpConfigurationFromEnvironment(signalIdentifier, signalResourcePath),\n    getHttpConfigurationDefaults(requiredHeaders, signalResourcePath)\n  );\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n  ReadableLogRecord,\n  LogRecordExporter,\n} from '@opentelemetry/sdk-logs';\nimport type { OTLPExporterNodeConfigBase } from '@opentelemetry/otlp-exporter-base';\nimport { OTLPExporterBase } from '@opentelemetry/otlp-exporter-base';\nimport { JsonLogsSerializer } from '@opentelemetry/otlp-transformer';\nimport { VERSION } from '../../version';\nimport {\n  convertLegacyHttpOptions,\n  createOtlpHttpExportDelegate,\n} from '@opentelemetry/otlp-exporter-base/node-http';\n\n/**\n * Collector Logs Exporter for Node\n */\nexport class OTLPLogExporter\n  extends OTLPExporterBase<ReadableLogRecord[]>\n  implements LogRecordExporter\n{\n  constructor(config: OTLPExporterNodeConfigBase = {}) {\n    super(\n      createOtlpHttpExportDelegate(\n        convertLegacyHttpOptions(config, 'LOGS', 'v1/logs', {\n          'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n          'Content-Type': 'application/json',\n        }),\n        JsonLogsSerializer\n      )\n    );\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\nimport type * as logsAPI from '@opentelemetry/api-logs';\nimport { NOOP_LOGGER } from '@opentelemetry/api-logs';\nimport { defaultResource } from '@opentelemetry/resources';\nimport { BindOnceFuture, merge } from '@opentelemetry/core';\n\nimport type { LoggerProviderConfig } from './types';\nimport type { LogRecordProcessor } from './LogRecordProcessor';\nimport { Logger } from './Logger';\nimport { loadDefaultConfig, reconfigureLimits } from './config';\nimport { MultiLogRecordProcessor } from './MultiLogRecordProcessor';\nimport { LoggerProviderSharedState } from './internal/LoggerProviderSharedState';\n\nexport const DEFAULT_LOGGER_NAME = 'unknown';\n\nexport class LoggerProvider implements logsAPI.LoggerProvider {\n  private _shutdownOnce: BindOnceFuture<void>;\n  private readonly _sharedState: LoggerProviderSharedState;\n\n  constructor(config: LoggerProviderConfig = {}) {\n    const mergedConfig = merge({}, loadDefaultConfig(), config);\n    const resource = config.resource ?? defaultResource();\n    this._sharedState = new LoggerProviderSharedState(\n      resource,\n      mergedConfig.forceFlushTimeoutMillis,\n      reconfigureLimits(mergedConfig.logRecordLimits)\n    );\n    this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n  }\n\n  /**\n   * Get a logger with the configuration of the LoggerProvider.\n   */\n  public getLogger(\n    name: string,\n    version?: string,\n    options?: logsAPI.LoggerOptions\n  ): logsAPI.Logger {\n    if (this._shutdownOnce.isCalled) {\n      diag.warn('A shutdown LoggerProvider cannot provide a Logger');\n      return NOOP_LOGGER;\n    }\n\n    if (!name) {\n      diag.warn('Logger requested without instrumentation scope name.');\n    }\n    const loggerName = name || DEFAULT_LOGGER_NAME;\n    const key = `${loggerName}@${version || ''}:${options?.schemaUrl || ''}`;\n    if (!this._sharedState.loggers.has(key)) {\n      this._sharedState.loggers.set(\n        key,\n        new Logger(\n          { name: loggerName, version, schemaUrl: options?.schemaUrl },\n          this._sharedState\n        )\n      );\n    }\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    return this._sharedState.loggers.get(key)!;\n  }\n\n  /**\n   * Adds a new {@link LogRecordProcessor} to this logger.\n   * @param processor the new LogRecordProcessor to be added.\n   */\n  public addLogRecordProcessor(processor: LogRecordProcessor) {\n    if (this._sharedState.registeredLogRecordProcessors.length === 0) {\n      // since we might have enabled by default a batchProcessor, we disable it\n      // before adding the new one\n      this._sharedState.activeProcessor\n        .shutdown()\n        .catch(err =>\n          diag.error(\n            'Error while trying to shutdown current log record processor',\n            err\n          )\n        );\n    }\n    this._sharedState.registeredLogRecordProcessors.push(processor);\n    this._sharedState.activeProcessor = new MultiLogRecordProcessor(\n      this._sharedState.registeredLogRecordProcessors,\n      this._sharedState.forceFlushTimeoutMillis\n    );\n  }\n\n  /**\n   * Notifies all registered LogRecordProcessor to flush any buffered data.\n   *\n   * Returns a promise which is resolved when all flushes are complete.\n   */\n  public forceFlush(): Promise<void> {\n    // do not flush after shutdown\n    if (this._shutdownOnce.isCalled) {\n      diag.warn('invalid attempt to force flush after LoggerProvider shutdown');\n      return this._shutdownOnce.promise;\n    }\n    return this._sharedState.activeProcessor.forceFlush();\n  }\n\n  /**\n   * Flush all buffered data and shut down the LoggerProvider and all registered\n   * LogRecordProcessor.\n   *\n   * Returns a promise which is resolved when all flushes are complete.\n   */\n  public shutdown(): Promise<void> {\n    if (this._shutdownOnce.isCalled) {\n      diag.warn('shutdown may only be called once per LoggerProvider');\n      return this._shutdownOnce.promise;\n    }\n    return this._shutdownOnce.call();\n  }\n\n  private _shutdown(): Promise<void> {\n    return this._sharedState.activeProcessor.shutdown();\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Logger } from './types/Logger';\nimport { LogRecord } from './types/LogRecord';\n\nexport class NoopLogger implements Logger {\n  emit(_logRecord: LogRecord): void {}\n}\n\nexport const NOOP_LOGGER = new NoopLogger();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LoggerProvider } from './types/LoggerProvider';\nimport { Logger } from './types/Logger';\nimport { LoggerOptions } from './types/LoggerOptions';\nimport { NoopLogger } from './NoopLogger';\n\nexport class NoopLoggerProvider implements LoggerProvider {\n  getLogger(\n    _name: string,\n    _version?: string | undefined,\n    _options?: LoggerOptions | undefined\n  ): Logger {\n    return new NoopLogger();\n  }\n}\n\nexport const NOOP_LOGGER_PROVIDER = new NoopLoggerProvider();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NOOP_LOGGER } from './NoopLogger';\nimport { Logger } from './types/Logger';\nimport { LoggerOptions } from './types/LoggerOptions';\nimport { LogRecord } from './types/LogRecord';\n\nexport class ProxyLogger implements Logger {\n  // When a real implementation is provided, this will be it\n  private _delegate?: Logger;\n\n  constructor(\n    private _provider: LoggerDelegator,\n    public readonly name: string,\n    public readonly version?: string | undefined,\n    public readonly options?: LoggerOptions | undefined\n  ) {}\n\n  /**\n   * Emit a log record. This method should only be used by log appenders.\n   *\n   * @param logRecord\n   */\n  emit(logRecord: LogRecord): void {\n    this._getLogger().emit(logRecord);\n  }\n\n  /**\n   * Try to get a logger from the proxy logger provider.\n   * If the proxy logger provider has no delegate, return a noop logger.\n   */\n  private _getLogger() {\n    if (this._delegate) {\n      return this._delegate;\n    }\n    const logger = this._provider.getDelegateLogger(\n      this.name,\n      this.version,\n      this.options\n    );\n    if (!logger) {\n      return NOOP_LOGGER;\n    }\n    this._delegate = logger;\n    return this._delegate;\n  }\n}\n\nexport interface LoggerDelegator {\n  getDelegateLogger(\n    name: string,\n    version?: string,\n    options?: LoggerOptions\n  ): Logger | undefined;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LoggerProvider } from './types/LoggerProvider';\nimport { Logger } from './types/Logger';\nimport { LoggerOptions } from './types/LoggerOptions';\nimport { NOOP_LOGGER_PROVIDER } from './NoopLoggerProvider';\nimport { ProxyLogger } from './ProxyLogger';\n\nexport class ProxyLoggerProvider implements LoggerProvider {\n  private _delegate?: LoggerProvider;\n\n  getLogger(\n    name: string,\n    version?: string | undefined,\n    options?: LoggerOptions | undefined\n  ): Logger {\n    return (\n      this.getDelegateLogger(name, version, options) ??\n      new ProxyLogger(this, name, version, options)\n    );\n  }\n\n  getDelegate(): LoggerProvider {\n    return this._delegate ?? NOOP_LOGGER_PROVIDER;\n  }\n\n  /**\n   * Set the delegate logger provider\n   */\n  setDelegate(delegate: LoggerProvider) {\n    this._delegate = delegate;\n  }\n\n  getDelegateLogger(\n    name: string,\n    version?: string | undefined,\n    options?: LoggerOptions | undefined\n  ): Logger | undefined {\n    return this._delegate?.getLogger(name, version, options);\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexport const _globalThis = typeof globalThis === 'object' ? globalThis : global;\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LoggerProvider } from '../types/LoggerProvider';\nimport { _globalThis } from '../platform';\n\nexport const GLOBAL_LOGS_API_KEY = Symbol.for('io.opentelemetry.js.api.logs');\n\ntype Get<T> = (version: number) => T;\ntype OtelGlobal = Partial<{\n  [GLOBAL_LOGS_API_KEY]: Get<LoggerProvider>;\n}>;\n\nexport const _global = _globalThis as OtelGlobal;\n\n/**\n * Make a function which accepts a version integer and returns the instance of an API if the version\n * is compatible, or a fallback version (usually NOOP) if it is not.\n *\n * @param requiredVersion Backwards compatibility version which is required to return the instance\n * @param instance Instance which should be returned if the required version is compatible\n * @param fallback Fallback instance, usually NOOP, which will be returned if the required version is not compatible\n */\nexport function makeGetter<T>(\n  requiredVersion: number,\n  instance: T,\n  fallback: T\n): Get<T> {\n  return (version: number): T =>\n    version === requiredVersion ? instance : fallback;\n}\n\n/**\n * A number which should be incremented each time a backwards incompatible\n * change is made to the API. This number is used when an API package\n * attempts to access the global API to ensure it is getting a compatible\n * version. If the global API is not compatible with the API package\n * attempting to get it, a NOOP API implementation will be returned.\n */\nexport const API_BACKWARDS_COMPATIBILITY_VERSION = 1;\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n  API_BACKWARDS_COMPATIBILITY_VERSION,\n  GLOBAL_LOGS_API_KEY,\n  _global,\n  makeGetter,\n} from '../internal/global-utils';\nimport { LoggerProvider } from '../types/LoggerProvider';\nimport { NOOP_LOGGER_PROVIDER } from '../NoopLoggerProvider';\nimport { Logger } from '../types/Logger';\nimport { LoggerOptions } from '../types/LoggerOptions';\nimport { ProxyLoggerProvider } from '../ProxyLoggerProvider';\n\nexport class LogsAPI {\n  private static _instance?: LogsAPI;\n\n  private _proxyLoggerProvider = new ProxyLoggerProvider();\n\n  private constructor() {}\n\n  public static getInstance(): LogsAPI {\n    if (!this._instance) {\n      this._instance = new LogsAPI();\n    }\n\n    return this._instance;\n  }\n\n  public setGlobalLoggerProvider(provider: LoggerProvider): LoggerProvider {\n    if (_global[GLOBAL_LOGS_API_KEY]) {\n      return this.getLoggerProvider();\n    }\n\n    _global[GLOBAL_LOGS_API_KEY] = makeGetter<LoggerProvider>(\n      API_BACKWARDS_COMPATIBILITY_VERSION,\n      provider,\n      NOOP_LOGGER_PROVIDER\n    );\n    this._proxyLoggerProvider.setDelegate(provider);\n\n    return provider;\n  }\n\n  /**\n   * Returns the global logger provider.\n   *\n   * @returns LoggerProvider\n   */\n  public getLoggerProvider(): LoggerProvider {\n    return (\n      _global[GLOBAL_LOGS_API_KEY]?.(API_BACKWARDS_COMPATIBILITY_VERSION) ??\n      this._proxyLoggerProvider\n    );\n  }\n\n  /**\n   * Returns a logger from the global logger provider.\n   *\n   * @returns Logger\n   */\n  public getLogger(\n    name: string,\n    version?: string,\n    options?: LoggerOptions\n  ): Logger {\n    return this.getLoggerProvider().getLogger(name, version, options);\n  }\n\n  /** Remove the global logger provider */\n  public disable(): void {\n    delete _global[GLOBAL_LOGS_API_KEY];\n    this._proxyLoggerProvider = new ProxyLoggerProvider();\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { Logger } from './types/Logger';\nexport { LoggerProvider } from './types/LoggerProvider';\nexport {\n  LogAttributes,\n  LogBody,\n  LogRecord,\n  SeverityNumber,\n} from './types/LogRecord';\nexport { LoggerOptions } from './types/LoggerOptions';\nexport { AnyValue, AnyValueMap } from './types/AnyValue';\nexport { NOOP_LOGGER, NoopLogger } from './NoopLogger';\nexport { NOOP_LOGGER_PROVIDER, NoopLoggerProvider } from './NoopLoggerProvider';\nexport { ProxyLogger } from './ProxyLogger';\nexport { ProxyLoggerProvider } from './ProxyLoggerProvider';\n\nimport { LogsAPI } from './api/logs';\nexport const logs = LogsAPI.getInstance();\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type * as logsAPI from '@opentelemetry/api-logs';\nimport type { InstrumentationScope } from '@opentelemetry/core';\nimport { context } from '@opentelemetry/api';\n\nimport { LogRecord } from './LogRecord';\nimport { LoggerProviderSharedState } from './internal/LoggerProviderSharedState';\n\nexport class Logger implements logsAPI.Logger {\n  constructor(\n    public readonly instrumentationScope: InstrumentationScope,\n    private _sharedState: LoggerProviderSharedState\n  ) {}\n\n  public emit(logRecord: logsAPI.LogRecord): void {\n    const currentContext = logRecord.context || context.active();\n    /**\n     * If a Logger was obtained with include_trace_context=true,\n     * the LogRecords it emits MUST automatically include the Trace Context from the active Context,\n     * if Context has not been explicitly set.\n     */\n    const logRecordInstance = new LogRecord(\n      this._sharedState,\n      this.instrumentationScope,\n      {\n        context: currentContext,\n        ...logRecord,\n      }\n    );\n    /**\n     * the explicitly passed Context,\n     * the current Context, or an empty Context if the Logger was obtained with include_trace_context=false\n     */\n    this._sharedState.activeProcessor.onEmit(logRecordInstance, currentContext);\n    /**\n     * A LogRecordProcessor may freely modify logRecord for the duration of the OnEmit call.\n     * If logRecord is needed after OnEmit returns (i.e. for asynchronous processing) only reads are permitted.\n     */\n    logRecordInstance._makeReadonly();\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { AttributeValue, diag } from '@opentelemetry/api';\nimport type * as logsAPI from '@opentelemetry/api-logs';\nimport * as api from '@opentelemetry/api';\nimport {\n  timeInputToHrTime,\n  isAttributeValue,\n  InstrumentationScope,\n} from '@opentelemetry/core';\nimport type { Resource } from '@opentelemetry/resources';\n\nimport type { ReadableLogRecord } from './export/ReadableLogRecord';\nimport type { LogRecordLimits } from './types';\nimport { AnyValue, LogAttributes, LogBody } from '@opentelemetry/api-logs';\nimport { LoggerProviderSharedState } from './internal/LoggerProviderSharedState';\n\nexport class LogRecord implements ReadableLogRecord {\n  readonly hrTime: api.HrTime;\n  readonly hrTimeObserved: api.HrTime;\n  readonly spanContext?: api.SpanContext;\n  readonly resource: Resource;\n  readonly instrumentationScope: InstrumentationScope;\n  readonly attributes: logsAPI.LogAttributes = {};\n  private _severityText?: string;\n  private _severityNumber?: logsAPI.SeverityNumber;\n  private _body?: LogBody;\n  private totalAttributesCount: number = 0;\n\n  private _isReadonly: boolean = false;\n  private readonly _logRecordLimits: Required<LogRecordLimits>;\n\n  set severityText(severityText: string | undefined) {\n    if (this._isLogRecordReadonly()) {\n      return;\n    }\n    this._severityText = severityText;\n  }\n  get severityText(): string | undefined {\n    return this._severityText;\n  }\n\n  set severityNumber(severityNumber: logsAPI.SeverityNumber | undefined) {\n    if (this._isLogRecordReadonly()) {\n      return;\n    }\n    this._severityNumber = severityNumber;\n  }\n  get severityNumber(): logsAPI.SeverityNumber | undefined {\n    return this._severityNumber;\n  }\n\n  set body(body: LogBody | undefined) {\n    if (this._isLogRecordReadonly()) {\n      return;\n    }\n    this._body = body;\n  }\n  get body(): LogBody | undefined {\n    return this._body;\n  }\n\n  get droppedAttributesCount(): number {\n    return this.totalAttributesCount - Object.keys(this.attributes).length;\n  }\n\n  constructor(\n    _sharedState: LoggerProviderSharedState,\n    instrumentationScope: InstrumentationScope,\n    logRecord: logsAPI.LogRecord\n  ) {\n    const {\n      timestamp,\n      observedTimestamp,\n      severityNumber,\n      severityText,\n      body,\n      attributes = {},\n      context,\n    } = logRecord;\n\n    const now = Date.now();\n    this.hrTime = timeInputToHrTime(timestamp ?? now);\n    this.hrTimeObserved = timeInputToHrTime(observedTimestamp ?? now);\n\n    if (context) {\n      const spanContext = api.trace.getSpanContext(context);\n      if (spanContext && api.isSpanContextValid(spanContext)) {\n        this.spanContext = spanContext;\n      }\n    }\n    this.severityNumber = severityNumber;\n    this.severityText = severityText;\n    this.body = body;\n    this.resource = _sharedState.resource;\n    this.instrumentationScope = instrumentationScope;\n    this._logRecordLimits = _sharedState.logRecordLimits;\n    this.setAttributes(attributes);\n  }\n\n  public setAttribute(key: string, value?: AnyValue) {\n    if (this._isLogRecordReadonly()) {\n      return this;\n    }\n    if (value === null) {\n      return this;\n    }\n    if (key.length === 0) {\n      api.diag.warn(`Invalid attribute key: ${key}`);\n      return this;\n    }\n    if (\n      !isAttributeValue(value) &&\n      !(\n        typeof value === 'object' &&\n        !Array.isArray(value) &&\n        Object.keys(value).length > 0\n      )\n    ) {\n      api.diag.warn(`Invalid attribute value set for key: ${key}`);\n      return this;\n    }\n    this.totalAttributesCount += 1;\n    if (\n      Object.keys(this.attributes).length >=\n        this._logRecordLimits.attributeCountLimit &&\n      !Object.prototype.hasOwnProperty.call(this.attributes, key)\n    ) {\n      // This logic is to create drop message at most once per LogRecord to prevent excessive logging.\n      if (this.droppedAttributesCount === 1) {\n        api.diag.warn('Dropping extra attributes.');\n      }\n      return this;\n    }\n    if (isAttributeValue(value)) {\n      this.attributes[key] = this._truncateToSize(value);\n    } else {\n      this.attributes[key] = value;\n    }\n    return this;\n  }\n\n  public setAttributes(attributes: LogAttributes) {\n    for (const [k, v] of Object.entries(attributes)) {\n      this.setAttribute(k, v);\n    }\n    return this;\n  }\n\n  public setBody(body: LogBody) {\n    this.body = body;\n    return this;\n  }\n\n  public setSeverityNumber(severityNumber: logsAPI.SeverityNumber) {\n    this.severityNumber = severityNumber;\n    return this;\n  }\n\n  public setSeverityText(severityText: string) {\n    this.severityText = severityText;\n    return this;\n  }\n\n  /**\n   * @internal\n   * A LogRecordProcessor may freely modify logRecord for the duration of the OnEmit call.\n   * If logRecord is needed after OnEmit returns (i.e. for asynchronous processing) only reads are permitted.\n   */\n  _makeReadonly() {\n    this._isReadonly = true;\n  }\n\n  private _truncateToSize(value: AttributeValue): AttributeValue {\n    const limit = this._logRecordLimits.attributeValueLengthLimit;\n    // Check limit\n    if (limit <= 0) {\n      // Negative values are invalid, so do not truncate\n      api.diag.warn(`Attribute value limit must be positive, got ${limit}`);\n      return value;\n    }\n\n    // String\n    if (typeof value === 'string') {\n      return this._truncateToLimitUtil(value, limit);\n    }\n\n    // Array of strings\n    if (Array.isArray(value)) {\n      return (value as []).map(val =>\n        typeof val === 'string' ? this._truncateToLimitUtil(val, limit) : val\n      );\n    }\n\n    // Other types, no need to apply value length limit\n    return value;\n  }\n\n  private _truncateToLimitUtil(value: string, limit: number): string {\n    if (value.length <= limit) {\n      return value;\n    }\n    return value.substring(0, limit);\n  }\n\n  private _isLogRecordReadonly(): boolean {\n    if (this._isReadonly) {\n      diag.warn('Can not execute the operation on emitted log record');\n    }\n    return this._isReadonly;\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { getNumberFromEnv } from '@opentelemetry/core';\nimport { LogRecordLimits } from './types';\n\nexport function loadDefaultConfig() {\n  return {\n    forceFlushTimeoutMillis: 30000,\n    logRecordLimits: {\n      attributeValueLengthLimit:\n        getNumberFromEnv('OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??\n        Infinity,\n      attributeCountLimit:\n        getNumberFromEnv('OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT') ?? 128,\n    },\n    includeTraceContext: true,\n  };\n}\n\n/**\n * When general limits are provided and model specific limits are not,\n * configures the model specific limits by using the values from the general ones.\n * @param logRecordLimits User provided limits configuration\n */\nexport function reconfigureLimits(\n  logRecordLimits: LogRecordLimits\n): Required<LogRecordLimits> {\n  return {\n    /**\n     * Reassign log record attribute count limit to use first non null value defined by user or use default value\n     */\n    attributeCountLimit:\n      logRecordLimits.attributeCountLimit ??\n      getNumberFromEnv('OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT') ??\n      getNumberFromEnv('OTEL_ATTRIBUTE_COUNT_LIMIT') ??\n      128,\n    /**\n     * Reassign log record attribute value length limit to use first non null value defined by user or use default value\n     */\n    attributeValueLengthLimit:\n      logRecordLimits.attributeValueLengthLimit ??\n      getNumberFromEnv('OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??\n      getNumberFromEnv('OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??\n      Infinity,\n  };\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { callWithTimeout } from '@opentelemetry/core';\nimport type { Context } from '@opentelemetry/api';\nimport type { LogRecordProcessor } from './LogRecordProcessor';\nimport type { LogRecord } from './LogRecord';\n\n/**\n * Implementation of the {@link LogRecordProcessor} that simply forwards all\n * received events to a list of {@link LogRecordProcessor}s.\n */\nexport class MultiLogRecordProcessor implements LogRecordProcessor {\n  constructor(\n    public readonly processors: LogRecordProcessor[],\n    public readonly forceFlushTimeoutMillis: number\n  ) {}\n\n  public async forceFlush(): Promise<void> {\n    const timeout = this.forceFlushTimeoutMillis;\n    await Promise.all(\n      this.processors.map(processor =>\n        callWithTimeout(processor.forceFlush(), timeout)\n      )\n    );\n  }\n\n  public onEmit(logRecord: LogRecord, context?: Context): void {\n    this.processors.forEach(processors =>\n      processors.onEmit(logRecord, context)\n    );\n  }\n\n  public async shutdown(): Promise<void> {\n    await Promise.all(this.processors.map(processor => processor.shutdown()));\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context } from '@opentelemetry/api';\nimport { LogRecordProcessor } from '../LogRecordProcessor';\nimport { ReadableLogRecord } from './ReadableLogRecord';\n\nexport class NoopLogRecordProcessor implements LogRecordProcessor {\n  forceFlush(): Promise<void> {\n    return Promise.resolve();\n  }\n\n  onEmit(_logRecord: ReadableLogRecord, _context: Context): void {}\n\n  shutdown(): Promise<void> {\n    return Promise.resolve();\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Logger } from '@opentelemetry/api-logs';\nimport { Resource } from '@opentelemetry/resources';\nimport { LogRecordProcessor } from '../LogRecordProcessor';\nimport { LogRecordLimits } from '../types';\nimport { NoopLogRecordProcessor } from '../export/NoopLogRecordProcessor';\n\nexport class LoggerProviderSharedState {\n  readonly loggers: Map<string, Logger> = new Map();\n  activeProcessor: LogRecordProcessor;\n  readonly registeredLogRecordProcessors: LogRecordProcessor[] = [];\n\n  constructor(\n    readonly resource: Resource,\n    readonly forceFlushTimeoutMillis: number,\n    readonly logRecordLimits: Required<LogRecordLimits>\n  ) {\n    this.activeProcessor = new NoopLogRecordProcessor();\n  }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExportResult, getNumberFromEnv } from '@opentelemetry/core';\nimport { diag } from '@opentelemetry/api';\nimport {\n  ExportResultCode,\n  globalErrorHandler,\n  unrefTimer,\n  BindOnceFuture,\n  internal,\n  callWithTimeout,\n} from '@opentelemetry/core';\n\nimport type { BufferConfig } from '../types';\nimport type { LogRecord } from '../LogRecord';\nimport type { LogRecordExporter } from './LogRecordExporter';\nimport type { LogRecordProcessor } from '../LogRecordProcessor';\n\nexport abstract class BatchLogRecordProcessorBase<T extends BufferConfig>\n  implements LogRecordProcessor\n{\n  private readonly _maxExportBatchSize: number;\n  private readonly _maxQueueSize: number;\n  private readonly _scheduledDelayMillis: number;\n  private readonly _exportTimeoutMillis: number;\n\n  private _finishedLogRecords: LogRecord[] = [];\n  private _timer: NodeJS.Timeout | undefined;\n  private _shutdownOnce: BindOnceFuture<void>;\n\n  constructor(\n    private readonly _exporter: LogRecordExporter,\n    config?: T\n  ) {\n    this._maxExportBatchSize =\n      config?.maxExportBatchSize ??\n      getNumberFromEnv('OTEL_BLRP_MAX_EXPORT_BATCH_SIZE') ??\n      512;\n    this._maxQueueSize =\n      config?.maxQueueSize ??\n      getNumberFromEnv('OTEL_BLRP_MAX_QUEUE_SIZE') ??\n      2048;\n    this._scheduledDelayMillis =\n      config?.scheduledDelayMillis ??\n      getNumberFromEnv('OTEL_BLRP_SCHEDULE_DELAY') ??\n      5000;\n    this._exportTimeoutMillis =\n      config?.exportTimeoutMillis ??\n      getNumberFromEnv('OTEL_BLRP_EXPORT_TIMEOUT') ??\n      30000;\n\n    this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n\n    if (this._maxExportBatchSize > this._maxQueueSize) {\n      diag.warn(\n        'BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize'\n      );\n      this._maxExportBatchSize = this._maxQueueSize;\n    }\n  }\n\n  public onEmit(logRecord: LogRecord): void {\n    if (this._shutdownOnce.isCalled) {\n      return;\n    }\n    this._addToBuffer(logRecord);\n  }\n\n  public forceFlush(): Promise<void> {\n    if (this._shutdownOnce.isCalled) {\n      return this._shutdownOnce.promise;\n    }\n    return this._flushAll();\n  }\n\n  public shutdown(): Promise<void> {\n    return this._shutdownOnce.call();\n  }\n\n  private async _shutdown(): Promise<void> {\n    this.onShutdown();\n    await this._flushAll();\n    await this._exporter.shutdown();\n  }\n\n  /** Add a LogRecord in the buffer. */\n  private _addToBuffer(logRecord: LogRecord) {\n    if (this._finishedLogRecords.length >= this._maxQueueSize) {\n      return;\n    }\n    this._finishedLogRecords.push(logRecord);\n    this._maybeStartTimer();\n  }\n\n  /**\n   * Send all LogRecords to the exporter respecting the batch size limit\n   * This function is used only on forceFlush or shutdown,\n   * for all other cases _flush should be used\n   * */\n  private _flushAll(): Promise<void> {\n    return new Promise((resolve, reject) => {\n      const promises = [];\n      const batchCount = Math.ceil(\n        this._finishedLogRecords.length / this._maxExportBatchSize\n      );\n      for (let i = 0; i < batchCount; i++) {\n        promises.push(this._flushOneBatch());\n      }\n      Promise.all(promises)\n        .then(() => {\n          resolve();\n        })\n        .catch(reject);\n    });\n  }\n\n  private _flushOneBatch(): Promise<void> {\n    this._clearTimer();\n    if (this._finishedLogRecords.length === 0) {\n      return Promise.resolve();\n    }\n    return new Promise((resolve, reject) => {\n      callWithTimeout(\n        this._export(\n          this._finishedLogRecords.splice(0, this._maxExportBatchSize)\n        ),\n        this._exportTimeoutMillis\n      )\n        .then(() => resolve())\n        .catch(reject);\n    });\n  }\n\n  private _maybeStartTimer() {\n    if (this._timer !== undefined) {\n      return;\n    }\n    this._timer = setTimeout(() => {\n      this._flushOneBatch()\n        .then(() => {\n          if (this._finishedLogRecords.length > 0) {\n            this._clearTimer();\n            this._maybeStartTimer();\n          }\n        })\n        .catch(e => {\n          globalErrorHandler(e);\n        });\n    }, this._scheduledDelayMillis);\n    unrefTimer(this._timer);\n  }\n\n  private _clearTimer() {\n    if (this._timer !== undefined) {\n      clearTimeout(this._timer);\n      this._timer = undefined;\n    }\n  }\n\n  private _export(logRecords: LogRecord[]): Promise<void> {\n    const doExport = () =>\n      internal\n        ._export(this._exporter, logRecords)\n        .then((result: ExportResult) => {\n          if (result.code !== ExportResultCode.SUCCESS) {\n            globalErrorHandler(\n              result.error ??\n                new Error(\n                  `BatchLogRecordProcessor: log record export failed (status ${result})`\n                )\n            );\n          }\n        })\n        .catch(globalErrorHandler);\n\n    const pendingResources = logRecords\n      .map(logRecord => logRecord.resource)\n      .filter(resource => resource.asyncAttributesPending);\n\n    // Avoid scheduling a promise to make the behavior more predictable and easier to test\n    if (pendingResources.length === 0) {\n      return doExport();\n    } else {\n      return Promise.all(\n        pendingResources.map(resource => resource.waitForAsyncAttributes?.())\n      ).then(doExport, globalErrorHandler);\n    }\n  }\n\n  protected abstract onShutdown(): void;\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { BufferConfig } from '../../../types';\nimport { BatchLogRecordProcessorBase } from '../../../export/BatchLogRecordProcessorBase';\n\nexport class BatchLogRecordProcessor extends BatchLogRecordProcessorBase<BufferConfig> {\n  protected onShutdown(): void {}\n}\n","{\n  \"name\": \"@safaricom-mxl/logger\",\n  \"author\": \"Francis Masha <fkonde@safaricom.co.ke>\",\n  \"license\": \"MIT\",\n  \"version\": \"0.0.49\",\n  \"description\": \"\",\n  \"sideEffects\": false,\n  \"type\": \"module\",\n  \"main\": \"dist/index.js\",\n  \"module\": \"dist/index.js\",\n  \"types\": \"dist/index.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"import\": \"./dist/index.js\"\n    }\n  },\n  \"files\": [\"dist\", \"README.md\"],\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"scripts\": {\n    \"clean\": \"git clean -xdf .turbo node_modules coverage dist tmp\",\n    \"prebuild\": \"rimraf coverage dist tmp\",\n    \"build\": \"tsup\",\n    \"check-exports\": \"attw --pack .\",\n    \"format\": \"biome format .\",\n    \"lint\": \"biome check .\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"ci:lint\": \"pnpm lint && pnpm tsc --noEmit\",\n    \"unit-test\": \"vitest --run\",\n    \"unit-test-coverage\": \"vitest --run --coverage\",\n    \"unit-test-watch\": \"vitest\"\n  },\n  \"dependencies\": {\n    \"@opentelemetry/api\": \"^1.9.0\",\n    \"@opentelemetry/api-logs\": \"^0.200.0\",\n    \"@opentelemetry/core\": \"^2.0.0\",\n    \"@opentelemetry/exporter-logs-otlp-http\": \"^0.200.0\",\n    \"@opentelemetry/resources\": \"^2.0.0\",\n    \"@opentelemetry/sdk-logs\": \"^0.200.0\",\n    \"@opentelemetry/semantic-conventions\": \"^1.30.0\",\n    \"debug\": \"^4.4.0\",\n    \"json-stringify-safe\": \"^5.0.1\",\n    \"pino-abstract-transport\": \"^2.0.0\",\n    \"winston\": \"^3.17.0\",\n    \"winston-transport\": \"^4.9.0\"\n  },\n  \"devDependencies\": {\n    \"@types/debug\": \"^4.1.12\",\n    \"@types/json-stringify-safe\": \"^5.0.3\",\n    \"pino\": \"^9.6.0\",\n    \"rimraf\": \"^6.0.1\",\n    \"vite-tsconfig-paths\": \"^5.1.4\",\n    \"vitest\": \"^3.0.9\"\n  },\n  \"keywords\": [\"winston\", \"transport\", \"nest\", \"logging\"]\n}\n","import debug from 'debug'\n\nimport { name as PKG_NAME, version as PKG_VERSION } from '../package.json'\n\nexport const LOG_PREFIX = `[${PKG_NAME} v${PKG_VERSION}]`\n\nexport default (message: string) =>\n  debug('@safaricom-mxl')(`${LOG_PREFIX} ${message}`)\n","import {\n  type Attributes,\n  context,\n  isSpanContextValid,\n  trace,\n} from '@opentelemetry/api'\nimport build from 'pino-abstract-transport'\n\nimport mxl from './debug'\nimport type { LoggerOptions } from './logger'\nimport { Logger } from './logger'\nimport { isString, jsonToString } from './utils'\n\nexport type PinoLogLine = {\n  level: number\n  time: number\n  pid: number\n  hostname: string\n  msg: string\n} & Attributes\n\nexport const parsePinoLog = (log: PinoLogLine) => {\n  const { level, msg, message, ...meta } = log\n  const targetMessage = msg || message\n  let bodyMsg = ''\n  if (targetMessage) {\n    bodyMsg = isString(targetMessage)\n      ? targetMessage\n      : jsonToString(targetMessage)\n  } else {\n    bodyMsg = jsonToString(log)\n  }\n  return {\n    level,\n    message: bodyMsg,\n    meta,\n  }\n}\n\n// map pino level to text\nconst PINO_LEVELS = {\n  10: 'trace',\n  20: 'debug',\n  30: 'info',\n  40: 'warn',\n  50: 'error',\n  60: 'fatal',\n}\n\nexport type MXLPinoOptions = LoggerOptions & {\n  apiKey?: string\n  getCustomMeta?: () => Attributes\n}\n\n// https://github.com/open-telemetry/opentelemetry-js-contrib/blob/65bc979f9f04410e9a78b4d546f5e08471c1fb6d/plugins/node/opentelemetry-instrumentation-pino/src/instrumentation.ts#L167C11-L167C30\nconst DEFAULT_LOG_KEYS = {\n  traceId: 'trace_id',\n  spanId: 'span_id',\n  traceFlags: 'trace_flags',\n}\nexport const getMixinFunction = () => {\n  const span = trace.getSpan(context.active())\n  if (!span) {\n    return {}\n  }\n\n  const spanContext = span.spanContext()\n\n  if (!isSpanContextValid(spanContext)) {\n    return {}\n  }\n  return {\n    [DEFAULT_LOG_KEYS.traceId]: spanContext.traceId,\n    [DEFAULT_LOG_KEYS.spanId]: spanContext.spanId,\n    [DEFAULT_LOG_KEYS.traceFlags]: `0${spanContext.traceFlags.toString(16)}`,\n  }\n}\n\nexport default ({ apiKey, getCustomMeta, ...options }: MXLPinoOptions) => {\n  try {\n    mxl('Initializing MXL pino transport...')\n    const logger = new Logger({\n      ...(apiKey && {\n        headers: {\n          Authorization: apiKey,\n        },\n      }),\n      ...options,\n    })\n    mxl('MXL pino transport initialized!')\n    return build(\n      async (source) => {\n        for await (const obj of source) {\n          const { level, message, meta } = parsePinoLog(obj)\n          mxl('Sending log to MXL')\n          logger.postMessage(PINO_LEVELS[level], message, {\n            ...getCustomMeta?.(),\n            ...meta,\n          })\n          mxl('Log sent to MXL')\n        }\n      },\n      {\n        async close(_err) {\n          mxl('Sending and closing MXL pino transport...')\n          await logger.shutdown()\n          mxl('MXL pino transport closed!')\n        },\n      }\n    )\n  } catch (err) {\n    console.error('createTransport error', err)\n  }\n}\n","import { diag } from '@opentelemetry/api'\nimport stringifySafe from 'json-stringify-safe'\n\nexport function isString(value: unknown): value is string {\n  return typeof value === 'string' || value instanceof String\n}\n\nexport function isPlainObject(value: any): boolean {\n  // Check if the value is null or not an object\n  if (value === null || typeof value !== 'object') {\n    return false\n  }\n\n  // Get the prototype of the value\n  const proto = Object.getPrototypeOf(value)\n\n  // Check if it's null (for Object.create(null)) or if it's the root Object.prototype\n  if (proto === null) {\n    return true\n  }\n\n  // Check if the constructor is Object and the prototype is Object.prototype\n  const Ctor =\n    Object.hasOwnProperty.call(proto, 'constructor') && proto.constructor\n  return (\n    typeof Ctor === 'function' &&\n    Ctor instanceof Ctor &&\n    Function.prototype.toString.call(Ctor) ===\n      Function.prototype.toString.call(Object)\n  )\n}\n\nexport function isObject(value: any): boolean {\n  const type = typeof value\n  return value != null && (type === 'object' || type === 'function')\n}\n\nexport const jsonToString = (json: any) => {\n  try {\n    return JSON.stringify(json)\n  } catch (e) {\n    diag.error('Failed to stringify json', e)\n    return stringifySafe(json)\n  }\n}\n","import type { Attributes } from '@opentelemetry/api'\nimport WinstonTransport from 'winston-transport'\n\nimport mxl from './debug'\nimport type { LoggerOptions } from './logger'\nimport { Logger } from './logger'\nimport { isPlainObject, isString, jsonToString } from './utils'\n\nexport const parseWinstonLog = (\n  log: {\n    message: string | Attributes\n    level: string\n  } & Attributes\n) => {\n  const { level, message, ...attributes } = log\n  const bodyMsg = isString(message) ? message : jsonToString(message)\n\n  let meta = attributes\n\n  if (isPlainObject(message)) {\n    // FIXME: attributes conflict ??\n    meta = {\n      ...attributes,\n      ...(message as Attributes),\n    }\n  }\n\n  return {\n    level,\n    message: bodyMsg,\n    meta,\n  }\n}\n\nexport type MXLWinstonOptions = LoggerOptions & {\n  apiKey?: string\n  maxLevel?: string\n  getCustomMeta?: () => Attributes\n}\n\nexport default class MXLWinston extends WinstonTransport {\n  private readonly logger: Logger\n\n  private readonly getCustomMeta: () => Attributes\n\n  constructor({\n    maxLevel,\n    getCustomMeta,\n    apiKey,\n    ...options\n  }: MXLWinstonOptions) {\n    mxl('Initializing MXL winston transport')\n    super({ level: maxLevel ?? 'info' })\n    this.getCustomMeta = getCustomMeta!\n    this.logger = new Logger({\n      ...(apiKey && {\n        headers: {\n          Authorization: apiKey,\n        },\n      }),\n      ...options,\n    })\n    mxl('MXL winston transport initialized!')\n  }\n\n  override log(\n    info: { message: string | Attributes; level: string } & Attributes,\n    callback: () => void\n  ) {\n    setImmediate(() => {\n      this.emit('logged', info)\n    })\n\n    mxl('Received log from winston')\n\n    const { level, message, meta } = parseWinstonLog(info)\n    mxl('Sending log to MXL')\n    this.logger.postMessage(level, message, {\n      ...this.getCustomMeta?.(),\n      ...meta,\n    })\n    mxl('Log sent to MXL')\n\n    callback()\n  }\n\n  override close() {\n    mxl('Closing MXL winston transport')\n    this.logger\n      .shutdown()\n      .then(() => {\n        mxl('MXL winston transport closed!')\n        this.emit('finish')\n        this.emit('close')\n      })\n      .catch((err) => {\n        console.error('Error closing MXL winston transport:', err)\n      })\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;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ACf,kBAAI,+BAA+B;AACnC,SAAK,OACF,SAAS,EACT,KAAK,MAAM;AACV,oBAAI,+BAA+B;AACnC,WAAK,KAAK,QAAQ;AAClB,WAAK,KAAK,OAAO;AAAA,IACnB,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,cAAQ,MAAM,wCAAwC,GAAG;AAAA,IAC3D,CAAC;AAAA,EACL;AACF;","names":["isCompatible","diag","_a","DiagComponentLogger","DiagLogLevel","DiagAPI","__spreadArray","__read","_a","BaseContext","context","DiagConsoleLogger","NoopContextManager","__spreadArray","__read","API_NAME","init_context","ContextAPI","context","_a","__spreadArray","__read","TraceFlags","NonRecordingSpan","context","_a","init_context","init_context","NoopTracer","name","context","ProxyTracer","name","version","context","NoopTracerProvider","ProxyTracerProvider","name","version","_a","init_context","diag","API_NAME","TraceAPI","name","version","init_types","diag","getMachineId","fs","diag","getMachineId","fs","diag","import_fs","getMachineId","diag","process","getMachineId","diag","request","Agent","init_types","Logger","_a","context","diag","diag","VERSION","VERSION","ExportResultCode","diag","init_types","diag","diag","hrTime","_a","name","version","_a","_a","diag","diag","diag","name","process","getMachineId","getMachineId","import_os","userInfo","diag","request","VERSION","sendWithHttp","createHttpAgent","_a","_a","diag","_a","diag","_a","_a","diag","diag","VERSION","name","version","name","version","_a","_globalThis","_global","_globalThis","version","_global","_a","name","version","context","diag","_a","context","_a","name","version","diag","_a","diag","debug","diag","_a","LOG_PREFIX","Logger","detectResources","isPlainObject","diag","stringifySafe","Logger","build","isPlainObject","WinstonTransport","Logger","_a"]}