{"version":3,"file":"ai21-jMBxFx_D.js","sources":["../../node_modules/@amplitude/experiment-core/dist/experiment-core.esm.js","../../node_modules/@amplitude/ua-parser-js/src/ua-parser.js","../../node_modules/@amplitude/experiment-js-client/dist/experiment.esm.js","../../node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.js","../../node_modules/@opentelemetry/api/build/esm/version.js","../../node_modules/@opentelemetry/api/build/esm/internal/semver.js","../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js","../../node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js","../../node_modules/@opentelemetry/api/build/esm/diag/types.js","../../node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js","../../node_modules/@opentelemetry/api/build/esm/api/diag.js","../../node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js","../../node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js","../../node_modules/@opentelemetry/api/build/esm/baggage/utils.js","../../node_modules/@opentelemetry/api/build/esm/context/context.js","../../node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js","../../node_modules/@opentelemetry/api/build/esm/metrics/Metric.js","../../node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js","../../node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js","../../node_modules/@opentelemetry/api/build/esm/api/context.js","../../node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js","../../node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js","../../node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js","../../node_modules/@opentelemetry/api/build/esm/trace/context-utils.js","../../node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js","../../node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js","../../node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js","../../node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js","../../node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js","../../node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js","../../node_modules/@opentelemetry/api/build/esm/trace/span_kind.js","../../node_modules/@opentelemetry/api/build/esm/trace/status.js","../../node_modules/@opentelemetry/api/build/esm/context-api.js","../../node_modules/@opentelemetry/api/build/esm/diag-api.js","../../node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js","../../node_modules/@opentelemetry/api/build/esm/api/metrics.js","../../node_modules/@opentelemetry/api/build/esm/metrics-api.js","../../node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js","../../node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js","../../node_modules/@opentelemetry/api/build/esm/api/propagation.js","../../node_modules/@opentelemetry/api/build/esm/propagation-api.js","../../node_modules/@opentelemetry/api/build/esm/api/trace.js","../../node_modules/@opentelemetry/api/build/esm/trace-api.js","../../node_modules/@opentelemetry/api/build/esm/index.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/export/AggregationTemporality.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricData.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/utils.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/types.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/Drop.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/InstrumentDescriptor.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/Histogram.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/Buckets.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/ieee754.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/util.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/types.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/ExponentMapping.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/LogarithmMapping.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/getMapping.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/ExponentialHistogram.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/version.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/platform/browser/sdk-info.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/common/time.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/ExportResult.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/internal/exporter.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/build/esm/index.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/LastValue.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/Sum.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/view/Aggregation.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/export/AggregationSelector.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReader.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/export/PeriodicExportingMetricReader.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources/build/esm/platform/browser/default-service-name.js","../../node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/resources/build/esm/Resource.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/view/ViewRegistry.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/Instruments.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/Meter.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/MetricStorage.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/HashMap.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/DeltaMetricProcessor.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/TemporalMetricProcessor.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/AsyncMetricStorage.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/view/RegistrationConflicts.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/MetricStorageRegistry.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/MultiWritableMetricStorage.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/ObservableResult.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/ObservableRegistry.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/SyncMetricStorage.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/view/AttributesProcessor.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/MeterSharedState.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/MeterProviderSharedState.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/state/MetricCollector.js","../../node_modules/@opentelemetry/sdk-metrics/build/esm/MeterProvider.js","../../node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js","../../node_modules/@opentelemetry/core/build/esm/baggage/constants.js","../../node_modules/@opentelemetry/core/build/esm/baggage/utils.js","../../node_modules/@opentelemetry/core/build/esm/common/attributes.js","../../node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js","../../node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js","../../node_modules/@opentelemetry/core/build/esm/utils/sampling.js","../../node_modules/@opentelemetry/core/build/esm/platform/browser/globalThis.js","../../node_modules/@opentelemetry/core/build/esm/utils/environment.js","../../node_modules/@opentelemetry/core/build/esm/platform/browser/environment.js","../../node_modules/@opentelemetry/core/build/esm/common/hex-to-binary.js","../../node_modules/@opentelemetry/core/build/esm/platform/browser/performance.js","../../node_modules/@opentelemetry/core/build/esm/version.js","../../node_modules/@opentelemetry/semantic-conventions/build/esm/internal/utils.js","../../node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js","../../node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js","../../node_modules/@opentelemetry/core/build/esm/platform/browser/sdk-info.js","../../node_modules/@opentelemetry/core/build/esm/common/time.js","../../node_modules/@opentelemetry/core/build/esm/ExportResult.js","../../node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js","../../node_modules/@opentelemetry/core/build/esm/utils/lodash.merge.js","../../node_modules/@opentelemetry/core/build/esm/utils/merge.js","../../node_modules/@opentelemetry/core/build/esm/utils/timeout.js","../../node_modules/@opentelemetry/core/build/esm/utils/url.js","../../node_modules/@opentelemetry/core/build/esm/utils/promise.js","../../node_modules/@opentelemetry/core/build/esm/utils/callback.js","../../node_modules/@opentelemetry/core/build/esm/internal/exporter.js","../../node_modules/@opentelemetry/core/build/esm/index.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/export/AggregationTemporality.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricData.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/utils.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/types.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/Drop.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/InstrumentDescriptor.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/Histogram.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/Buckets.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/ieee754.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/util.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/types.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/ExponentMapping.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/LogarithmMapping.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/exponential-histogram/mapping/getMapping.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/ExponentialHistogram.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/LastValue.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/aggregator/Sum.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/build/esm/view/Aggregation.js","../../node_modules/@opentelemetry/resources/build/esm/platform/browser/default-service-name.js","../../node_modules/@opentelemetry/resources/build/esm/Resource.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/OTLPMetricExporterOptions.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/OTLPMetricExporterBase.js","../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/util.js","../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/OTLPExporterBase.js","../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/types.js","../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/platform/browser/util.js","../../node_modules/@opentelemetry/otlp-exporter-base/build/esm/platform/browser/OTLPExporterBrowserBase.js","../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/index.js","../../node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js","../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js","../../node_modules/@opentelemetry/otlp-transformer/build/esm/trace/index.js","../../node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-metrics/build/esm/export/AggregationTemporality.js","../../node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricData.js","../../node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/internal.js","../../node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/index.js","../../node_modules/@opentelemetry/otlp-transformer/build/esm/logs/index.js","../../node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/platform/browser/OTLPMetricExporter.js","../../node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js","../../node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/browser/export/BatchSpanProcessor.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/baggage/constants.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/baggage/utils.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/common/attributes.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/utils/sampling.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/utils/environment.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/platform/browser/globalThis.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/platform/browser/environment.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/platform/browser/performance.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/version.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/semantic-conventions/build/esm/resource/SemanticResourceAttributes.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/platform/browser/sdk-info.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/common/time.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/ExportResult.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/propagation/composite.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/internal/validators.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/utils/lodash.merge.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/utils/merge.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/utils/promise.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/core/build/esm/utils/callback.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/enums.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/Sampler.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOffSampler.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOnSampler.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/TraceIdRatioBasedSampler.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/config.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/utility.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/browser/export/BatchSpanProcessor.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/browser/RandomIdGenerator.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/resources/build/esm/platform/browser/default-service-name.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/resources/build/esm/Resource.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/NoopSpanProcessor.js","../../node_modules/@opentelemetry/sdk-trace-web/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js","../../node_modules/@opentelemetry/sdk-trace-web/build/esm/StackContextManager.js","../../node_modules/@opentelemetry/sdk-trace-web/build/esm/WebTracerProvider.js","../../node_modules/@opentelemetry/sdk-trace-web/build/esm/enums/PerformanceTimingNames.js","../../node_modules/@opentelemetry/sdk-trace-web/build/esm/utils.js","../../node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/browser/OTLPTraceExporter.js","../../node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/platform/config.js","../../node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/platform/browser/OTLPLogExporter.js","../../node_modules/@opentelemetry/api-logs/build/esm/types/LogRecord.js","../../node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/LogRecord.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/Logger.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/config.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/MultiLogRecordProcessor.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/export/NoopLogRecordProcessor.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/internal/LoggerProviderSharedState.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/LoggerProvider.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/export/BatchLogRecordProcessorBase.js","../../node_modules/@opentelemetry/sdk-logs/build/esm/platform/browser/export/BatchLogRecordProcessor.js","../../node_modules/@ai21/telemetry/dist/esm/ai21-logger.js","../../node_modules/@opentelemetry/instrumentation/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.js","../../node_modules/@opentelemetry/instrumentation/node_modules/@opentelemetry/api-logs/build/esm/NoopLoggerProvider.js","../../node_modules/@opentelemetry/instrumentation/node_modules/@opentelemetry/api-logs/build/esm/platform/browser/globalThis.js","../../node_modules/@opentelemetry/instrumentation/node_modules/@opentelemetry/api-logs/build/esm/internal/global-utils.js","../../node_modules/@opentelemetry/instrumentation/node_modules/@opentelemetry/api-logs/build/esm/api/logs.js","../../node_modules/@opentelemetry/instrumentation/node_modules/@opentelemetry/api-logs/build/esm/index.js","../../node_modules/@opentelemetry/instrumentation/build/esm/autoLoaderUtils.js","../../node_modules/@opentelemetry/instrumentation/build/esm/autoLoader.js","../../node_modules/shimmer/index.js","../../node_modules/@opentelemetry/instrumentation/build/esm/instrumentation.js","../../node_modules/@opentelemetry/instrumentation/build/esm/platform/browser/instrumentation.js","../../node_modules/@opentelemetry/instrumentation/build/esm/utils.js","../../node_modules/@opentelemetry/instrumentation-document-load/build/esm/enums/AttributeNames.js","../../node_modules/@opentelemetry/instrumentation-document-load/build/esm/version.js","../../node_modules/@opentelemetry/instrumentation-document-load/build/esm/enums/EventNames.js","../../node_modules/@opentelemetry/instrumentation-document-load/build/esm/utils.js","../../node_modules/@opentelemetry/instrumentation-document-load/build/esm/instrumentation.js","../../node_modules/@opentelemetry/instrumentation-fetch/node_modules/@opentelemetry/sdk-trace-web/build/esm/enums/PerformanceTimingNames.js","../../node_modules/@opentelemetry/instrumentation-fetch/node_modules/@opentelemetry/sdk-trace-web/build/esm/utils.js","../../node_modules/@opentelemetry/instrumentation-fetch/build/esm/enums/AttributeNames.js","../../node_modules/@opentelemetry/instrumentation-fetch/build/esm/version.js","../../node_modules/@opentelemetry/instrumentation-fetch/build/esm/fetch.js","../../node_modules/@opentelemetry/instrumentation-user-interaction/build/esm/enums/AttributeNames.js","../../node_modules/@opentelemetry/instrumentation-user-interaction/build/esm/version.js","../../node_modules/@opentelemetry/instrumentation-user-interaction/build/esm/instrumentation.js","../../node_modules/@opentelemetry/instrumentation-xml-http-request/node_modules/@opentelemetry/sdk-trace-web/build/esm/enums/PerformanceTimingNames.js","../../node_modules/@opentelemetry/instrumentation-xml-http-request/node_modules/@opentelemetry/sdk-trace-web/build/esm/utils.js","../../node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/enums/EventNames.js","../../node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/version.js","../../node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/enums/AttributeNames.js","../../node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/xhr.js","../../node_modules/@opentelemetry/auto-instrumentations-web/build/esm/utils.js","../../node_modules/@ai21/telemetry/dist/esm/custom-fetch-log-exporter.js","../../node_modules/@ai21/telemetry/dist/esm/ai21-open-telemetry.js","../../node_modules/@ai21/experiments/dist/esm/TelemetryClient.js","../../node_modules/@ai21/experiments/dist/esm/AmplitudeExperimentProvider.js","../../node_modules/@ai21/experiments/dist/esm/utils/counters.js","../../node_modules/@ai21/experiments/dist/esm/VariantsClient.js","../../node_modules/@ai21/experiments/dist/esm/ExperimentClient.js"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nfunction __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nfunction __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nvar EvaluationOperator = {\n IS: 'is',\n IS_NOT: 'is not',\n CONTAINS: 'contains',\n DOES_NOT_CONTAIN: 'does not contain',\n LESS_THAN: 'less',\n LESS_THAN_EQUALS: 'less or equal',\n GREATER_THAN: 'greater',\n GREATER_THAN_EQUALS: 'greater or equal',\n VERSION_LESS_THAN: 'version less',\n VERSION_LESS_THAN_EQUALS: 'version less or equal',\n VERSION_GREATER_THAN: 'version greater',\n VERSION_GREATER_THAN_EQUALS: 'version greater or equal',\n SET_IS: 'set is',\n SET_IS_NOT: 'set is not',\n SET_CONTAINS: 'set contains',\n SET_DOES_NOT_CONTAIN: 'set does not contain',\n SET_CONTAINS_ANY: 'set contains any',\n SET_DOES_NOT_CONTAIN_ANY: 'set does not contain any',\n REGEX_MATCH: 'regex match',\n REGEX_DOES_NOT_MATCH: 'regex does not match',\n};\n\nvar stringToUtf8ByteArray = function (str) {\n var out = [];\n var p = 0;\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c < 128) {\n out[p++] = c;\n }\n else if (c < 2048) {\n out[p++] = (c >> 6) | 192;\n out[p++] = (c & 63) | 128;\n }\n else if ((c & 0xfc00) == 0xd800 &&\n i + 1 < str.length &&\n (str.charCodeAt(i + 1) & 0xfc00) == 0xdc00) {\n // Surrogate Pair\n c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);\n out[p++] = (c >> 18) | 240;\n out[p++] = ((c >> 12) & 63) | 128;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n else {\n out[p++] = (c >> 12) | 224;\n out[p++] = ((c >> 6) & 63) | 128;\n out[p++] = (c & 63) | 128;\n }\n }\n return Uint8Array.from(out);\n};\n\nvar C1_32 = -0x3361d2af;\nvar C2_32 = 0x1b873593;\nvar R1_32 = 15;\nvar R2_32 = 13;\nvar M_32 = 5;\nvar N_32 = -0x19ab949c;\nvar hash32x86 = function (input, seed) {\n if (seed === void 0) { seed = 0; }\n var data = stringToUtf8ByteArray(input);\n var length = data.length;\n var nBlocks = length >> 2;\n var hash = seed;\n // body\n for (var i = 0; i < nBlocks; i++) {\n var index_1 = i << 2;\n var k = readIntLe(data, index_1);\n hash = mix32(k, hash);\n }\n // tail\n var index = nBlocks << 2;\n var k1 = 0;\n switch (length - index) {\n case 3:\n k1 ^= data[index + 2] << 16;\n k1 ^= data[index + 1] << 8;\n k1 ^= data[index];\n k1 = Math.imul(k1, C1_32);\n k1 = rotateLeft(k1, R1_32);\n k1 = Math.imul(k1, C2_32);\n hash ^= k1;\n break;\n case 2:\n k1 ^= data[index + 1] << 8;\n k1 ^= data[index];\n k1 = Math.imul(k1, C1_32);\n k1 = rotateLeft(k1, R1_32);\n k1 = Math.imul(k1, C2_32);\n hash ^= k1;\n break;\n case 1:\n k1 ^= data[index];\n k1 = Math.imul(k1, C1_32);\n k1 = rotateLeft(k1, R1_32);\n k1 = Math.imul(k1, C2_32);\n hash ^= k1;\n break;\n }\n hash ^= length;\n return fmix32(hash) >>> 0;\n};\nvar mix32 = function (k, hash) {\n var kResult = k;\n var hashResult = hash;\n kResult = Math.imul(kResult, C1_32);\n kResult = rotateLeft(kResult, R1_32);\n kResult = Math.imul(kResult, C2_32);\n hashResult ^= kResult;\n hashResult = rotateLeft(hashResult, R2_32);\n hashResult = Math.imul(hashResult, M_32);\n return (hashResult + N_32) | 0;\n};\nvar fmix32 = function (hash) {\n var hashResult = hash;\n hashResult ^= hashResult >>> 16;\n hashResult = Math.imul(hashResult, -0x7a143595);\n hashResult ^= hashResult >>> 13;\n hashResult = Math.imul(hashResult, -0x3d4d51cb);\n hashResult ^= hashResult >>> 16;\n return hashResult;\n};\nvar rotateLeft = function (x, n, width) {\n if (width === void 0) { width = 32; }\n if (n > width)\n n = n % width;\n var mask = (0xffffffff << (width - n)) >>> 0;\n var r = (((x & mask) >>> 0) >>> (width - n)) >>> 0;\n return ((x << n) | r) >>> 0;\n};\nvar readIntLe = function (data, index) {\n if (index === void 0) { index = 0; }\n var n = (data[index] << 24) |\n (data[index + 1] << 16) |\n (data[index + 2] << 8) |\n data[index + 3];\n return reverseBytes(n);\n};\nvar reverseBytes = function (n) {\n return (((n & -0x1000000) >>> 24) |\n ((n & 0x00ff0000) >>> 8) |\n ((n & 0x0000ff00) << 8) |\n ((n & 0x000000ff) << 24));\n};\n\nvar select = function (selectable, selector) {\n var e_1, _a;\n if (!selector || selector.length === 0) {\n return undefined;\n }\n try {\n for (var selector_1 = __values(selector), selector_1_1 = selector_1.next(); !selector_1_1.done; selector_1_1 = selector_1.next()) {\n var selectorElement = selector_1_1.value;\n if (!selectorElement || !selectable || typeof selectable !== 'object') {\n return undefined;\n }\n selectable = selectable[selectorElement];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (selector_1_1 && !selector_1_1.done && (_a = selector_1.return)) _a.call(selector_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (!selectable) {\n return undefined;\n }\n else {\n return selectable;\n }\n};\n\n// major and minor should be non-negative numbers separated by a dot\nvar MAJOR_MINOR_REGEX = '(\\\\d+)\\\\.(\\\\d+)';\n// patch should be a non-negative number\nvar PATCH_REGEX = '(\\\\d+)';\n// prerelease is optional. If provided, it should be a hyphen followed by a\n// series of dot separated identifiers where an identifer can contain anything in [-0-9a-zA-Z]\nvar PRERELEASE_REGEX = '(-(([-\\\\w]+\\\\.?)*))?';\n// version pattern should be major.minor(.patchAndPreRelease) where .patchAndPreRelease is optional\nvar VERSION_PATTERN = \"^\".concat(MAJOR_MINOR_REGEX, \"(\\\\.\").concat(PATCH_REGEX).concat(PRERELEASE_REGEX, \")?$\");\nvar SemanticVersion = /** @class */ (function () {\n function SemanticVersion(major, minor, patch, preRelease) {\n if (preRelease === void 0) { preRelease = undefined; }\n this.major = major;\n this.minor = minor;\n this.patch = patch;\n this.preRelease = preRelease;\n }\n SemanticVersion.parse = function (version) {\n if (!version) {\n return undefined;\n }\n var matchGroup = new RegExp(VERSION_PATTERN).exec(version);\n if (!matchGroup) {\n return undefined;\n }\n var major = Number(matchGroup[1]);\n var minor = Number(matchGroup[2]);\n if (isNaN(major) || isNaN(minor)) {\n return undefined;\n }\n var patch = Number(matchGroup[4]) || 0;\n var preRelease = matchGroup[5] || undefined;\n return new SemanticVersion(major, minor, patch, preRelease);\n };\n SemanticVersion.prototype.compareTo = function (other) {\n if (this.major > other.major)\n return 1;\n if (this.major < other.major)\n return -1;\n if (this.minor > other.minor)\n return 1;\n if (this.minor < other.minor)\n return -1;\n if (this.patch > other.patch)\n return 1;\n if (this.patch < other.patch)\n return -1;\n if (this.preRelease && !other.preRelease)\n return -1;\n if (!this.preRelease && other.preRelease)\n return 1;\n if (this.preRelease && other.preRelease) {\n if (this.preRelease > other.preRelease)\n return 1;\n if (this.preRelease < other.preRelease)\n return -1;\n return 0;\n }\n return 0;\n };\n return SemanticVersion;\n}());\n\nvar EvaluationEngine = /** @class */ (function () {\n function EvaluationEngine() {\n }\n EvaluationEngine.prototype.evaluate = function (context, flags) {\n var e_1, _a;\n var results = {};\n var target = {\n context: context,\n result: results,\n };\n try {\n for (var flags_1 = __values(flags), flags_1_1 = flags_1.next(); !flags_1_1.done; flags_1_1 = flags_1.next()) {\n var flag = flags_1_1.value;\n // Evaluate flag and update results.\n var variant = this.evaluateFlag(target, flag);\n if (variant) {\n results[flag.key] = variant;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (flags_1_1 && !flags_1_1.done && (_a = flags_1.return)) _a.call(flags_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return results;\n };\n EvaluationEngine.prototype.evaluateFlag = function (target, flag) {\n var e_2, _a;\n var result;\n try {\n for (var _b = __values(flag.segments), _c = _b.next(); !_c.done; _c = _b.next()) {\n var segment = _c.value;\n result = this.evaluateSegment(target, flag, segment);\n if (result) {\n // Merge all metadata into the result\n var metadata = __assign(__assign(__assign({}, flag.metadata), segment.metadata), result.metadata);\n result = __assign(__assign({}, result), { metadata: metadata });\n break;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return result;\n };\n EvaluationEngine.prototype.evaluateSegment = function (target, flag, segment) {\n if (!segment.conditions) {\n // Null conditions always match\n var variantKey = this.bucket(target, segment);\n if (variantKey !== undefined) {\n return flag.variants[variantKey];\n }\n else {\n return undefined;\n }\n }\n var match = this.evaluateConditions(target, segment.conditions);\n // On match, bucket the user.\n if (match) {\n var variantKey = this.bucket(target, segment);\n if (variantKey !== undefined) {\n return flag.variants[variantKey];\n }\n else {\n return undefined;\n }\n }\n return undefined;\n };\n EvaluationEngine.prototype.evaluateConditions = function (target, conditions) {\n var e_3, _a, e_4, _b;\n try {\n // Outer list logic is \"or\" (||)\n for (var conditions_1 = __values(conditions), conditions_1_1 = conditions_1.next(); !conditions_1_1.done; conditions_1_1 = conditions_1.next()) {\n var innerConditions = conditions_1_1.value;\n var match = true;\n try {\n for (var innerConditions_1 = (e_4 = void 0, __values(innerConditions)), innerConditions_1_1 = innerConditions_1.next(); !innerConditions_1_1.done; innerConditions_1_1 = innerConditions_1.next()) {\n var condition = innerConditions_1_1.value;\n match = this.matchCondition(target, condition);\n if (!match) {\n break;\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (innerConditions_1_1 && !innerConditions_1_1.done && (_b = innerConditions_1.return)) _b.call(innerConditions_1);\n }\n finally { if (e_4) throw e_4.error; }\n }\n if (match) {\n return true;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (conditions_1_1 && !conditions_1_1.done && (_a = conditions_1.return)) _a.call(conditions_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return false;\n };\n EvaluationEngine.prototype.matchCondition = function (target, condition) {\n var propValue = select(target, condition.selector);\n // We need special matching for null properties and set type prop values\n // and operators. All other values are matched as strings, since the\n // filter values are always strings.\n if (!propValue) {\n return this.matchNull(condition.op, condition.values);\n }\n else if (this.isSetOperator(condition.op)) {\n var propValueStringList = this.coerceStringArray(propValue);\n if (!propValueStringList) {\n return false;\n }\n return this.matchSet(propValueStringList, condition.op, condition.values);\n }\n else {\n var propValueString = this.coerceString(propValue);\n if (propValueString !== undefined) {\n return this.matchString(propValueString, condition.op, condition.values);\n }\n else {\n return false;\n }\n }\n };\n EvaluationEngine.prototype.getHash = function (key) {\n return hash32x86(key);\n };\n EvaluationEngine.prototype.bucket = function (target, segment) {\n var e_5, _a, e_6, _b;\n if (!segment.bucket) {\n // A null bucket means the segment is fully rolled out. Select the\n // default variant.\n return segment.variant;\n }\n // Select the bucketing value.\n var bucketingValue = this.coerceString(select(target, segment.bucket.selector));\n if (!bucketingValue || bucketingValue.length === 0) {\n // A null or empty bucketing value cannot be bucketed. Select the\n // default variant.\n return segment.variant;\n }\n // Salt and has the value, and compute the allocation and distribution\n // values.\n var keyToHash = \"\".concat(segment.bucket.salt, \"/\").concat(bucketingValue);\n var hash = this.getHash(keyToHash);\n var allocationValue = hash % 100;\n var distributionValue = Math.floor(hash / 100);\n try {\n for (var _c = __values(segment.bucket.allocations), _d = _c.next(); !_d.done; _d = _c.next()) {\n var allocation = _d.value;\n var allocationStart = allocation.range[0];\n var allocationEnd = allocation.range[1];\n if (allocationValue >= allocationStart &&\n allocationValue < allocationEnd) {\n try {\n for (var _e = (e_6 = void 0, __values(allocation.distributions)), _f = _e.next(); !_f.done; _f = _e.next()) {\n var distribution = _f.value;\n var distributionStart = distribution.range[0];\n var distributionEnd = distribution.range[1];\n if (distributionValue >= distributionStart &&\n distributionValue < distributionEnd) {\n return distribution.variant;\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_6) throw e_6.error; }\n }\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_5) throw e_5.error; }\n }\n return segment.variant;\n };\n EvaluationEngine.prototype.matchNull = function (op, filterValues) {\n var containsNone = this.containsNone(filterValues);\n switch (op) {\n case EvaluationOperator.IS:\n case EvaluationOperator.CONTAINS:\n case EvaluationOperator.LESS_THAN:\n case EvaluationOperator.LESS_THAN_EQUALS:\n case EvaluationOperator.GREATER_THAN:\n case EvaluationOperator.GREATER_THAN_EQUALS:\n case EvaluationOperator.VERSION_LESS_THAN:\n case EvaluationOperator.VERSION_LESS_THAN_EQUALS:\n case EvaluationOperator.VERSION_GREATER_THAN:\n case EvaluationOperator.VERSION_GREATER_THAN_EQUALS:\n case EvaluationOperator.SET_IS:\n case EvaluationOperator.SET_CONTAINS:\n case EvaluationOperator.SET_CONTAINS_ANY:\n return containsNone;\n case EvaluationOperator.IS_NOT:\n case EvaluationOperator.DOES_NOT_CONTAIN:\n case EvaluationOperator.SET_DOES_NOT_CONTAIN:\n case EvaluationOperator.SET_DOES_NOT_CONTAIN_ANY:\n return !containsNone;\n default:\n return false;\n }\n };\n EvaluationEngine.prototype.matchSet = function (propValues, op, filterValues) {\n switch (op) {\n case EvaluationOperator.SET_IS:\n return this.setEquals(propValues, filterValues);\n case EvaluationOperator.SET_IS_NOT:\n return !this.setEquals(propValues, filterValues);\n case EvaluationOperator.SET_CONTAINS:\n return this.matchesSetContainsAll(propValues, filterValues);\n case EvaluationOperator.SET_DOES_NOT_CONTAIN:\n return !this.matchesSetContainsAll(propValues, filterValues);\n case EvaluationOperator.SET_CONTAINS_ANY:\n return this.matchesSetContainsAny(propValues, filterValues);\n case EvaluationOperator.SET_DOES_NOT_CONTAIN_ANY:\n return !this.matchesSetContainsAny(propValues, filterValues);\n default:\n return false;\n }\n };\n EvaluationEngine.prototype.matchString = function (propValue, op, filterValues) {\n var _this = this;\n switch (op) {\n case EvaluationOperator.IS:\n return this.matchesIs(propValue, filterValues);\n case EvaluationOperator.IS_NOT:\n return !this.matchesIs(propValue, filterValues);\n case EvaluationOperator.CONTAINS:\n return this.matchesContains(propValue, filterValues);\n case EvaluationOperator.DOES_NOT_CONTAIN:\n return !this.matchesContains(propValue, filterValues);\n case EvaluationOperator.LESS_THAN:\n case EvaluationOperator.LESS_THAN_EQUALS:\n case EvaluationOperator.GREATER_THAN:\n case EvaluationOperator.GREATER_THAN_EQUALS:\n return this.matchesComparable(propValue, op, filterValues, function (value) { return _this.parseNumber(value); }, this.comparator);\n case EvaluationOperator.VERSION_LESS_THAN:\n case EvaluationOperator.VERSION_LESS_THAN_EQUALS:\n case EvaluationOperator.VERSION_GREATER_THAN:\n case EvaluationOperator.VERSION_GREATER_THAN_EQUALS:\n return this.matchesComparable(propValue, op, filterValues, function (value) { return SemanticVersion.parse(value); }, this.versionComparator);\n case EvaluationOperator.REGEX_MATCH:\n return this.matchesRegex(propValue, filterValues);\n case EvaluationOperator.REGEX_DOES_NOT_MATCH:\n return !this.matchesRegex(propValue, filterValues);\n default:\n return false;\n }\n };\n EvaluationEngine.prototype.matchesIs = function (propValue, filterValues) {\n if (this.containsBooleans(filterValues)) {\n var lower_1 = propValue.toLowerCase();\n if (lower_1 === 'true' || lower_1 === 'false') {\n return filterValues.some(function (value) { return value.toLowerCase() === lower_1; });\n }\n }\n return filterValues.some(function (value) { return propValue === value; });\n };\n EvaluationEngine.prototype.matchesContains = function (propValue, filterValues) {\n var e_7, _a;\n try {\n for (var filterValues_1 = __values(filterValues), filterValues_1_1 = filterValues_1.next(); !filterValues_1_1.done; filterValues_1_1 = filterValues_1.next()) {\n var filterValue = filterValues_1_1.value;\n if (propValue.toLowerCase().includes(filterValue.toLowerCase())) {\n return true;\n }\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (filterValues_1_1 && !filterValues_1_1.done && (_a = filterValues_1.return)) _a.call(filterValues_1);\n }\n finally { if (e_7) throw e_7.error; }\n }\n return false;\n };\n EvaluationEngine.prototype.matchesComparable = function (propValue, op, filterValues, typeTransformer, typeComparator) {\n var _this = this;\n var propValueTransformed = typeTransformer(propValue);\n var filterValuesTransformed = filterValues\n .map(function (filterValue) {\n return typeTransformer(filterValue);\n })\n .filter(function (filterValue) {\n return filterValue !== undefined;\n });\n if (propValueTransformed === undefined ||\n filterValuesTransformed.length === 0) {\n return filterValues.some(function (filterValue) {\n return _this.comparator(propValue, op, filterValue);\n });\n }\n else {\n return filterValuesTransformed.some(function (filterValueTransformed) {\n return typeComparator(propValueTransformed, op, filterValueTransformed);\n });\n }\n };\n EvaluationEngine.prototype.comparator = function (propValue, op, filterValue) {\n switch (op) {\n case EvaluationOperator.LESS_THAN:\n case EvaluationOperator.VERSION_LESS_THAN:\n return propValue < filterValue;\n case EvaluationOperator.LESS_THAN_EQUALS:\n case EvaluationOperator.VERSION_LESS_THAN_EQUALS:\n return propValue <= filterValue;\n case EvaluationOperator.GREATER_THAN:\n case EvaluationOperator.VERSION_GREATER_THAN:\n return propValue > filterValue;\n case EvaluationOperator.GREATER_THAN_EQUALS:\n case EvaluationOperator.VERSION_GREATER_THAN_EQUALS:\n return propValue >= filterValue;\n default:\n return false;\n }\n };\n EvaluationEngine.prototype.versionComparator = function (propValue, op, filterValue) {\n var compareTo = propValue.compareTo(filterValue);\n switch (op) {\n case EvaluationOperator.LESS_THAN:\n case EvaluationOperator.VERSION_LESS_THAN:\n return compareTo < 0;\n case EvaluationOperator.LESS_THAN_EQUALS:\n case EvaluationOperator.VERSION_LESS_THAN_EQUALS:\n return compareTo <= 0;\n case EvaluationOperator.GREATER_THAN:\n case EvaluationOperator.VERSION_GREATER_THAN:\n return compareTo > 0;\n case EvaluationOperator.GREATER_THAN_EQUALS:\n case EvaluationOperator.VERSION_GREATER_THAN_EQUALS:\n return compareTo >= 0;\n default:\n return false;\n }\n };\n EvaluationEngine.prototype.matchesRegex = function (propValue, filterValues) {\n return filterValues.some(function (filterValue) {\n return Boolean(new RegExp(filterValue).exec(propValue));\n });\n };\n EvaluationEngine.prototype.containsNone = function (filterValues) {\n return filterValues.some(function (filterValue) {\n return filterValue === '(none)';\n });\n };\n EvaluationEngine.prototype.containsBooleans = function (filterValues) {\n return filterValues.some(function (filterValue) {\n switch (filterValue.toLowerCase()) {\n case 'true':\n case 'false':\n return true;\n default:\n return false;\n }\n });\n };\n EvaluationEngine.prototype.parseNumber = function (value) {\n var _a;\n return (_a = Number(value)) !== null && _a !== void 0 ? _a : undefined;\n };\n EvaluationEngine.prototype.coerceString = function (value) {\n if (!value) {\n return undefined;\n }\n if (typeof value === 'object') {\n return JSON.stringify(value);\n }\n return String(value);\n };\n EvaluationEngine.prototype.coerceStringArray = function (value) {\n var _this = this;\n if (Array.isArray(value)) {\n var anyArray = value;\n return anyArray\n .map(function (e) { return _this.coerceString(e); })\n .filter(Boolean);\n }\n var stringValue = String(value);\n try {\n var parsedValue = JSON.parse(stringValue);\n if (Array.isArray(parsedValue)) {\n var anyArray = value;\n return anyArray\n .map(function (e) { return _this.coerceString(e); })\n .filter(Boolean);\n }\n else {\n var s = this.coerceString(stringValue);\n return s ? [s] : undefined;\n }\n }\n catch (_a) {\n var s = this.coerceString(stringValue);\n return s ? [s] : undefined;\n }\n };\n EvaluationEngine.prototype.isSetOperator = function (op) {\n switch (op) {\n case EvaluationOperator.SET_IS:\n case EvaluationOperator.SET_IS_NOT:\n case EvaluationOperator.SET_CONTAINS:\n case EvaluationOperator.SET_DOES_NOT_CONTAIN:\n case EvaluationOperator.SET_CONTAINS_ANY:\n case EvaluationOperator.SET_DOES_NOT_CONTAIN_ANY:\n return true;\n default:\n return false;\n }\n };\n EvaluationEngine.prototype.setEquals = function (xa, ya) {\n var xs = new Set(xa);\n var ys = new Set(ya);\n return xs.size === ys.size && __spreadArray([], __read(ys), false).every(function (y) { return xs.has(y); });\n };\n EvaluationEngine.prototype.matchesSetContainsAll = function (propValues, filterValues) {\n var e_8, _a;\n if (propValues.length < filterValues.length) {\n return false;\n }\n try {\n for (var filterValues_2 = __values(filterValues), filterValues_2_1 = filterValues_2.next(); !filterValues_2_1.done; filterValues_2_1 = filterValues_2.next()) {\n var filterValue = filterValues_2_1.value;\n if (!this.matchesIs(filterValue, propValues)) {\n return false;\n }\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (filterValues_2_1 && !filterValues_2_1.done && (_a = filterValues_2.return)) _a.call(filterValues_2);\n }\n finally { if (e_8) throw e_8.error; }\n }\n return true;\n };\n EvaluationEngine.prototype.matchesSetContainsAny = function (propValues, filterValues) {\n var e_9, _a;\n try {\n for (var filterValues_3 = __values(filterValues), filterValues_3_1 = filterValues_3.next(); !filterValues_3_1.done; filterValues_3_1 = filterValues_3.next()) {\n var filterValue = filterValues_3_1.value;\n if (this.matchesIs(filterValue, propValues)) {\n return true;\n }\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (filterValues_3_1 && !filterValues_3_1.done && (_a = filterValues_3.return)) _a.call(filterValues_3);\n }\n finally { if (e_9) throw e_9.error; }\n }\n return false;\n };\n return EvaluationEngine;\n}());\n\nvar topologicalSort = function (flags, flagKeys) {\n var e_1, _a;\n var available = __assign({}, flags);\n var result = [];\n var startingKeys = flagKeys || Object.keys(available);\n try {\n for (var startingKeys_1 = __values(startingKeys), startingKeys_1_1 = startingKeys_1.next(); !startingKeys_1_1.done; startingKeys_1_1 = startingKeys_1.next()) {\n var flagKey = startingKeys_1_1.value;\n var traversal = parentTraversal(flagKey, available);\n if (traversal) {\n result.push.apply(result, __spreadArray([], __read(traversal), false));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (startingKeys_1_1 && !startingKeys_1_1.done && (_a = startingKeys_1.return)) _a.call(startingKeys_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n};\nvar parentTraversal = function (flagKey, available, path) {\n var e_2, _a;\n if (path === void 0) { path = []; }\n var flag = available[flagKey];\n if (!flag) {\n return undefined;\n }\n else if (!flag.dependencies || flag.dependencies.length === 0) {\n delete available[flag.key];\n return [flag];\n }\n path.push(flag.key);\n var result = [];\n var _loop_1 = function (parentKey) {\n if (path.some(function (p) { return p === parentKey; })) {\n throw Error(\"Detected a cycle between flags \".concat(path));\n }\n var traversal = parentTraversal(parentKey, available, path);\n if (traversal) {\n result.push.apply(result, __spreadArray([], __read(traversal), false));\n }\n };\n try {\n for (var _b = __values(flag.dependencies), _c = _b.next(); !_c.done; _c = _b.next()) {\n var parentKey = _c.value;\n _loop_1(parentKey);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n result.push(flag);\n path.pop();\n delete available[flag.key];\n return result;\n};\n\n/**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\nconst version = '3.7.5';\n/**\n * @deprecated use lowercase `version`.\n */\nconst VERSION = version;\nconst _hasatob = typeof atob === 'function';\nconst _hasbtoa = typeof btoa === 'function';\nconst _hasBuffer = typeof Buffer === 'function';\nconst _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\nconst _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\nconst b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nconst b64chs = Array.prototype.slice.call(b64ch);\nconst b64tab = (a => {\n let tab = {};\n a.forEach((c, i) => tab[c] = i);\n return tab;\n})(b64chs);\nconst b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\nconst _fromCC = String.fromCharCode.bind(String);\nconst _U8Afrom = typeof Uint8Array.from === 'function' ? Uint8Array.from.bind(Uint8Array) : it => new Uint8Array(Array.prototype.slice.call(it, 0));\nconst _mkUriSafe = src => src.replace(/=/g, '').replace(/[+\\/]/g, m0 => m0 == '+' ? '-' : '_');\nconst _tidyB64 = s => s.replace(/[^A-Za-z0-9\\+\\/]/g, '');\n/**\n * polyfill version of `btoa`\n */\nconst btoaPolyfill = bin => {\n // console.log('polyfilled');\n let u32,\n c0,\n c1,\n c2,\n asc = '';\n const pad = bin.length % 3;\n for (let i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 || (c1 = bin.charCodeAt(i++)) > 255 || (c2 = bin.charCodeAt(i++)) > 255) throw new TypeError('invalid character found');\n u32 = c0 << 16 | c1 << 8 | c2;\n asc += b64chs[u32 >> 18 & 63] + b64chs[u32 >> 12 & 63] + b64chs[u32 >> 6 & 63] + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n};\n/**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\nconst _btoa = _hasbtoa ? bin => btoa(bin) : _hasBuffer ? bin => Buffer.from(bin, 'binary').toString('base64') : btoaPolyfill;\nconst _fromUint8Array = _hasBuffer ? u8a => Buffer.from(u8a).toString('base64') : u8a => {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n const maxargs = 0x1000;\n let strs = [];\n for (let i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n};\n/**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\nconst fromUint8Array = (u8a, urlsafe = false) => urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const utob = (src: string) => unescape(encodeURIComponent(src));\n// reverting good old fationed regexp\nconst cb_utob = c => {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c : cc < 0x800 ? _fromCC(0xc0 | cc >>> 6) + _fromCC(0x80 | cc & 0x3f) : _fromCC(0xe0 | cc >>> 12 & 0x0f) + _fromCC(0x80 | cc >>> 6 & 0x3f) + _fromCC(0x80 | cc & 0x3f);\n } else {\n var cc = 0x10000 + (c.charCodeAt(0) - 0xD800) * 0x400 + (c.charCodeAt(1) - 0xDC00);\n return _fromCC(0xf0 | cc >>> 18 & 0x07) + _fromCC(0x80 | cc >>> 12 & 0x3f) + _fromCC(0x80 | cc >>> 6 & 0x3f) + _fromCC(0x80 | cc & 0x3f);\n }\n};\nconst re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\nconst utob = u => u.replace(re_utob, cb_utob);\n//\nconst _encode = _hasBuffer ? s => Buffer.from(s, 'utf8').toString('base64') : _TE ? s => _fromUint8Array(_TE.encode(s)) : s => _btoa(utob(s));\n/**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\nconst encode = (src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode(src)) : _encode(src);\n/**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\nconst encodeURI = src => encode(src, true);\n// This trick is found broken https://github.com/dankogai/js-base64/issues/130\n// const btou = (src: string) => decodeURIComponent(escape(src));\n// reverting good old fationed regexp\nconst re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\nconst cb_btou = cccc => {\n switch (cccc.length) {\n case 4:\n var cp = (0x07 & cccc.charCodeAt(0)) << 18 | (0x3f & cccc.charCodeAt(1)) << 12 | (0x3f & cccc.charCodeAt(2)) << 6 | 0x3f & cccc.charCodeAt(3),\n offset = cp - 0x10000;\n return _fromCC((offset >>> 10) + 0xD800) + _fromCC((offset & 0x3FF) + 0xDC00);\n case 3:\n return _fromCC((0x0f & cccc.charCodeAt(0)) << 12 | (0x3f & cccc.charCodeAt(1)) << 6 | 0x3f & cccc.charCodeAt(2));\n default:\n return _fromCC((0x1f & cccc.charCodeAt(0)) << 6 | 0x3f & cccc.charCodeAt(1));\n }\n};\n/**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\nconst btou = b => b.replace(re_btou, cb_btou);\n/**\n * polyfill version of `atob`\n */\nconst atobPolyfill = asc => {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc)) throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n let u24,\n bin = '',\n r1,\n r2;\n for (let i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18 | b64tab[asc.charAt(i++)] << 12 | (r1 = b64tab[asc.charAt(i++)]) << 6 | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255) : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255) : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n};\n/**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\nconst _atob = _hasatob ? asc => atob(_tidyB64(asc)) : _hasBuffer ? asc => Buffer.from(asc, 'base64').toString('binary') : atobPolyfill;\n//\nconst _toUint8Array = _hasBuffer ? a => _U8Afrom(Buffer.from(a, 'base64')) : a => _U8Afrom(_atob(a).split('').map(c => c.charCodeAt(0)));\n/**\n * converts a Base64 string to a Uint8Array.\n */\nconst toUint8Array = a => _toUint8Array(_unURI(a));\n//\nconst _decode = _hasBuffer ? a => Buffer.from(a, 'base64').toString('utf8') : _TD ? a => _TD.decode(_toUint8Array(a)) : a => btou(_atob(a));\nconst _unURI = a => _tidyB64(a.replace(/[-_]/g, m0 => m0 == '-' ? '+' : '/'));\n/**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\nconst decode = src => _decode(_unURI(src));\n/**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\nconst isValid = src => {\n if (typeof src !== 'string') return false;\n const s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n};\n//\nconst _noEnum = v => {\n return {\n value: v,\n enumerable: false,\n writable: true,\n configurable: true\n };\n};\n/**\n * extend String.prototype with relevant methods\n */\nconst extendString = function () {\n const _add = (name, body) => Object.defineProperty(String.prototype, name, _noEnum(body));\n _add('fromBase64', function () {\n return decode(this);\n });\n _add('toBase64', function (urlsafe) {\n return encode(this, urlsafe);\n });\n _add('toBase64URI', function () {\n return encode(this, true);\n });\n _add('toBase64URL', function () {\n return encode(this, true);\n });\n _add('toUint8Array', function () {\n return toUint8Array(this);\n });\n};\n/**\n * extend Uint8Array.prototype with relevant methods\n */\nconst extendUint8Array = function () {\n const _add = (name, body) => Object.defineProperty(Uint8Array.prototype, name, _noEnum(body));\n _add('toBase64', function (urlsafe) {\n return fromUint8Array(this, urlsafe);\n });\n _add('toBase64URI', function () {\n return fromUint8Array(this, true);\n });\n _add('toBase64URL', function () {\n return fromUint8Array(this, true);\n });\n};\n/**\n * extend Builtin prototypes with relevant methods\n */\nconst extendBuiltins = () => {\n extendString();\n extendUint8Array();\n};\nconst gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n};\n\nvar FetchError = /** @class */ (function (_super) {\n __extends(FetchError, _super);\n function FetchError(statusCode, message) {\n var _this = _super.call(this, message) || this;\n _this.statusCode = statusCode;\n Object.setPrototypeOf(_this, FetchError.prototype);\n return _this;\n }\n return FetchError;\n}(Error));\nvar TimeoutError = /** @class */ (function (_super) {\n __extends(TimeoutError, _super);\n function TimeoutError(message) {\n var _this = _super.call(this, message) || this;\n Object.setPrototypeOf(_this, TimeoutError.prototype);\n return _this;\n }\n return TimeoutError;\n}(Error));\n\nvar SdkEvaluationApi = /** @class */ (function () {\n function SdkEvaluationApi(deploymentKey, serverUrl, httpClient) {\n this.deploymentKey = deploymentKey;\n this.serverUrl = serverUrl;\n this.httpClient = httpClient;\n }\n SdkEvaluationApi.prototype.getVariants = function (user, options) {\n return __awaiter(this, void 0, void 0, function () {\n var userJsonBase64, headers, url, response;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n userJsonBase64 = gBase64.encodeURL(JSON.stringify(user));\n headers = {\n Authorization: \"Api-Key \".concat(this.deploymentKey),\n 'X-Amp-Exp-User': userJsonBase64,\n };\n if (options === null || options === void 0 ? void 0 : options.flagKeys) {\n headers['X-Amp-Exp-Flag-Keys'] = gBase64.encodeURL(JSON.stringify(options.flagKeys));\n }\n if (options === null || options === void 0 ? void 0 : options.trackingOption) {\n headers['X-Amp-Exp-Track'] = options.trackingOption;\n }\n url = new URL(\"\".concat(this.serverUrl, \"/sdk/v2/vardata?v=0\"));\n if (options === null || options === void 0 ? void 0 : options.evaluationMode) {\n url.searchParams.append('eval_mode', options === null || options === void 0 ? void 0 : options.evaluationMode);\n }\n if (options === null || options === void 0 ? void 0 : options.deliveryMethod) {\n url.searchParams.append('delivery_method', options === null || options === void 0 ? void 0 : options.deliveryMethod);\n }\n return [4 /*yield*/, this.httpClient.request({\n requestUrl: url.toString(),\n method: 'GET',\n headers: headers,\n timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis,\n })];\n case 1:\n response = _a.sent();\n if (response.status != 200) {\n throw new FetchError(response.status, \"Fetch error response: status=\".concat(response.status));\n }\n return [2 /*return*/, JSON.parse(response.body)];\n }\n });\n });\n };\n return SdkEvaluationApi;\n}());\n\nvar SdkFlagApi = /** @class */ (function () {\n function SdkFlagApi(deploymentKey, serverUrl, httpClient) {\n this.deploymentKey = deploymentKey;\n this.serverUrl = serverUrl;\n this.httpClient = httpClient;\n }\n SdkFlagApi.prototype.getFlags = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var headers, response, flagsArray;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n headers = {\n Authorization: \"Api-Key \".concat(this.deploymentKey),\n };\n if ((options === null || options === void 0 ? void 0 : options.libraryName) && (options === null || options === void 0 ? void 0 : options.libraryVersion)) {\n headers['X-Amp-Exp-Library'] = \"\".concat(options.libraryName, \"/\").concat(options.libraryVersion);\n }\n return [4 /*yield*/, this.httpClient.request({\n requestUrl: \"\".concat(this.serverUrl, \"/sdk/v2/flags\"),\n method: 'GET',\n headers: headers,\n timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis,\n })];\n case 1:\n response = _a.sent();\n if (response.status != 200) {\n throw Error(\"Flags error response: status=\".concat(response.status));\n }\n flagsArray = JSON.parse(response.body);\n return [2 /*return*/, flagsArray.reduce(function (map, flag) {\n map[flag.key] = flag;\n return map;\n }, {})];\n }\n });\n });\n };\n return SdkFlagApi;\n}());\n\nvar safeGlobal = typeof globalThis !== 'undefined' ? globalThis : global || self;\nvar getGlobalScope = function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n return undefined;\n};\nvar isLocalStorageAvailable = function () {\n var globalScope = getGlobalScope();\n if (globalScope) {\n try {\n var testKey = 'EXP_test';\n globalScope.localStorage.setItem(testKey, testKey);\n globalScope.localStorage.removeItem(testKey);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n return false;\n};\n\nvar Poller = /** @class */ (function () {\n function Poller(action, ms) {\n this.poller = undefined;\n this.action = action;\n this.ms = ms;\n }\n Poller.prototype.start = function () {\n if (this.poller) {\n return;\n }\n this.poller = safeGlobal.setInterval(this.action, this.ms);\n void this.action();\n };\n Poller.prototype.stop = function () {\n if (!this.poller) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n safeGlobal.clearInterval(this.poller);\n this.poller = undefined;\n };\n return Poller;\n}());\n\nexport { EvaluationEngine, EvaluationOperator, FetchError, Poller, SdkEvaluationApi, SdkFlagApi, TimeoutError, getGlobalScope, isLocalStorageAvailable, safeGlobal, topologicalSort };\n","/////////////////////////////////////////////////////////////////////////////////\n/* UAParser.js v0.7.33\n Copyright © 2012-2021 Faisal Salman \n MIT License */ /*\n Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.\n Supports browser & node.js environment.\n Demo : https://faisalman.github.io/ua-parser-js\n Source : https://github.com/faisalman/ua-parser-js */\n/////////////////////////////////////////////////////////////////////////////////\n\n(function (window, undefined) {\n \"use strict\";\n\n //////////////\n // Constants\n /////////////\n\n var LIBVERSION = \"0.7.33\",\n EMPTY = \"\",\n UNKNOWN = \"?\",\n FUNC_TYPE = \"function\",\n UNDEF_TYPE = \"undefined\",\n OBJ_TYPE = \"object\",\n STR_TYPE = \"string\",\n MAJOR = \"major\",\n MODEL = \"model\",\n NAME = \"name\",\n TYPE = \"type\",\n VENDOR = \"vendor\",\n VERSION = \"version\",\n ARCHITECTURE = \"architecture\",\n CONSOLE = \"console\",\n MOBILE = \"mobile\",\n TABLET = \"tablet\",\n SMARTTV = \"smarttv\",\n WEARABLE = \"wearable\",\n EMBEDDED = \"embedded\",\n UA_MAX_LENGTH = 350;\n\n var AMAZON = \"Amazon\",\n APPLE = \"Apple\",\n ASUS = \"ASUS\",\n BLACKBERRY = \"BlackBerry\",\n BROWSER = \"Browser\",\n CHROME = \"Chrome\",\n EDGE = \"Edge\",\n FIREFOX = \"Firefox\",\n GOOGLE = \"Google\",\n HUAWEI = \"Huawei\",\n LG = \"LG\",\n MICROSOFT = \"Microsoft\",\n MOTOROLA = \"Motorola\",\n OPERA = \"Opera\",\n SAMSUNG = \"Samsung\",\n SHARP = \"Sharp\",\n SONY = \"Sony\",\n XIAOMI = \"Xiaomi\",\n ZEBRA = \"Zebra\",\n FACEBOOK = \"Facebook\";\n\n ///////////\n // Helper\n //////////\n\n var extend = function (regexes, extensions) {\n var mergedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n mergedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n mergedRegexes[i] = regexes[i];\n }\n }\n return mergedRegexes;\n },\n enumerize = function (arr) {\n var enums = {};\n for (var i = 0; i < arr.length; i++) {\n enums[arr[i].toUpperCase()] = arr[i];\n }\n return enums;\n },\n has = function (str1, str2) {\n return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;\n },\n lowerize = function (str) {\n return str.toLowerCase();\n },\n majorize = function (version) {\n return typeof version === STR_TYPE ? version.replace(/[^\\d\\.]/g, EMPTY).split(\".\")[0] : undefined;\n },\n trim = function (str, len) {\n if (typeof str === STR_TYPE) {\n str = str.replace(/^\\s\\s*/, EMPTY);\n return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);\n }\n };\n\n ///////////////\n // Map helper\n //////////////\n\n var rgxMapper = function (ua, arrays) {\n var i = 0,\n j,\n k,\n p,\n q,\n matches,\n match;\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length === 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length === 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length === 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n },\n strMapper = function (str, map) {\n for (var i in map) {\n // check if current value is array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (has(map[i][j], str)) {\n return i === UNKNOWN ? undefined : i;\n }\n }\n } else if (has(map[i], str)) {\n return i === UNKNOWN ? undefined : i;\n }\n }\n return str;\n };\n\n ///////////////\n // String map\n //////////////\n\n // Safari < 3.0\n var oldSafariMap = {\n \"1.0\": \"/8\",\n 1.2: \"/1\",\n 1.3: \"/3\",\n \"2.0\": \"/412\",\n \"2.0.2\": \"/416\",\n \"2.0.3\": \"/417\",\n \"2.0.4\": \"/419\",\n \"?\": \"/\"\n },\n windowsVersionMap = {\n ME: \"4.90\",\n \"NT 3.11\": \"NT3.51\",\n \"NT 4.0\": \"NT4.0\",\n 2000: \"NT 5.0\",\n XP: [\"NT 5.1\", \"NT 5.2\"],\n Vista: \"NT 6.0\",\n 7: \"NT 6.1\",\n 8: \"NT 6.2\",\n 8.1: \"NT 6.3\",\n 10: [\"NT 6.4\", \"NT 10.0\"],\n RT: \"ARM\"\n };\n\n //////////////\n // Regex map\n /////////////\n\n var regexes = {\n browser: [\n [\n /\\b(?:crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ],\n [VERSION, [NAME, \"Chrome\"]],\n [\n /edg(?:e|ios|a)?\\/([\\w\\.]+)/i // Microsoft Edge\n ],\n [VERSION, [NAME, \"Edge\"]],\n [\n // Presto based\n /(opera mini)\\/([-\\w\\.]+)/i, // Opera Mini\n /(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i, // Opera Mobi/Tablet\n /(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i // Opera\n ],\n [NAME, VERSION],\n [\n /opios[\\/ ]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ],\n [VERSION, [NAME, OPERA + \" Mini\"]],\n [\n /\\bopr\\/([\\w\\.]+)/i // Opera Webkit\n ],\n [VERSION, [NAME, OPERA]],\n [\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n // Trident based\n /(avant |iemobile|slim)(?:browser)?[\\/ ]?([\\w\\.]*)/i, // Avant/IEMobile/SlimBrowser\n /(ba?idubrowser)[\\/ ]?([\\w\\.]+)/i, // Baidu Browser\n /(?:ms|\\()(ie) ([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based // Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon\n /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,\n // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ\n /(weibo)__([\\d\\.]+)/i // Weibo\n ],\n [NAME, VERSION],\n [\n /(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i // UCBrowser\n ],\n [VERSION, [NAME, \"UC\" + BROWSER]],\n [\n /microm.+\\bqbcore\\/([\\w\\.]+)/i, // WeChat Desktop for Windows Built-in Browser\n /\\bqbcore\\/([\\w\\.]+).+microm/i\n ],\n [VERSION, [NAME, \"WeChat(Win) Desktop\"]],\n [\n /micromessenger\\/([\\w\\.]+)/i // WeChat\n ],\n [VERSION, [NAME, \"WeChat\"]],\n [\n /konqueror\\/([\\w\\.]+)/i // Konqueror\n ],\n [VERSION, [NAME, \"Konqueror\"]],\n [\n /trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i // IE11\n ],\n [VERSION, [NAME, \"IE\"]],\n [\n /yabrowser\\/([\\w\\.]+)/i // Yandex\n ],\n [VERSION, [NAME, \"Yandex\"]],\n [\n /(avast|avg)\\/([\\w\\.]+)/i // Avast/AVG Secure Browser\n ],\n [[NAME, /(.+)/, \"$1 Secure \" + BROWSER], VERSION],\n [\n /\\bfocus\\/([\\w\\.]+)/i // Firefox Focus\n ],\n [VERSION, [NAME, FIREFOX + \" Focus\"]],\n [\n /\\bopt\\/([\\w\\.]+)/i // Opera Touch\n ],\n [VERSION, [NAME, OPERA + \" Touch\"]],\n [\n /coc_coc\\w+\\/([\\w\\.]+)/i // Coc Coc Browser\n ],\n [VERSION, [NAME, \"Coc Coc\"]],\n [\n /dolfin\\/([\\w\\.]+)/i // Dolphin\n ],\n [VERSION, [NAME, \"Dolphin\"]],\n [\n /coast\\/([\\w\\.]+)/i // Opera Coast\n ],\n [VERSION, [NAME, OPERA + \" Coast\"]],\n [\n /miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ],\n [VERSION, [NAME, \"MIUI \" + BROWSER]],\n [\n /fxios\\/([-\\w\\.]+)/i // Firefox for iOS\n ],\n [VERSION, [NAME, FIREFOX]],\n [\n /\\bqihu|(qi?ho?o?|360)browser/i // 360\n ],\n [[NAME, \"360 \" + BROWSER]],\n [/(oculus|samsung|sailfish|huawei)browser\\/([\\w\\.]+)/i],\n [[NAME, /(.+)/, \"$1 \" + BROWSER], VERSION],\n [\n // Oculus/Samsung/Sailfish/Huawei Browser\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ],\n [[NAME, /_/g, \" \"], VERSION],\n [\n /(electron)\\/([\\w\\.]+) safari/i, // Electron-based App\n /(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i, // Tesla\n /m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i // QQBrowser/Baidu App/2345 Browser\n ],\n [NAME, VERSION],\n [\n /(metasr)[\\/ ]?([\\w\\.]+)/i, // SouGouBrowser\n /(lbbrowser)/i, // LieBao Browser\n /\\[(linkedin)app\\]/i // LinkedIn App for iOS & Android\n ],\n [NAME],\n [\n // WebView\n /((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i // Facebook App for iOS & Android\n ],\n [[NAME, FACEBOOK], VERSION],\n [\n /safari (line)\\/([\\w\\.]+)/i, // Line App for iOS\n /\\b(line)\\/([\\w\\.]+)\\/iab/i, // Line App for Android\n /(chromium|instagram)[\\/ ]([-\\w\\.]+)/i // Chromium/Instagram\n ],\n [NAME, VERSION],\n [\n /\\bgsa\\/([\\w\\.]+) .*safari\\//i // Google Search Appliance on iOS\n ],\n [VERSION, [NAME, \"GSA\"]],\n [\n /headlesschrome(?:\\/([\\w\\.]+)| )/i // Chrome Headless\n ],\n [VERSION, [NAME, CHROME + \" Headless\"]],\n [\n / wv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ],\n [[NAME, CHROME + \" WebView\"], VERSION],\n [\n /droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i // Android Browser\n ],\n [VERSION, [NAME, \"Android \" + BROWSER]],\n [\n /(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia\n ],\n [NAME, VERSION],\n [\n /version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i // Mobile Safari\n ],\n [VERSION, [NAME, \"Mobile Safari\"]],\n [\n /version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i // Safari & Safari Mobile\n ],\n [VERSION, NAME],\n [\n /webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ],\n [NAME, [VERSION, strMapper, oldSafariMap]],\n [/(webkit|khtml)\\/([\\w\\.]+)/i],\n [NAME, VERSION],\n [\n // Gecko based\n /(navigator|netscape\\d?)\\/([-\\w\\.]+)/i // Netscape\n ],\n [[NAME, \"Netscape\"], VERSION],\n [\n /mobile vr; rv:([\\w\\.]+)\\).+firefox/i // Firefox Reality\n ],\n [VERSION, [NAME, FIREFOX + \" Reality\"]],\n [\n /ekiohf.+(flow)\\/([\\w\\.]+)/i, // Flow\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror/Klar\n /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(firefox)\\/([\\w\\.]+)/i, // Other Firefox-based\n /(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser\n /(links) \\(([\\w\\.]+)/i // Links\n ],\n [NAME, VERSION],\n [\n /(cobalt)\\/([\\w\\.]+)/i // Cobalt\n ],\n [NAME, [VERSION, /master.|lts./, \"\"]]\n ],\n\n cpu: [\n [\n /(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i // AMD64 (x64)\n ],\n [[ARCHITECTURE, \"amd64\"]],\n [\n /(ia32(?=;))/i // IA32 (quicktime)\n ],\n [[ARCHITECTURE, lowerize]],\n [\n /((?:i[346]|x)86)[;\\)]/i // IA32 (x86)\n ],\n [[ARCHITECTURE, \"ia32\"]],\n [\n /\\b(aarch64|arm(v?8e?l?|_?64))\\b/i // ARM64\n ],\n [[ARCHITECTURE, \"arm64\"]],\n [\n /\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i // ARMHF\n ],\n [[ARCHITECTURE, \"armhf\"]],\n [\n // PocketPC mistakenly identified as PowerPC\n /windows (ce|mobile); ppc;/i\n ],\n [[ARCHITECTURE, \"arm\"]],\n [\n /((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i // PowerPC\n ],\n [[ARCHITECTURE, /ower/, EMPTY, lowerize]],\n [\n /(sun4\\w)[;\\)]/i // SPARC\n ],\n [[ARCHITECTURE, \"sparc\"]],\n [\n /((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ],\n [[ARCHITECTURE, lowerize]]\n ],\n\n device: [\n [\n //////////////////////////\n // MOBILES & TABLETS\n // Ordered by popularity\n /////////////////////////\n\n // Samsung\n /\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i\n ],\n [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]],\n [\n /\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,\n /samsung[- ]([-\\w]+)/i,\n /sec-(sgh\\w+)/i\n ],\n [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]],\n [\n // Apple\n /((ipod|iphone)\\d+,\\d+)/i // iPod/iPhone model\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]],\n [\n /(ipad\\d+,\\d+)/i // iPad model\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, TABLET]],\n [\n /\\((ip(?:hone|od)[\\w ]*);/i // iPod/iPhone\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]],\n [\n /\\((ipad);[-\\w\\),; ]+apple/i, // iPad\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/i,\n /\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i\n ],\n [MODEL, [VENDOR, APPLE], [TYPE, TABLET]],\n [/(macintosh);/i],\n [MODEL, [VENDOR, APPLE]],\n [\n // Huawei\n /\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i\n ],\n [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]],\n [\n /(?:huawei|honor)([-\\w ]+)[;\\)]/i,\n /\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i\n ],\n [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]],\n [\n // Xiaomi\n /\\b(poco[\\w ]+)(?: bui|\\))/i, // Xiaomi POCO\n /\\b; (\\w+) build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i, // Xiaomi Hongmi\n /\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i, // Xiaomi Redmi\n /\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i // Xiaomi Mi\n ],\n [\n [MODEL, /_/g, \" \"],\n [VENDOR, XIAOMI],\n [TYPE, MOBILE]\n ],\n [\n /\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i // Mi Pad tablets\n ],\n [\n [MODEL, /_/g, \" \"],\n [VENDOR, XIAOMI],\n [TYPE, TABLET]\n ],\n [\n // OPPO\n /; (\\w+) bui.+ oppo/i,\n /\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i\n ],\n [MODEL, [VENDOR, \"OPPO\"], [TYPE, MOBILE]],\n [\n // Vivo\n /vivo (\\w+)(?: bui|\\))/i,\n /\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i\n ],\n [MODEL, [VENDOR, \"Vivo\"], [TYPE, MOBILE]],\n [\n // Realme\n /\\b(rmx[12]\\d{3})(?: bui|;|\\))/i\n ],\n [MODEL, [VENDOR, \"Realme\"], [TYPE, MOBILE]],\n [\n // Motorola\n /\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,\n /\\bmot(?:orola)?[- ](\\w*)/i,\n /((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i\n ],\n [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]],\n [/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],\n [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]],\n [\n // LG\n /((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i\n ],\n [MODEL, [VENDOR, LG], [TYPE, TABLET]],\n [\n /(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,\n /\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,\n /\\blg-?([\\d\\w]+) bui/i\n ],\n [MODEL, [VENDOR, LG], [TYPE, MOBILE]],\n [\n // Lenovo\n /(ideatab[-\\w ]+)/i,\n /lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i\n ],\n [MODEL, [VENDOR, \"Lenovo\"], [TYPE, TABLET]],\n [\n // Nokia\n /(?:maemo|nokia).*(n900|lumia \\d+)/i,\n /nokia[-_ ]?([-\\w\\.]*)/i\n ],\n [\n [MODEL, /_/g, \" \"],\n [VENDOR, \"Nokia\"],\n [TYPE, MOBILE]\n ],\n [\n // Google\n /(pixel c)\\b/i // Google Pixel C\n ],\n [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]],\n [\n /droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i // Google Pixel\n ],\n [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]],\n [\n // Sony\n /droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i\n ],\n [MODEL, [VENDOR, SONY], [TYPE, MOBILE]],\n [/sony tablet [ps]/i, /\\b(?:sony)?sgp\\w+(?: bui|\\))/i],\n [\n [MODEL, \"Xperia Tablet\"],\n [VENDOR, SONY],\n [TYPE, TABLET]\n ],\n [\n // OnePlus\n / (kb2005|in20[12]5|be20[12][59])\\b/i,\n /(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i\n ],\n [MODEL, [VENDOR, \"OnePlus\"], [TYPE, MOBILE]],\n [\n // Amazon\n /(alexa)webm/i,\n /(kf[a-z]{2}wi)( bui|\\))/i, // Kindle Fire without Silk\n /(kf[a-z]+)( bui|\\)).+silk\\//i // Kindle Fire HD\n ],\n [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]],\n [\n /((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i // Fire Phone\n ],\n [\n [MODEL, /(.+)/g, \"Fire Phone $1\"],\n [VENDOR, AMAZON],\n [TYPE, MOBILE]\n ],\n [\n // BlackBerry\n /(playbook);[-\\w\\),; ]+(rim)/i // BlackBerry PlayBook\n ],\n [MODEL, VENDOR, [TYPE, TABLET]],\n [\n /\\b((?:bb[a-f]|st[hv])100-\\d)/i,\n /\\(bb10; (\\w+)/i // BlackBerry 10\n ],\n [MODEL, [VENDOR, BLACKBERRY], [TYPE, MOBILE]],\n [\n // Asus\n /(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i\n ],\n [MODEL, [VENDOR, ASUS], [TYPE, TABLET]],\n [/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],\n [MODEL, [VENDOR, ASUS], [TYPE, MOBILE]],\n [\n // HTC\n /(nexus 9)/i // HTC Nexus 9\n ],\n [MODEL, [VENDOR, \"HTC\"], [TYPE, TABLET]],\n [\n /(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i, // HTC\n\n // ZTE\n /(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,\n /(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\\w]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony\n ],\n [VENDOR, [MODEL, /_/g, \" \"], [TYPE, MOBILE]],\n [\n // Acer\n /droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i\n ],\n [MODEL, [VENDOR, \"Acer\"], [TYPE, TABLET]],\n [\n // Meizu\n /droid.+; (m[1-5] note) bui/i,\n /\\bmz-([-\\w]{2,})/i\n ],\n [MODEL, [VENDOR, \"Meizu\"], [TYPE, MOBILE]],\n [\n // Sharp\n /\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i\n ],\n [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]],\n [\n // MIXED\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\w]*)/i,\n // BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp) ([\\w ]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i, // Asus\n /(microsoft); (lumia[\\w ]+)/i, // Microsoft Lumia\n /(lenovo)[-_ ]?([-\\w]+)/i, // Lenovo\n /(jolla)/i, // Jolla\n /(oppo) ?([\\w ]+) bui/i // OPPO\n ],\n [VENDOR, MODEL, [TYPE, MOBILE]],\n [\n /(archos) (gamepad2?)/i, // Archos\n /(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(nook)[\\w ]+build\\/(\\w+)/i, // Nook\n /(dell) (strea[kpr\\d ]*[\\dko])/i, // Dell Streak\n /(le[- ]+pan)[- ]+(\\w{1,9}) bui/i, // Le Pan Tablets\n /(trinity)[- ]*(t\\d{3}) bui/i, // Trinity Tablets\n /(gigaset)[- ]+(q\\w{1,9}) bui/i, // Gigaset Tablets\n /(vodafone) ([\\w ]+)(?:\\)| bui)/i // Vodafone\n ],\n [VENDOR, MODEL, [TYPE, TABLET]],\n [\n /(surface duo)/i // Surface Duo\n ],\n [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]],\n [\n /droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i // Fairphone\n ],\n [MODEL, [VENDOR, \"Fairphone\"], [TYPE, MOBILE]],\n [\n /(u304aa)/i // AT&T\n ],\n [MODEL, [VENDOR, \"AT&T\"], [TYPE, MOBILE]],\n [\n /\\bsie-(\\w*)/i // Siemens\n ],\n [MODEL, [VENDOR, \"Siemens\"], [TYPE, MOBILE]],\n [\n /\\b(rct\\w+) b/i // RCA Tablets\n ],\n [MODEL, [VENDOR, \"RCA\"], [TYPE, TABLET]],\n [\n /\\b(venue[\\d ]{2,7}) b/i // Dell Venue Tablets\n ],\n [MODEL, [VENDOR, \"Dell\"], [TYPE, TABLET]],\n [\n /\\b(q(?:mv|ta)\\w+) b/i // Verizon Tablet\n ],\n [MODEL, [VENDOR, \"Verizon\"], [TYPE, TABLET]],\n [\n /\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i // Barnes & Noble Tablet\n ],\n [MODEL, [VENDOR, \"Barnes & Noble\"], [TYPE, TABLET]],\n [/\\b(tm\\d{3}\\w+) b/i],\n [MODEL, [VENDOR, \"NuVision\"], [TYPE, TABLET]],\n [\n /\\b(k88) b/i // ZTE K Series Tablet\n ],\n [MODEL, [VENDOR, \"ZTE\"], [TYPE, TABLET]],\n [\n /\\b(nx\\d{3}j) b/i // ZTE Nubia\n ],\n [MODEL, [VENDOR, \"ZTE\"], [TYPE, MOBILE]],\n [\n /\\b(gen\\d{3}) b.+49h/i // Swiss GEN Mobile\n ],\n [MODEL, [VENDOR, \"Swiss\"], [TYPE, MOBILE]],\n [\n /\\b(zur\\d{3}) b/i // Swiss ZUR Tablet\n ],\n [MODEL, [VENDOR, \"Swiss\"], [TYPE, TABLET]],\n [\n /\\b((zeki)?tb.*\\b) b/i // Zeki Tablets\n ],\n [MODEL, [VENDOR, \"Zeki\"], [TYPE, TABLET]],\n [\n /\\b([yr]\\d{2}) b/i,\n /\\b(dragon[- ]+touch |dt)(\\w{5}) b/i // Dragon Touch Tablet\n ],\n [[VENDOR, \"Dragon Touch\"], MODEL, [TYPE, TABLET]],\n [\n /\\b(ns-?\\w{0,9}) b/i // Insignia Tablets\n ],\n [MODEL, [VENDOR, \"Insignia\"], [TYPE, TABLET]],\n [\n /\\b((nxa|next)-?\\w{0,9}) b/i // NextBook Tablets\n ],\n [MODEL, [VENDOR, \"NextBook\"], [TYPE, TABLET]],\n [\n /\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i // Voice Xtreme Phones\n ],\n [[VENDOR, \"Voice\"], MODEL, [TYPE, MOBILE]],\n [\n /\\b(lvtel\\-)?(v1[12]) b/i // LvTel Phones\n ],\n [[VENDOR, \"LvTel\"], MODEL, [TYPE, MOBILE]],\n [\n /\\b(ph-1) /i // Essential PH-1\n ],\n [MODEL, [VENDOR, \"Essential\"], [TYPE, MOBILE]],\n [\n /\\b(v(100md|700na|7011|917g).*\\b) b/i // Envizen Tablets\n ],\n [MODEL, [VENDOR, \"Envizen\"], [TYPE, TABLET]],\n [\n /\\b(trio[-\\w\\. ]+) b/i // MachSpeed Tablets\n ],\n [MODEL, [VENDOR, \"MachSpeed\"], [TYPE, TABLET]],\n [\n /\\btu_(1491) b/i // Rotor Tablets\n ],\n [MODEL, [VENDOR, \"Rotor\"], [TYPE, TABLET]],\n [\n /(shield[\\w ]+) b/i // Nvidia Shield Tablets\n ],\n [MODEL, [VENDOR, \"Nvidia\"], [TYPE, TABLET]],\n [\n /(sprint) (\\w+)/i // Sprint Phones\n ],\n [VENDOR, MODEL, [TYPE, MOBILE]],\n [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ],\n [\n [MODEL, /\\./g, \" \"],\n [VENDOR, MICROSOFT],\n [TYPE, MOBILE]\n ],\n [\n /droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i // Zebra\n ],\n [MODEL, [VENDOR, ZEBRA], [TYPE, TABLET]],\n [/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],\n [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]],\n [\n ///////////////////\n // CONSOLES\n ///////////////////\n\n /(ouya)/i, // Ouya\n /(nintendo) ([wids3utch]+)/i // Nintendo\n ],\n [VENDOR, MODEL, [TYPE, CONSOLE]],\n [\n /droid.+; (shield) bui/i // Nvidia\n ],\n [MODEL, [VENDOR, \"Nvidia\"], [TYPE, CONSOLE]],\n [\n /(playstation [345portablevi]+)/i // Playstation\n ],\n [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]],\n [\n /\\b(xbox(?: one)?(?!; xbox))[\\); ]/i // Microsoft Xbox\n ],\n [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]],\n [\n ///////////////////\n // SMARTTVS\n ///////////////////\n\n /smart-tv.+(samsung)/i // Samsung\n ],\n [VENDOR, [TYPE, SMARTTV]],\n [/hbbtv.+maple;(\\d+)/i],\n [\n [MODEL, /^/, \"SmartTV\"],\n [VENDOR, SAMSUNG],\n [TYPE, SMARTTV]\n ],\n [\n /(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i // LG SmartTV\n ],\n [\n [VENDOR, LG],\n [TYPE, SMARTTV]\n ],\n [\n /(apple) ?tv/i // Apple TV\n ],\n [VENDOR, [MODEL, APPLE + \" TV\"], [TYPE, SMARTTV]],\n [\n /crkey/i // Google Chromecast\n ],\n [\n [MODEL, CHROME + \"cast\"],\n [VENDOR, GOOGLE],\n [TYPE, SMARTTV]\n ],\n [\n /droid.+aft(\\w)( bui|\\))/i // Fire TV\n ],\n [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]],\n [\n /\\(dtv[\\);].+(aquos)/i,\n /(aquos-tv[\\w ]+)\\)/i // Sharp\n ],\n [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],\n [\n /(bravia[\\w ]+)( bui|\\))/i // Sony\n ],\n [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]],\n [\n /(mitv-\\w{5}) bui/i // Xiaomi\n ],\n [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]],\n [\n /\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i, // Roku\n /hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i // HbbTV devices\n ],\n [\n [VENDOR, trim],\n [MODEL, trim],\n [TYPE, SMARTTV]\n ],\n [\n /\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i // SmartTV from Unidentified Vendors\n ],\n [[TYPE, SMARTTV]],\n [\n ///////////////////\n // WEARABLES\n ///////////////////\n\n /((pebble))app/i // Pebble\n ],\n [VENDOR, MODEL, [TYPE, WEARABLE]],\n [\n /droid.+; (glass) \\d/i // Google Glass\n ],\n [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]],\n [/droid.+; (wt63?0{2,3})\\)/i],\n [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]],\n [\n /(quest( 2)?)/i // Oculus Quest\n ],\n [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]],\n [\n ///////////////////\n // EMBEDDED\n ///////////////////\n\n /(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i // Tesla\n ],\n [VENDOR, [TYPE, EMBEDDED]],\n [\n ////////////////////\n // MIXED (GENERIC)\n ///////////////////\n\n /droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors\n ],\n [MODEL, [TYPE, MOBILE]],\n [\n /droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors\n ],\n [MODEL, [TYPE, TABLET]],\n [\n /\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i // Unidentifiable Tablet\n ],\n [[TYPE, TABLET]],\n [\n /(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile\n ],\n [[TYPE, MOBILE]],\n [\n /(android[-\\w\\. ]{0,9});.+buil/i // Generic Android Device\n ],\n [MODEL, [VENDOR, \"Generic\"]]\n ],\n\n engine: [\n [\n /windows.+ edge\\/([\\w\\.]+)/i // EdgeHTML\n ],\n [VERSION, [NAME, EDGE + \"HTML\"]],\n [\n /webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i // Blink\n ],\n [VERSION, [NAME, \"Blink\"]],\n [\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna\n /ekioh(flow)\\/([\\w\\.]+)/i, // Flow\n /(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/ ]([23]\\.[\\d\\.]+)/i // iCab\n ],\n [NAME, VERSION],\n [\n /rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i // Gecko\n ],\n [VERSION, NAME]\n ],\n\n os: [\n [\n // Windows\n /microsoft (windows) (vista|xp)/i // Windows (iTunes)\n ],\n [NAME, VERSION],\n [\n /(windows) nt 6\\.2; (arm)/i, // Windows RT\n /(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i, // Windows Phone\n /(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i\n ],\n [NAME, [VERSION, strMapper, windowsVersionMap]],\n [/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],\n [\n [NAME, \"Windows\"],\n [VERSION, strMapper, windowsVersionMap]\n ],\n [\n // iOS/macOS\n /ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i, // iOS\n /cfnetwork\\/.+darwin/i\n ],\n [\n [VERSION, /_/g, \".\"],\n [NAME, \"iOS\"]\n ],\n [\n /(mac os x) ?([\\w\\. ]*)/i,\n /(macintosh|mac_powerpc\\b)(?!.+haiku)/i // Mac OS\n ],\n [\n [NAME, \"Mac OS\"],\n [VERSION, /_/g, \".\"]\n ],\n [\n // Mobile OSes\n /droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS\n ],\n [VERSION, NAME],\n [\n // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS\n /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,\n /(blackberry)\\w*\\/([\\w\\.]*)/i, // Blackberry\n /(tizen|kaios)[\\/ ]([\\w\\.]+)/i, // Tizen/KaiOS\n /\\((series40);/i // Series 40\n ],\n [NAME, VERSION],\n [\n /\\(bb(10);/i // BlackBerry 10\n ],\n [VERSION, [NAME, BLACKBERRY]],\n [\n /(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i // Symbian\n ],\n [VERSION, [NAME, \"Symbian\"]],\n [\n /mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i // Firefox OS\n ],\n [VERSION, [NAME, FIREFOX + \" OS\"]],\n [\n /web0s;.+rt(tv)/i,\n /\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i // WebOS\n ],\n [VERSION, [NAME, \"webOS\"]],\n [\n // Google Chromecast\n /crkey\\/([\\d\\.]+)/i // Google Chromecast\n ],\n [VERSION, [NAME, CHROME + \"cast\"]],\n [\n /(cros) [\\w]+ ([\\w\\.]+\\w)/i // Chromium OS\n ],\n [[NAME, \"Chromium OS\"], VERSION],\n [\n // Console\n /(nintendo|playstation) ([wids345portablevuch]+)/i, // Nintendo/Playstation\n /(xbox); +xbox ([^\\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S)\n\n // Other\n /\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i, // Joli/Palm\n /(mint)[\\/\\(\\) ]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux\n /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,\n // Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire\n /(hurd|linux) ?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu) ?([\\w\\.]*)/i, // GNU\n /\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly\n /(haiku) (\\w+)/i // Haiku\n ],\n [NAME, VERSION],\n [\n /(sunos) ?([\\w\\.\\d]*)/i // Solaris\n ],\n [[NAME, \"Solaris\"], VERSION],\n [\n /((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i, // Solaris\n /(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i, // AIX\n /\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i, // BeOS/OS2/AmigaOS/MorphOS/OpenVMS/Fuchsia/HP-UX\n /(unix) ?([\\w\\.]*)/i // UNIX\n ],\n [NAME, VERSION]\n ]\n };\n\n /////////////////\n // Constructor\n ////////////////\n\n var UAParser = function (ua, extensions) {\n if (typeof ua === OBJ_TYPE) {\n extensions = ua;\n ua = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(ua, extensions).getResult();\n }\n\n var _ua =\n ua ||\n (typeof window !== UNDEF_TYPE &&\n window.navigator &&\n window.navigator.userAgent ? window.navigator.userAgent : EMPTY);\n var _rgxmap = extensions ? extend(regexes, extensions) : regexes;\n\n this.getBrowser = function () {\n var _browser = {};\n _browser[NAME] = undefined;\n _browser[VERSION] = undefined;\n rgxMapper.call(_browser, _ua, _rgxmap.browser);\n _browser.major = majorize(_browser.version);\n return _browser;\n };\n this.getCPU = function () {\n var _cpu = {};\n _cpu[ARCHITECTURE] = undefined;\n rgxMapper.call(_cpu, _ua, _rgxmap.cpu);\n return _cpu;\n };\n this.getDevice = function () {\n var _device = {};\n _device[VENDOR] = undefined;\n _device[MODEL] = undefined;\n _device[TYPE] = undefined;\n rgxMapper.call(_device, _ua, _rgxmap.device);\n return _device;\n };\n this.getEngine = function () {\n var _engine = {};\n _engine[NAME] = undefined;\n _engine[VERSION] = undefined;\n rgxMapper.call(_engine, _ua, _rgxmap.engine);\n return _engine;\n };\n this.getOS = function () {\n var _os = {};\n _os[NAME] = undefined;\n _os[VERSION] = undefined;\n rgxMapper.call(_os, _ua, _rgxmap.os);\n return _os;\n };\n this.getResult = function () {\n return {\n ua: this.getUA(),\n browser: this.getBrowser(),\n engine: this.getEngine(),\n os: this.getOS(),\n device: this.getDevice(),\n cpu: this.getCPU()\n };\n };\n this.getUA = function () {\n return _ua;\n };\n this.setUA = function (ua) {\n _ua =\n typeof ua === STR_TYPE && ua.length > UA_MAX_LENGTH ? trim(ua, UA_MAX_LENGTH) : ua;\n return this;\n };\n this.setUA(_ua);\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = enumerize([NAME, VERSION, MAJOR]);\n UAParser.CPU = enumerize([ARCHITECTURE]);\n UAParser.DEVICE = enumerize([\n MODEL,\n VENDOR,\n TYPE,\n CONSOLE,\n MOBILE,\n SMARTTV,\n TABLET,\n WEARABLE,\n EMBEDDED\n ]);\n UAParser.ENGINE = UAParser.OS = enumerize([NAME, VERSION]);\n\n ///////////\n // Export\n //////////\n\n // check js environment\n if (typeof exports !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof define === FUNC_TYPE && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (typeof window !== UNDEF_TYPE) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = typeof window !== UNDEF_TYPE && (window.jQuery || window.Zepto);\n if ($ && !$.ua) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (ua) {\n parser.setUA(ua);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n})(typeof window === \"object\" ? window : this);\n","import { safeGlobal, TimeoutError, isLocalStorageAvailable, getGlobalScope, topologicalSort, FetchError, EvaluationEngine, Poller, SdkFlagApi, SdkEvaluationApi } from '@amplitude/experiment-core';\nimport { AnalyticsConnector } from '@amplitude/analytics-connector';\nimport { UAParser } from '@amplitude/ua-parser-js';\n\n/**\n * @deprecated Update your version of the amplitude analytics-js SDK to 8.17.0+ and for seamless\n * integration with the amplitude analytics SDK.\n */\nvar AmplitudeUserProvider = /** @class */ (function () {\n function AmplitudeUserProvider(amplitudeInstance) {\n this.amplitudeInstance = amplitudeInstance;\n }\n AmplitudeUserProvider.prototype.getUser = function () {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n return {\n device_id: (_b = (_a = this.amplitudeInstance) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.deviceId,\n user_id: (_d = (_c = this.amplitudeInstance) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.userId,\n version: (_f = (_e = this.amplitudeInstance) === null || _e === void 0 ? void 0 : _e.options) === null || _f === void 0 ? void 0 : _f.versionName,\n language: (_h = (_g = this.amplitudeInstance) === null || _g === void 0 ? void 0 : _g.options) === null || _h === void 0 ? void 0 : _h.language,\n platform: (_k = (_j = this.amplitudeInstance) === null || _j === void 0 ? void 0 : _j.options) === null || _k === void 0 ? void 0 : _k.platform,\n os: this.getOs(),\n device_model: this.getDeviceModel(),\n };\n };\n AmplitudeUserProvider.prototype.getOs = function () {\n var _a, _b, _c, _d, _e, _f;\n return [\n (_c = (_b = (_a = this.amplitudeInstance) === null || _a === void 0 ? void 0 : _a._ua) === null || _b === void 0 ? void 0 : _b.browser) === null || _c === void 0 ? void 0 : _c.name,\n (_f = (_e = (_d = this.amplitudeInstance) === null || _d === void 0 ? void 0 : _d._ua) === null || _e === void 0 ? void 0 : _e.browser) === null || _f === void 0 ? void 0 : _f.major,\n ]\n .filter(function (e) { return e !== null && e !== undefined; })\n .join(' ');\n };\n AmplitudeUserProvider.prototype.getDeviceModel = function () {\n var _a, _b, _c;\n return (_c = (_b = (_a = this.amplitudeInstance) === null || _a === void 0 ? void 0 : _a._ua) === null || _b === void 0 ? void 0 : _b.os) === null || _c === void 0 ? void 0 : _c.name;\n };\n return AmplitudeUserProvider;\n}());\n/**\n * @deprecated Update your version of the amplitude analytics-js SDK to 8.17.0+ and for seamless\n * integration with the amplitude analytics SDK.\n */\nvar AmplitudeAnalyticsProvider = /** @class */ (function () {\n function AmplitudeAnalyticsProvider(amplitudeInstance) {\n this.amplitudeInstance = amplitudeInstance;\n }\n AmplitudeAnalyticsProvider.prototype.track = function (event) {\n this.amplitudeInstance.logEvent(event.name, event.properties);\n };\n AmplitudeAnalyticsProvider.prototype.setUserProperty = function (event) {\n var _a;\n var _b;\n // if the variant has a value, set the user property and log an event\n this.amplitudeInstance.setUserProperties((_a = {},\n _a[event.userProperty] = (_b = event.variant) === null || _b === void 0 ? void 0 : _b.value,\n _a));\n };\n AmplitudeAnalyticsProvider.prototype.unsetUserProperty = function (event) {\n var _a;\n // if the variant does not have a value, unset the user property\n this.amplitudeInstance['_logEvent']('$identify', null, null, {\n $unset: (_a = {}, _a[event.userProperty] = '-', _a),\n });\n };\n return AmplitudeAnalyticsProvider;\n}());\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nfunction __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nfunction __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nfunction __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\nfunction __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nvar parseAmplitudeCookie = function (apiKey, newFormat) {\n var e_1, _a;\n if (newFormat === void 0) { newFormat = false; }\n // Get the cookie value\n var key = generateKey(apiKey, newFormat);\n var value = undefined;\n var cookies = safeGlobal.document.cookie.split('; ');\n try {\n for (var cookies_1 = __values(cookies), cookies_1_1 = cookies_1.next(); !cookies_1_1.done; cookies_1_1 = cookies_1.next()) {\n var cookie = cookies_1_1.value;\n var _b = __read(cookie.split('='), 2), cookieKey = _b[0], cookieValue = _b[1];\n if (cookieKey === key) {\n value = decodeURIComponent(cookieValue);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (cookies_1_1 && !cookies_1_1.done && (_a = cookies_1.return)) _a.call(cookies_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (!value) {\n return;\n }\n // Parse cookie value depending on format\n try {\n // New format\n if (newFormat) {\n var decoding = Buffer.from(value, 'base64').toString('utf-8');\n return JSON.parse(decodeURIComponent(decoding));\n }\n // Old format\n var values = value.split('.');\n var userId = undefined;\n if (values.length >= 2 && values[1]) {\n userId = Buffer.from(values[1], 'base64').toString('utf-8');\n }\n return {\n deviceId: values[0],\n userId: userId,\n };\n }\n catch (e) {\n return;\n }\n};\nvar parseAmplitudeLocalStorage = function (apiKey) {\n var key = generateKey(apiKey, true);\n try {\n var value = safeGlobal.localStorage.getItem(key);\n if (!value)\n return;\n var state = JSON.parse(value);\n if (typeof state !== 'object')\n return;\n return state;\n }\n catch (_a) {\n return;\n }\n};\nvar parseAmplitudeSessionStorage = function (apiKey) {\n var key = generateKey(apiKey, true);\n try {\n var value = safeGlobal.sessionStorage.getItem(key);\n if (!value)\n return;\n var state = JSON.parse(value);\n if (typeof state !== 'object')\n return;\n return state;\n }\n catch (_a) {\n return;\n }\n};\nvar generateKey = function (apiKey, newFormat) {\n if (newFormat) {\n if ((apiKey === null || apiKey === void 0 ? void 0 : apiKey.length) < 10) {\n return;\n }\n return \"AMP_\".concat(apiKey.substring(0, 10));\n }\n if ((apiKey === null || apiKey === void 0 ? void 0 : apiKey.length) < 6) {\n return;\n }\n return \"amp_\".concat(apiKey.substring(0, 6));\n};\n\n/**\n * Integration plugin for Amplitude Analytics. Uses the analytics connector to\n * track events and get user identity.\n *\n * On initialization, this plugin attempts to read the user identity from all\n * the storage locations and formats supported by the analytics SDK, then\n * commits the identity to the connector. The order of locations checks are:\n * - Cookie\n * - Cookie (Legacy)\n * - Local Storage\n * - Session Storage\n *\n * Events are tracked only if the connector has an event receiver set, otherwise\n * track returns false, and events are persisted and managed by the\n * IntegrationManager.\n */\nvar AmplitudeIntegrationPlugin = /** @class */ (function () {\n function AmplitudeIntegrationPlugin(apiKey, connector, timeoutMillis) {\n this.type = 'integration';\n this.apiKey = apiKey;\n this.identityStore = connector.identityStore;\n this.eventBridge = connector.eventBridge;\n this.contextProvider = connector.applicationContextProvider;\n this.timeoutMillis = timeoutMillis;\n this.loadPersistedState();\n if (timeoutMillis <= 0) {\n this.setup = undefined;\n }\n }\n AmplitudeIntegrationPlugin.prototype.setup = function (config, client) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n // Setup automatic fetch on amplitude identity change.\n if (config === null || config === void 0 ? void 0 : config.automaticFetchOnAmplitudeIdentityChange) {\n this.identityStore.addIdentityListener(function () {\n client === null || client === void 0 ? void 0 : client.fetch();\n });\n }\n return [2 /*return*/, this.waitForConnectorIdentity(this.timeoutMillis)];\n });\n });\n };\n AmplitudeIntegrationPlugin.prototype.getUser = function () {\n var identity = this.identityStore.getIdentity();\n return {\n user_id: identity.userId,\n device_id: identity.deviceId,\n user_properties: identity.userProperties,\n version: this.contextProvider.versionName,\n };\n };\n AmplitudeIntegrationPlugin.prototype.track = function (event) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (!this.eventBridge.receiver) {\n return false;\n }\n this.eventBridge.logEvent({\n eventType: event.eventType,\n eventProperties: event.eventProperties,\n });\n return true;\n };\n AmplitudeIntegrationPlugin.prototype.loadPersistedState = function () {\n // Avoid reading state if the api key is undefined or an experiment\n // deployment.\n if (!this.apiKey || this.apiKey.startsWith('client-')) {\n return false;\n }\n // New cookie format\n var user = parseAmplitudeCookie(this.apiKey, true);\n if (user) {\n this.commitIdentityToConnector(user);\n return true;\n }\n // Old cookie format\n user = parseAmplitudeCookie(this.apiKey, false);\n if (user) {\n this.commitIdentityToConnector(user);\n return true;\n }\n // Local storage\n user = parseAmplitudeLocalStorage(this.apiKey);\n if (user) {\n this.commitIdentityToConnector(user);\n return true;\n }\n // Session storage\n user = parseAmplitudeSessionStorage(this.apiKey);\n if (user) {\n this.commitIdentityToConnector(user);\n return true;\n }\n return false;\n };\n AmplitudeIntegrationPlugin.prototype.commitIdentityToConnector = function (user) {\n var editor = this.identityStore.editIdentity();\n editor.setDeviceId(user.deviceId);\n if (user.userId) {\n editor.setUserId(user.userId);\n }\n editor.commit();\n };\n AmplitudeIntegrationPlugin.prototype.waitForConnectorIdentity = function (ms) {\n return __awaiter(this, void 0, void 0, function () {\n var identity;\n var _this = this;\n return __generator(this, function (_a) {\n identity = this.identityStore.getIdentity();\n if (!identity.userId && !identity.deviceId) {\n return [2 /*return*/, Promise.race([\n new Promise(function (resolve) {\n var listener = function () {\n resolve();\n _this.identityStore.removeIdentityListener(listener);\n };\n _this.identityStore.addIdentityListener(listener);\n }),\n new Promise(function (_, reject) {\n safeGlobal.setTimeout(reject, ms, 'Timed out waiting for Amplitude Analytics SDK to initialize.');\n }),\n ])];\n }\n return [2 /*return*/];\n });\n });\n };\n return AmplitudeIntegrationPlugin;\n}());\n\nfunction unfetch(e,n){return n=n||{},new Promise(function(t,r){var s=new XMLHttpRequest,o=[],u=[],i={},a=function(){return {ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(JSON.parse(s.responseText))},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var l in s.open(n.method||\"get\",e,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+\",\"+t:t;}),t(a());},s.onerror=r,s.withCredentials=\"include\"==n.credentials,n.headers)s.setRequestHeader(l,n.headers[l]);s.send(n.body||null);})}\n\n/**\n * @packageDocumentation\n * @internal\n */\nvar fetch = safeGlobal.fetch || unfetch;\n/*\n * Copied from:\n * https://github.com/github/fetch/issues/175#issuecomment-284787564\n */\nvar timeout = function (promise, timeoutMillis) {\n // Don't timeout if timeout is null or invalid\n if (timeoutMillis == null || timeoutMillis <= 0) {\n return promise;\n }\n return new Promise(function (resolve, reject) {\n safeGlobal.setTimeout(function () {\n reject(new TimeoutError('Request timeout after ' + timeoutMillis + ' milliseconds'));\n }, timeoutMillis);\n promise.then(resolve, reject);\n });\n};\nvar _request = function (requestUrl, method, headers, data, timeoutMillis) {\n var call = function () { return __awaiter(void 0, void 0, void 0, function () {\n var response, simpleResponse;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, fetch(requestUrl, {\n method: method,\n headers: headers,\n body: data,\n })];\n case 1:\n response = _b.sent();\n _a = {\n status: response.status\n };\n return [4 /*yield*/, response.text()];\n case 2:\n simpleResponse = (_a.body = _b.sent(),\n _a);\n return [2 /*return*/, simpleResponse];\n }\n });\n }); };\n return timeout(call(), timeoutMillis);\n};\n/**\n * Wrap the exposed HttpClient in a CoreClient implementation to work with\n * FlagsApi and EvaluationApi.\n */\nvar WrapperClient = /** @class */ (function () {\n function WrapperClient(client) {\n this.client = client;\n }\n WrapperClient.prototype.request = function (request) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.client.request(request.requestUrl, request.method, request.headers, null, request.timeoutMillis)];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return WrapperClient;\n}());\nvar FetchHttpClient = { request: _request };\n\n/**\n * Determines the primary source of variants before falling back.\n *\n * @category Source\n */\nvar Source;\n(function (Source) {\n /**\n * The default way to source variants within your application. Before the\n * assignments are fetched, `getVariant(s)` will fallback to local storage\n * first, then `initialVariants` if local storage is empty. This option\n * effectively falls back to an assignment fetched previously.\n */\n Source[\"LocalStorage\"] = \"localStorage\";\n /**\n * This bootstrap option is used primarily for servers-side rendering using an\n * Experiment server SDK. This bootstrap option always prefers the config\n * `initialVariants` over data in local storage, even if variants are fetched\n * successfully and stored locally.\n */\n Source[\"InitialVariants\"] = \"initialVariants\";\n})(Source || (Source = {}));\n/**\n * Indicates from which source the variant() function determines the variant\n *\n * @category Source\n */\nvar VariantSource;\n(function (VariantSource) {\n VariantSource[\"LocalStorage\"] = \"storage\";\n VariantSource[\"InitialVariants\"] = \"initial\";\n VariantSource[\"SecondaryLocalStorage\"] = \"secondary-storage\";\n VariantSource[\"SecondaryInitialVariants\"] = \"secondary-initial\";\n VariantSource[\"FallbackInline\"] = \"fallback-inline\";\n VariantSource[\"FallbackConfig\"] = \"fallback-config\";\n VariantSource[\"LocalEvaluation\"] = \"local-evaluation\";\n})(VariantSource || (VariantSource = {}));\n/**\n * Returns true if the VariantSource is one of the fallbacks (inline or config)\n *\n * @param source a {@link VariantSource}\n * @returns true if source is {@link VariantSource.FallbackInline} or {@link VariantSource.FallbackConfig}\n */\nvar isFallback = function (source) {\n return (!source ||\n source === VariantSource.FallbackInline ||\n source === VariantSource.FallbackConfig ||\n source === VariantSource.SecondaryInitialVariants);\n};\n\n/**\n Defaults for Experiment Config options\n\n | **Option** | **Default** |\n |------------------|-----------------------------------|\n | **debug** | `false` |\n | **instanceName** | `$default_instance` |\n | **fallbackVariant** | `null` |\n | **initialVariants** | `null` |\n | **initialFlags** | `undefined` |\n | **source** | `Source.LocalStorage` |\n | **serverUrl** | `\"https://api.lab.amplitude.com\"` |\n | **flagsServerUrl** | `\"https://flag.lab.amplitude.com\"` |\n | **serverZone** | `\"US\"` |\n | **assignmentTimeoutMillis** | `10000` |\n | **retryFailedAssignment** | `true` |\n | **automaticExposureTracking** | `true` |\n | **pollOnStart** | `true` |\n | **fetchOnStart** | `true` |\n | **automaticFetchOnAmplitudeIdentityChange** | `false` |\n | **userProvider** | `null` |\n | **analyticsProvider** | `null` |\n | **exposureTrackingProvider** | `null` |\n\n *\n * @category Configuration\n */\nvar Defaults = {\n debug: false,\n instanceName: '$default_instance',\n fallbackVariant: {},\n initialVariants: {},\n initialFlags: undefined,\n source: Source.LocalStorage,\n serverUrl: 'https://api.lab.amplitude.com',\n flagsServerUrl: 'https://flag.lab.amplitude.com',\n serverZone: 'US',\n fetchTimeoutMillis: 10000,\n retryFetchOnFailure: true,\n automaticExposureTracking: true,\n pollOnStart: true,\n fetchOnStart: true,\n automaticFetchOnAmplitudeIdentityChange: false,\n userProvider: null,\n analyticsProvider: null,\n exposureTrackingProvider: null,\n httpClient: FetchHttpClient,\n};\n\nvar version = \"1.12.3\";\n\nvar MAX_QUEUE_SIZE = 512;\n/**\n * Handles integration plugin management, event persistence and deduplication.\n */\nvar IntegrationManager = /** @class */ (function () {\n function IntegrationManager(config, client) {\n var _this = this;\n var _a;\n this.isReady = new Promise(function (resolve) {\n _this.resolve = resolve;\n });\n this.config = config;\n this.client = client;\n var instanceName = (_a = config.instanceName) !== null && _a !== void 0 ? _a : Defaults.instanceName;\n this.queue = new PersistentTrackingQueue(instanceName);\n this.cache = new SessionDedupeCache(instanceName);\n }\n /**\n * Returns a promise when the integration has completed setup. If no\n * integration has been set, returns a resolved promise.\n */\n IntegrationManager.prototype.ready = function () {\n if (!this.integration) {\n return Promise.resolve();\n }\n return this.isReady;\n };\n /**\n * Set the integration to be managed. An existing integration is torndown,\n * and the new integration is setup. This function resolves the promise\n * returned by ready() if it has not already been resolved.\n *\n * @param integration the integration to manage.\n */\n IntegrationManager.prototype.setIntegration = function (integration) {\n var _this = this;\n if (this.integration && this.integration.teardown) {\n void this.integration.teardown();\n }\n this.integration = integration;\n if (integration.setup) {\n this.integration.setup(this.config, this.client).then(function () {\n _this.queue.setTracker(_this.integration.track.bind(integration));\n _this.resolve();\n }, function (e) {\n console.error('Integration setup failed.', e);\n _this.queue.setTracker(_this.integration.track.bind(integration));\n _this.resolve();\n });\n }\n else {\n this.queue.setTracker(this.integration.track.bind(integration));\n this.resolve();\n }\n };\n /**\n * Get the user from the integration. If no integration is set, returns an\n * empty object.\n */\n IntegrationManager.prototype.getUser = function () {\n if (!this.integration) {\n return {};\n }\n return this.integration.getUser();\n };\n /**\n * Deduplicates exposures using session storage, then tracks the event to the\n * integration. If no integration is set, or if the integration returns false,\n * the event is persisted in local storage.\n *\n * @param exposure\n */\n IntegrationManager.prototype.track = function (exposure) {\n if (this.cache.shouldTrack(exposure)) {\n var event_1 = this.getExposureEvent(exposure);\n this.queue.push(event_1);\n }\n };\n IntegrationManager.prototype.getExposureEvent = function (exposure) {\n var _a, _b, _c;\n var event = {\n eventType: '$exposure',\n eventProperties: exposure,\n };\n if ((_a = exposure.metadata) === null || _a === void 0 ? void 0 : _a.exposureEvent) {\n // Metadata specifically passes the exposure event definition\n event = {\n eventType: (_b = exposure.metadata) === null || _b === void 0 ? void 0 : _b.exposureEvent,\n eventProperties: exposure,\n };\n }\n else if (((_c = exposure.metadata) === null || _c === void 0 ? void 0 : _c.deliveryMethod) === 'web') {\n // Web experiments track impression events by default\n event = {\n eventType: '$impression',\n eventProperties: exposure,\n };\n }\n return event;\n };\n return IntegrationManager;\n}());\nvar SessionDedupeCache = /** @class */ (function () {\n function SessionDedupeCache(instanceName) {\n this.isSessionStorageAvailable = isSessionStorageAvailable();\n this.inMemoryCache = {};\n this.storageKey = \"EXP_sent_\".concat(instanceName);\n }\n SessionDedupeCache.prototype.shouldTrack = function (exposure) {\n var _a;\n // Always track web impressions.\n if (((_a = exposure.metadata) === null || _a === void 0 ? void 0 : _a.deliveryMethod) === 'web') {\n return true;\n }\n this.loadCache();\n var value = this.inMemoryCache[exposure.flag_key];\n var shouldTrack = false;\n if (!value) {\n shouldTrack = true;\n this.inMemoryCache[exposure.flag_key] = exposure.variant;\n }\n this.storeCache();\n return shouldTrack;\n };\n SessionDedupeCache.prototype.loadCache = function () {\n if (this.isSessionStorageAvailable) {\n var storedCache = safeGlobal.sessionStorage.getItem(this.storageKey);\n this.inMemoryCache = storedCache ? JSON.parse(storedCache) : {};\n }\n };\n SessionDedupeCache.prototype.storeCache = function () {\n if (this.isSessionStorageAvailable) {\n safeGlobal.sessionStorage.setItem(this.storageKey, JSON.stringify(this.inMemoryCache));\n }\n };\n return SessionDedupeCache;\n}());\nvar PersistentTrackingQueue = /** @class */ (function () {\n function PersistentTrackingQueue(instanceName, maxQueueSize) {\n if (maxQueueSize === void 0) { maxQueueSize = MAX_QUEUE_SIZE; }\n this.isLocalStorageAvailable = isLocalStorageAvailable();\n this.inMemoryQueue = [];\n this.storageKey = \"EXP_unsent_\".concat(instanceName);\n this.maxQueueSize = maxQueueSize;\n }\n PersistentTrackingQueue.prototype.push = function (event) {\n this.loadQueue();\n this.inMemoryQueue.push(event);\n this.flush();\n this.storeQueue();\n };\n PersistentTrackingQueue.prototype.setTracker = function (tracker) {\n var _this = this;\n this.tracker = tracker;\n this.poller = safeGlobal.setInterval(function () {\n _this.loadFlushStore();\n }, 1000);\n this.loadFlushStore();\n };\n PersistentTrackingQueue.prototype.flush = function () {\n var e_1, _a;\n if (!this.tracker)\n return;\n if (this.inMemoryQueue.length === 0)\n return;\n try {\n for (var _b = __values(this.inMemoryQueue), _c = _b.next(); !_c.done; _c = _b.next()) {\n var event_2 = _c.value;\n if (!this.tracker(event_2))\n return;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n this.inMemoryQueue = [];\n if (this.poller) {\n safeGlobal.clearInterval(this.poller);\n this.poller = undefined;\n }\n };\n PersistentTrackingQueue.prototype.loadQueue = function () {\n if (this.isLocalStorageAvailable) {\n var storedQueue = safeGlobal.localStorage.getItem(this.storageKey);\n this.inMemoryQueue = storedQueue ? JSON.parse(storedQueue) : [];\n }\n };\n PersistentTrackingQueue.prototype.storeQueue = function () {\n if (this.isLocalStorageAvailable) {\n // Trim the queue if it is too large.\n if (this.inMemoryQueue.length > this.maxQueueSize) {\n this.inMemoryQueue = this.inMemoryQueue.slice(this.inMemoryQueue.length - this.maxQueueSize);\n }\n safeGlobal.localStorage.setItem(this.storageKey, JSON.stringify(this.inMemoryQueue));\n }\n };\n PersistentTrackingQueue.prototype.loadFlushStore = function () {\n this.loadQueue();\n this.flush();\n this.storeQueue();\n };\n return PersistentTrackingQueue;\n}());\nvar isSessionStorageAvailable = function () {\n var globalScope = getGlobalScope();\n if (globalScope) {\n try {\n var testKey = 'EXP_test';\n globalScope.sessionStorage.setItem(testKey, testKey);\n globalScope.sessionStorage.removeItem(testKey);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n return false;\n};\n\nvar LocalStorage = /** @class */ (function () {\n function LocalStorage() {\n this.globalScope = getGlobalScope();\n }\n LocalStorage.prototype.get = function (key) {\n var _a;\n return (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.localStorage.getItem(key);\n };\n LocalStorage.prototype.put = function (key, value) {\n var _a;\n (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.localStorage.setItem(key, value);\n };\n LocalStorage.prototype.delete = function (key) {\n var _a;\n (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.localStorage.removeItem(key);\n };\n return LocalStorage;\n}());\n\nvar getVariantStorage = function (deploymentKey, instanceName, storage) {\n var truncatedDeployment = deploymentKey.substring(deploymentKey.length - 6);\n var namespace = \"amp-exp-\".concat(instanceName, \"-\").concat(truncatedDeployment);\n return new LoadStoreCache(namespace, storage, transformVariantFromStorage);\n};\nvar getFlagStorage = function (deploymentKey, instanceName, storage) {\n if (storage === void 0) { storage = new LocalStorage(); }\n var truncatedDeployment = deploymentKey.substring(deploymentKey.length - 6);\n var namespace = \"amp-exp-\".concat(instanceName, \"-\").concat(truncatedDeployment, \"-flags\");\n return new LoadStoreCache(namespace, storage);\n};\nvar LoadStoreCache = /** @class */ (function () {\n function LoadStoreCache(namespace, storage, transformer) {\n this.cache = {};\n this.namespace = namespace;\n this.storage = storage;\n this.transformer = transformer;\n }\n LoadStoreCache.prototype.get = function (key) {\n return this.cache[key];\n };\n LoadStoreCache.prototype.getAll = function () {\n return __assign({}, this.cache);\n };\n LoadStoreCache.prototype.put = function (key, value) {\n this.cache[key] = value;\n };\n LoadStoreCache.prototype.putAll = function (values) {\n var e_1, _a;\n try {\n for (var _b = __values(Object.keys(values)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n this.cache[key] = values[key];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n LoadStoreCache.prototype.remove = function (key) {\n delete this.cache[key];\n };\n LoadStoreCache.prototype.clear = function () {\n this.cache = {};\n };\n LoadStoreCache.prototype.load = function () {\n var e_2, _a;\n var rawValues = this.storage.get(this.namespace);\n var jsonValues;\n try {\n jsonValues = JSON.parse(rawValues) || {};\n }\n catch (_b) {\n // Do nothing\n return;\n }\n var values = {};\n try {\n for (var _c = __values(Object.keys(jsonValues)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var key = _d.value;\n try {\n var value = void 0;\n if (this.transformer) {\n value = this.transformer(jsonValues[key]);\n }\n else {\n value = jsonValues[key];\n }\n if (value) {\n values[key] = value;\n }\n }\n catch (_e) {\n // Do nothing\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n this.clear();\n this.putAll(values);\n };\n LoadStoreCache.prototype.store = function (values) {\n if (values === void 0) { values = this.cache; }\n this.storage.put(this.namespace, JSON.stringify(values));\n };\n return LoadStoreCache;\n}());\nvar transformVariantFromStorage = function (storageValue) {\n if (typeof storageValue === 'string') {\n // From v0 string format\n return {\n key: storageValue,\n value: storageValue,\n };\n }\n else if (typeof storageValue === 'object') {\n // From v1 or v2 object format\n var key = storageValue['key'];\n var value = storageValue['value'];\n var payload = storageValue['payload'];\n var metadata = storageValue['metadata'];\n var experimentKey = storageValue['expKey'];\n if (metadata && metadata.experimentKey) {\n experimentKey = metadata.experimentKey;\n }\n else if (experimentKey) {\n metadata = metadata || {};\n metadata['experimentKey'] = experimentKey;\n }\n var variant = {};\n if (key) {\n variant.key = key;\n }\n else if (value) {\n variant.key = value;\n }\n if (value)\n variant.value = value;\n if (metadata)\n variant.metadata = metadata;\n if (payload)\n variant.payload = payload;\n if (experimentKey)\n variant.expKey = experimentKey;\n return variant;\n }\n};\n\n/**\n * Event for tracking a user's exposure to a variant. This event will not count\n * towards your analytics event volume.\n *\n * @deprecated use ExposureTrackingProvider instead\n */\nvar exposureEvent = function (user, key, variant, source) {\n var _a;\n var name = '[Experiment] Exposure';\n var value = variant === null || variant === void 0 ? void 0 : variant.value;\n var userProperty = \"[Experiment] \".concat(key);\n return {\n name: name,\n user: user,\n key: key,\n variant: variant,\n userProperty: userProperty,\n properties: {\n key: key,\n variant: value,\n source: source,\n },\n userProperties: (_a = {},\n _a[userProperty] = value,\n _a),\n };\n};\n\nvar isNullOrUndefined = function (value) {\n return value === null || value === undefined;\n};\nvar isNullUndefinedOrEmpty = function (value) {\n if (isNullOrUndefined(value))\n return true;\n return value && Object.keys(value).length === 0;\n};\nvar isLocalEvaluationMode = function (flag) {\n var _a;\n return ((_a = flag === null || flag === void 0 ? void 0 : flag.metadata) === null || _a === void 0 ? void 0 : _a.evaluationMode) === 'local';\n};\n\nvar Backoff = /** @class */ (function () {\n function Backoff(attempts, min, max, scalar) {\n this.started = false;\n this.done = false;\n this.attempts = attempts;\n this.min = min;\n this.max = max;\n this.scalar = scalar;\n }\n Backoff.prototype.start = function (fn) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.started) {\n this.started = true;\n }\n else {\n throw Error('Backoff already started');\n }\n return [4 /*yield*/, this.backoff(fn, 0, this.min)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n Backoff.prototype.cancel = function () {\n this.done = true;\n clearTimeout(this.timeoutHandle);\n };\n Backoff.prototype.backoff = function (fn, attempt, delay) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n if (this.done) {\n return [2 /*return*/];\n }\n this.timeoutHandle = safeGlobal.setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {\n var nextAttempt, nextDelay;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, fn()];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n _a.sent();\n nextAttempt = attempt + 1;\n if (nextAttempt < this.attempts) {\n nextDelay = Math.min(delay * this.scalar, this.max);\n this.backoff(fn, nextAttempt, nextDelay);\n }\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n }); }, delay);\n return [2 /*return*/];\n });\n });\n };\n return Backoff;\n}());\n\nvar convertUserToContext = function (user) {\n var e_1, _a;\n var _b, _c;\n if (!user) {\n return {};\n }\n var context = { user: user };\n // add page context\n var globalScope = getGlobalScope();\n if (globalScope) {\n context.page = {\n url: globalScope.location.href,\n };\n }\n var groups = {};\n if (!user.groups) {\n return context;\n }\n try {\n for (var _d = __values(Object.keys(user.groups)), _e = _d.next(); !_e.done; _e = _d.next()) {\n var groupType = _e.value;\n var groupNames = user.groups[groupType];\n if (groupNames.length > 0 && groupNames[0]) {\n var groupName = groupNames[0];\n var groupNameMap = {\n group_name: groupName,\n };\n // Check for group properties\n var groupProperties = (_c = (_b = user.group_properties) === null || _b === void 0 ? void 0 : _b[groupType]) === null || _c === void 0 ? void 0 : _c[groupName];\n if (groupProperties && Object.keys(groupProperties).length > 0) {\n groupNameMap['group_properties'] = groupProperties;\n }\n groups[groupType] = groupNameMap;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_e && !_e.done && (_a = _d.return)) _a.call(_d);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (Object.keys(groups).length > 0) {\n context['groups'] = groups;\n }\n delete context.user['groups'];\n delete context.user['group_properties'];\n return context;\n};\nvar convertVariant = function (value) {\n if (value === null || value === undefined) {\n return {};\n }\n if (typeof value == 'string') {\n return {\n key: value,\n value: value,\n };\n }\n else {\n return value;\n }\n};\nvar convertEvaluationVariantToVariant = function (evaluationVariant) {\n if (!evaluationVariant) {\n return {};\n }\n var experimentKey = undefined;\n if (evaluationVariant.metadata) {\n experimentKey = evaluationVariant.metadata['experimentKey'];\n }\n var variant = {};\n if (evaluationVariant.key)\n variant.key = evaluationVariant.key;\n if (evaluationVariant.value)\n variant.value = evaluationVariant.value;\n if (evaluationVariant.payload)\n variant.payload = evaluationVariant.payload;\n if (experimentKey)\n variant.expKey = experimentKey;\n if (evaluationVariant.metadata)\n variant.metadata = evaluationVariant.metadata;\n return variant;\n};\n\n/**\n * A wrapper for an analytics provider which only sends one exposure event per\n * flag, per variant, per session. In other words, wrapping an analytics\n * provider in this class will prevent the same exposure event to be sent twice\n * in one session.\n */\nvar SessionAnalyticsProvider = /** @class */ (function () {\n function SessionAnalyticsProvider(analyticsProvider) {\n // In memory record of flagKey and variant value to in order to only set\n // user properties and track an exposure event once per session unless the\n // variant value changes\n this.setProperties = {};\n this.unsetProperties = {};\n this.analyticsProvider = analyticsProvider;\n }\n SessionAnalyticsProvider.prototype.track = function (event) {\n if (this.setProperties[event.key] == event.variant.value) {\n return;\n }\n else {\n this.setProperties[event.key] = event.variant.value;\n delete this.unsetProperties[event.key];\n }\n this.analyticsProvider.track(event);\n };\n SessionAnalyticsProvider.prototype.setUserProperty = function (event) {\n if (this.setProperties[event.key] == event.variant.value) {\n return;\n }\n this.analyticsProvider.setUserProperty(event);\n };\n SessionAnalyticsProvider.prototype.unsetUserProperty = function (event) {\n if (this.unsetProperties[event.key]) {\n return;\n }\n else {\n this.unsetProperties[event.key] = 'unset';\n delete this.setProperties[event.key];\n }\n this.analyticsProvider.unsetUserProperty(event);\n };\n return SessionAnalyticsProvider;\n}());\n\nvar SessionExposureTrackingProvider = /** @class */ (function () {\n function SessionExposureTrackingProvider(exposureTrackingProvider) {\n this.tracked = {};\n this.exposureTrackingProvider = exposureTrackingProvider;\n }\n SessionExposureTrackingProvider.prototype.track = function (exposure) {\n var trackedExposure = this.tracked[exposure.flag_key];\n if (trackedExposure && trackedExposure.variant === exposure.variant) {\n return;\n }\n else {\n this.tracked[exposure.flag_key] = exposure;\n this.exposureTrackingProvider.track(exposure);\n }\n };\n return SessionExposureTrackingProvider;\n}());\n\n/**\n * @packageDocumentation\n * @module experiment-js-client\n */\n// Configs which have been removed from the public API.\n// May be added back in the future.\nvar fetchBackoffTimeout = 10000;\nvar fetchBackoffAttempts = 8;\nvar fetchBackoffMinMillis = 500;\nvar fetchBackoffMaxMillis = 10000;\nvar fetchBackoffScalar = 1.5;\nvar flagPollerIntervalMillis = 60000;\nvar euServerUrl = 'https://api.lab.eu.amplitude.com';\nvar euFlagsServerUrl = 'https://flag.lab.eu.amplitude.com';\n/**\n * The default {@link Client} used to fetch variations from Experiment's\n * servers.\n *\n * @category Core Usage\n */\nvar ExperimentClient = /** @class */ (function () {\n /**\n * Creates a new ExperimentClient instance.\n *\n * In most cases you will want to use the `initialize` factory method in\n * {@link Experiment}.\n *\n * @param apiKey The Client key for the Experiment project\n * @param config See {@link ExperimentConfig} for config options\n */\n function ExperimentClient(apiKey, config) {\n var _this = this;\n var _a, _b;\n this.engine = new EvaluationEngine();\n this.poller = new Poller(function () { return _this.doFlags(); }, flagPollerIntervalMillis);\n this.isRunning = false;\n this.apiKey = apiKey;\n // Merge configs with defaults and wrap providers\n this.config = __assign(__assign(__assign({}, Defaults), config), { \n // Set server URLs separately\n serverUrl: (config === null || config === void 0 ? void 0 : config.serverUrl) ||\n (((_a = config === null || config === void 0 ? void 0 : config.serverZone) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'eu'\n ? euServerUrl\n : Defaults.serverUrl), flagsServerUrl: (config === null || config === void 0 ? void 0 : config.flagsServerUrl) ||\n (((_b = config === null || config === void 0 ? void 0 : config.serverZone) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'eu'\n ? euFlagsServerUrl\n : Defaults.flagsServerUrl) });\n // Transform initialVariants\n if (this.config.initialVariants) {\n for (var flagKey in this.config.initialVariants) {\n this.config.initialVariants[flagKey] = transformVariantFromStorage(this.config.initialVariants[flagKey]);\n }\n }\n if (this.config.userProvider) {\n this.userProvider = this.config.userProvider;\n }\n if (this.config.analyticsProvider) {\n this.analyticsProvider = new SessionAnalyticsProvider(this.config.analyticsProvider);\n }\n if (this.config.exposureTrackingProvider) {\n this.exposureTrackingProvider = new SessionExposureTrackingProvider(this.config.exposureTrackingProvider);\n }\n this.integrationManager = new IntegrationManager(this.config, this);\n // Setup Remote APIs\n var httpClient = new WrapperClient(this.config.httpClient || FetchHttpClient);\n this.flagApi = new SdkFlagApi(this.apiKey, this.config.flagsServerUrl, httpClient);\n this.evaluationApi = new SdkEvaluationApi(this.apiKey, this.config.serverUrl, httpClient);\n // Storage & Caching\n var storage = new LocalStorage();\n this.variants = getVariantStorage(this.apiKey, this.config.instanceName, storage);\n this.flags = getFlagStorage(this.apiKey, this.config.instanceName, storage);\n try {\n this.flags.load();\n this.variants.load();\n }\n catch (e) {\n // catch localStorage undefined error\n }\n this.mergeInitialFlagsWithStorage();\n }\n /**\n * Start the SDK by getting flag configurations from the server and fetching\n * variants for the user. The promise returned by this function resolves when\n * local flag configurations have been updated, and the {@link fetch()}\n * result has been received (if the request was made).\n *\n * To force this function not to fetch variants, set the {@link fetchOnStart}\n * configuration option to `false` when initializing the SDK.\n *\n * Finally, this function will start polling for flag configurations at a\n * fixed interval. To disable polling, set the {@link pollOnStart}\n * configuration option to `false` on initialization.\n *\n * @param user The user to set in the SDK.\n * @see fetchOnStart\n * @see pollOnStart\n * @see fetch\n * @see variant\n */\n ExperimentClient.prototype.start = function (user) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var flagsReadyPromise, fetchOnStart;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (this.isRunning) {\n return [2 /*return*/];\n }\n else {\n this.isRunning = true;\n }\n this.setUser(user);\n flagsReadyPromise = this.doFlags();\n fetchOnStart = (_a = this.config.fetchOnStart) !== null && _a !== void 0 ? _a : true;\n if (!fetchOnStart) return [3 /*break*/, 2];\n return [4 /*yield*/, Promise.all([this.fetch(user), flagsReadyPromise])];\n case 1:\n _b.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, flagsReadyPromise];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n if (this.config.pollOnStart) {\n this.poller.start();\n }\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Stop the local flag configuration poller.\n */\n ExperimentClient.prototype.stop = function () {\n if (!this.isRunning) {\n return;\n }\n this.poller.stop();\n this.isRunning = false;\n };\n /**\n * Assign the given user to the SDK and asynchronously fetch all variants\n * from the server. Subsequent calls may omit the user from the argument to\n * use the user from the previous call.\n *\n * If an {@link ExperimentUserProvider} has been set, the argument user will\n * be merged with the provider user, preferring user fields from the argument\n * user and falling back on the provider for fields which are null or\n * undefined.\n *\n * If configured, fetch retries the request in the background on failure.\n * Variants received from a successful retry are stored in local storage for\n * access.\n *\n * If you are using the `initialVariants` config option to preload this SDK\n * from the server, you generally do not need to call `fetch`.\n *\n * @param user The user to fetch variants for.\n * @param options Options for this specific fetch call.\n * @returns Promise that resolves when the request for variants completes.\n * @see ExperimentUser\n * @see ExperimentUserProvider\n */\n ExperimentClient.prototype.fetch = function (user, options) {\n if (user === void 0) { user = this.user; }\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.setUser(user || {});\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.fetchInternal(user, this.config.fetchTimeoutMillis, this.config.retryFetchOnFailure, options)];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n e_1 = _a.sent();\n if (this.config.debug) {\n if (e_1 instanceof TimeoutError) {\n console.debug(e_1);\n }\n else {\n console.error(e_1);\n }\n }\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/, this];\n }\n });\n });\n };\n /**\n * Returns the variant for the provided key.\n *\n * Access the variant from {@link Source}, falling back on the given\n * fallback, then the configured fallbackVariant.\n *\n * If an {@link ExposureTrackingProvider} is configured and the\n * {@link automaticExposureTracking} configuration option is `true`, this\n * function will call the provider with an {@link Exposure} event. The\n * exposure event does not count towards your event volume within Amplitude.\n *\n * @param key The key to get the variant for.\n * @param fallback The highest priority fallback.\n * @see ExperimentConfig\n * @see ExposureTrackingProvider\n */\n ExperimentClient.prototype.variant = function (key, fallback) {\n var _a, _b;\n if (!this.apiKey) {\n return { value: undefined };\n }\n var sourceVariant = this.variantAndSource(key, fallback);\n if (this.config.automaticExposureTracking) {\n this.exposureInternal(key, sourceVariant);\n }\n this.debug(\"[Experiment] variant for \".concat(key, \" is \").concat(((_a = sourceVariant.variant) === null || _a === void 0 ? void 0 : _a.key) || ((_b = sourceVariant.variant) === null || _b === void 0 ? void 0 : _b.value)));\n return sourceVariant.variant || {};\n };\n /**\n * Track an exposure event for the variant associated with the flag/experiment\n * {@link key}.\n *\n * This method requires that an {@link ExposureTrackingProvider} be\n * configured when this client is initialized, either manually, or through the\n * Amplitude Analytics SDK integration from set up using\n * {@link Experiment.initializeWithAmplitudeAnalytics}.\n *\n * @param key The flag/experiment key to track an exposure for.\n * @see ExposureTrackingProvider\n */\n ExperimentClient.prototype.exposure = function (key) {\n var sourceVariant = this.variantAndSource(key);\n this.exposureInternal(key, sourceVariant);\n };\n /**\n * Returns all variants for the user.\n *\n * The primary source of variants is based on the\n * {@link Source} configured in the {@link ExperimentConfig}.\n *\n * @see Source\n * @see ExperimentConfig\n */\n ExperimentClient.prototype.all = function () {\n if (!this.apiKey) {\n return {};\n }\n var evaluatedVariants = this.evaluate();\n for (var flagKey in evaluatedVariants) {\n var flag = this.flags.get(flagKey);\n if (!isLocalEvaluationMode(flag)) {\n delete evaluatedVariants[flagKey];\n }\n }\n return __assign(__assign(__assign({}, this.secondaryVariants()), this.sourceVariants()), evaluatedVariants);\n };\n /**\n * Clear all variants in the cache and storage.\n */\n ExperimentClient.prototype.clear = function () {\n this.variants.clear();\n try {\n void this.variants.store();\n }\n catch (e) {\n // catch localStorage undefined error\n }\n };\n /**\n * Get a copy of the internal {@link ExperimentUser} object if it is set.\n *\n * @returns a copy of the internal user object if set.\n */\n ExperimentClient.prototype.getUser = function () {\n var _a;\n if (!this.user) {\n return this.user;\n }\n if ((_a = this.user) === null || _a === void 0 ? void 0 : _a.user_properties) {\n var userPropertiesCopy = __assign({}, this.user.user_properties);\n return __assign(__assign({}, this.user), { user_properties: userPropertiesCopy });\n }\n else {\n return __assign({}, this.user);\n }\n };\n /**\n * Copy in and set the user within the experiment client.\n *\n * @param user the user to set within the experiment client.\n */\n ExperimentClient.prototype.setUser = function (user) {\n var _a;\n if (!user) {\n this.user = null;\n return;\n }\n if ((_a = this.user) === null || _a === void 0 ? void 0 : _a.user_properties) {\n var userPropertiesCopy = __assign({}, user.user_properties);\n this.user = __assign(__assign({}, user), { user_properties: userPropertiesCopy });\n }\n else {\n this.user = __assign({}, user);\n }\n };\n /**\n * Get the user provider set by {@link setUserProvider} or null if the user\n * provider has not been set.\n *\n * @returns The user provider set by {@link setUserProvider} or null.\n * @deprecated use ExperimentConfig.userProvider instead\n */\n ExperimentClient.prototype.getUserProvider = function () {\n return this.userProvider;\n };\n /**\n * Sets a user provider that will inject identity information into the user\n * for {@link fetch()} requests. The user provider will only set user fields\n * in outgoing requests which are null or undefined.\n *\n * See {@link ExperimentUserProvider} for more details\n * @param userProvider\n * @deprecated use ExperimentConfig.userProvider instead\n */\n ExperimentClient.prototype.setUserProvider = function (userProvider) {\n this.userProvider = userProvider;\n return this;\n };\n ExperimentClient.prototype.mergeInitialFlagsWithStorage = function () {\n var _this = this;\n if (this.config.initialFlags) {\n var initialFlags = JSON.parse(this.config.initialFlags);\n initialFlags.forEach(function (flag) {\n if (!_this.flags.get(flag.key)) {\n _this.flags.put(flag.key, flag);\n }\n });\n }\n };\n ExperimentClient.prototype.evaluate = function (flagKeys) {\n var e_2, _a;\n var user = this.addContext(this.user);\n var flags = topologicalSort(this.flags.getAll(), flagKeys);\n var context = convertUserToContext(user);\n var evaluationVariants = this.engine.evaluate(context, flags);\n var variants = {};\n try {\n for (var _b = __values(Object.keys(evaluationVariants)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var flagKey = _c.value;\n variants[flagKey] = convertEvaluationVariantToVariant(evaluationVariants[flagKey]);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return variants;\n };\n ExperimentClient.prototype.variantAndSource = function (key, fallback) {\n var sourceVariant = {};\n if (this.config.source === Source.LocalStorage) {\n sourceVariant = this.localStorageVariantAndSource(key, fallback);\n }\n else if (this.config.source === Source.InitialVariants) {\n sourceVariant = this.initialVariantsVariantAndSource(key, fallback);\n }\n var flag = this.flags.get(key);\n if (isLocalEvaluationMode(flag) || (!sourceVariant.variant && flag)) {\n sourceVariant = this.localEvaluationVariantAndSource(key, flag, fallback);\n }\n return sourceVariant;\n };\n /**\n * This function assumes the flag exists and is local evaluation mode. For\n * local evaluation, fallback order goes:\n *\n * 1. Local evaluation\n * 2. Inline function fallback\n * 3. Initial variants\n * 4. Config fallback\n *\n * If there is a default variant and no fallback, return the default variant.\n */\n ExperimentClient.prototype.localEvaluationVariantAndSource = function (key, flag, fallback) {\n var _a;\n var defaultSourceVariant = {};\n // Local evaluation\n var variant = this.evaluate([flag.key])[key];\n var source = VariantSource.LocalEvaluation;\n var isLocalEvaluationDefault = (_a = variant === null || variant === void 0 ? void 0 : variant.metadata) === null || _a === void 0 ? void 0 : _a.default;\n if (!isNullOrUndefined(variant) && !isLocalEvaluationDefault) {\n return {\n variant: convertVariant(variant),\n source: source,\n hasDefaultVariant: false,\n };\n }\n else if (isLocalEvaluationDefault) {\n defaultSourceVariant = {\n variant: convertVariant(variant),\n source: source,\n hasDefaultVariant: true,\n };\n }\n // Inline fallback\n if (!isNullOrUndefined(fallback)) {\n return {\n variant: convertVariant(fallback),\n source: VariantSource.FallbackInline,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n }\n // Initial variants\n var initialVariant = this.config.initialVariants[key];\n if (!isNullOrUndefined(initialVariant)) {\n return {\n variant: convertVariant(initialVariant),\n source: VariantSource.SecondaryInitialVariants,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n }\n // Configured fallback, or default variant\n var fallbackVariant = convertVariant(this.config.fallbackVariant);\n var fallbackSourceVariant = {\n variant: fallbackVariant,\n source: VariantSource.FallbackConfig,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n if (!isNullUndefinedOrEmpty(fallbackVariant)) {\n return fallbackSourceVariant;\n }\n return defaultSourceVariant;\n };\n /**\n * For Source.LocalStorage, fallback order goes:\n *\n * 1. Local Storage\n * 2. Inline function fallback\n * 3. InitialFlags\n * 4. Config fallback\n *\n * If there is a default variant and no fallback, return the default variant.\n */\n ExperimentClient.prototype.localStorageVariantAndSource = function (key, fallback) {\n var _a;\n var defaultSourceVariant = {};\n // Local storage\n var localStorageVariant = this.variants.get(key);\n var isLocalStorageDefault = (_a = localStorageVariant === null || localStorageVariant === void 0 ? void 0 : localStorageVariant.metadata) === null || _a === void 0 ? void 0 : _a.default;\n if (!isNullOrUndefined(localStorageVariant) && !isLocalStorageDefault) {\n return {\n variant: convertVariant(localStorageVariant),\n source: VariantSource.LocalStorage,\n hasDefaultVariant: false,\n };\n }\n else if (isLocalStorageDefault) {\n defaultSourceVariant = {\n variant: convertVariant(localStorageVariant),\n source: VariantSource.LocalStorage,\n hasDefaultVariant: true,\n };\n }\n // Inline fallback\n if (!isNullOrUndefined(fallback)) {\n return {\n variant: convertVariant(fallback),\n source: VariantSource.FallbackInline,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n }\n // Initial variants\n var initialVariant = this.config.initialVariants[key];\n if (!isNullOrUndefined(initialVariant)) {\n return {\n variant: convertVariant(initialVariant),\n source: VariantSource.SecondaryInitialVariants,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n }\n // Configured fallback, or default variant\n var fallbackVariant = convertVariant(this.config.fallbackVariant);\n var fallbackSourceVariant = {\n variant: fallbackVariant,\n source: VariantSource.FallbackConfig,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n if (!isNullUndefinedOrEmpty(fallbackVariant)) {\n return fallbackSourceVariant;\n }\n return defaultSourceVariant;\n };\n /**\n * For Source.InitialVariants, fallback order goes:\n *\n * 1. Initial variants\n * 2. Local storage\n * 3. Inline function fallback\n * 4. Config fallback\n *\n * If there is a default variant and no fallback, return the default variant.\n */\n ExperimentClient.prototype.initialVariantsVariantAndSource = function (key, fallback) {\n var _a;\n var defaultSourceVariant = {};\n // Initial variants\n var initialVariantsVariant = this.config.initialVariants[key];\n if (!isNullOrUndefined(initialVariantsVariant)) {\n return {\n variant: convertVariant(initialVariantsVariant),\n source: VariantSource.InitialVariants,\n hasDefaultVariant: false,\n };\n }\n // Local storage\n var localStorageVariant = this.variants.get(key);\n var isLocalStorageDefault = (_a = localStorageVariant === null || localStorageVariant === void 0 ? void 0 : localStorageVariant.metadata) === null || _a === void 0 ? void 0 : _a.default;\n if (!isNullOrUndefined(localStorageVariant) && !isLocalStorageDefault) {\n return {\n variant: convertVariant(localStorageVariant),\n source: VariantSource.LocalStorage,\n hasDefaultVariant: false,\n };\n }\n else if (isLocalStorageDefault) {\n defaultSourceVariant = {\n variant: convertVariant(localStorageVariant),\n source: VariantSource.LocalStorage,\n hasDefaultVariant: true,\n };\n }\n // Inline fallback\n if (!isNullOrUndefined(fallback)) {\n return {\n variant: convertVariant(fallback),\n source: VariantSource.FallbackInline,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n }\n // Configured fallback, or default variant\n var fallbackVariant = convertVariant(this.config.fallbackVariant);\n var fallbackSourceVariant = {\n variant: fallbackVariant,\n source: VariantSource.FallbackConfig,\n hasDefaultVariant: defaultSourceVariant.hasDefaultVariant,\n };\n if (!isNullUndefinedOrEmpty(fallbackVariant)) {\n return fallbackSourceVariant;\n }\n return defaultSourceVariant;\n };\n ExperimentClient.prototype.fetchInternal = function (user, timeoutMillis, retry, options) {\n return __awaiter(this, void 0, void 0, function () {\n var variants, e_3;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // Don't even try to fetch variants if API key is not set\n if (!this.apiKey) {\n throw Error('Experiment API key is empty');\n }\n this.debug(\"[Experiment] Fetch all: retry=\".concat(retry));\n // Proactively cancel retries if active in order to avoid unnecessary API\n // requests. A new failure will restart the retries.\n if (retry) {\n this.stopRetries();\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 4, , 5]);\n return [4 /*yield*/, this.doFetch(user, timeoutMillis, options)];\n case 2:\n variants = _a.sent();\n return [4 /*yield*/, this.storeVariants(variants, options)];\n case 3:\n _a.sent();\n return [2 /*return*/, variants];\n case 4:\n e_3 = _a.sent();\n if (retry && this.shouldRetryFetch(e_3)) {\n void this.startRetries(user, options);\n }\n throw e_3;\n case 5: return [2 /*return*/];\n }\n });\n });\n };\n ExperimentClient.prototype.cleanUserPropsForFetch = function (user) {\n var cleanedUser = __assign({}, user);\n delete cleanedUser.cookie;\n return cleanedUser;\n };\n ExperimentClient.prototype.doFetch = function (user, timeoutMillis, options) {\n return __awaiter(this, void 0, void 0, function () {\n var results, variants, _a, _b, key;\n var e_4, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this.addContextOrWait(user)];\n case 1:\n user = _d.sent();\n user = this.cleanUserPropsForFetch(user);\n this.debug('[Experiment] Fetch variants for user: ', user);\n return [4 /*yield*/, this.evaluationApi.getVariants(user, __assign({ timeoutMillis: timeoutMillis }, options))];\n case 2:\n results = _d.sent();\n variants = {};\n try {\n for (_a = __values(Object.keys(results)), _b = _a.next(); !_b.done; _b = _a.next()) {\n key = _b.value;\n variants[key] = convertEvaluationVariantToVariant(results[key]);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_4) throw e_4.error; }\n }\n this.debug('[Experiment] Received variants: ', variants);\n return [2 /*return*/, variants];\n }\n });\n });\n };\n ExperimentClient.prototype.doFlags = function () {\n return __awaiter(this, void 0, void 0, function () {\n var flags, e_5;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.flagApi.getFlags({\n libraryName: 'experiment-js-client',\n libraryVersion: version,\n timeoutMillis: this.config.fetchTimeoutMillis,\n })];\n case 1:\n flags = _a.sent();\n this.flags.clear();\n this.flags.putAll(flags);\n return [3 /*break*/, 3];\n case 2:\n e_5 = _a.sent();\n if (e_5 instanceof TimeoutError) {\n this.config.debug && console.debug(e_5);\n }\n else {\n throw e_5;\n }\n return [3 /*break*/, 3];\n case 3:\n try {\n this.flags.store();\n }\n catch (e) {\n // catch localStorage undefined error\n }\n this.mergeInitialFlagsWithStorage();\n return [2 /*return*/];\n }\n });\n });\n };\n ExperimentClient.prototype.storeVariants = function (variants, options) {\n return __awaiter(this, void 0, void 0, function () {\n var failedFlagKeys, _loop_1, this_1, key, key;\n return __generator(this, function (_a) {\n failedFlagKeys = options && options.flagKeys ? options.flagKeys : [];\n if (failedFlagKeys.length === 0) {\n this.variants.clear();\n }\n _loop_1 = function (key) {\n failedFlagKeys = failedFlagKeys.filter(function (flagKey) { return flagKey !== key; });\n this_1.variants.put(key, variants[key]);\n };\n this_1 = this;\n for (key in variants) {\n _loop_1(key);\n }\n for (key in failedFlagKeys) {\n this.variants.remove(key);\n }\n try {\n this.variants.store();\n }\n catch (e) {\n // catch localStorage undefined error\n }\n this.debug('[Experiment] Stored variants: ', variants);\n return [2 /*return*/];\n });\n });\n };\n ExperimentClient.prototype.startRetries = function (user, options) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n this.debug('[Experiment] Retry fetch');\n this.retriesBackoff = new Backoff(fetchBackoffAttempts, fetchBackoffMinMillis, fetchBackoffMaxMillis, fetchBackoffScalar);\n void this.retriesBackoff.start(function () { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.fetchInternal(user, fetchBackoffTimeout, false, options)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); });\n return [2 /*return*/];\n });\n });\n };\n ExperimentClient.prototype.stopRetries = function () {\n if (this.retriesBackoff) {\n this.retriesBackoff.cancel();\n }\n };\n ExperimentClient.prototype.addContext = function (user) {\n var _a;\n var providedUser = (_a = this.userProvider) === null || _a === void 0 ? void 0 : _a.getUser();\n var integrationUser = this.integrationManager.getUser();\n var mergedUserProperties = __assign(__assign(__assign({}, providedUser === null || providedUser === void 0 ? void 0 : providedUser.user_properties), integrationUser.user_properties), user === null || user === void 0 ? void 0 : user.user_properties);\n return __assign(__assign(__assign(__assign({ library: \"experiment-js-client/\".concat(version) }, providedUser), integrationUser), user), { user_properties: mergedUserProperties });\n };\n ExperimentClient.prototype.addContextOrWait = function (user) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.integrationManager.ready()];\n case 1:\n _a.sent();\n return [2 /*return*/, this.addContext(user)];\n }\n });\n });\n };\n ExperimentClient.prototype.sourceVariants = function () {\n if (this.config.source == Source.LocalStorage) {\n return this.variants.getAll();\n }\n else if (this.config.source == Source.InitialVariants) {\n return this.config.initialVariants;\n }\n };\n ExperimentClient.prototype.secondaryVariants = function () {\n if (this.config.source == Source.LocalStorage) {\n return this.config.initialVariants;\n }\n else if (this.config.source == Source.InitialVariants) {\n return this.variants.getAll();\n }\n };\n ExperimentClient.prototype.exposureInternal = function (key, sourceVariant) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n // Variant metadata may disable exposure tracking remotely.\n var trackExposure = (_c = (_b = (_a = sourceVariant.variant) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.trackExposure) !== null && _c !== void 0 ? _c : true;\n if (!trackExposure) {\n return;\n }\n this.legacyExposureInternal(key, sourceVariant.variant, sourceVariant.source);\n var exposure = { flag_key: key };\n // Do not track exposure for fallback variants that are not associated with\n // a default variant.\n var fallback = isFallback(sourceVariant.source);\n if (fallback && !sourceVariant.hasDefaultVariant) {\n return;\n }\n if ((_d = sourceVariant.variant) === null || _d === void 0 ? void 0 : _d.expKey) {\n exposure.experiment_key = (_e = sourceVariant.variant) === null || _e === void 0 ? void 0 : _e.expKey;\n }\n var metadata = (_f = sourceVariant.variant) === null || _f === void 0 ? void 0 : _f.metadata;\n if (!fallback && !(metadata === null || metadata === void 0 ? void 0 : metadata.default)) {\n if ((_g = sourceVariant.variant) === null || _g === void 0 ? void 0 : _g.key) {\n exposure.variant = sourceVariant.variant.key;\n }\n else if ((_h = sourceVariant.variant) === null || _h === void 0 ? void 0 : _h.value) {\n exposure.variant = sourceVariant.variant.value;\n }\n }\n if (metadata)\n exposure.metadata = metadata;\n (_j = this.exposureTrackingProvider) === null || _j === void 0 ? void 0 : _j.track(exposure);\n this.integrationManager.track(exposure);\n };\n ExperimentClient.prototype.legacyExposureInternal = function (key, variant, source) {\n var _a, _b, _c, _d, _e;\n if (this.analyticsProvider) {\n var user = this.addContext(this.getUser());\n var event_1 = exposureEvent(user, key, variant, source);\n if (isFallback(source) || !(variant === null || variant === void 0 ? void 0 : variant.value)) {\n (_b = (_a = this.analyticsProvider) === null || _a === void 0 ? void 0 : _a.unsetUserProperty) === null || _b === void 0 ? void 0 : _b.call(_a, event_1);\n }\n else if (variant === null || variant === void 0 ? void 0 : variant.value) {\n (_d = (_c = this.analyticsProvider) === null || _c === void 0 ? void 0 : _c.setUserProperty) === null || _d === void 0 ? void 0 : _d.call(_c, event_1);\n (_e = this.analyticsProvider) === null || _e === void 0 ? void 0 : _e.track(event_1);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ExperimentClient.prototype.debug = function (message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n if (this.config.debug) {\n console.debug.apply(console, __spreadArray([message], __read(optionalParams), false));\n }\n };\n ExperimentClient.prototype.shouldRetryFetch = function (e) {\n if (e instanceof FetchError) {\n return e.statusCode < 400 || e.statusCode >= 500 || e.statusCode === 429;\n }\n return true;\n };\n /**\n * Add a plugin to the experiment client.\n * @param plugin the plugin to add.\n */\n ExperimentClient.prototype.addPlugin = function (plugin) {\n if (plugin.type === 'integration') {\n this.integrationManager.setIntegration(plugin);\n }\n };\n return ExperimentClient;\n}());\n\nvar SessionStorage = /** @class */ (function () {\n function SessionStorage() {\n this.globalScope = getGlobalScope();\n }\n SessionStorage.prototype.get = function (key) {\n var _a;\n return (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.sessionStorage.getItem(key);\n };\n SessionStorage.prototype.put = function (key, value) {\n var _a;\n (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.sessionStorage.setItem(key, value);\n };\n SessionStorage.prototype.delete = function (key) {\n var _a;\n (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.sessionStorage.removeItem(key);\n };\n return SessionStorage;\n}());\n\nvar DefaultUserProvider = /** @class */ (function () {\n function DefaultUserProvider(userProvider, apiKey) {\n var _a, _b, _c;\n this.globalScope = getGlobalScope();\n this.userAgent = typeof ((_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.navigator) !== 'undefined'\n ? (_b = this.globalScope) === null || _b === void 0 ? void 0 : _b.navigator.userAgent\n : undefined;\n this.ua = new UAParser(this.userAgent).getResult();\n this.localStorage = new LocalStorage();\n this.sessionStorage = new SessionStorage();\n this.userProvider = userProvider;\n this.apiKey = apiKey;\n this.storageKey = \"EXP_\".concat((_c = this.apiKey) === null || _c === void 0 ? void 0 : _c.slice(0, 10), \"_DEFAULT_USER_PROVIDER\");\n }\n DefaultUserProvider.prototype.getUser = function () {\n var _a, _b, _c, _d, _e;\n var user = ((_a = this.userProvider) === null || _a === void 0 ? void 0 : _a.getUser()) || {};\n return __assign({ language: this.getLanguage(), platform: 'Web', os: this.getOs(this.ua), device_model: this.getDeviceModel(this.ua), device_category: (_c = (_b = this.ua.device) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : 'desktop', referring_url: (_e = (_d = this.globalScope) === null || _d === void 0 ? void 0 : _d.document) === null || _e === void 0 ? void 0 : _e.referrer.replace(/\\/$/, ''), cookie: this.getCookie(), browser: this.getBrowser(this.ua), landing_url: this.getLandingUrl(), first_seen: this.getFirstSeen(), url_param: this.getUrlParam(), user_agent: this.userAgent }, user);\n };\n DefaultUserProvider.prototype.getLanguage = function () {\n return ((typeof navigator !== 'undefined' &&\n ((navigator.languages && navigator.languages[0]) ||\n navigator.language)) ||\n '');\n };\n DefaultUserProvider.prototype.getOs = function (ua) {\n var _a, _b;\n return [(_a = ua.browser) === null || _a === void 0 ? void 0 : _a.name, (_b = ua.browser) === null || _b === void 0 ? void 0 : _b.major]\n .filter(function (e) { return e !== null && e !== undefined; })\n .join(' ');\n };\n DefaultUserProvider.prototype.getDeviceModel = function (ua) {\n var _a;\n return (_a = ua.os) === null || _a === void 0 ? void 0 : _a.name;\n };\n DefaultUserProvider.prototype.getBrowser = function (ua) {\n var _a;\n var browser = (_a = ua.browser) === null || _a === void 0 ? void 0 : _a.name;\n // Normalize for Chrome, Firefox, Safari, Edge, and Opera.\n if (browser === null || browser === void 0 ? void 0 : browser.includes('Chrom'))\n browser = 'Chrome'; // Chrome, Chrome Mobile, Chromium, etc\n if (browser === null || browser === void 0 ? void 0 : browser.includes('Firefox'))\n browser = 'Firefox'; // Firefox, Firefox Mobile, etc\n if (browser === null || browser === void 0 ? void 0 : browser.includes('Safari'))\n browser = 'Safari'; // Safari, Safari Mobile\n if (browser === null || browser === void 0 ? void 0 : browser.includes('Edge'))\n browser = 'Edge'; // Edge\n if (browser === null || browser === void 0 ? void 0 : browser.includes('Opera'))\n browser = 'Opera'; // Opera, Opera Mobi, etc\n return browser;\n };\n DefaultUserProvider.prototype.getCookie = function () {\n var _a, _b, _c, _d, _e;\n if (!((_b = (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.document) === null || _b === void 0 ? void 0 : _b.cookie)) {\n return undefined;\n }\n return Object.fromEntries((_e = (_d = (_c = this.globalScope) === null || _c === void 0 ? void 0 : _c.document) === null || _d === void 0 ? void 0 : _d.cookie) === null || _e === void 0 ? void 0 : _e.split('; ').map(function (c) { return c.split('='); }));\n };\n DefaultUserProvider.prototype.getLandingUrl = function () {\n var _a, _b;\n try {\n var sessionUser = JSON.parse(this.sessionStorage.get(this.storageKey) || '{}');\n if (!sessionUser.landing_url) {\n sessionUser.landing_url = (_b = (_a = this.globalScope) === null || _a === void 0 ? void 0 : _a.location) === null || _b === void 0 ? void 0 : _b.href.replace(/\\/$/, '');\n this.sessionStorage.put(this.storageKey, JSON.stringify(sessionUser));\n }\n return sessionUser.landing_url;\n }\n catch (_c) {\n return undefined;\n }\n };\n DefaultUserProvider.prototype.getFirstSeen = function () {\n try {\n var localUser = JSON.parse(this.localStorage.get(this.storageKey) || '{}');\n if (!localUser.first_seen) {\n localUser.first_seen = (Date.now() / 1000).toString();\n this.localStorage.put(this.storageKey, JSON.stringify(localUser));\n }\n return localUser.first_seen;\n }\n catch (_a) {\n return undefined;\n }\n };\n DefaultUserProvider.prototype.getUrlParam = function () {\n var e_1, _a;\n var _b, _c, _d;\n if (!this.globalScope) {\n return {};\n }\n var params = {};\n try {\n for (var _e = __values(new URL((_c = (_b = this.globalScope) === null || _b === void 0 ? void 0 : _b.location) === null || _c === void 0 ? void 0 : _c.href)\n .searchParams), _f = _e.next(); !_f.done; _f = _e.next()) {\n var _g = __read(_f.value, 2), name_1 = _g[0], value = _g[1];\n params[name_1] = __spreadArray(__spreadArray([], __read(((_d = params[name_1]) !== null && _d !== void 0 ? _d : [])), false), __read(value.split(',')), false);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_a = _e.return)) _a.call(_e);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return Object.entries(params).reduce(function (acc, _a) {\n var _b = __read(_a, 2), name = _b[0], value = _b[1];\n acc[name] = value.length == 1 ? value[0] : value;\n return acc;\n }, {});\n };\n return DefaultUserProvider;\n}());\n\nvar instances = {};\nvar getInstanceName = function (config) {\n return (config === null || config === void 0 ? void 0 : config.instanceName) || Defaults.instanceName;\n};\n/**\n * Initializes a singleton {@link ExperimentClient} identified by the configured\n * instance name.\n *\n * @param apiKey The deployment API Key\n * @param config See {@link ExperimentConfig} for config options\n */\nvar initialize = function (apiKey, config) {\n // Store instances by appending the instance name and api key. Allows for\n // initializing multiple default instances for different api keys.\n var instanceName = getInstanceName(config);\n // The internal instance name prefix is used by web experiment to differentiate\n // web and feature experiment sdks which use the same api key.\n var internalInstanceNameSuffix = config === null || config === void 0 ? void 0 : config['internalInstanceNameSuffix'];\n var instanceKey = internalInstanceNameSuffix\n ? \"\".concat(instanceName, \".\").concat(apiKey, \".\").concat(internalInstanceNameSuffix)\n : \"\".concat(instanceName, \".\").concat(apiKey);\n if (!instances[instanceKey]) {\n config = __assign(__assign({}, config), { userProvider: new DefaultUserProvider(config === null || config === void 0 ? void 0 : config.userProvider, apiKey) });\n instances[instanceKey] = new ExperimentClient(apiKey, config);\n }\n return instances[instanceKey];\n};\n/**\n * Initialize a singleton {@link ExperimentClient} which automatically\n * integrates with the installed and initialized instance of the amplitude\n * analytics SDK.\n *\n * You must be using amplitude-js SDK version 8.17.0+ for this integration to\n * work.\n *\n * @param apiKey The deployment API Key\n * @param config See {@link ExperimentConfig} for config options\n */\nvar initializeWithAmplitudeAnalytics = function (apiKey, config) {\n var instanceName = getInstanceName(config);\n var client = initialize(apiKey, config);\n client.addPlugin(new AmplitudeIntegrationPlugin(apiKey, AnalyticsConnector.getInstance(instanceName), 10000));\n return client;\n};\n/**\n * Provides factory methods for storing singleton instances of {@link ExperimentClient}\n * @category Core Usage\n */\nvar Experiment = {\n initialize: initialize,\n initializeWithAmplitudeAnalytics: initializeWithAmplitudeAnalytics,\n};\n\n/**\n * A stub {@link Client} implementation that does nothing for all methods\n */\nvar StubExperimentClient = /** @class */ (function () {\n function StubExperimentClient() {\n }\n StubExperimentClient.prototype.getUser = function () {\n return {};\n };\n StubExperimentClient.prototype.start = function (user) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/];\n });\n });\n };\n StubExperimentClient.prototype.stop = function () { };\n StubExperimentClient.prototype.setUser = function (user) { };\n StubExperimentClient.prototype.fetch = function (user) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this];\n });\n });\n };\n StubExperimentClient.prototype.getUserProvider = function () {\n return null;\n };\n StubExperimentClient.prototype.setUserProvider = function (uerProvider) {\n return this;\n };\n StubExperimentClient.prototype.variant = function (key, fallback) {\n return Defaults.fallbackVariant;\n };\n StubExperimentClient.prototype.all = function () {\n return {};\n };\n StubExperimentClient.prototype.clear = function () { };\n StubExperimentClient.prototype.exposure = function (key) { };\n return StubExperimentClient;\n}());\n\nexport { AmplitudeAnalyticsProvider, AmplitudeIntegrationPlugin, AmplitudeUserProvider, Experiment, ExperimentClient, Source, StubExperimentClient };\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// Updates to this file should also be replicated to @opentelemetry/core too.\n/**\n * - globalThis (New standard)\n * - self (Will return the current window instance for supported browsers)\n * - window (fallback for older browser implementations)\n * - global (NodeJS implementation)\n * - (When all else fails)\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef\nexport var _globalThis = typeof globalThis === 'object'\n ? globalThis\n : typeof self === 'object'\n ? self\n : typeof window === 'object'\n ? window\n : typeof global === 'object'\n ? global\n : {};\n//# sourceMappingURL=globalThis.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.8.0';\n//# sourceMappingURL=version.js.map","/*\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 { VERSION } from '../version';\nvar re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\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(ownVersion) {\n var acceptedVersions = new Set([ownVersion]);\n var rejectedVersions = new Set();\n var myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return function () { return false; };\n }\n var ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n var 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 var globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\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 var isCompatible = _makeCompatibilityCheck(VERSION);\n//# sourceMappingURL=semver.js.map","/*\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 { _globalThis } from '../platform';\nimport { VERSION } from '../version';\nimport { isCompatible } from './semver';\nvar major = VERSION.split('.')[0];\nvar GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\"opentelemetry.js.api.\" + major);\nvar _global = _globalThis;\nexport function registerGlobal(type, instance, diag, allowOverride) {\n var _a;\n if (allowOverride === void 0) { allowOverride = false; }\n var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n var err = new Error(\"@opentelemetry/api: Attempted duplicate registration of API: \" + type);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== VERSION) {\n // All registered APIs must be of the same version exactly\n var err = new Error(\"@opentelemetry/api: Registration of version v\" + api.version + \" for \" + type + \" does not match previously registered API v\" + VERSION);\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(\"@opentelemetry/api: Registered a global for \" + type + \" v\" + VERSION + \".\");\n return true;\n}\nexport function getGlobal(type) {\n var _a, _b;\n var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !isCompatible(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexport function unregisterGlobal(type, diag) {\n diag.debug(\"@opentelemetry/api: Unregistering a global for \" + type + \" v\" + VERSION + \".\");\n var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\n//# sourceMappingURL=global-utils.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { getGlobal } from '../internal/global-utils';\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 */\nvar DiagComponentLogger = /** @class */ (function () {\n function DiagComponentLogger(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n DiagComponentLogger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('debug', this._namespace, args);\n };\n DiagComponentLogger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('error', this._namespace, args);\n };\n DiagComponentLogger.prototype.info = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('info', this._namespace, args);\n };\n DiagComponentLogger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('warn', this._namespace, args);\n };\n DiagComponentLogger.prototype.verbose = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('verbose', this._namespace, args);\n };\n return DiagComponentLogger;\n}());\nexport { DiagComponentLogger };\nfunction logProxy(funcName, namespace, args) {\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n}\n//# sourceMappingURL=ComponentLogger.js.map","/*\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 * 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 var DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","/*\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 { DiagLogLevel } from '../types';\nexport function createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < DiagLogLevel.NONE) {\n maxLevel = DiagLogLevel.NONE;\n }\n else if (maxLevel > DiagLogLevel.ALL) {\n maxLevel = DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n var theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\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//# sourceMappingURL=logLevelLogger.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { DiagComponentLogger } from '../diag/ComponentLogger';\nimport { createLogLevelDiagLogger } from '../diag/internal/logLevelLogger';\nimport { DiagLogLevel, } from '../diag/types';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nvar API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nvar DiagAPI = /** @class */ (function () {\n /**\n * Private internal constructor\n * @private\n */\n function DiagAPI() {\n function _logProxy(funcName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n var self = this;\n // DiagAPI specific functions\n var setLogger = function (logger, optionsOrLogLevel) {\n var _a, _b, _c;\n if (optionsOrLogLevel === void 0) { optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }; }\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 var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n if (typeof optionsOrLogLevel === 'number') {\n optionsOrLogLevel = {\n logLevel: optionsOrLogLevel,\n };\n }\n var oldLogger = getGlobal('diag');\n var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '';\n oldLogger.warn(\"Current logger will be overwritten from \" + stack);\n newLogger.warn(\"Current logger will overwrite one already registered from \" + stack);\n }\n return registerGlobal('diag', newLogger, self, true);\n };\n self.setLogger = setLogger;\n self.disable = function () {\n unregisterGlobal(API_NAME, self);\n };\n self.createComponentLogger = function (options) {\n return new DiagComponentLogger(options);\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 /** Get the singleton instance of the DiagAPI API */\n DiagAPI.instance = function () {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n };\n return DiagAPI;\n}());\nexport { DiagAPI };\n//# sourceMappingURL=diag.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar BaggageImpl = /** @class */ (function () {\n function BaggageImpl(entries) {\n this._entries = entries ? new Map(entries) : new Map();\n }\n BaggageImpl.prototype.getEntry = function (key) {\n var entry = this._entries.get(key);\n if (!entry) {\n return undefined;\n }\n return Object.assign({}, entry);\n };\n BaggageImpl.prototype.getAllEntries = function () {\n return Array.from(this._entries.entries()).map(function (_a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return [k, v];\n });\n };\n BaggageImpl.prototype.setEntry = function (key, entry) {\n var newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.set(key, entry);\n return newBaggage;\n };\n BaggageImpl.prototype.removeEntry = function (key) {\n var newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.delete(key);\n return newBaggage;\n };\n BaggageImpl.prototype.removeEntries = function () {\n var e_1, _a;\n var keys = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n keys[_i] = arguments[_i];\n }\n var newBaggage = new BaggageImpl(this._entries);\n try {\n for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {\n var key = keys_1_1.value;\n newBaggage._entries.delete(key);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return newBaggage;\n };\n BaggageImpl.prototype.clear = function () {\n return new BaggageImpl();\n };\n return BaggageImpl;\n}());\nexport { BaggageImpl };\n//# sourceMappingURL=baggage-impl.js.map","/*\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 * Symbol used to make BaggageEntryMetadata an opaque type\n */\nexport var baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');\n//# sourceMappingURL=symbol.js.map","/*\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 { DiagAPI } from '../api/diag';\nimport { BaggageImpl } from './internal/baggage-impl';\nimport { baggageEntryMetadataSymbol } from './internal/symbol';\nvar diag = DiagAPI.instance();\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(entries) {\n if (entries === void 0) { entries = {}; }\n return new BaggageImpl(new Map(Object.entries(entries)));\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(str) {\n if (typeof str !== 'string') {\n diag.error(\"Cannot create baggage metadata from unknown type: \" + typeof str);\n str = '';\n }\n return {\n __TYPE__: baggageEntryMetadataSymbol,\n toString: function () {\n return str;\n },\n };\n}\n//# sourceMappingURL=utils.js.map","/*\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/** Get a key to uniquely identify a context value */\nexport function createContextKey(description) {\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}\nvar BaseContext = /** @class */ (function () {\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 function BaseContext(parentContext) {\n // for minification\n var self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = function (key) { return self._currentContext.get(key); };\n self.setValue = function (key, value) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = function (key) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n return BaseContext;\n}());\n/** The root context is used as the default parent context when there is no active context */\nexport var ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses\n * constant NoopMetrics for all of its methods.\n */\nvar NoopMeter = /** @class */ (function () {\n function NoopMeter() {\n }\n /**\n * @see {@link Meter.createHistogram}\n */\n NoopMeter.prototype.createHistogram = function (_name, _options) {\n return NOOP_HISTOGRAM_METRIC;\n };\n /**\n * @see {@link Meter.createCounter}\n */\n NoopMeter.prototype.createCounter = function (_name, _options) {\n return NOOP_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.createUpDownCounter}\n */\n NoopMeter.prototype.createUpDownCounter = function (_name, _options) {\n return NOOP_UP_DOWN_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.createObservableGauge}\n */\n NoopMeter.prototype.createObservableGauge = function (_name, _options) {\n return NOOP_OBSERVABLE_GAUGE_METRIC;\n };\n /**\n * @see {@link Meter.createObservableCounter}\n */\n NoopMeter.prototype.createObservableCounter = function (_name, _options) {\n return NOOP_OBSERVABLE_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.createObservableUpDownCounter}\n */\n NoopMeter.prototype.createObservableUpDownCounter = function (_name, _options) {\n return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.addBatchObservableCallback}\n */\n NoopMeter.prototype.addBatchObservableCallback = function (_callback, _observables) { };\n /**\n * @see {@link Meter.removeBatchObservableCallback}\n */\n NoopMeter.prototype.removeBatchObservableCallback = function (_callback) { };\n return NoopMeter;\n}());\nexport { NoopMeter };\nvar NoopMetric = /** @class */ (function () {\n function NoopMetric() {\n }\n return NoopMetric;\n}());\nexport { NoopMetric };\nvar NoopCounterMetric = /** @class */ (function (_super) {\n __extends(NoopCounterMetric, _super);\n function NoopCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopCounterMetric.prototype.add = function (_value, _attributes) { };\n return NoopCounterMetric;\n}(NoopMetric));\nexport { NoopCounterMetric };\nvar NoopUpDownCounterMetric = /** @class */ (function (_super) {\n __extends(NoopUpDownCounterMetric, _super);\n function NoopUpDownCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopUpDownCounterMetric.prototype.add = function (_value, _attributes) { };\n return NoopUpDownCounterMetric;\n}(NoopMetric));\nexport { NoopUpDownCounterMetric };\nvar NoopHistogramMetric = /** @class */ (function (_super) {\n __extends(NoopHistogramMetric, _super);\n function NoopHistogramMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopHistogramMetric.prototype.record = function (_value, _attributes) { };\n return NoopHistogramMetric;\n}(NoopMetric));\nexport { NoopHistogramMetric };\nvar NoopObservableMetric = /** @class */ (function () {\n function NoopObservableMetric() {\n }\n NoopObservableMetric.prototype.addCallback = function (_callback) { };\n NoopObservableMetric.prototype.removeCallback = function (_callback) { };\n return NoopObservableMetric;\n}());\nexport { NoopObservableMetric };\nvar NoopObservableCounterMetric = /** @class */ (function (_super) {\n __extends(NoopObservableCounterMetric, _super);\n function NoopObservableCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return NoopObservableCounterMetric;\n}(NoopObservableMetric));\nexport { NoopObservableCounterMetric };\nvar NoopObservableGaugeMetric = /** @class */ (function (_super) {\n __extends(NoopObservableGaugeMetric, _super);\n function NoopObservableGaugeMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return NoopObservableGaugeMetric;\n}(NoopObservableMetric));\nexport { NoopObservableGaugeMetric };\nvar NoopObservableUpDownCounterMetric = /** @class */ (function (_super) {\n __extends(NoopObservableUpDownCounterMetric, _super);\n function NoopObservableUpDownCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return NoopObservableUpDownCounterMetric;\n}(NoopObservableMetric));\nexport { NoopObservableUpDownCounterMetric };\nexport var NOOP_METER = new NoopMeter();\n// Synchronous instruments\nexport var NOOP_COUNTER_METRIC = new NoopCounterMetric();\nexport var NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();\nexport var NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();\n// Asynchronous instruments\nexport var NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();\nexport var NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();\nexport var NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();\n/**\n * Create a no-op Meter\n */\nexport function createNoopMeter() {\n return NOOP_METER;\n}\n//# sourceMappingURL=NoopMeter.js.map","/*\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/** The Type of value. It describes how the data is reported. */\nexport var ValueType;\n(function (ValueType) {\n ValueType[ValueType[\"INT\"] = 0] = \"INT\";\n ValueType[ValueType[\"DOUBLE\"] = 1] = \"DOUBLE\";\n})(ValueType || (ValueType = {}));\n//# sourceMappingURL=Metric.js.map","/*\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 var defaultTextMapGetter = {\n get: function (carrier, key) {\n if (carrier == null) {\n return undefined;\n }\n return carrier[key];\n },\n keys: function (carrier) {\n if (carrier == null) {\n return [];\n }\n return Object.keys(carrier);\n },\n};\nexport var defaultTextMapSetter = {\n set: function (carrier, key, value) {\n if (carrier == null) {\n return;\n }\n carrier[key] = value;\n },\n};\n//# sourceMappingURL=TextMapPropagator.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ROOT_CONTEXT } from './context';\nvar NoopContextManager = /** @class */ (function () {\n function NoopContextManager() {\n }\n NoopContextManager.prototype.active = function () {\n return ROOT_CONTEXT;\n };\n NoopContextManager.prototype.with = function (_context, fn, thisArg) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return fn.call.apply(fn, __spreadArray([thisArg], __read(args), false));\n };\n NoopContextManager.prototype.bind = function (_context, target) {\n return target;\n };\n NoopContextManager.prototype.enable = function () {\n return this;\n };\n NoopContextManager.prototype.disable = function () {\n return this;\n };\n return NoopContextManager;\n}());\nexport { NoopContextManager };\n//# sourceMappingURL=NoopContextManager.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { NoopContextManager } from '../context/NoopContextManager';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'context';\nvar NOOP_CONTEXT_MANAGER = new NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nvar ContextAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function ContextAPI() {\n }\n /** Get the singleton instance of the Context API */\n ContextAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n };\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n ContextAPI.prototype.setGlobalContextManager = function (contextManager) {\n return registerGlobal(API_NAME, contextManager, DiagAPI.instance());\n };\n /**\n * Get the currently active context\n */\n ContextAPI.prototype.active = function () {\n return this._getContextManager().active();\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 ContextAPI.prototype.with = function (context, fn, thisArg) {\n var _a;\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], __read(args), false));\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 ContextAPI.prototype.bind = function (context, target) {\n return this._getContextManager().bind(context, target);\n };\n ContextAPI.prototype._getContextManager = function () {\n return getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER;\n };\n /** Disable and remove the global context manager */\n ContextAPI.prototype.disable = function () {\n this._getContextManager().disable();\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n return ContextAPI;\n}());\nexport { ContextAPI };\n//# sourceMappingURL=context.js.map","/*\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 var TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags || (TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","/*\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 { TraceFlags } from './trace_flags';\nexport var INVALID_SPANID = '0000000000000000';\nexport var INVALID_TRACEID = '00000000000000000000000000000000';\nexport var INVALID_SPAN_CONTEXT = {\n traceId: INVALID_TRACEID,\n spanId: INVALID_SPANID,\n traceFlags: TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","/*\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_SPAN_CONTEXT } from './invalid-span-constants';\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 */\nvar NonRecordingSpan = /** @class */ (function () {\n function NonRecordingSpan(_spanContext) {\n if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n NonRecordingSpan.prototype.spanContext = function () {\n return this._spanContext;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttribute = function (_key, _value) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttributes = function (_attributes) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.addEvent = function (_name, _attributes) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setStatus = function (_status) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.updateName = function (_name) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.end = function (_endTime) { };\n // isRecording always returns false for NonRecordingSpan.\n NonRecordingSpan.prototype.isRecording = function () {\n return false;\n };\n // By default does nothing\n NonRecordingSpan.prototype.recordException = function (_exception, _time) { };\n return NonRecordingSpan;\n}());\nexport { NonRecordingSpan };\n//# sourceMappingURL=NonRecordingSpan.js.map","/*\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 { createContextKey } from '../context/context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n/**\n * span key\n */\nvar SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan() {\n return getSpan(ContextAPI.getInstance().active());\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, span) {\n return context.setValue(SPAN_KEY, span);\n}\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\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(context, spanContext) {\n return setSpan(context, new NonRecordingSpan(spanContext));\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) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\n//# sourceMappingURL=context-utils.js.map","/*\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';\nvar VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nvar VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nexport function isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\nexport function isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\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) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\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) {\n return new NonRecordingSpan(spanContext);\n}\n//# sourceMappingURL=spancontext-utils.js.map","/*\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 { ContextAPI } from '../api/context';\nimport { getSpanContext, setSpan } from '../trace/context-utils';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { isSpanContextValid } from './spancontext-utils';\nvar contextApi = ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nvar NoopTracer = /** @class */ (function () {\n function NoopTracer() {\n }\n // startSpan starts a noop span.\n NoopTracer.prototype.startSpan = function (name, options, context) {\n if (context === void 0) { context = contextApi.active(); }\n var root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan();\n }\n var parentFromContext = context && getSpanContext(context);\n if (isSpanContext(parentFromContext) &&\n isSpanContextValid(parentFromContext)) {\n return new NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan();\n }\n };\n NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) {\n var opts;\n var ctx;\n var fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n var span = this.startSpan(name, opts, parentContext);\n var contextWithSpanSet = setSpan(parentContext, span);\n return contextApi.with(contextWithSpanSet, fn, undefined, span);\n };\n return NoopTracer;\n}());\nexport { NoopTracer };\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","/*\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 { NoopTracer } from './NoopTracer';\nvar NOOP_TRACER = new NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nvar ProxyTracer = /** @class */ (function () {\n function ProxyTracer(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n ProxyTracer.prototype.startSpan = function (name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n };\n ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) {\n var tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\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 ProxyTracer.prototype._getTracer = function () {\n if (this._delegate) {\n return this._delegate;\n }\n var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n };\n return ProxyTracer;\n}());\nexport { ProxyTracer };\n//# sourceMappingURL=ProxyTracer.js.map","/*\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 { NoopTracer } from './NoopTracer';\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 */\nvar NoopTracerProvider = /** @class */ (function () {\n function NoopTracerProvider() {\n }\n NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {\n return new NoopTracer();\n };\n return NoopTracerProvider;\n}());\nexport { NoopTracerProvider };\n//# sourceMappingURL=NoopTracerProvider.js.map","/*\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 { ProxyTracer } from './ProxyTracer';\nimport { NoopTracerProvider } from './NoopTracerProvider';\nvar NOOP_TRACER_PROVIDER = new NoopTracerProvider();\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 */\nvar ProxyTracerProvider = /** @class */ (function () {\n function ProxyTracerProvider() {\n }\n /**\n * Get a {@link ProxyTracer}\n */\n ProxyTracerProvider.prototype.getTracer = function (name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options));\n };\n ProxyTracerProvider.prototype.getDelegate = function () {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n };\n /**\n * Set the delegate tracer provider\n */\n ProxyTracerProvider.prototype.setDelegate = function (delegate) {\n this._delegate = delegate;\n };\n ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n };\n return ProxyTracerProvider;\n}());\nexport { ProxyTracerProvider };\n//# sourceMappingURL=ProxyTracerProvider.js.map","/*\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 * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nexport var SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision || (SamplingDecision = {}));\n//# sourceMappingURL=SamplingResult.js.map","/*\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 var SpanKind;\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(SpanKind || (SpanKind = {}));\n//# sourceMappingURL=span_kind.js.map","/**\n * An enumeration of status codes.\n */\nexport var SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode || (SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","/*\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// 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 var context = ContextAPI.getInstance();\n//# sourceMappingURL=context-api.js.map","/*\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// 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 var diag = DiagAPI.instance();\n//# sourceMappingURL=diag-api.js.map","/*\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 { NOOP_METER } from './NoopMeter';\n/**\n * An implementation of the {@link MeterProvider} which returns an impotent Meter\n * for all calls to `getMeter`\n */\nvar NoopMeterProvider = /** @class */ (function () {\n function NoopMeterProvider() {\n }\n NoopMeterProvider.prototype.getMeter = function (_name, _version, _options) {\n return NOOP_METER;\n };\n return NoopMeterProvider;\n}());\nexport { NoopMeterProvider };\nexport var NOOP_METER_PROVIDER = new NoopMeterProvider();\n//# sourceMappingURL=NoopMeterProvider.js.map","/*\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 { NOOP_METER_PROVIDER } from '../metrics/NoopMeterProvider';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'metrics';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Metrics API\n */\nvar MetricsAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function MetricsAPI() {\n }\n /** Get the singleton instance of the Metrics API */\n MetricsAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new MetricsAPI();\n }\n return this._instance;\n };\n /**\n * Set the current global meter provider.\n * Returns true if the meter provider was successfully registered, else false.\n */\n MetricsAPI.prototype.setGlobalMeterProvider = function (provider) {\n return registerGlobal(API_NAME, provider, DiagAPI.instance());\n };\n /**\n * Returns the global meter provider.\n */\n MetricsAPI.prototype.getMeterProvider = function () {\n return getGlobal(API_NAME) || NOOP_METER_PROVIDER;\n };\n /**\n * Returns a meter from the global meter provider.\n */\n MetricsAPI.prototype.getMeter = function (name, version, options) {\n return this.getMeterProvider().getMeter(name, version, options);\n };\n /** Remove the global meter provider */\n MetricsAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n return MetricsAPI;\n}());\nexport { MetricsAPI };\n//# sourceMappingURL=metrics.js.map","/*\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// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { MetricsAPI } from './api/metrics';\n/** Entrypoint for metrics API */\nexport var metrics = MetricsAPI.getInstance();\n//# sourceMappingURL=metrics-api.js.map","/*\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 * No-op implementations of {@link TextMapPropagator}.\n */\nvar NoopTextMapPropagator = /** @class */ (function () {\n function NoopTextMapPropagator() {\n }\n /** Noop inject function does nothing */\n NoopTextMapPropagator.prototype.inject = function (_context, _carrier) { };\n /** Noop extract function does nothing and returns the input context */\n NoopTextMapPropagator.prototype.extract = function (context, _carrier) {\n return context;\n };\n NoopTextMapPropagator.prototype.fields = function () {\n return [];\n };\n return NoopTextMapPropagator;\n}());\nexport { NoopTextMapPropagator };\n//# sourceMappingURL=NoopTextMapPropagator.js.map","/*\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 { ContextAPI } from '../api/context';\nimport { createContextKey } from '../context/context';\n/**\n * Baggage key\n */\nvar BAGGAGE_KEY = createContextKey('OpenTelemetry Baggage Key');\n/**\n * Retrieve the current baggage from the given context\n *\n * @param {Context} Context that manage all context values\n * @returns {Baggage} Extracted baggage from the context\n */\nexport function getBaggage(context) {\n return context.getValue(BAGGAGE_KEY) || undefined;\n}\n/**\n * Retrieve the current baggage from the active/current context\n *\n * @returns {Baggage} Extracted baggage from the context\n */\nexport function getActiveBaggage() {\n return getBaggage(ContextAPI.getInstance().active());\n}\n/**\n * Store a baggage in the given context\n *\n * @param {Context} Context that manage all context values\n * @param {Baggage} baggage that will be set in the actual context\n */\nexport function setBaggage(context, baggage) {\n return context.setValue(BAGGAGE_KEY, baggage);\n}\n/**\n * Delete the baggage stored in the given context\n *\n * @param {Context} Context that manage all context values\n */\nexport function deleteBaggage(context) {\n return context.deleteValue(BAGGAGE_KEY);\n}\n//# sourceMappingURL=context-helpers.js.map","/*\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 { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { NoopTextMapPropagator } from '../propagation/NoopTextMapPropagator';\nimport { defaultTextMapGetter, defaultTextMapSetter, } from '../propagation/TextMapPropagator';\nimport { getBaggage, getActiveBaggage, setBaggage, deleteBaggage, } from '../baggage/context-helpers';\nimport { createBaggage } from '../baggage/utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'propagation';\nvar NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Propagation API\n */\nvar PropagationAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function PropagationAPI() {\n this.createBaggage = createBaggage;\n this.getBaggage = getBaggage;\n this.getActiveBaggage = getActiveBaggage;\n this.setBaggage = setBaggage;\n this.deleteBaggage = deleteBaggage;\n }\n /** Get the singleton instance of the Propagator API */\n PropagationAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new PropagationAPI();\n }\n return this._instance;\n };\n /**\n * Set the current propagator.\n *\n * @returns true if the propagator was successfully registered, else false\n */\n PropagationAPI.prototype.setGlobalPropagator = function (propagator) {\n return registerGlobal(API_NAME, propagator, DiagAPI.instance());\n };\n /**\n * Inject context into a carrier to be propagated inter-process\n *\n * @param context Context carrying tracing data to inject\n * @param carrier carrier to inject context into\n * @param setter Function used to set values on the carrier\n */\n PropagationAPI.prototype.inject = function (context, carrier, setter) {\n if (setter === void 0) { setter = defaultTextMapSetter; }\n return this._getGlobalPropagator().inject(context, carrier, setter);\n };\n /**\n * Extract context from a carrier\n *\n * @param context Context which the newly created context will inherit from\n * @param carrier Carrier to extract context from\n * @param getter Function used to extract keys from a carrier\n */\n PropagationAPI.prototype.extract = function (context, carrier, getter) {\n if (getter === void 0) { getter = defaultTextMapGetter; }\n return this._getGlobalPropagator().extract(context, carrier, getter);\n };\n /**\n * Return a list of all fields which may be used by the propagator.\n */\n PropagationAPI.prototype.fields = function () {\n return this._getGlobalPropagator().fields();\n };\n /** Remove the global propagator */\n PropagationAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n PropagationAPI.prototype._getGlobalPropagator = function () {\n return getGlobal(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;\n };\n return PropagationAPI;\n}());\nexport { PropagationAPI };\n//# sourceMappingURL=propagation.js.map","/*\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// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { PropagationAPI } from './api/propagation';\n/** Entrypoint for propagation API */\nexport var propagation = PropagationAPI.getInstance();\n//# sourceMappingURL=propagation-api.js.map","/*\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 { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { ProxyTracerProvider } from '../trace/ProxyTracerProvider';\nimport { isSpanContextValid, wrapSpanContext, } from '../trace/spancontext-utils';\nimport { deleteSpan, getActiveSpan, getSpan, getSpanContext, setSpan, setSpanContext, } from '../trace/context-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nvar TraceAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function TraceAPI() {\n this._proxyTracerProvider = new ProxyTracerProvider();\n this.wrapSpanContext = wrapSpanContext;\n this.isSpanContextValid = isSpanContextValid;\n this.deleteSpan = deleteSpan;\n this.getSpan = getSpan;\n this.getActiveSpan = getActiveSpan;\n this.getSpanContext = getSpanContext;\n this.setSpan = setSpan;\n this.setSpanContext = setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n TraceAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n };\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n TraceAPI.prototype.setGlobalTracerProvider = function (provider) {\n var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n };\n /**\n * Returns the global tracer provider.\n */\n TraceAPI.prototype.getTracerProvider = function () {\n return getGlobal(API_NAME) || this._proxyTracerProvider;\n };\n /**\n * Returns a tracer from the global tracer provider.\n */\n TraceAPI.prototype.getTracer = function (name, version) {\n return this.getTracerProvider().getTracer(name, version);\n };\n /** Remove the global tracer provider */\n TraceAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider();\n };\n return TraceAPI;\n}());\nexport { TraceAPI };\n//# sourceMappingURL=trace.js.map","/*\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// 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 var trace = TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","/*\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 { baggageEntryMetadataFromString } from './baggage/utils';\n// Context APIs\nexport { createContextKey, ROOT_CONTEXT } from './context/context';\n// Diag APIs\nexport { DiagConsoleLogger } from './diag/consoleLogger';\nexport { DiagLogLevel, } from './diag/types';\n// Metrics APIs\nexport { createNoopMeter } from './metrics/NoopMeter';\nexport { ValueType, } from './metrics/Metric';\n// Propagation APIs\nexport { defaultTextMapGetter, defaultTextMapSetter, } from './propagation/TextMapPropagator';\nexport { ProxyTracer } from './trace/ProxyTracer';\nexport { ProxyTracerProvider } from './trace/ProxyTracerProvider';\nexport { SamplingDecision } from './trace/SamplingResult';\nexport { SpanKind } from './trace/span_kind';\nexport { SpanStatusCode } from './trace/status';\nexport { TraceFlags } from './trace/trace_flags';\nexport { createTraceState } from './trace/internal/utils';\nexport { isSpanContextValid, isValidTraceId, isValidSpanId, } from './trace/spancontext-utils';\nexport { INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT, } from './trace/invalid-span-constants';\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// Named export.\nexport { context, diag, metrics, propagation, trace };\n// Default export.\nexport default {\n context: context,\n diag: diag,\n metrics: metrics,\n propagation: propagation,\n trace: trace,\n};\n//# sourceMappingURL=index.js.map","/*\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 * AggregationTemporality indicates the way additive quantities are expressed.\n */\nexport var AggregationTemporality;\n(function (AggregationTemporality) {\n AggregationTemporality[AggregationTemporality[\"DELTA\"] = 0] = \"DELTA\";\n AggregationTemporality[AggregationTemporality[\"CUMULATIVE\"] = 1] = \"CUMULATIVE\";\n})(AggregationTemporality || (AggregationTemporality = {}));\n//# sourceMappingURL=AggregationTemporality.js.map","/*\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 * The aggregated point data type.\n */\nexport var DataPointType;\n(function (DataPointType) {\n /**\n * A histogram data point contains a histogram statistics of collected\n * values with a list of explicit bucket boundaries and statistics such\n * as min, max, count, and sum of all collected values.\n */\n DataPointType[DataPointType[\"HISTOGRAM\"] = 0] = \"HISTOGRAM\";\n /**\n * An exponential histogram data point contains a histogram statistics of\n * collected values where bucket boundaries are automatically calculated\n * using an exponential function, and statistics such as min, max, count,\n * and sum of all collected values.\n */\n DataPointType[DataPointType[\"EXPONENTIAL_HISTOGRAM\"] = 1] = \"EXPONENTIAL_HISTOGRAM\";\n /**\n * A gauge metric data point has only a single numeric value.\n */\n DataPointType[DataPointType[\"GAUGE\"] = 2] = \"GAUGE\";\n /**\n * A sum metric data point has a single numeric value and a\n * monotonicity-indicator.\n */\n DataPointType[DataPointType[\"SUM\"] = 3] = \"SUM\";\n})(DataPointType || (DataPointType = {}));\n//# sourceMappingURL=MetricData.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nexport function isNotNullish(item) {\n return item !== undefined && item !== null;\n}\n/**\n * Converting the unordered attributes into unique identifier string.\n * @param attributes user provided unordered Attributes.\n */\nexport function hashAttributes(attributes) {\n var keys = Object.keys(attributes);\n if (keys.length === 0)\n return '';\n // Return a string that is stable on key orders.\n keys = keys.sort();\n return JSON.stringify(keys.map(function (key) { return [key, attributes[key]]; }));\n}\n/**\n * Converting the instrumentation scope object to a unique identifier string.\n * @param instrumentationScope\n */\nexport function instrumentationScopeId(instrumentationScope) {\n var _a, _b;\n return instrumentationScope.name + \":\" + ((_a = instrumentationScope.version) !== null && _a !== void 0 ? _a : '') + \":\" + ((_b = instrumentationScope.schemaUrl) !== null && _b !== void 0 ? _b : '');\n}\n/**\n * Error that is thrown on timeouts.\n */\nvar TimeoutError = /** @class */ (function (_super) {\n __extends(TimeoutError, _super);\n function TimeoutError(message) {\n var _this = _super.call(this, message) || this;\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 return _this;\n }\n return TimeoutError;\n}(Error));\nexport { TimeoutError };\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 *

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(promise, timeout) {\n var timeoutHandle;\n var timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {\n timeoutHandle = setTimeout(function timeoutHandler() {\n reject(new TimeoutError('Operation timed out.'));\n }, timeout);\n });\n return Promise.race([promise, timeoutPromise]).then(function (result) {\n clearTimeout(timeoutHandle);\n return result;\n }, function (reason) {\n clearTimeout(timeoutHandle);\n throw reason;\n });\n}\n/**\n * Node.js v12.9 lower and browser compatible `Promise.allSettled`.\n */\nexport function PromiseAllSettled(promises) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, Promise.all(promises.map(function (p) { return __awaiter(_this, void 0, void 0, function () {\n var ret, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, p];\n case 1:\n ret = _a.sent();\n return [2 /*return*/, {\n status: 'fulfilled',\n value: ret,\n }];\n case 2:\n e_1 = _a.sent();\n return [2 /*return*/, {\n status: 'rejected',\n reason: e_1,\n }];\n case 3: return [2 /*return*/];\n }\n });\n }); }))];\n });\n });\n}\nexport function isPromiseAllSettledRejectionResult(it) {\n return it.status === 'rejected';\n}\n/**\n * Node.js v11.0 lower and browser compatible `Array.prototype.flatMap`.\n */\nexport function FlatMap(arr, fn) {\n var result = [];\n arr.forEach(function (it) {\n result.push.apply(result, __spreadArray([], __read(fn(it)), false));\n });\n return result;\n}\nexport function setEquals(lhs, rhs) {\n var e_2, _a;\n if (lhs.size !== rhs.size) {\n return false;\n }\n try {\n for (var lhs_1 = __values(lhs), lhs_1_1 = lhs_1.next(); !lhs_1_1.done; lhs_1_1 = lhs_1.next()) {\n var item = lhs_1_1.value;\n if (!rhs.has(item)) {\n return false;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (lhs_1_1 && !lhs_1_1.done && (_a = lhs_1.return)) _a.call(lhs_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return true;\n}\n/**\n * Binary search the sorted array to the find upper bound for the value.\n * @param arr\n * @param value\n * @returns\n */\nexport function binarySearchUB(arr, value) {\n var lo = 0;\n var hi = arr.length - 1;\n var ret = arr.length;\n while (hi >= lo) {\n var mid = lo + Math.trunc((hi - lo) / 2);\n if (arr[mid] < value) {\n lo = mid + 1;\n }\n else {\n ret = mid;\n hi = mid - 1;\n }\n }\n return ret;\n}\nexport function equalsCaseInsensitive(lhs, rhs) {\n return lhs.toLowerCase() === rhs.toLowerCase();\n}\n//# sourceMappingURL=utils.js.map","/*\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/** The kind of aggregator. */\nexport var AggregatorKind;\n(function (AggregatorKind) {\n AggregatorKind[AggregatorKind[\"DROP\"] = 0] = \"DROP\";\n AggregatorKind[AggregatorKind[\"SUM\"] = 1] = \"SUM\";\n AggregatorKind[AggregatorKind[\"LAST_VALUE\"] = 2] = \"LAST_VALUE\";\n AggregatorKind[AggregatorKind[\"HISTOGRAM\"] = 3] = \"HISTOGRAM\";\n AggregatorKind[AggregatorKind[\"EXPONENTIAL_HISTOGRAM\"] = 4] = \"EXPONENTIAL_HISTOGRAM\";\n})(AggregatorKind || (AggregatorKind = {}));\n//# sourceMappingURL=types.js.map","/*\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 { AggregatorKind } from './types';\n/** Basic aggregator for None which keeps no recorded value. */\nvar DropAggregator = /** @class */ (function () {\n function DropAggregator() {\n this.kind = AggregatorKind.DROP;\n }\n DropAggregator.prototype.createAccumulation = function () {\n return undefined;\n };\n DropAggregator.prototype.merge = function (_previous, _delta) {\n return undefined;\n };\n DropAggregator.prototype.diff = function (_previous, _current) {\n return undefined;\n };\n DropAggregator.prototype.toMetricData = function (_descriptor, _aggregationTemporality, _accumulationByAttributes, _endTime) {\n return undefined;\n };\n return DropAggregator;\n}());\nexport { DropAggregator };\n//# sourceMappingURL=Drop.js.map","/*\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 { ValueType, diag } from '@opentelemetry/api';\nimport { equalsCaseInsensitive } from './utils';\n/**\n * Supported types of metric instruments.\n */\nexport var InstrumentType;\n(function (InstrumentType) {\n InstrumentType[\"COUNTER\"] = \"COUNTER\";\n InstrumentType[\"GAUGE\"] = \"GAUGE\";\n InstrumentType[\"HISTOGRAM\"] = \"HISTOGRAM\";\n InstrumentType[\"UP_DOWN_COUNTER\"] = \"UP_DOWN_COUNTER\";\n InstrumentType[\"OBSERVABLE_COUNTER\"] = \"OBSERVABLE_COUNTER\";\n InstrumentType[\"OBSERVABLE_GAUGE\"] = \"OBSERVABLE_GAUGE\";\n InstrumentType[\"OBSERVABLE_UP_DOWN_COUNTER\"] = \"OBSERVABLE_UP_DOWN_COUNTER\";\n})(InstrumentType || (InstrumentType = {}));\nexport function createInstrumentDescriptor(name, type, options) {\n var _a, _b, _c, _d;\n if (!isValidName(name)) {\n diag.warn(\"Invalid metric name: \\\"\" + name + \"\\\". The metric name should be a ASCII string with a length no greater than 255 characters.\");\n }\n return {\n name: name,\n type: type,\n description: (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : '',\n unit: (_b = options === null || options === void 0 ? void 0 : options.unit) !== null && _b !== void 0 ? _b : '',\n valueType: (_c = options === null || options === void 0 ? void 0 : options.valueType) !== null && _c !== void 0 ? _c : ValueType.DOUBLE,\n advice: (_d = options === null || options === void 0 ? void 0 : options.advice) !== null && _d !== void 0 ? _d : {},\n };\n}\nexport function createInstrumentDescriptorWithView(view, instrument) {\n var _a, _b;\n return {\n name: (_a = view.name) !== null && _a !== void 0 ? _a : instrument.name,\n description: (_b = view.description) !== null && _b !== void 0 ? _b : instrument.description,\n type: instrument.type,\n unit: instrument.unit,\n valueType: instrument.valueType,\n advice: instrument.advice,\n };\n}\nexport function isDescriptorCompatibleWith(descriptor, otherDescriptor) {\n // Names are case-insensitive strings.\n return (equalsCaseInsensitive(descriptor.name, otherDescriptor.name) &&\n descriptor.unit === otherDescriptor.unit &&\n descriptor.type === otherDescriptor.type &&\n descriptor.valueType === otherDescriptor.valueType);\n}\n// ASCII string with a length no greater than 255 characters.\n// NB: the first character counted separately from the rest.\nvar NAME_REGEXP = /^[a-z][a-z0-9_.\\-/]{0,254}$/i;\nexport function isValidName(name) {\n return name.match(NAME_REGEXP) != null;\n}\n//# sourceMappingURL=InstrumentDescriptor.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { DataPointType, } from '../export/MetricData';\nimport { InstrumentType } from '../InstrumentDescriptor';\nimport { binarySearchUB } from '../utils';\nfunction createNewEmptyCheckpoint(boundaries) {\n var counts = boundaries.map(function () { return 0; });\n counts.push(0);\n return {\n buckets: {\n boundaries: boundaries,\n counts: counts,\n },\n sum: 0,\n count: 0,\n hasMinMax: false,\n min: Infinity,\n max: -Infinity,\n };\n}\nvar HistogramAccumulation = /** @class */ (function () {\n function HistogramAccumulation(startTime, _boundaries, _recordMinMax, _current) {\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n if (_current === void 0) { _current = createNewEmptyCheckpoint(_boundaries); }\n this.startTime = startTime;\n this._boundaries = _boundaries;\n this._recordMinMax = _recordMinMax;\n this._current = _current;\n }\n HistogramAccumulation.prototype.record = function (value) {\n // NaN does not fall into any bucket, is not zero and should not be counted,\n // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do.\n if (Number.isNaN(value)) {\n return;\n }\n this._current.count += 1;\n this._current.sum += value;\n if (this._recordMinMax) {\n this._current.min = Math.min(value, this._current.min);\n this._current.max = Math.max(value, this._current.max);\n this._current.hasMinMax = true;\n }\n var idx = binarySearchUB(this._boundaries, value);\n this._current.buckets.counts[idx] += 1;\n };\n HistogramAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n HistogramAccumulation.prototype.toPointValue = function () {\n return this._current;\n };\n return HistogramAccumulation;\n}());\nexport { HistogramAccumulation };\n/**\n * Basic aggregator which observes events and counts them in pre-defined buckets\n * and provides the total sum and count of all observations.\n */\nvar HistogramAggregator = /** @class */ (function () {\n /**\n * @param _boundaries sorted upper bounds of recorded values.\n * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded.\n */\n function HistogramAggregator(_boundaries, _recordMinMax) {\n this._boundaries = _boundaries;\n this._recordMinMax = _recordMinMax;\n this.kind = AggregatorKind.HISTOGRAM;\n }\n HistogramAggregator.prototype.createAccumulation = function (startTime) {\n return new HistogramAccumulation(startTime, this._boundaries, this._recordMinMax);\n };\n /**\n * Return the result of the merge of two histogram accumulations. As long as one Aggregator\n * instance produces all Accumulations with constant boundaries we don't need to worry about\n * merging accumulations with different boundaries.\n */\n HistogramAggregator.prototype.merge = function (previous, delta) {\n var previousValue = previous.toPointValue();\n var deltaValue = delta.toPointValue();\n var previousCounts = previousValue.buckets.counts;\n var deltaCounts = deltaValue.buckets.counts;\n var mergedCounts = new Array(previousCounts.length);\n for (var idx = 0; idx < previousCounts.length; idx++) {\n mergedCounts[idx] = previousCounts[idx] + deltaCounts[idx];\n }\n var min = Infinity;\n var max = -Infinity;\n if (this._recordMinMax) {\n if (previousValue.hasMinMax && deltaValue.hasMinMax) {\n min = Math.min(previousValue.min, deltaValue.min);\n max = Math.max(previousValue.max, deltaValue.max);\n }\n else if (previousValue.hasMinMax) {\n min = previousValue.min;\n max = previousValue.max;\n }\n else if (deltaValue.hasMinMax) {\n min = deltaValue.min;\n max = deltaValue.max;\n }\n }\n return new HistogramAccumulation(previous.startTime, previousValue.buckets.boundaries, this._recordMinMax, {\n buckets: {\n boundaries: previousValue.buckets.boundaries,\n counts: mergedCounts,\n },\n count: previousValue.count + deltaValue.count,\n sum: previousValue.sum + deltaValue.sum,\n hasMinMax: this._recordMinMax &&\n (previousValue.hasMinMax || deltaValue.hasMinMax),\n min: min,\n max: max,\n });\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n HistogramAggregator.prototype.diff = function (previous, current) {\n var previousValue = previous.toPointValue();\n var currentValue = current.toPointValue();\n var previousCounts = previousValue.buckets.counts;\n var currentCounts = currentValue.buckets.counts;\n var diffedCounts = new Array(previousCounts.length);\n for (var idx = 0; idx < previousCounts.length; idx++) {\n diffedCounts[idx] = currentCounts[idx] - previousCounts[idx];\n }\n return new HistogramAccumulation(current.startTime, previousValue.buckets.boundaries, this._recordMinMax, {\n buckets: {\n boundaries: previousValue.buckets.boundaries,\n counts: diffedCounts,\n },\n count: currentValue.count - previousValue.count,\n sum: currentValue.sum - previousValue.sum,\n hasMinMax: false,\n min: Infinity,\n max: -Infinity,\n });\n };\n HistogramAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.HISTOGRAM,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n var pointValue = accumulation.toPointValue();\n // determine if instrument allows negative values.\n var allowsNegativeValues = descriptor.type === InstrumentType.GAUGE ||\n descriptor.type === InstrumentType.UP_DOWN_COUNTER ||\n descriptor.type === InstrumentType.OBSERVABLE_GAUGE ||\n descriptor.type === InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: {\n min: pointValue.hasMinMax ? pointValue.min : undefined,\n max: pointValue.hasMinMax ? pointValue.max : undefined,\n sum: !allowsNegativeValues ? pointValue.sum : undefined,\n buckets: pointValue.buckets,\n count: pointValue.count,\n },\n };\n }),\n };\n };\n return HistogramAggregator;\n}());\nexport { HistogramAggregator };\n//# sourceMappingURL=Histogram.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\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 */\nvar Buckets = /** @class */ (function () {\n /**\n * The term index refers to the number of the exponential histogram bucket\n * used to determine its boundaries. The lower boundary of a bucket is\n * determined by base ** index and the upper boundary of a bucket is\n * determined by base ** (index + 1). index values are signed to account\n * for values less than or equal to 1.\n *\n * indexBase is the index of the 0th position in the\n * backing array, i.e., backing[0] is the count\n * in the bucket with index `indexBase`.\n *\n * indexStart is the smallest index value represented\n * in the backing array.\n *\n * indexEnd is the largest index value represented in\n * the backing array.\n */\n function Buckets(backing, indexBase, indexStart, indexEnd) {\n if (backing === void 0) { backing = new BucketsBacking(); }\n if (indexBase === void 0) { indexBase = 0; }\n if (indexStart === void 0) { indexStart = 0; }\n if (indexEnd === void 0) { indexEnd = 0; }\n this.backing = backing;\n this.indexBase = indexBase;\n this.indexStart = indexStart;\n this.indexEnd = indexEnd;\n }\n Object.defineProperty(Buckets.prototype, \"offset\", {\n /**\n * Offset is the bucket index of the smallest entry in the counts array\n * @returns {number}\n */\n get: function () {\n return this.indexStart;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Buckets.prototype, \"length\", {\n /**\n * Buckets is a view into the backing array.\n * @returns {number}\n */\n get: function () {\n if (this.backing.length === 0) {\n return 0;\n }\n if (this.indexEnd === this.indexStart && this.at(0) === 0) {\n return 0;\n }\n return this.indexEnd - this.indexStart + 1;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * An array of counts, where count[i] carries the count\n * of the bucket at index (offset+i). count[i] is the count of\n * values greater than base^(offset+i) and less than or equal to\n * base^(offset+i+1).\n * @returns {number} The logical counts based on the backing array\n */\n Buckets.prototype.counts = function () {\n var _this = this;\n return Array.from({ length: this.length }, function (_, i) { return _this.at(i); });\n };\n /**\n * At returns the count of the bucket at a position in the logical\n * array of counts.\n * @param position\n * @returns {number}\n */\n Buckets.prototype.at = function (position) {\n var bias = this.indexBase - this.indexStart;\n if (position < bias) {\n position += this.backing.length;\n }\n position -= bias;\n return this.backing.countAt(position);\n };\n /**\n * incrementBucket increments the backing array index by `increment`\n * @param bucketIndex\n * @param increment\n */\n Buckets.prototype.incrementBucket = function (bucketIndex, increment) {\n this.backing.increment(bucketIndex, increment);\n };\n /**\n * decrementBucket decrements the backing array index by `decrement`\n * if decrement is greater than the current value, it's set to 0.\n * @param bucketIndex\n * @param decrement\n */\n Buckets.prototype.decrementBucket = function (bucketIndex, decrement) {\n this.backing.decrement(bucketIndex, decrement);\n };\n /**\n * trim removes leading and / or trailing zero buckets (which can occur\n * after diffing two histos) and rotates the backing array so that the\n * smallest non-zero index is in the 0th position of the backing array\n */\n Buckets.prototype.trim = function () {\n for (var i = 0; i < this.length; i++) {\n if (this.at(i) !== 0) {\n this.indexStart += i;\n break;\n }\n else if (i === this.length - 1) {\n //the entire array is zeroed out\n this.indexStart = this.indexEnd = this.indexBase = 0;\n return;\n }\n }\n for (var i = this.length - 1; i >= 0; i--) {\n if (this.at(i) !== 0) {\n this.indexEnd -= this.length - i - 1;\n break;\n }\n }\n this._rotate();\n };\n /**\n * downscale first rotates, then collapses 2**`by`-to-1 buckets.\n * @param by\n */\n Buckets.prototype.downscale = function (by) {\n this._rotate();\n var size = 1 + this.indexEnd - this.indexStart;\n var each = 1 << by;\n var inpos = 0;\n var outpos = 0;\n for (var pos = this.indexStart; pos <= this.indexEnd;) {\n var mod = pos % each;\n if (mod < 0) {\n mod += each;\n }\n for (var i = mod; i < each && inpos < size; i++) {\n this._relocateBucket(outpos, inpos);\n inpos++;\n pos++;\n }\n outpos++;\n }\n this.indexStart >>= by;\n this.indexEnd >>= by;\n this.indexBase = this.indexStart;\n };\n /**\n * Clone returns a deep copy of Buckets\n * @returns {Buckets}\n */\n Buckets.prototype.clone = function () {\n return new Buckets(this.backing.clone(), this.indexBase, this.indexStart, this.indexEnd);\n };\n /**\n * _rotate shifts the backing array contents so that indexStart ==\n * indexBase to simplify the downscale logic.\n */\n Buckets.prototype._rotate = function () {\n var bias = this.indexBase - this.indexStart;\n if (bias === 0) {\n return;\n }\n else if (bias > 0) {\n this.backing.reverse(0, this.backing.length);\n this.backing.reverse(0, bias);\n this.backing.reverse(bias, this.backing.length);\n }\n else {\n // negative bias, this can happen when diffing two histograms\n this.backing.reverse(0, this.backing.length);\n this.backing.reverse(0, this.backing.length + bias);\n }\n this.indexBase = this.indexStart;\n };\n /**\n * _relocateBucket adds the count in counts[src] to counts[dest] and\n * resets count[src] to zero.\n */\n Buckets.prototype._relocateBucket = function (dest, src) {\n if (dest === src) {\n return;\n }\n this.incrementBucket(dest, this.backing.emptyBucket(src));\n };\n return Buckets;\n}());\nexport { Buckets };\n/**\n * BucketsBacking holds the raw buckets and some utility methods to\n * manage them.\n */\nvar BucketsBacking = /** @class */ (function () {\n function BucketsBacking(_counts) {\n if (_counts === void 0) { _counts = [0]; }\n this._counts = _counts;\n }\n Object.defineProperty(BucketsBacking.prototype, \"length\", {\n /**\n * length returns the physical size of the backing array, which\n * is >= buckets.length()\n */\n get: function () {\n return this._counts.length;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * countAt returns the count in a specific bucket\n */\n BucketsBacking.prototype.countAt = function (pos) {\n return this._counts[pos];\n };\n /**\n * growTo grows a backing array and copies old entries\n * into their correct new positions.\n */\n BucketsBacking.prototype.growTo = function (newSize, oldPositiveLimit, newPositiveLimit) {\n var tmp = new Array(newSize).fill(0);\n tmp.splice.apply(tmp, __spreadArray([newPositiveLimit,\n this._counts.length - oldPositiveLimit], __read(this._counts.slice(oldPositiveLimit)), false));\n tmp.splice.apply(tmp, __spreadArray([0, oldPositiveLimit], __read(this._counts.slice(0, oldPositiveLimit)), false));\n this._counts = tmp;\n };\n /**\n * reverse the items in the backing array in the range [from, limit).\n */\n BucketsBacking.prototype.reverse = function (from, limit) {\n var num = Math.floor((from + limit) / 2) - from;\n for (var i = 0; i < num; i++) {\n var tmp = this._counts[from + i];\n this._counts[from + i] = this._counts[limit - i - 1];\n this._counts[limit - i - 1] = tmp;\n }\n };\n /**\n * emptyBucket empties the count from a bucket, for\n * moving into another.\n */\n BucketsBacking.prototype.emptyBucket = function (src) {\n var tmp = this._counts[src];\n this._counts[src] = 0;\n return tmp;\n };\n /**\n * increments a bucket by `increment`\n */\n BucketsBacking.prototype.increment = function (bucketIndex, increment) {\n this._counts[bucketIndex] += increment;\n };\n /**\n * decrements a bucket by `decrement`\n */\n BucketsBacking.prototype.decrement = function (bucketIndex, decrement) {\n if (this._counts[bucketIndex] >= decrement) {\n this._counts[bucketIndex] -= decrement;\n }\n else {\n // this should not happen, but we're being defensive against\n // negative counts.\n this._counts[bucketIndex] = 0;\n }\n };\n /**\n * clone returns a deep copy of BucketsBacking\n */\n BucketsBacking.prototype.clone = function () {\n return new BucketsBacking(__spreadArray([], __read(this._counts), false));\n };\n return BucketsBacking;\n}());\n//# sourceMappingURL=Buckets.js.map","/*\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 * The functions and constants in this file allow us to interact\n * with the internal representation of an IEEE 64-bit floating point\n * number. We need to work with all 64-bits, thus, care needs to be\n * taken when working with Javascript's bitwise operators (<<, >>, &,\n * |, etc) as they truncate operands to 32-bits. In order to work around\n * this we work with the 64-bits as two 32-bit halves, perform bitwise\n * operations on them independently, and combine the results (if needed).\n */\nexport var SIGNIFICAND_WIDTH = 52;\n/**\n * EXPONENT_MASK is set to 1 for the hi 32-bits of an IEEE 754\n * floating point exponent: 0x7ff00000.\n */\nvar EXPONENT_MASK = 0x7ff00000;\n/**\n * SIGNIFICAND_MASK is the mask for the significand portion of the hi 32-bits\n * of an IEEE 754 double-precision floating-point value: 0xfffff\n */\nvar SIGNIFICAND_MASK = 0xfffff;\n/**\n * EXPONENT_BIAS is the exponent bias specified for encoding\n * the IEEE 754 double-precision floating point exponent: 1023\n */\nvar EXPONENT_BIAS = 1023;\n/**\n * MIN_NORMAL_EXPONENT is the minimum exponent of a normalized\n * floating point: -1022.\n */\nexport var MIN_NORMAL_EXPONENT = -EXPONENT_BIAS + 1;\n/**\n * MAX_NORMAL_EXPONENT is the maximum exponent of a normalized\n * floating point: 1023.\n */\nexport var MAX_NORMAL_EXPONENT = EXPONENT_BIAS;\n/**\n * MIN_VALUE is the smallest normal number\n */\nexport var MIN_VALUE = Math.pow(2, -1022);\n/**\n * getNormalBase2 extracts the normalized base-2 fractional exponent.\n * This returns k for the equation f x 2**k where f is\n * in the range [1, 2). Note that this function is not called for\n * subnormal numbers.\n * @param {number} value - the value to determine normalized base-2 fractional\n * exponent for\n * @returns {number} the normalized base-2 exponent\n */\nexport function getNormalBase2(value) {\n var dv = new DataView(new ArrayBuffer(8));\n dv.setFloat64(0, value);\n // access the raw 64-bit float as 32-bit uints\n var hiBits = dv.getUint32(0);\n var expBits = (hiBits & EXPONENT_MASK) >> 20;\n return expBits - EXPONENT_BIAS;\n}\n/**\n * GetSignificand returns the 52 bit (unsigned) significand as a signed value.\n * @param {number} value - the floating point number to extract the significand from\n * @returns {number} The 52-bit significand\n */\nexport function getSignificand(value) {\n var dv = new DataView(new ArrayBuffer(8));\n dv.setFloat64(0, value);\n // access the raw 64-bit float as two 32-bit uints\n var hiBits = dv.getUint32(0);\n var loBits = dv.getUint32(4);\n // extract the significand bits from the hi bits and left shift 32 places note:\n // we can't use the native << operator as it will truncate the result to 32-bits\n var significandHiBits = (hiBits & SIGNIFICAND_MASK) * Math.pow(2, 32);\n // combine the hi and lo bits and return\n return significandHiBits + loBits;\n}\n//# sourceMappingURL=ieee754.js.map","/*\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 * Note: other languages provide this as a built in function. This is\n * a naive, but functionally correct implementation. This is used sparingly,\n * when creating a new mapping in a running application.\n *\n * ldexp returns frac × 2**exp. With the following special cases:\n * ldexp(±0, exp) = ±0\n * ldexp(±Inf, exp) = ±Inf\n * ldexp(NaN, exp) = NaN\n * @param frac\n * @param exp\n * @returns {number}\n */\nexport function ldexp(frac, exp) {\n if (frac === 0 ||\n frac === Number.POSITIVE_INFINITY ||\n frac === Number.NEGATIVE_INFINITY ||\n Number.isNaN(frac)) {\n return frac;\n }\n return frac * Math.pow(2, exp);\n}\n/**\n * Computes the next power of two that is greater than or equal to v.\n * This implementation more efficient than, but functionally equivalent\n * to Math.pow(2, Math.ceil(Math.log(x)/Math.log(2))).\n * @param v\n * @returns {number}\n */\nexport function nextGreaterSquare(v) {\n // The following expression computes the least power-of-two\n // that is >= v. There are a number of tricky ways to\n // do this, see https://stackoverflow.com/questions/466204/rounding-up-to-next-power-of-2\n v--;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v++;\n return v;\n}\n//# sourceMappingURL=util.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\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 */\nvar MappingError = /** @class */ (function (_super) {\n __extends(MappingError, _super);\n function MappingError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MappingError;\n}(Error));\nexport { MappingError };\n//# sourceMappingURL=types.js.map","/*\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 ieee754 from './ieee754';\nimport * as util from '../util';\nimport { MappingError } from './types';\n/**\n * ExponentMapping implements exponential mapping functions for\n * scales <=0. For scales > 0 LogarithmMapping should be used.\n */\nvar ExponentMapping = /** @class */ (function () {\n function ExponentMapping(scale) {\n this._shift = -scale;\n }\n /**\n * Maps positive floating point values to indexes corresponding to scale\n * @param value\n * @returns {number} index for provided value at the current scale\n */\n ExponentMapping.prototype.mapToIndex = function (value) {\n if (value < ieee754.MIN_VALUE) {\n return this._minNormalLowerBoundaryIndex();\n }\n var exp = ieee754.getNormalBase2(value);\n // In case the value is an exact power of two, compute a\n // correction of -1. Note, we are using a custom _rightShift\n // to accommodate a 52-bit argument, which the native bitwise\n // operators do not support\n var correction = this._rightShift(ieee754.getSignificand(value) - 1, ieee754.SIGNIFICAND_WIDTH);\n return (exp + correction) >> this._shift;\n };\n /**\n * Returns the lower bucket boundary for the given index for scale\n *\n * @param index\n * @returns {number}\n */\n ExponentMapping.prototype.lowerBoundary = function (index) {\n var minIndex = this._minNormalLowerBoundaryIndex();\n if (index < minIndex) {\n throw new MappingError(\"underflow: \" + index + \" is < minimum lower boundary: \" + minIndex);\n }\n var maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index > maxIndex) {\n throw new MappingError(\"overflow: \" + index + \" is > maximum lower boundary: \" + maxIndex);\n }\n return util.ldexp(1, index << this._shift);\n };\n Object.defineProperty(ExponentMapping.prototype, \"scale\", {\n /**\n * The scale used by this mapping\n * @returns {number}\n */\n get: function () {\n if (this._shift === 0) {\n return 0;\n }\n return -this._shift;\n },\n enumerable: false,\n configurable: true\n });\n ExponentMapping.prototype._minNormalLowerBoundaryIndex = function () {\n var index = ieee754.MIN_NORMAL_EXPONENT >> this._shift;\n if (this._shift < 2) {\n index--;\n }\n return index;\n };\n ExponentMapping.prototype._maxNormalLowerBoundaryIndex = function () {\n return ieee754.MAX_NORMAL_EXPONENT >> this._shift;\n };\n ExponentMapping.prototype._rightShift = function (value, shift) {\n return Math.floor(value * Math.pow(2, -shift));\n };\n return ExponentMapping;\n}());\nexport { ExponentMapping };\n//# sourceMappingURL=ExponentMapping.js.map","/*\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 ieee754 from './ieee754';\nimport * as util from '../util';\nimport { MappingError } from './types';\n/**\n * LogarithmMapping implements exponential mapping functions for scale > 0.\n * For scales <= 0 the exponent mapping should be used.\n */\nvar LogarithmMapping = /** @class */ (function () {\n function LogarithmMapping(scale) {\n this._scale = scale;\n this._scaleFactor = util.ldexp(Math.LOG2E, scale);\n this._inverseFactor = util.ldexp(Math.LN2, -scale);\n }\n /**\n * Maps positive floating point values to indexes corresponding to scale\n * @param value\n * @returns {number} index for provided value at the current scale\n */\n LogarithmMapping.prototype.mapToIndex = function (value) {\n if (value <= ieee754.MIN_VALUE) {\n return this._minNormalLowerBoundaryIndex() - 1;\n }\n // exact power of two special case\n if (ieee754.getSignificand(value) === 0) {\n var exp = ieee754.getNormalBase2(value);\n return (exp << this._scale) - 1;\n }\n // non-power of two cases. use Math.floor to round the scaled logarithm\n var index = Math.floor(Math.log(value) * this._scaleFactor);\n var maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index >= maxIndex) {\n return maxIndex;\n }\n return index;\n };\n /**\n * Returns the lower bucket boundary for the given index for scale\n *\n * @param index\n * @returns {number}\n */\n LogarithmMapping.prototype.lowerBoundary = function (index) {\n var maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index >= maxIndex) {\n if (index === maxIndex) {\n return 2 * Math.exp((index - (1 << this._scale)) / this._scaleFactor);\n }\n throw new MappingError(\"overflow: \" + index + \" is > maximum lower boundary: \" + maxIndex);\n }\n var minIndex = this._minNormalLowerBoundaryIndex();\n if (index <= minIndex) {\n if (index === minIndex) {\n return ieee754.MIN_VALUE;\n }\n else if (index === minIndex - 1) {\n return Math.exp((index + (1 << this._scale)) / this._scaleFactor) / 2;\n }\n throw new MappingError(\"overflow: \" + index + \" is < minimum lower boundary: \" + minIndex);\n }\n return Math.exp(index * this._inverseFactor);\n };\n Object.defineProperty(LogarithmMapping.prototype, \"scale\", {\n /**\n * The scale used by this mapping\n * @returns {number}\n */\n get: function () {\n return this._scale;\n },\n enumerable: false,\n configurable: true\n });\n LogarithmMapping.prototype._minNormalLowerBoundaryIndex = function () {\n return ieee754.MIN_NORMAL_EXPONENT << this._scale;\n };\n LogarithmMapping.prototype._maxNormalLowerBoundaryIndex = function () {\n return ((ieee754.MAX_NORMAL_EXPONENT + 1) << this._scale) - 1;\n };\n return LogarithmMapping;\n}());\nexport { LogarithmMapping };\n//# sourceMappingURL=LogarithmMapping.js.map","/*\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 { ExponentMapping } from './ExponentMapping';\nimport { LogarithmMapping } from './LogarithmMapping';\nimport { MappingError } from './types';\nvar MIN_SCALE = -10;\nvar MAX_SCALE = 20;\nvar PREBUILT_MAPPINGS = Array.from({ length: 31 }, function (_, i) {\n if (i > 10) {\n return new LogarithmMapping(i - 10);\n }\n return new ExponentMapping(i - 10);\n});\n/**\n * getMapping returns an appropriate mapping for the given scale. For scales -10\n * to 0 the underlying type will be ExponentMapping. For scales 1 to 20 the\n * underlying type will be LogarithmMapping.\n * @param scale a number in the range [-10, 20]\n * @returns {Mapping}\n */\nexport function getMapping(scale) {\n if (scale > MAX_SCALE || scale < MIN_SCALE) {\n throw new MappingError(\"expected scale >= \" + MIN_SCALE + \" && <= \" + MAX_SCALE + \", got: \" + scale);\n }\n // mappings are offset by 10. scale -10 is at position 0 and scale 20 is at 30\n return PREBUILT_MAPPINGS[scale + 10];\n}\n//# sourceMappingURL=getMapping.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { DataPointType, } from '../export/MetricData';\nimport { diag } from '@opentelemetry/api';\nimport { InstrumentType } from '../InstrumentDescriptor';\nimport { Buckets } from './exponential-histogram/Buckets';\nimport { getMapping } from './exponential-histogram/mapping/getMapping';\nimport { nextGreaterSquare } from './exponential-histogram/util';\n// HighLow is a utility class used for computing a common scale for\n// two exponential histogram accumulations\nvar HighLow = /** @class */ (function () {\n function HighLow(low, high) {\n this.low = low;\n this.high = high;\n }\n HighLow.combine = function (h1, h2) {\n return new HighLow(Math.min(h1.low, h2.low), Math.max(h1.high, h2.high));\n };\n return HighLow;\n}());\nvar MAX_SCALE = 20;\nvar DEFAULT_MAX_SIZE = 160;\nvar MIN_MAX_SIZE = 2;\nvar ExponentialHistogramAccumulation = /** @class */ (function () {\n function ExponentialHistogramAccumulation(startTime, _maxSize, _recordMinMax, _sum, _count, _zeroCount, _min, _max, _positive, _negative, _mapping) {\n if (startTime === void 0) { startTime = startTime; }\n if (_maxSize === void 0) { _maxSize = DEFAULT_MAX_SIZE; }\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n if (_sum === void 0) { _sum = 0; }\n if (_count === void 0) { _count = 0; }\n if (_zeroCount === void 0) { _zeroCount = 0; }\n if (_min === void 0) { _min = Number.POSITIVE_INFINITY; }\n if (_max === void 0) { _max = Number.NEGATIVE_INFINITY; }\n if (_positive === void 0) { _positive = new Buckets(); }\n if (_negative === void 0) { _negative = new Buckets(); }\n if (_mapping === void 0) { _mapping = getMapping(MAX_SCALE); }\n this.startTime = startTime;\n this._maxSize = _maxSize;\n this._recordMinMax = _recordMinMax;\n this._sum = _sum;\n this._count = _count;\n this._zeroCount = _zeroCount;\n this._min = _min;\n this._max = _max;\n this._positive = _positive;\n this._negative = _negative;\n this._mapping = _mapping;\n if (this._maxSize < MIN_MAX_SIZE) {\n diag.warn(\"Exponential Histogram Max Size set to \" + this._maxSize + \", changing to the minimum size of: \" + MIN_MAX_SIZE);\n this._maxSize = MIN_MAX_SIZE;\n }\n }\n /**\n * record updates a histogram with a single count\n * @param {Number} value\n */\n ExponentialHistogramAccumulation.prototype.record = function (value) {\n this.updateByIncrement(value, 1);\n };\n /**\n * Sets the start time for this accumulation\n * @param {HrTime} startTime\n */\n ExponentialHistogramAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n /**\n * Returns the datapoint representation of this accumulation\n * @param {HrTime} startTime\n */\n ExponentialHistogramAccumulation.prototype.toPointValue = function () {\n return {\n hasMinMax: this._recordMinMax,\n min: this.min,\n max: this.max,\n sum: this.sum,\n positive: {\n offset: this.positive.offset,\n bucketCounts: this.positive.counts(),\n },\n negative: {\n offset: this.negative.offset,\n bucketCounts: this.negative.counts(),\n },\n count: this.count,\n scale: this.scale,\n zeroCount: this.zeroCount,\n };\n };\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"sum\", {\n /**\n * @returns {Number} The sum of values recorded by this accumulation\n */\n get: function () {\n return this._sum;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"min\", {\n /**\n * @returns {Number} The minimum value recorded by this accumulation\n */\n get: function () {\n return this._min;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"max\", {\n /**\n * @returns {Number} The maximum value recorded by this accumulation\n */\n get: function () {\n return this._max;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"count\", {\n /**\n * @returns {Number} The count of values recorded by this accumulation\n */\n get: function () {\n return this._count;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"zeroCount\", {\n /**\n * @returns {Number} The number of 0 values recorded by this accumulation\n */\n get: function () {\n return this._zeroCount;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"scale\", {\n /**\n * @returns {Number} The scale used by this accumulation\n */\n get: function () {\n if (this._count === this._zeroCount) {\n // all zeros! scale doesn't matter, use zero\n return 0;\n }\n return this._mapping.scale;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"positive\", {\n /**\n * positive holds the positive values\n * @returns {Buckets}\n */\n get: function () {\n return this._positive;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"negative\", {\n /**\n * negative holds the negative values by their absolute value\n * @returns {Buckets}\n */\n get: function () {\n return this._negative;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * updateByIncr supports updating a histogram with a non-negative\n * increment.\n * @param value\n * @param increment\n */\n ExponentialHistogramAccumulation.prototype.updateByIncrement = function (value, increment) {\n // NaN does not fall into any bucket, is not zero and should not be counted,\n // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do.\n if (Number.isNaN(value)) {\n return;\n }\n if (value > this._max) {\n this._max = value;\n }\n if (value < this._min) {\n this._min = value;\n }\n this._count += increment;\n if (value === 0) {\n this._zeroCount += increment;\n return;\n }\n this._sum += value * increment;\n if (value > 0) {\n this._updateBuckets(this._positive, value, increment);\n }\n else {\n this._updateBuckets(this._negative, -value, increment);\n }\n };\n /**\n * merge combines data from previous value into self\n * @param {ExponentialHistogramAccumulation} previous\n */\n ExponentialHistogramAccumulation.prototype.merge = function (previous) {\n if (this._count === 0) {\n this._min = previous.min;\n this._max = previous.max;\n }\n else if (previous.count !== 0) {\n if (previous.min < this.min) {\n this._min = previous.min;\n }\n if (previous.max > this.max) {\n this._max = previous.max;\n }\n }\n this.startTime = previous.startTime;\n this._sum += previous.sum;\n this._count += previous.count;\n this._zeroCount += previous.zeroCount;\n var minScale = this._minScale(previous);\n this._downscale(this.scale - minScale);\n this._mergeBuckets(this.positive, previous, previous.positive, minScale);\n this._mergeBuckets(this.negative, previous, previous.negative, minScale);\n };\n /**\n * diff subtracts other from self\n * @param {ExponentialHistogramAccumulation} other\n */\n ExponentialHistogramAccumulation.prototype.diff = function (other) {\n this._min = Infinity;\n this._max = -Infinity;\n this._sum -= other.sum;\n this._count -= other.count;\n this._zeroCount -= other.zeroCount;\n var minScale = this._minScale(other);\n this._downscale(this.scale - minScale);\n this._diffBuckets(this.positive, other, other.positive, minScale);\n this._diffBuckets(this.negative, other, other.negative, minScale);\n };\n /**\n * clone returns a deep copy of self\n * @returns {ExponentialHistogramAccumulation}\n */\n ExponentialHistogramAccumulation.prototype.clone = function () {\n return new ExponentialHistogramAccumulation(this.startTime, this._maxSize, this._recordMinMax, this._sum, this._count, this._zeroCount, this._min, this._max, this.positive.clone(), this.negative.clone(), this._mapping);\n };\n /**\n * _updateBuckets maps the incoming value to a bucket index for the current\n * scale. If the bucket index is outside of the range of the backing array,\n * it will rescale the backing array and update the mapping for the new scale.\n */\n ExponentialHistogramAccumulation.prototype._updateBuckets = function (buckets, value, increment) {\n var index = this._mapping.mapToIndex(value);\n // rescale the mapping if needed\n var rescalingNeeded = false;\n var high = 0;\n var low = 0;\n if (buckets.length === 0) {\n buckets.indexStart = index;\n buckets.indexEnd = buckets.indexStart;\n buckets.indexBase = buckets.indexStart;\n }\n else if (index < buckets.indexStart &&\n buckets.indexEnd - index >= this._maxSize) {\n rescalingNeeded = true;\n low = index;\n high = buckets.indexEnd;\n }\n else if (index > buckets.indexEnd &&\n index - buckets.indexStart >= this._maxSize) {\n rescalingNeeded = true;\n low = buckets.indexStart;\n high = index;\n }\n // rescale and compute index at new scale\n if (rescalingNeeded) {\n var change = this._changeScale(high, low);\n this._downscale(change);\n index = this._mapping.mapToIndex(value);\n }\n this._incrementIndexBy(buckets, index, increment);\n };\n /**\n * _incrementIndexBy increments the count of the bucket specified by `index`.\n * If the index is outside of the range [buckets.indexStart, buckets.indexEnd]\n * the boundaries of the backing array will be adjusted and more buckets will\n * be added if needed.\n */\n ExponentialHistogramAccumulation.prototype._incrementIndexBy = function (buckets, index, increment) {\n if (increment === 0) {\n // nothing to do for a zero increment, can happen during a merge operation\n return;\n }\n if (buckets.length === 0) {\n buckets.indexStart = buckets.indexEnd = buckets.indexBase = index;\n }\n if (index < buckets.indexStart) {\n var span = buckets.indexEnd - index;\n if (span >= buckets.backing.length) {\n this._grow(buckets, span + 1);\n }\n buckets.indexStart = index;\n }\n else if (index > buckets.indexEnd) {\n var span = index - buckets.indexStart;\n if (span >= buckets.backing.length) {\n this._grow(buckets, span + 1);\n }\n buckets.indexEnd = index;\n }\n var bucketIndex = index - buckets.indexBase;\n if (bucketIndex < 0) {\n bucketIndex += buckets.backing.length;\n }\n buckets.incrementBucket(bucketIndex, increment);\n };\n /**\n * grow resizes the backing array by doubling in size up to maxSize.\n * This extends the array with a bunch of zeros and copies the\n * existing counts to the same position.\n */\n ExponentialHistogramAccumulation.prototype._grow = function (buckets, needed) {\n var size = buckets.backing.length;\n var bias = buckets.indexBase - buckets.indexStart;\n var oldPositiveLimit = size - bias;\n var newSize = nextGreaterSquare(needed);\n if (newSize > this._maxSize) {\n newSize = this._maxSize;\n }\n var newPositiveLimit = newSize - bias;\n buckets.backing.growTo(newSize, oldPositiveLimit, newPositiveLimit);\n };\n /**\n * _changeScale computes how much downscaling is needed by shifting the\n * high and low values until they are separated by no more than size.\n */\n ExponentialHistogramAccumulation.prototype._changeScale = function (high, low) {\n var change = 0;\n while (high - low >= this._maxSize) {\n high >>= 1;\n low >>= 1;\n change++;\n }\n return change;\n };\n /**\n * _downscale subtracts `change` from the current mapping scale.\n */\n ExponentialHistogramAccumulation.prototype._downscale = function (change) {\n if (change === 0) {\n return;\n }\n if (change < 0) {\n // Note: this should be impossible. If we get here it's because\n // there is a bug in the implementation.\n throw new Error(\"impossible change of scale: \" + this.scale);\n }\n var newScale = this._mapping.scale - change;\n this._positive.downscale(change);\n this._negative.downscale(change);\n this._mapping = getMapping(newScale);\n };\n /**\n * _minScale is used by diff and merge to compute an ideal combined scale\n */\n ExponentialHistogramAccumulation.prototype._minScale = function (other) {\n var minScale = Math.min(this.scale, other.scale);\n var highLowPos = HighLow.combine(this._highLowAtScale(this.positive, this.scale, minScale), this._highLowAtScale(other.positive, other.scale, minScale));\n var highLowNeg = HighLow.combine(this._highLowAtScale(this.negative, this.scale, minScale), this._highLowAtScale(other.negative, other.scale, minScale));\n return Math.min(minScale - this._changeScale(highLowPos.high, highLowPos.low), minScale - this._changeScale(highLowNeg.high, highLowNeg.low));\n };\n /**\n * _highLowAtScale is used by diff and merge to compute an ideal combined scale.\n */\n ExponentialHistogramAccumulation.prototype._highLowAtScale = function (buckets, currentScale, newScale) {\n if (buckets.length === 0) {\n return new HighLow(0, -1);\n }\n var shift = currentScale - newScale;\n return new HighLow(buckets.indexStart >> shift, buckets.indexEnd >> shift);\n };\n /**\n * _mergeBuckets translates index values from another histogram and\n * adds the values into the corresponding buckets of this histogram.\n */\n ExponentialHistogramAccumulation.prototype._mergeBuckets = function (ours, other, theirs, scale) {\n var theirOffset = theirs.offset;\n var theirChange = other.scale - scale;\n for (var i = 0; i < theirs.length; i++) {\n this._incrementIndexBy(ours, (theirOffset + i) >> theirChange, theirs.at(i));\n }\n };\n /**\n * _diffBuckets translates index values from another histogram and\n * subtracts the values in the corresponding buckets of this histogram.\n */\n ExponentialHistogramAccumulation.prototype._diffBuckets = function (ours, other, theirs, scale) {\n var theirOffset = theirs.offset;\n var theirChange = other.scale - scale;\n for (var i = 0; i < theirs.length; i++) {\n var ourIndex = (theirOffset + i) >> theirChange;\n var bucketIndex = ourIndex - ours.indexBase;\n if (bucketIndex < 0) {\n bucketIndex += ours.backing.length;\n }\n ours.decrementBucket(bucketIndex, theirs.at(i));\n }\n ours.trim();\n };\n return ExponentialHistogramAccumulation;\n}());\nexport { ExponentialHistogramAccumulation };\n/**\n * Aggregator for ExponentialHistogramAccumulations\n */\nvar ExponentialHistogramAggregator = /** @class */ (function () {\n /**\n * @param _maxSize Maximum number of buckets for each of the positive\n * and negative ranges, exclusive of the zero-bucket.\n * @param _recordMinMax If set to true, min and max will be recorded.\n * Otherwise, min and max will not be recorded.\n */\n function ExponentialHistogramAggregator(_maxSize, _recordMinMax) {\n this._maxSize = _maxSize;\n this._recordMinMax = _recordMinMax;\n this.kind = AggregatorKind.EXPONENTIAL_HISTOGRAM;\n }\n ExponentialHistogramAggregator.prototype.createAccumulation = function (startTime) {\n return new ExponentialHistogramAccumulation(startTime, this._maxSize, this._recordMinMax);\n };\n /**\n * Return the result of the merge of two exponential histogram accumulations.\n */\n ExponentialHistogramAggregator.prototype.merge = function (previous, delta) {\n var result = delta.clone();\n result.merge(previous);\n return result;\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n ExponentialHistogramAggregator.prototype.diff = function (previous, current) {\n var result = current.clone();\n result.diff(previous);\n return result;\n };\n ExponentialHistogramAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.EXPONENTIAL_HISTOGRAM,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n var pointValue = accumulation.toPointValue();\n // determine if instrument allows negative values.\n var allowsNegativeValues = descriptor.type === InstrumentType.GAUGE ||\n descriptor.type === InstrumentType.UP_DOWN_COUNTER ||\n descriptor.type === InstrumentType.OBSERVABLE_GAUGE ||\n descriptor.type === InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: {\n min: pointValue.hasMinMax ? pointValue.min : undefined,\n max: pointValue.hasMinMax ? pointValue.max : undefined,\n sum: !allowsNegativeValues ? pointValue.sum : undefined,\n positive: {\n offset: pointValue.positive.offset,\n bucketCounts: pointValue.positive.bucketCounts,\n },\n negative: {\n offset: pointValue.negative.offset,\n bucketCounts: pointValue.negative.bucketCounts,\n },\n count: pointValue.count,\n scale: pointValue.scale,\n zeroCount: pointValue.zeroCount,\n },\n };\n }),\n };\n };\n return ExponentialHistogramAggregator;\n}());\nexport { ExponentialHistogramAggregator };\n//# sourceMappingURL=ExponentialHistogram.js.map","/*\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 { createContextKey } from '@opentelemetry/api';\nvar SUPPRESS_TRACING_KEY = createContextKey('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nexport function suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexport function unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexport function isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\n//# sourceMappingURL=suppress-tracing.js.map","/*\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';\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() {\n return function (ex) {\n diag.error(stringifyException(ex));\n };\n}\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\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) {\n var result = {};\n var current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(function (propertyName) {\n if (result[propertyName])\n return;\n var value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","/*\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 { loggingErrorHandler } from './logging-error-handler';\n/** The global error handler delegate */\nvar delegateHandler = loggingErrorHandler();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nexport function setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nexport function globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\n//# sourceMappingURL=global-error-handler.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.28.0';\n//# sourceMappingURL=version.js.map","/*\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 { createConstMap } from '../internal/utils';\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticResourceAttributes\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\nvar TMP_CLOUD_PROVIDER = 'cloud.provider';\nvar TMP_CLOUD_ACCOUNT_ID = 'cloud.account.id';\nvar TMP_CLOUD_REGION = 'cloud.region';\nvar TMP_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';\nvar TMP_CLOUD_PLATFORM = 'cloud.platform';\nvar TMP_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn';\nvar TMP_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn';\nvar TMP_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype';\nvar TMP_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn';\nvar TMP_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family';\nvar TMP_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision';\nvar TMP_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn';\nvar TMP_AWS_LOG_GROUP_NAMES = 'aws.log.group.names';\nvar TMP_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns';\nvar TMP_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';\nvar TMP_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns';\nvar TMP_CONTAINER_NAME = 'container.name';\nvar TMP_CONTAINER_ID = 'container.id';\nvar TMP_CONTAINER_RUNTIME = 'container.runtime';\nvar TMP_CONTAINER_IMAGE_NAME = 'container.image.name';\nvar TMP_CONTAINER_IMAGE_TAG = 'container.image.tag';\nvar TMP_DEPLOYMENT_ENVIRONMENT = 'deployment.environment';\nvar TMP_DEVICE_ID = 'device.id';\nvar TMP_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier';\nvar TMP_DEVICE_MODEL_NAME = 'device.model.name';\nvar TMP_FAAS_NAME = 'faas.name';\nvar TMP_FAAS_ID = 'faas.id';\nvar TMP_FAAS_VERSION = 'faas.version';\nvar TMP_FAAS_INSTANCE = 'faas.instance';\nvar TMP_FAAS_MAX_MEMORY = 'faas.max_memory';\nvar TMP_HOST_ID = 'host.id';\nvar TMP_HOST_NAME = 'host.name';\nvar TMP_HOST_TYPE = 'host.type';\nvar TMP_HOST_ARCH = 'host.arch';\nvar TMP_HOST_IMAGE_NAME = 'host.image.name';\nvar TMP_HOST_IMAGE_ID = 'host.image.id';\nvar TMP_HOST_IMAGE_VERSION = 'host.image.version';\nvar TMP_K8S_CLUSTER_NAME = 'k8s.cluster.name';\nvar TMP_K8S_NODE_NAME = 'k8s.node.name';\nvar TMP_K8S_NODE_UID = 'k8s.node.uid';\nvar TMP_K8S_NAMESPACE_NAME = 'k8s.namespace.name';\nvar TMP_K8S_POD_UID = 'k8s.pod.uid';\nvar TMP_K8S_POD_NAME = 'k8s.pod.name';\nvar TMP_K8S_CONTAINER_NAME = 'k8s.container.name';\nvar TMP_K8S_REPLICASET_UID = 'k8s.replicaset.uid';\nvar TMP_K8S_REPLICASET_NAME = 'k8s.replicaset.name';\nvar TMP_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';\nvar TMP_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name';\nvar TMP_K8S_STATEFULSET_UID = 'k8s.statefulset.uid';\nvar TMP_K8S_STATEFULSET_NAME = 'k8s.statefulset.name';\nvar TMP_K8S_DAEMONSET_UID = 'k8s.daemonset.uid';\nvar TMP_K8S_DAEMONSET_NAME = 'k8s.daemonset.name';\nvar TMP_K8S_JOB_UID = 'k8s.job.uid';\nvar TMP_K8S_JOB_NAME = 'k8s.job.name';\nvar TMP_K8S_CRONJOB_UID = 'k8s.cronjob.uid';\nvar TMP_K8S_CRONJOB_NAME = 'k8s.cronjob.name';\nvar TMP_OS_TYPE = 'os.type';\nvar TMP_OS_DESCRIPTION = 'os.description';\nvar TMP_OS_NAME = 'os.name';\nvar TMP_OS_VERSION = 'os.version';\nvar TMP_PROCESS_PID = 'process.pid';\nvar TMP_PROCESS_EXECUTABLE_NAME = 'process.executable.name';\nvar TMP_PROCESS_EXECUTABLE_PATH = 'process.executable.path';\nvar TMP_PROCESS_COMMAND = 'process.command';\nvar TMP_PROCESS_COMMAND_LINE = 'process.command_line';\nvar TMP_PROCESS_COMMAND_ARGS = 'process.command_args';\nvar TMP_PROCESS_OWNER = 'process.owner';\nvar TMP_PROCESS_RUNTIME_NAME = 'process.runtime.name';\nvar TMP_PROCESS_RUNTIME_VERSION = 'process.runtime.version';\nvar TMP_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description';\nvar TMP_SERVICE_NAME = 'service.name';\nvar TMP_SERVICE_NAMESPACE = 'service.namespace';\nvar TMP_SERVICE_INSTANCE_ID = 'service.instance.id';\nvar TMP_SERVICE_VERSION = 'service.version';\nvar TMP_TELEMETRY_SDK_NAME = 'telemetry.sdk.name';\nvar TMP_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';\nvar TMP_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';\nvar TMP_TELEMETRY_AUTO_VERSION = 'telemetry.auto.version';\nvar TMP_WEBENGINE_NAME = 'webengine.name';\nvar TMP_WEBENGINE_VERSION = 'webengine.version';\nvar TMP_WEBENGINE_DESCRIPTION = 'webengine.description';\n/**\n * Name of the cloud provider.\n *\n * @deprecated use ATTR_CLOUD_PROVIDER\n */\nexport var SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER;\n/**\n * The cloud account ID the resource is assigned to.\n *\n * @deprecated use ATTR_CLOUD_ACCOUNT_ID\n */\nexport var SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID;\n/**\n * The geographical region the resource is running. Refer to your provider'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\n */\nexport var SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION;\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 "zones" on Alibaba Cloud and Google Cloud.\n *\n * @deprecated use ATTR_CLOUD_AVAILABILITY_ZONE\n */\nexport var SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE;\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\n */\nexport var SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM;\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\n */\nexport var SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN;\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\n */\nexport var SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN;\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\n */\nexport var SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE;\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\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN;\n/**\n * The task definition family this task definition is a member of.\n *\n * @deprecated use ATTR_AWS_ECS_TASK_FAMILY\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY;\n/**\n * The revision for this task definition.\n *\n * @deprecated use ATTR_AWS_ECS_TASK_REVISION\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION;\n/**\n * The ARN of an EKS cluster.\n *\n * @deprecated use ATTR_AWS_EKS_CLUSTER_ARN\n */\nexport var SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN;\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\n */\nexport var SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES;\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\n */\nexport var SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS;\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\n */\nexport var SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES;\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\n */\nexport var SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS;\n/**\n * Container name.\n *\n * @deprecated use ATTR_CONTAINER_NAME\n */\nexport var SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME;\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\n */\nexport var SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID;\n/**\n * The container runtime managing this container.\n *\n * @deprecated use ATTR_CONTAINER_RUNTIME\n */\nexport var SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME;\n/**\n * Name of the image the container was built on.\n *\n * @deprecated use ATTR_CONTAINER_IMAGE_NAME\n */\nexport var SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME;\n/**\n * Container image tag.\n *\n * @deprecated use ATTR_CONTAINER_IMAGE_TAG\n */\nexport var SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG;\n/**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n *\n * @deprecated use ATTR_DEPLOYMENT_ENVIRONMENT\n */\nexport var SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT;\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\n */\nexport var SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID;\n/**\n * The model identifier for the device.\n *\n * Note: It'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\n */\nexport var SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER;\n/**\n * The marketing name for the device model.\n *\n * Note: It'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\n */\nexport var SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME;\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\n */\nexport var SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME;\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 "invoked ARN" 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_FAAS_ID\n*/\nexport var SEMRESATTRS_FAAS_ID = TMP_FAAS_ID;\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\n*/\nexport var SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION;\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\n */\nexport var SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE;\n/**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It'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\n */\nexport var SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY;\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\n */\nexport var SEMRESATTRS_HOST_ID = TMP_HOST_ID;\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\n */\nexport var SEMRESATTRS_HOST_NAME = TMP_HOST_NAME;\n/**\n * Type of host. For Cloud, this must be the machine type.\n *\n * @deprecated use ATTR_HOST_TYPE\n */\nexport var SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated use ATTR_HOST_ARCH\n */\nexport var SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH;\n/**\n * Name of the VM image or OS install the host was instantiated from.\n *\n * @deprecated use ATTR_HOST_IMAGE_NAME\n */\nexport var SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME;\n/**\n * VM image ID. For Cloud, this value is from the provider.\n *\n * @deprecated use ATTR_HOST_IMAGE_ID\n */\nexport var SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID;\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\n */\nexport var SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION;\n/**\n * The name of the cluster.\n *\n * @deprecated use ATTR_K8S_CLUSTER_NAME\n */\nexport var SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME;\n/**\n * The name of the Node.\n *\n * @deprecated use ATTR_K8S_NODE_NAME\n */\nexport var SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME;\n/**\n * The UID of the Node.\n *\n * @deprecated use ATTR_K8S_NODE_UID\n */\nexport var SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID;\n/**\n * The name of the namespace that the pod is running in.\n *\n * @deprecated use ATTR_K8S_NAMESPACE_NAME\n */\nexport var SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME;\n/**\n * The UID of the Pod.\n *\n * @deprecated use ATTR_K8S_POD_UID\n */\nexport var SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID;\n/**\n * The name of the Pod.\n *\n * @deprecated use ATTR_K8S_POD_NAME\n */\nexport var SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME;\n/**\n * The name of the Container in a Pod template.\n *\n * @deprecated use ATTR_K8S_CONTAINER_NAME\n */\nexport var SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME;\n/**\n * The UID of the ReplicaSet.\n *\n * @deprecated use ATTR_K8S_REPLICASET_UID\n */\nexport var SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID;\n/**\n * The name of the ReplicaSet.\n *\n * @deprecated use ATTR_K8S_REPLICASET_NAME\n */\nexport var SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME;\n/**\n * The UID of the Deployment.\n *\n * @deprecated use ATTR_K8S_DEPLOYMENT_UID\n */\nexport var SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID;\n/**\n * The name of the Deployment.\n *\n * @deprecated use ATTR_K8S_DEPLOYMENT_NAME\n */\nexport var SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME;\n/**\n * The UID of the StatefulSet.\n *\n * @deprecated use ATTR_K8S_STATEFULSET_UID\n */\nexport var SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID;\n/**\n * The name of the StatefulSet.\n *\n * @deprecated use ATTR_K8S_STATEFULSET_NAME\n */\nexport var SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME;\n/**\n * The UID of the DaemonSet.\n *\n * @deprecated use ATTR_K8S_DAEMONSET_UID\n */\nexport var SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID;\n/**\n * The name of the DaemonSet.\n *\n * @deprecated use ATTR_K8S_DAEMONSET_NAME\n */\nexport var SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME;\n/**\n * The UID of the Job.\n *\n * @deprecated use ATTR_K8S_JOB_UID\n */\nexport var SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID;\n/**\n * The name of the Job.\n *\n * @deprecated use ATTR_K8S_JOB_NAME\n */\nexport var SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME;\n/**\n * The UID of the CronJob.\n *\n * @deprecated use ATTR_K8S_CRONJOB_UID\n */\nexport var SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID;\n/**\n * The name of the CronJob.\n *\n * @deprecated use ATTR_K8S_CRONJOB_NAME\n */\nexport var SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME;\n/**\n * The operating system type.\n *\n * @deprecated use ATTR_OS_TYPE\n */\nexport var SEMRESATTRS_OS_TYPE = TMP_OS_TYPE;\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\n */\nexport var SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION;\n/**\n * Human readable operating system name.\n *\n * @deprecated use ATTR_OS_NAME\n */\nexport var SEMRESATTRS_OS_NAME = TMP_OS_NAME;\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\n */\nexport var SEMRESATTRS_OS_VERSION = TMP_OS_VERSION;\n/**\n * Process identifier (PID).\n *\n * @deprecated use ATTR_PROCESS_PID\n */\nexport var SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID;\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\n */\nexport var SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME;\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\n */\nexport var SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH;\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\n */\nexport var SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND;\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\n */\nexport var SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE;\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\n */\nexport var SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS;\n/**\n * The username of the user that owns the process.\n *\n * @deprecated use ATTR_PROCESS_OWNER\n */\nexport var SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER;\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\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME;\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\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION;\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\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = TMP_PROCESS_RUNTIME_DESCRIPTION;\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 var SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME;\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\n */\nexport var SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE;\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\n */\nexport var SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID;\n/**\n * The version string of the service API or implementation.\n *\n * @deprecated use ATTR_SERVICE_VERSION\n */\nexport var SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION;\n/**\n * The name of the telemetry SDK as defined above.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_NAME\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_LANGUAGE\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE;\n/**\n * The version string of the telemetry SDK.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_VERSION\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION;\n/**\n * The version string of the auto instrumentation agent, if used.\n *\n * @deprecated use ATTR_TELEMETRY_AUTO_VERSION\n */\nexport var SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION;\n/**\n * The name of the web engine.\n *\n * @deprecated use ATTR_WEBENGINE_NAME\n */\nexport var SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME;\n/**\n * The version of the web engine.\n *\n * @deprecated use ATTR_WEBENGINE_VERSION\n */\nexport var SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION;\n/**\n * Additional description of the web engine (e.g. detailed version and edition information).\n *\n * @deprecated use ATTR_WEBENGINE_DESCRIPTION\n */\nexport var SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION;\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 var SemanticResourceAttributes = \n/*#__PURE__*/ createConstMap([\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 * Constant values for CloudProviderValues enum definition\n *\n * Name of the cloud provider.\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\nvar TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nvar TMP_CLOUDPROVIDERVALUES_AWS = 'aws';\nvar TMP_CLOUDPROVIDERVALUES_AZURE = 'azure';\nvar TMP_CLOUDPROVIDERVALUES_GCP = 'gcp';\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_ALIBABA_CLOUD.\n */\nexport var CLOUDPROVIDERVALUES_ALIBABA_CLOUD = TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AWS.\n */\nexport var CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AZURE.\n */\nexport var CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_GCP.\n */\nexport var CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP;\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 var CloudProviderValues = \n/*#__PURE__*/ createConstMap([\n TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_CLOUDPROVIDERVALUES_AWS,\n TMP_CLOUDPROVIDERVALUES_AZURE,\n TMP_CLOUDPROVIDERVALUES_GCP,\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// 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\nvar TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs';\nvar TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc';\nvar TMP_CLOUDPLATFORMVALUES_AWS_EC2 = 'aws_ec2';\nvar TMP_CLOUDPLATFORMVALUES_AWS_ECS = 'aws_ecs';\nvar TMP_CLOUDPLATFORMVALUES_AWS_EKS = 'aws_eks';\nvar TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = 'aws_lambda';\nvar TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = 'aws_elastic_beanstalk';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_VM = 'azure_vm';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = 'azure_container_instances';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_AKS = 'azure_aks';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = 'azure_functions';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = 'azure_app_service';\nvar TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine';\nvar TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run';\nvar TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = 'gcp_kubernetes_engine';\nvar TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions';\nvar TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine';\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.\n */\nexport var CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS;\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.\n */\nexport var CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_LAMBDA = TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_APP_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE;\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 var CloudPlatformValues = \n/*#__PURE__*/ createConstMap([\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 * 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// 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\nvar TMP_AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2';\nvar TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate';\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.\n */\nexport var AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2;\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.\n */\nexport var AWSECSLAUNCHTYPEVALUES_FARGATE = TMP_AWSECSLAUNCHTYPEVALUES_FARGATE;\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 var AwsEcsLaunchtypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_AWSECSLAUNCHTYPEVALUES_EC2,\n TMP_AWSECSLAUNCHTYPEVALUES_FARGATE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HostArchValues enum definition\n *\n * The CPU architecture the host system is running on.\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\nvar TMP_HOSTARCHVALUES_AMD64 = 'amd64';\nvar TMP_HOSTARCHVALUES_ARM32 = 'arm32';\nvar TMP_HOSTARCHVALUES_ARM64 = 'arm64';\nvar TMP_HOSTARCHVALUES_IA64 = 'ia64';\nvar TMP_HOSTARCHVALUES_PPC32 = 'ppc32';\nvar TMP_HOSTARCHVALUES_PPC64 = 'ppc64';\nvar TMP_HOSTARCHVALUES_X86 = 'x86';\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_AMD64.\n */\nexport var HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM32.\n */\nexport var HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM64.\n */\nexport var HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_IA64.\n */\nexport var HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC32.\n */\nexport var HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC64.\n */\nexport var HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_X86.\n */\nexport var HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86;\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 var HostArchValues = \n/*#__PURE__*/ createConstMap([\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 * Constant values for OsTypeValues enum definition\n *\n * The operating system type.\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\nvar TMP_OSTYPEVALUES_WINDOWS = 'windows';\nvar TMP_OSTYPEVALUES_LINUX = 'linux';\nvar TMP_OSTYPEVALUES_DARWIN = 'darwin';\nvar TMP_OSTYPEVALUES_FREEBSD = 'freebsd';\nvar TMP_OSTYPEVALUES_NETBSD = 'netbsd';\nvar TMP_OSTYPEVALUES_OPENBSD = 'openbsd';\nvar TMP_OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd';\nvar TMP_OSTYPEVALUES_HPUX = 'hpux';\nvar TMP_OSTYPEVALUES_AIX = 'aix';\nvar TMP_OSTYPEVALUES_SOLARIS = 'solaris';\nvar TMP_OSTYPEVALUES_Z_OS = 'z_os';\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_WINDOWS.\n */\nexport var OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_LINUX.\n */\nexport var OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DARWIN.\n */\nexport var OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_FREEBSD.\n */\nexport var OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_NETBSD.\n */\nexport var OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_OPENBSD.\n */\nexport var OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DRAGONFLYBSD.\n */\nexport var OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_HPUX.\n */\nexport var OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_AIX.\n */\nexport var OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_SOLARIS.\n */\nexport var OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_Z_OS.\n */\nexport var OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS;\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 var OsTypeValues = \n/*#__PURE__*/ createConstMap([\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 * Constant values for TelemetrySdkLanguageValues enum definition\n *\n * The language of the telemetry SDK.\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\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_GO = 'go';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = 'php';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs';\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_CPP.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_CPP = TMP_TELEMETRYSDKLANGUAGEVALUES_CPP;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_DOTNET = TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_ERLANG = TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_GO.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_JAVA.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_JAVA = TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_NODEJS = TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PHP.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_PHP = TMP_TELEMETRYSDKLANGUAGEVALUES_PHP;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_PYTHON = TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_RUBY.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_RUBY = TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_WEBJS = TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS;\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 var TelemetrySdkLanguageValues = \n/*#__PURE__*/ createConstMap([\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//# sourceMappingURL=SemanticResourceAttributes.js.map","/*\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 */\nvar _a;\nimport { VERSION } from '../../version';\nimport { SEMRESATTRS_TELEMETRY_SDK_NAME, SEMRESATTRS_PROCESS_RUNTIME_NAME, SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, TELEMETRYSDKLANGUAGEVALUES_WEBJS, SEMRESATTRS_TELEMETRY_SDK_VERSION, } from '@opentelemetry/semantic-conventions';\n/** Constants describing the SDK in use */\nexport var SDK_INFO = (_a = {},\n _a[SEMRESATTRS_TELEMETRY_SDK_NAME] = 'opentelemetry',\n _a[SEMRESATTRS_PROCESS_RUNTIME_NAME] = 'browser',\n _a[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE] = TELEMETRYSDKLANGUAGEVALUES_WEBJS,\n _a[SEMRESATTRS_TELEMETRY_SDK_VERSION] = VERSION,\n _a);\n//# sourceMappingURL=sdk-info.js.map","/*\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 { otperformance as performance } from '../platform';\nvar NANOSECOND_DIGITS = 9;\nvar NANOSECOND_DIGITS_IN_MILLIS = 6;\nvar MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);\nvar SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).\n * @param epochMillis\n */\nexport function millisToHrTime(epochMillis) {\n var epochSeconds = epochMillis / 1000;\n // Decimals only.\n var seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n var nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);\n return [seconds, nanos];\n}\nexport function getTimeOrigin() {\n var timeOrigin = performance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n var perf = performance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nexport function hrTime(performanceNow) {\n var timeOrigin = millisToHrTime(getTimeOrigin());\n var now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : performance.now());\n return addHrTimes(timeOrigin, now);\n}\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nexport function timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\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 }\n else {\n // epoch milliseconds or performance.timeOrigin\n return millisToHrTime(time);\n }\n }\n else if (time instanceof Date) {\n return millisToHrTime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nexport function hrTimeDuration(startTime, endTime) {\n var seconds = endTime[0] - startTime[0];\n var nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nexport function hrTimeToTimeStamp(time) {\n var precision = NANOSECOND_DIGITS;\n var tmp = \"\" + '0'.repeat(precision) + time[1] + \"Z\";\n var nanoString = tmp.substr(tmp.length - precision - 1);\n var date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nexport function hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nexport function hrTimeToMilliseconds(time) {\n return time[0] * 1e3 + time[1] / 1e6;\n}\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nexport function hrTimeToMicroseconds(time) {\n return time[0] * 1e6 + time[1] / 1e3;\n}\n/**\n * check if time is HrTime\n * @param value\n */\nexport function isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nexport function isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\n/**\n * Given 2 HrTime formatted times, return their sum as an HrTime.\n */\nexport function addHrTimes(time1, time2) {\n var out = [time1[0] + time2[0], time1[1] + time2[1]];\n // Nanoseconds\n if (out[1] >= SECOND_TO_NANOSECONDS) {\n out[1] -= SECOND_TO_NANOSECONDS;\n out[0] += 1;\n }\n return out;\n}\n//# sourceMappingURL=time.js.map","/*\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 var ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode || (ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","/*\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 { context } from '@opentelemetry/api';\nimport { suppressTracing } from '../trace/suppress-tracing';\n/**\n * @internal\n * Shared functionality used by Exporters while exporting data, including suppression of Traces.\n */\nexport function _export(exporter, arg) {\n return new Promise(function (resolve) {\n // prevent downstream exporter calls from generating spans\n context.with(suppressTracing(context.active()), function () {\n exporter.export(arg, function (result) {\n resolve(result);\n });\n });\n });\n}\n//# sourceMappingURL=exporter.js.map","/*\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 { W3CBaggagePropagator } from './baggage/propagation/W3CBaggagePropagator';\nexport { AnchoredClock } from './common/anchored-clock';\nexport { isAttributeKey, isAttributeValue, sanitizeAttributes, } from './common/attributes';\nexport { globalErrorHandler, setGlobalErrorHandler, } from './common/global-error-handler';\nexport { loggingErrorHandler } from './common/logging-error-handler';\nexport { addHrTimes, getTimeOrigin, hrTime, hrTimeDuration, hrTimeToMicroseconds, hrTimeToMilliseconds, hrTimeToNanoseconds, hrTimeToTimeStamp, isTimeInput, isTimeInputHrTime, millisToHrTime, timeInputToHrTime, } from './common/time';\nexport { hexToBinary } from './common/hex-to-binary';\nexport { ExportResultCode } from './ExportResult';\nimport { getKeyPairs, serializeKeyPairs, parseKeyPairsIntoRecord, parsePairKeyValue, } from './baggage/utils';\nexport var baggageUtils = {\n getKeyPairs: getKeyPairs,\n serializeKeyPairs: serializeKeyPairs,\n parseKeyPairsIntoRecord: parseKeyPairsIntoRecord,\n parsePairKeyValue: parsePairKeyValue,\n};\nexport { RandomIdGenerator, SDK_INFO, _globalThis, getEnv, getEnvWithoutDefaults, hexToBase64, otperformance, unrefTimer, } from './platform';\nexport { CompositePropagator, } from './propagation/composite';\nexport { TRACE_PARENT_HEADER, TRACE_STATE_HEADER, W3CTraceContextPropagator, parseTraceParent, } from './trace/W3CTraceContextPropagator';\nexport { RPCType, deleteRPCMetadata, getRPCMetadata, setRPCMetadata, } from './trace/rpc-metadata';\nexport { AlwaysOffSampler } from './trace/sampler/AlwaysOffSampler';\nexport { AlwaysOnSampler } from './trace/sampler/AlwaysOnSampler';\nexport { ParentBasedSampler } from './trace/sampler/ParentBasedSampler';\nexport { TraceIdRatioBasedSampler } from './trace/sampler/TraceIdRatioBasedSampler';\nexport { isTracingSuppressed, suppressTracing, unsuppressTracing, } from './trace/suppress-tracing';\nexport { TraceState } from './trace/TraceState';\nexport { DEFAULT_ATTRIBUTE_COUNT_LIMIT, DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, DEFAULT_ENVIRONMENT, DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT, parseEnvironment, } from './utils/environment';\nexport { merge } from './utils/merge';\nexport { TracesSamplerValues } from './utils/sampling';\nexport { TimeoutError, callWithTimeout } from './utils/timeout';\nexport { isUrlIgnored, urlMatches } from './utils/url';\nexport { isWrapped } from './utils/wrap';\nexport { BindOnceFuture } from './utils/callback';\nexport { VERSION } from './version';\nimport { _export } from './internal/exporter';\nexport var internal = {\n _export: _export,\n};\n//# sourceMappingURL=index.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { millisToHrTime, hrTimeToMicroseconds } from '@opentelemetry/core';\nimport { DataPointType, } from '../export/MetricData';\nvar LastValueAccumulation = /** @class */ (function () {\n function LastValueAccumulation(startTime, _current, sampleTime) {\n if (_current === void 0) { _current = 0; }\n if (sampleTime === void 0) { sampleTime = [0, 0]; }\n this.startTime = startTime;\n this._current = _current;\n this.sampleTime = sampleTime;\n }\n LastValueAccumulation.prototype.record = function (value) {\n this._current = value;\n this.sampleTime = millisToHrTime(Date.now());\n };\n LastValueAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n LastValueAccumulation.prototype.toPointValue = function () {\n return this._current;\n };\n return LastValueAccumulation;\n}());\nexport { LastValueAccumulation };\n/** Basic aggregator which calculates a LastValue from individual measurements. */\nvar LastValueAggregator = /** @class */ (function () {\n function LastValueAggregator() {\n this.kind = AggregatorKind.LAST_VALUE;\n }\n LastValueAggregator.prototype.createAccumulation = function (startTime) {\n return new LastValueAccumulation(startTime);\n };\n /**\n * Returns the result of the merge of the given accumulations.\n *\n * Return the newly captured (delta) accumulation for LastValueAggregator.\n */\n LastValueAggregator.prototype.merge = function (previous, delta) {\n // nanoseconds may lose precisions.\n var latestAccumulation = hrTimeToMicroseconds(delta.sampleTime) >=\n hrTimeToMicroseconds(previous.sampleTime)\n ? delta\n : previous;\n return new LastValueAccumulation(previous.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n *\n * A delta aggregation is not meaningful to LastValueAggregator, just return\n * the newly captured (delta) accumulation for LastValueAggregator.\n */\n LastValueAggregator.prototype.diff = function (previous, current) {\n // nanoseconds may lose precisions.\n var latestAccumulation = hrTimeToMicroseconds(current.sampleTime) >=\n hrTimeToMicroseconds(previous.sampleTime)\n ? current\n : previous;\n return new LastValueAccumulation(current.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);\n };\n LastValueAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.GAUGE,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: accumulation.toPointValue(),\n };\n }),\n };\n };\n return LastValueAggregator;\n}());\nexport { LastValueAggregator };\n//# sourceMappingURL=LastValue.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { DataPointType, } from '../export/MetricData';\nvar SumAccumulation = /** @class */ (function () {\n function SumAccumulation(startTime, monotonic, _current, reset) {\n if (_current === void 0) { _current = 0; }\n if (reset === void 0) { reset = false; }\n this.startTime = startTime;\n this.monotonic = monotonic;\n this._current = _current;\n this.reset = reset;\n }\n SumAccumulation.prototype.record = function (value) {\n if (this.monotonic && value < 0) {\n return;\n }\n this._current += value;\n };\n SumAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n SumAccumulation.prototype.toPointValue = function () {\n return this._current;\n };\n return SumAccumulation;\n}());\nexport { SumAccumulation };\n/** Basic aggregator which calculates a Sum from individual measurements. */\nvar SumAggregator = /** @class */ (function () {\n function SumAggregator(monotonic) {\n this.monotonic = monotonic;\n this.kind = AggregatorKind.SUM;\n }\n SumAggregator.prototype.createAccumulation = function (startTime) {\n return new SumAccumulation(startTime, this.monotonic);\n };\n /**\n * Returns the result of the merge of the given accumulations.\n */\n SumAggregator.prototype.merge = function (previous, delta) {\n var prevPv = previous.toPointValue();\n var deltaPv = delta.toPointValue();\n if (delta.reset) {\n return new SumAccumulation(delta.startTime, this.monotonic, deltaPv, delta.reset);\n }\n return new SumAccumulation(previous.startTime, this.monotonic, prevPv + deltaPv);\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n SumAggregator.prototype.diff = function (previous, current) {\n var prevPv = previous.toPointValue();\n var currPv = current.toPointValue();\n /**\n * If the SumAggregator is a monotonic one and the previous point value is\n * greater than the current one, a reset is deemed to be happened.\n * Return the current point value to prevent the value from been reset.\n */\n if (this.monotonic && prevPv > currPv) {\n return new SumAccumulation(current.startTime, this.monotonic, currPv, true);\n }\n return new SumAccumulation(current.startTime, this.monotonic, currPv - prevPv);\n };\n SumAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.SUM,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: accumulation.toPointValue(),\n };\n }),\n isMonotonic: this.monotonic,\n };\n };\n return SumAggregator;\n}());\nexport { SumAggregator };\n//# sourceMappingURL=Sum.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as api from '@opentelemetry/api';\nimport { SumAggregator, DropAggregator, LastValueAggregator, HistogramAggregator, ExponentialHistogramAggregator, } from '../aggregator';\nimport { InstrumentType } from '../InstrumentDescriptor';\n/**\n * Configures how measurements are combined into metrics for views.\n *\n * Aggregation provides a set of built-in aggregations via static methods.\n */\nvar Aggregation = /** @class */ (function () {\n function Aggregation() {\n }\n Aggregation.Drop = function () {\n return DROP_AGGREGATION;\n };\n Aggregation.Sum = function () {\n return SUM_AGGREGATION;\n };\n Aggregation.LastValue = function () {\n return LAST_VALUE_AGGREGATION;\n };\n Aggregation.Histogram = function () {\n return HISTOGRAM_AGGREGATION;\n };\n Aggregation.ExponentialHistogram = function () {\n return EXPONENTIAL_HISTOGRAM_AGGREGATION;\n };\n Aggregation.Default = function () {\n return DEFAULT_AGGREGATION;\n };\n return Aggregation;\n}());\nexport { Aggregation };\n/**\n * The default drop aggregation.\n */\nvar DropAggregation = /** @class */ (function (_super) {\n __extends(DropAggregation, _super);\n function DropAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DropAggregation.prototype.createAggregator = function (_instrument) {\n return DropAggregation.DEFAULT_INSTANCE;\n };\n DropAggregation.DEFAULT_INSTANCE = new DropAggregator();\n return DropAggregation;\n}(Aggregation));\nexport { DropAggregation };\n/**\n * The default sum aggregation.\n */\nvar SumAggregation = /** @class */ (function (_super) {\n __extends(SumAggregation, _super);\n function SumAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SumAggregation.prototype.createAggregator = function (instrument) {\n switch (instrument.type) {\n case InstrumentType.COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.HISTOGRAM: {\n return SumAggregation.MONOTONIC_INSTANCE;\n }\n default: {\n return SumAggregation.NON_MONOTONIC_INSTANCE;\n }\n }\n };\n SumAggregation.MONOTONIC_INSTANCE = new SumAggregator(true);\n SumAggregation.NON_MONOTONIC_INSTANCE = new SumAggregator(false);\n return SumAggregation;\n}(Aggregation));\nexport { SumAggregation };\n/**\n * The default last value aggregation.\n */\nvar LastValueAggregation = /** @class */ (function (_super) {\n __extends(LastValueAggregation, _super);\n function LastValueAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LastValueAggregation.prototype.createAggregator = function (_instrument) {\n return LastValueAggregation.DEFAULT_INSTANCE;\n };\n LastValueAggregation.DEFAULT_INSTANCE = new LastValueAggregator();\n return LastValueAggregation;\n}(Aggregation));\nexport { LastValueAggregation };\n/**\n * The default histogram aggregation.\n */\nvar HistogramAggregation = /** @class */ (function (_super) {\n __extends(HistogramAggregation, _super);\n function HistogramAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HistogramAggregation.prototype.createAggregator = function (_instrument) {\n return HistogramAggregation.DEFAULT_INSTANCE;\n };\n HistogramAggregation.DEFAULT_INSTANCE = new HistogramAggregator([0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000], true);\n return HistogramAggregation;\n}(Aggregation));\nexport { HistogramAggregation };\n/**\n * The explicit bucket histogram aggregation.\n */\nvar ExplicitBucketHistogramAggregation = /** @class */ (function (_super) {\n __extends(ExplicitBucketHistogramAggregation, _super);\n /**\n * @param boundaries the bucket boundaries of the histogram aggregation\n * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded.\n */\n function ExplicitBucketHistogramAggregation(boundaries, _recordMinMax) {\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n var _this = _super.call(this) || this;\n _this._recordMinMax = _recordMinMax;\n if (boundaries == null) {\n throw new Error('ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array');\n }\n // Copy the boundaries array for modification.\n boundaries = boundaries.concat();\n // We need to an ordered set to be able to correctly compute count for each\n // boundary since we'll iterate on each in order.\n boundaries = boundaries.sort(function (a, b) { return a - b; });\n // Remove all Infinity from the boundaries.\n var minusInfinityIndex = boundaries.lastIndexOf(-Infinity);\n var infinityIndex = boundaries.indexOf(Infinity);\n if (infinityIndex === -1) {\n infinityIndex = undefined;\n }\n _this._boundaries = boundaries.slice(minusInfinityIndex + 1, infinityIndex);\n return _this;\n }\n ExplicitBucketHistogramAggregation.prototype.createAggregator = function (_instrument) {\n return new HistogramAggregator(this._boundaries, this._recordMinMax);\n };\n return ExplicitBucketHistogramAggregation;\n}(Aggregation));\nexport { ExplicitBucketHistogramAggregation };\nvar ExponentialHistogramAggregation = /** @class */ (function (_super) {\n __extends(ExponentialHistogramAggregation, _super);\n function ExponentialHistogramAggregation(_maxSize, _recordMinMax) {\n if (_maxSize === void 0) { _maxSize = 160; }\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n var _this = _super.call(this) || this;\n _this._maxSize = _maxSize;\n _this._recordMinMax = _recordMinMax;\n return _this;\n }\n ExponentialHistogramAggregation.prototype.createAggregator = function (_instrument) {\n return new ExponentialHistogramAggregator(this._maxSize, this._recordMinMax);\n };\n return ExponentialHistogramAggregation;\n}(Aggregation));\nexport { ExponentialHistogramAggregation };\n/**\n * The default aggregation.\n */\nvar DefaultAggregation = /** @class */ (function (_super) {\n __extends(DefaultAggregation, _super);\n function DefaultAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DefaultAggregation.prototype._resolve = function (instrument) {\n // cast to unknown to disable complaints on the (unreachable) fallback.\n switch (instrument.type) {\n case InstrumentType.COUNTER:\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: {\n return SUM_AGGREGATION;\n }\n case InstrumentType.GAUGE:\n case InstrumentType.OBSERVABLE_GAUGE: {\n return LAST_VALUE_AGGREGATION;\n }\n case InstrumentType.HISTOGRAM: {\n if (instrument.advice.explicitBucketBoundaries) {\n return new ExplicitBucketHistogramAggregation(instrument.advice.explicitBucketBoundaries);\n }\n return HISTOGRAM_AGGREGATION;\n }\n }\n api.diag.warn(\"Unable to recognize instrument type: \" + instrument.type);\n return DROP_AGGREGATION;\n };\n DefaultAggregation.prototype.createAggregator = function (instrument) {\n return this._resolve(instrument).createAggregator(instrument);\n };\n return DefaultAggregation;\n}(Aggregation));\nexport { DefaultAggregation };\nvar DROP_AGGREGATION = new DropAggregation();\nvar SUM_AGGREGATION = new SumAggregation();\nvar LAST_VALUE_AGGREGATION = new LastValueAggregation();\nvar HISTOGRAM_AGGREGATION = new HistogramAggregation();\nvar EXPONENTIAL_HISTOGRAM_AGGREGATION = new ExponentialHistogramAggregation();\nvar DEFAULT_AGGREGATION = new DefaultAggregation();\n//# sourceMappingURL=Aggregation.js.map","/*\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 { Aggregation } from '../view/Aggregation';\nimport { AggregationTemporality } from './AggregationTemporality';\nexport var DEFAULT_AGGREGATION_SELECTOR = function (_instrumentType) { return Aggregation.Default(); };\nexport var DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR = function (_instrumentType) { return AggregationTemporality.CUMULATIVE; };\n//# sourceMappingURL=AggregationSelector.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport * as api from '@opentelemetry/api';\nimport { FlatMap, callWithTimeout } from '../utils';\nimport { DEFAULT_AGGREGATION_SELECTOR, DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR, } from './AggregationSelector';\n/**\n * A registered reader of metrics that, when linked to a {@link MetricProducer}, offers global\n * control over metrics.\n */\nvar MetricReader = /** @class */ (function () {\n function MetricReader(options) {\n var _a, _b, _c;\n // Tracks the shutdown state.\n // TODO: use BindOncePromise here once a new version of @opentelemetry/core is available.\n this._shutdown = false;\n this._aggregationSelector =\n (_a = options === null || options === void 0 ? void 0 : options.aggregationSelector) !== null && _a !== void 0 ? _a : DEFAULT_AGGREGATION_SELECTOR;\n this._aggregationTemporalitySelector =\n (_b = options === null || options === void 0 ? void 0 : options.aggregationTemporalitySelector) !== null && _b !== void 0 ? _b : DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;\n this._metricProducers = (_c = options === null || options === void 0 ? void 0 : options.metricProducers) !== null && _c !== void 0 ? _c : [];\n }\n /**\n * Set the {@link MetricProducer} used by this instance. **This should only be called by the\n * SDK and should be considered internal.**\n *\n * To add additional {@link MetricProducer}s to a {@link MetricReader}, pass them to the\n * constructor as {@link MetricReaderOptions.metricProducers}.\n *\n * @internal\n * @param metricProducer\n */\n MetricReader.prototype.setMetricProducer = function (metricProducer) {\n if (this._sdkMetricProducer) {\n throw new Error('MetricReader can not be bound to a MeterProvider again.');\n }\n this._sdkMetricProducer = metricProducer;\n this.onInitialized();\n };\n /**\n * Select the {@link Aggregation} for the given {@link InstrumentType} for this\n * reader.\n */\n MetricReader.prototype.selectAggregation = function (instrumentType) {\n return this._aggregationSelector(instrumentType);\n };\n /**\n * Select the {@link AggregationTemporality} for the given\n * {@link InstrumentType} for this reader.\n */\n MetricReader.prototype.selectAggregationTemporality = function (instrumentType) {\n return this._aggregationTemporalitySelector(instrumentType);\n };\n /**\n * Handle once the SDK has initialized this {@link MetricReader}\n * Overriding this method is optional.\n */\n MetricReader.prototype.onInitialized = function () {\n // Default implementation is empty.\n };\n /**\n * Collect all metrics from the associated {@link MetricProducer}\n */\n MetricReader.prototype.collect = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, sdkCollectionResults, additionalCollectionResults, errors, resource, scopeMetrics;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (this._sdkMetricProducer === undefined) {\n throw new Error('MetricReader is not bound to a MetricProducer');\n }\n // Subsequent invocations to collect are not allowed. SDKs SHOULD return some failure for these calls.\n if (this._shutdown) {\n throw new Error('MetricReader is shutdown');\n }\n return [4 /*yield*/, Promise.all(__spreadArray([\n this._sdkMetricProducer.collect({\n timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis,\n })\n ], __read(this._metricProducers.map(function (producer) {\n return producer.collect({\n timeoutMillis: options === null || options === void 0 ? void 0 : options.timeoutMillis,\n });\n })), false))];\n case 1:\n _a = __read.apply(void 0, [_b.sent()]), sdkCollectionResults = _a[0], additionalCollectionResults = _a.slice(1);\n errors = sdkCollectionResults.errors.concat(FlatMap(additionalCollectionResults, function (result) { return result.errors; }));\n resource = sdkCollectionResults.resourceMetrics.resource;\n scopeMetrics = sdkCollectionResults.resourceMetrics.scopeMetrics.concat(FlatMap(additionalCollectionResults, function (result) { return result.resourceMetrics.scopeMetrics; }));\n return [2 /*return*/, {\n resourceMetrics: {\n resource: resource,\n scopeMetrics: scopeMetrics,\n },\n errors: errors,\n }];\n }\n });\n });\n };\n /**\n * Shuts down the metric reader, the promise will reject after the optional timeout or resolve after completion.\n *\n *

NOTE: this operation will continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n MetricReader.prototype.shutdown = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // Do not call shutdown again if it has already been called.\n if (this._shutdown) {\n api.diag.error('Cannot call shutdown twice.');\n return [2 /*return*/];\n }\n if (!((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null)) return [3 /*break*/, 2];\n return [4 /*yield*/, this.onShutdown()];\n case 1:\n _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, callWithTimeout(this.onShutdown(), options.timeoutMillis)];\n case 3:\n _a.sent();\n _a.label = 4;\n case 4:\n this._shutdown = true;\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Flushes metrics read by this reader, the promise will reject after the optional timeout or resolve after completion.\n *\n *

NOTE: this operation will continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n MetricReader.prototype.forceFlush = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this._shutdown) {\n api.diag.warn('Cannot forceFlush on already shutdown MetricReader.');\n return [2 /*return*/];\n }\n if (!((options === null || options === void 0 ? void 0 : options.timeoutMillis) == null)) return [3 /*break*/, 2];\n return [4 /*yield*/, this.onForceFlush()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n case 2: return [4 /*yield*/, callWithTimeout(this.onForceFlush(), options.timeoutMillis)];\n case 3:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n return MetricReader;\n}());\nexport { MetricReader };\n//# sourceMappingURL=MetricReader.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport * as api from '@opentelemetry/api';\nimport { internal, ExportResultCode, globalErrorHandler, unrefTimer, } from '@opentelemetry/core';\nimport { MetricReader } from './MetricReader';\nimport { callWithTimeout, TimeoutError } from '../utils';\n/**\n * {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to\n * the configured {@link PushMetricExporter}\n */\nvar PeriodicExportingMetricReader = /** @class */ (function (_super) {\n __extends(PeriodicExportingMetricReader, _super);\n function PeriodicExportingMetricReader(options) {\n var _a, _b, _c, _d;\n var _this = _super.call(this, {\n aggregationSelector: (_a = options.exporter.selectAggregation) === null || _a === void 0 ? void 0 : _a.bind(options.exporter),\n aggregationTemporalitySelector: (_b = options.exporter.selectAggregationTemporality) === null || _b === void 0 ? void 0 : _b.bind(options.exporter),\n metricProducers: options.metricProducers,\n }) || this;\n if (options.exportIntervalMillis !== undefined &&\n options.exportIntervalMillis <= 0) {\n throw Error('exportIntervalMillis must be greater than 0');\n }\n if (options.exportTimeoutMillis !== undefined &&\n options.exportTimeoutMillis <= 0) {\n throw Error('exportTimeoutMillis must be greater than 0');\n }\n if (options.exportTimeoutMillis !== undefined &&\n options.exportIntervalMillis !== undefined &&\n options.exportIntervalMillis < options.exportTimeoutMillis) {\n throw Error('exportIntervalMillis must be greater than or equal to exportTimeoutMillis');\n }\n _this._exportInterval = (_c = options.exportIntervalMillis) !== null && _c !== void 0 ? _c : 60000;\n _this._exportTimeout = (_d = options.exportTimeoutMillis) !== null && _d !== void 0 ? _d : 30000;\n _this._exporter = options.exporter;\n return _this;\n }\n PeriodicExportingMetricReader.prototype._runOnce = function () {\n return __awaiter(this, void 0, void 0, function () {\n var err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, callWithTimeout(this._doRun(), this._exportTimeout)];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n err_1 = _a.sent();\n if (err_1 instanceof TimeoutError) {\n api.diag.error('Export took longer than %s milliseconds and timed out.', this._exportTimeout);\n return [2 /*return*/];\n }\n globalErrorHandler(err_1);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n PeriodicExportingMetricReader.prototype._doRun = function () {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n var _c, resourceMetrics, errors, e_1, result;\n var _d;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0: return [4 /*yield*/, this.collect({\n timeoutMillis: this._exportTimeout,\n })];\n case 1:\n _c = _e.sent(), resourceMetrics = _c.resourceMetrics, errors = _c.errors;\n if (errors.length > 0) {\n (_d = api.diag).error.apply(_d, __spreadArray(['PeriodicExportingMetricReader: metrics collection errors'], __read(errors), false));\n }\n if (!resourceMetrics.resource.asyncAttributesPending) return [3 /*break*/, 5];\n _e.label = 2;\n case 2:\n _e.trys.push([2, 4, , 5]);\n return [4 /*yield*/, ((_b = (_a = resourceMetrics.resource).waitForAsyncAttributes) === null || _b === void 0 ? void 0 : _b.call(_a))];\n case 3:\n _e.sent();\n return [3 /*break*/, 5];\n case 4:\n e_1 = _e.sent();\n api.diag.debug('Error while resolving async portion of resource: ', e_1);\n globalErrorHandler(e_1);\n return [3 /*break*/, 5];\n case 5: return [4 /*yield*/, internal._export(this._exporter, resourceMetrics)];\n case 6:\n result = _e.sent();\n if (result.code !== ExportResultCode.SUCCESS) {\n throw new Error(\"PeriodicExportingMetricReader: metrics export failed (error \" + result.error + \")\");\n }\n return [2 /*return*/];\n }\n });\n });\n };\n PeriodicExportingMetricReader.prototype.onInitialized = function () {\n var _this = this;\n // start running the interval as soon as this reader is initialized and keep handle for shutdown.\n this._interval = setInterval(function () {\n // this._runOnce never rejects. Using void operator to suppress @typescript-eslint/no-floating-promises.\n void _this._runOnce();\n }, this._exportInterval);\n unrefTimer(this._interval);\n };\n PeriodicExportingMetricReader.prototype.onForceFlush = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._runOnce()];\n case 1:\n _a.sent();\n return [4 /*yield*/, this._exporter.forceFlush()];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n PeriodicExportingMetricReader.prototype.onShutdown = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this._interval) {\n clearInterval(this._interval);\n }\n return [4 /*yield*/, this._exporter.shutdown()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n return PeriodicExportingMetricReader;\n}(MetricReader));\nexport { PeriodicExportingMetricReader };\n//# sourceMappingURL=PeriodicExportingMetricReader.js.map","/*\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 defaultServiceName() {\n return 'unknown_service';\n}\n//# sourceMappingURL=default-service-name.js.map","/*\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 */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { diag } from '@opentelemetry/api';\nimport { SEMRESATTRS_SERVICE_NAME, SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, SEMRESATTRS_TELEMETRY_SDK_NAME, SEMRESATTRS_TELEMETRY_SDK_VERSION, } from '@opentelemetry/semantic-conventions';\nimport { SDK_INFO } from '@opentelemetry/core';\nimport { defaultServiceName } from './platform';\n/**\n * A Resource describes the entity for which a signals (metrics or trace) are\n * collected.\n */\nvar Resource = /** @class */ (function () {\n function Resource(\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 attributes, asyncAttributesPromise) {\n var _this = this;\n var _a;\n this._attributes = attributes;\n this.asyncAttributesPending = asyncAttributesPromise != null;\n this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(function (asyncAttributes) {\n _this._attributes = Object.assign({}, _this._attributes, asyncAttributes);\n _this.asyncAttributesPending = false;\n return asyncAttributes;\n }, function (err) {\n diag.debug(\"a resource's async attributes promise rejected: %s\", err);\n _this.asyncAttributesPending = false;\n return {};\n });\n }\n /**\n * Returns an empty Resource\n */\n Resource.empty = function () {\n return Resource.EMPTY;\n };\n /**\n * Returns a Resource that identifies the SDK in use.\n */\n Resource.default = function () {\n var _a;\n return new Resource((_a = {},\n _a[SEMRESATTRS_SERVICE_NAME] = defaultServiceName(),\n _a[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE] = SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE],\n _a[SEMRESATTRS_TELEMETRY_SDK_NAME] = SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_NAME],\n _a[SEMRESATTRS_TELEMETRY_SDK_VERSION] = SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_VERSION],\n _a));\n };\n Object.defineProperty(Resource.prototype, \"attributes\", {\n get: function () {\n var _a;\n if (this.asyncAttributesPending) {\n diag.error('Accessing resource attributes before async attributes settled');\n }\n return (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Returns a promise that will never be rejected. Resolves when all async attributes have finished being added to\n * this Resource's attributes. This is useful in exporters to block until resource detection\n * has finished.\n */\n Resource.prototype.waitForAsyncAttributes = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.asyncAttributesPending) return [3 /*break*/, 2];\n return [4 /*yield*/, this._asyncAttributesPromise];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a new, merged {@link Resource} by merging the current Resource\n * with the other Resource. In case of a collision, other Resource takes\n * precedence.\n *\n * @param other the Resource that will be merged with this.\n * @returns the newly merged Resource.\n */\n Resource.prototype.merge = function (other) {\n var _this = this;\n var _a;\n if (!other)\n return this;\n // SpanAttributes from other resource overwrite attributes from this resource.\n var mergedSyncAttributes = __assign(__assign({}, this._syncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes));\n if (!this._asyncAttributesPromise &&\n !other._asyncAttributesPromise) {\n return new Resource(mergedSyncAttributes);\n }\n var mergedAttributesPromise = Promise.all([\n this._asyncAttributesPromise,\n other._asyncAttributesPromise,\n ]).then(function (_a) {\n var _b;\n var _c = __read(_a, 2), thisAsyncAttributes = _c[0], otherAsyncAttributes = _c[1];\n return __assign(__assign(__assign(__assign({}, _this._syncAttributes), thisAsyncAttributes), ((_b = other._syncAttributes) !== null && _b !== void 0 ? _b : other.attributes)), otherAsyncAttributes);\n });\n return new Resource(mergedSyncAttributes, mergedAttributesPromise);\n };\n Resource.EMPTY = new Resource({});\n return Resource;\n}());\nexport { Resource };\n//# sourceMappingURL=Resource.js.map","/*\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 */\nvar ViewRegistry = /** @class */ (function () {\n function ViewRegistry() {\n this._registeredViews = [];\n }\n ViewRegistry.prototype.addView = function (view) {\n this._registeredViews.push(view);\n };\n ViewRegistry.prototype.findViews = function (instrument, meter) {\n var _this = this;\n var views = this._registeredViews.filter(function (registeredView) {\n return (_this._matchInstrument(registeredView.instrumentSelector, instrument) &&\n _this._matchMeter(registeredView.meterSelector, meter));\n });\n return views;\n };\n ViewRegistry.prototype._matchInstrument = function (selector, instrument) {\n return ((selector.getType() === undefined ||\n instrument.type === selector.getType()) &&\n selector.getNameFilter().match(instrument.name) &&\n selector.getUnitFilter().match(instrument.unit));\n };\n ViewRegistry.prototype._matchMeter = function (selector, meter) {\n return (selector.getNameFilter().match(meter.name) &&\n (meter.version === undefined ||\n selector.getVersionFilter().match(meter.version)) &&\n (meter.schemaUrl === undefined ||\n selector.getSchemaUrlFilter().match(meter.schemaUrl)));\n };\n return ViewRegistry;\n}());\nexport { ViewRegistry };\n//# sourceMappingURL=ViewRegistry.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { context as contextApi, diag, ValueType, } from '@opentelemetry/api';\nimport { millisToHrTime } from '@opentelemetry/core';\nvar SyncInstrument = /** @class */ (function () {\n function SyncInstrument(_writableMetricStorage, _descriptor) {\n this._writableMetricStorage = _writableMetricStorage;\n this._descriptor = _descriptor;\n }\n SyncInstrument.prototype._record = function (value, attributes, context) {\n if (attributes === void 0) { attributes = {}; }\n if (context === void 0) { context = contextApi.active(); }\n if (typeof value !== 'number') {\n diag.warn(\"non-number value provided to metric \" + this._descriptor.name + \": \" + value);\n return;\n }\n if (this._descriptor.valueType === ValueType.INT &&\n !Number.isInteger(value)) {\n diag.warn(\"INT value type cannot accept a floating-point value for \" + this._descriptor.name + \", ignoring the fractional digits.\");\n value = Math.trunc(value);\n // ignore non-finite values.\n if (!Number.isInteger(value)) {\n return;\n }\n }\n this._writableMetricStorage.record(value, attributes, context, millisToHrTime(Date.now()));\n };\n return SyncInstrument;\n}());\nexport { SyncInstrument };\n/**\n * The class implements {@link UpDownCounter} interface.\n */\nvar UpDownCounterInstrument = /** @class */ (function (_super) {\n __extends(UpDownCounterInstrument, _super);\n function UpDownCounterInstrument() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Increment value of counter by the input. Inputs may be negative.\n */\n UpDownCounterInstrument.prototype.add = function (value, attributes, ctx) {\n this._record(value, attributes, ctx);\n };\n return UpDownCounterInstrument;\n}(SyncInstrument));\nexport { UpDownCounterInstrument };\n/**\n * The class implements {@link Counter} interface.\n */\nvar CounterInstrument = /** @class */ (function (_super) {\n __extends(CounterInstrument, _super);\n function CounterInstrument() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Increment value of counter by the input. Inputs may not be negative.\n */\n CounterInstrument.prototype.add = function (value, attributes, ctx) {\n if (value < 0) {\n diag.warn(\"negative value provided to counter \" + this._descriptor.name + \": \" + value);\n return;\n }\n this._record(value, attributes, ctx);\n };\n return CounterInstrument;\n}(SyncInstrument));\nexport { CounterInstrument };\n/**\n * The class implements {@link Gauge} interface.\n */\nvar GaugeInstrument = /** @class */ (function (_super) {\n __extends(GaugeInstrument, _super);\n function GaugeInstrument() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Records a measurement.\n */\n GaugeInstrument.prototype.record = function (value, attributes, ctx) {\n this._record(value, attributes, ctx);\n };\n return GaugeInstrument;\n}(SyncInstrument));\nexport { GaugeInstrument };\n/**\n * The class implements {@link Histogram} interface.\n */\nvar HistogramInstrument = /** @class */ (function (_super) {\n __extends(HistogramInstrument, _super);\n function HistogramInstrument() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Records a measurement. Value of the measurement must not be negative.\n */\n HistogramInstrument.prototype.record = function (value, attributes, ctx) {\n if (value < 0) {\n diag.warn(\"negative value provided to histogram \" + this._descriptor.name + \": \" + value);\n return;\n }\n this._record(value, attributes, ctx);\n };\n return HistogramInstrument;\n}(SyncInstrument));\nexport { HistogramInstrument };\nvar ObservableInstrument = /** @class */ (function () {\n function ObservableInstrument(descriptor, metricStorages, _observableRegistry) {\n this._observableRegistry = _observableRegistry;\n this._descriptor = descriptor;\n this._metricStorages = metricStorages;\n }\n /**\n * @see {Observable.addCallback}\n */\n ObservableInstrument.prototype.addCallback = function (callback) {\n this._observableRegistry.addCallback(callback, this);\n };\n /**\n * @see {Observable.removeCallback}\n */\n ObservableInstrument.prototype.removeCallback = function (callback) {\n this._observableRegistry.removeCallback(callback, this);\n };\n return ObservableInstrument;\n}());\nexport { ObservableInstrument };\nvar ObservableCounterInstrument = /** @class */ (function (_super) {\n __extends(ObservableCounterInstrument, _super);\n function ObservableCounterInstrument() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObservableCounterInstrument;\n}(ObservableInstrument));\nexport { ObservableCounterInstrument };\nvar ObservableGaugeInstrument = /** @class */ (function (_super) {\n __extends(ObservableGaugeInstrument, _super);\n function ObservableGaugeInstrument() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObservableGaugeInstrument;\n}(ObservableInstrument));\nexport { ObservableGaugeInstrument };\nvar ObservableUpDownCounterInstrument = /** @class */ (function (_super) {\n __extends(ObservableUpDownCounterInstrument, _super);\n function ObservableUpDownCounterInstrument() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ObservableUpDownCounterInstrument;\n}(ObservableInstrument));\nexport { ObservableUpDownCounterInstrument };\nexport function isObservableInstrument(it) {\n return it instanceof ObservableInstrument;\n}\n//# sourceMappingURL=Instruments.js.map","/*\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 { createInstrumentDescriptor, InstrumentType, } from './InstrumentDescriptor';\nimport { CounterInstrument, GaugeInstrument, HistogramInstrument, ObservableCounterInstrument, ObservableGaugeInstrument, ObservableUpDownCounterInstrument, UpDownCounterInstrument, } from './Instruments';\n/**\n * This class implements the {@link IMeter} interface.\n */\nvar Meter = /** @class */ (function () {\n function Meter(_meterSharedState) {\n this._meterSharedState = _meterSharedState;\n }\n /**\n * Create a {@link Gauge} instrument.\n */\n Meter.prototype.createGauge = function (name, options) {\n var descriptor = createInstrumentDescriptor(name, InstrumentType.GAUGE, options);\n var storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new GaugeInstrument(storage, descriptor);\n };\n /**\n * Create a {@link Histogram} instrument.\n */\n Meter.prototype.createHistogram = function (name, options) {\n var descriptor = createInstrumentDescriptor(name, InstrumentType.HISTOGRAM, options);\n var storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new HistogramInstrument(storage, descriptor);\n };\n /**\n * Create a {@link Counter} instrument.\n */\n Meter.prototype.createCounter = function (name, options) {\n var descriptor = createInstrumentDescriptor(name, InstrumentType.COUNTER, options);\n var storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new CounterInstrument(storage, descriptor);\n };\n /**\n * Create a {@link UpDownCounter} instrument.\n */\n Meter.prototype.createUpDownCounter = function (name, options) {\n var descriptor = createInstrumentDescriptor(name, InstrumentType.UP_DOWN_COUNTER, options);\n var storage = this._meterSharedState.registerMetricStorage(descriptor);\n return new UpDownCounterInstrument(storage, descriptor);\n };\n /**\n * Create a {@link ObservableGauge} instrument.\n */\n Meter.prototype.createObservableGauge = function (name, options) {\n var descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_GAUGE, options);\n var storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);\n return new ObservableGaugeInstrument(descriptor, storages, this._meterSharedState.observableRegistry);\n };\n /**\n * Create a {@link ObservableCounter} instrument.\n */\n Meter.prototype.createObservableCounter = function (name, options) {\n var descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_COUNTER, options);\n var storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);\n return new ObservableCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);\n };\n /**\n * Create a {@link ObservableUpDownCounter} instrument.\n */\n Meter.prototype.createObservableUpDownCounter = function (name, options) {\n var descriptor = createInstrumentDescriptor(name, InstrumentType.OBSERVABLE_UP_DOWN_COUNTER, options);\n var storages = this._meterSharedState.registerAsyncMetricStorage(descriptor);\n return new ObservableUpDownCounterInstrument(descriptor, storages, this._meterSharedState.observableRegistry);\n };\n /**\n * @see {@link Meter.addBatchObservableCallback}\n */\n Meter.prototype.addBatchObservableCallback = function (callback, observables) {\n this._meterSharedState.observableRegistry.addBatchCallback(callback, observables);\n };\n /**\n * @see {@link Meter.removeBatchObservableCallback}\n */\n Meter.prototype.removeBatchObservableCallback = function (callback, observables) {\n this._meterSharedState.observableRegistry.removeBatchCallback(callback, observables);\n };\n return Meter;\n}());\nexport { Meter };\n//# sourceMappingURL=Meter.js.map","/*\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 { createInstrumentDescriptor, } from '../InstrumentDescriptor';\n/**\n * Internal interface.\n *\n * Represents a storage from which we can collect metrics.\n */\nvar MetricStorage = /** @class */ (function () {\n function MetricStorage(_instrumentDescriptor) {\n this._instrumentDescriptor = _instrumentDescriptor;\n }\n MetricStorage.prototype.getInstrumentDescriptor = function () {\n return this._instrumentDescriptor;\n };\n MetricStorage.prototype.updateDescription = function (description) {\n this._instrumentDescriptor = createInstrumentDescriptor(this._instrumentDescriptor.name, this._instrumentDescriptor.type, {\n description: description,\n valueType: this._instrumentDescriptor.valueType,\n unit: this._instrumentDescriptor.unit,\n advice: this._instrumentDescriptor.advice,\n });\n };\n return MetricStorage;\n}());\nexport { MetricStorage };\n//# sourceMappingURL=MetricStorage.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { hashAttributes } from '../utils';\nvar HashMap = /** @class */ (function () {\n function HashMap(_hash) {\n this._hash = _hash;\n this._valueMap = new Map();\n this._keyMap = new Map();\n }\n HashMap.prototype.get = function (key, hashCode) {\n hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key));\n return this._valueMap.get(hashCode);\n };\n HashMap.prototype.getOrDefault = function (key, defaultFactory) {\n var hash = this._hash(key);\n if (this._valueMap.has(hash)) {\n return this._valueMap.get(hash);\n }\n var val = defaultFactory();\n if (!this._keyMap.has(hash)) {\n this._keyMap.set(hash, key);\n }\n this._valueMap.set(hash, val);\n return val;\n };\n HashMap.prototype.set = function (key, value, hashCode) {\n hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key));\n if (!this._keyMap.has(hashCode)) {\n this._keyMap.set(hashCode, key);\n }\n this._valueMap.set(hashCode, value);\n };\n HashMap.prototype.has = function (key, hashCode) {\n hashCode !== null && hashCode !== void 0 ? hashCode : (hashCode = this._hash(key));\n return this._valueMap.has(hashCode);\n };\n HashMap.prototype.keys = function () {\n var keyIterator, next;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n keyIterator = this._keyMap.entries();\n next = keyIterator.next();\n _a.label = 1;\n case 1:\n if (!(next.done !== true)) return [3 /*break*/, 3];\n return [4 /*yield*/, [next.value[1], next.value[0]]];\n case 2:\n _a.sent();\n next = keyIterator.next();\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/];\n }\n });\n };\n HashMap.prototype.entries = function () {\n var valueIterator, next;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n valueIterator = this._valueMap.entries();\n next = valueIterator.next();\n _a.label = 1;\n case 1:\n if (!(next.done !== true)) return [3 /*break*/, 3];\n // next.value[0] here can not be undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return [4 /*yield*/, [this._keyMap.get(next.value[0]), next.value[1], next.value[0]]];\n case 2:\n // next.value[0] here can not be undefined\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n _a.sent();\n next = valueIterator.next();\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/];\n }\n });\n };\n Object.defineProperty(HashMap.prototype, \"size\", {\n get: function () {\n return this._valueMap.size;\n },\n enumerable: false,\n configurable: true\n });\n return HashMap;\n}());\nexport { HashMap };\nvar AttributeHashMap = /** @class */ (function (_super) {\n __extends(AttributeHashMap, _super);\n function AttributeHashMap() {\n return _super.call(this, hashAttributes) || this;\n }\n return AttributeHashMap;\n}(HashMap));\nexport { AttributeHashMap };\n//# sourceMappingURL=HashMap.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AttributeHashMap } from './HashMap';\n/**\n * Internal interface.\n *\n * Allows synchronous collection of metrics. This processor should allow\n * allocation of new aggregation cells for metrics and convert cumulative\n * recording to delta data points.\n */\nvar DeltaMetricProcessor = /** @class */ (function () {\n function DeltaMetricProcessor(_aggregator) {\n this._aggregator = _aggregator;\n this._activeCollectionStorage = new AttributeHashMap();\n // TODO: find a reasonable mean to clean the memo;\n // https://github.com/open-telemetry/opentelemetry-specification/pull/2208\n this._cumulativeMemoStorage = new AttributeHashMap();\n }\n DeltaMetricProcessor.prototype.record = function (value, attributes, _context, collectionTime) {\n var _this = this;\n var accumulation = this._activeCollectionStorage.getOrDefault(attributes, function () { return _this._aggregator.createAccumulation(collectionTime); });\n accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value);\n };\n DeltaMetricProcessor.prototype.batchCumulate = function (measurements, collectionTime) {\n var _this = this;\n Array.from(measurements.entries()).forEach(function (_a) {\n var _b = __read(_a, 3), attributes = _b[0], value = _b[1], hashCode = _b[2];\n var accumulation = _this._aggregator.createAccumulation(collectionTime);\n accumulation === null || accumulation === void 0 ? void 0 : accumulation.record(value);\n var delta = accumulation;\n // Diff with recorded cumulative memo.\n if (_this._cumulativeMemoStorage.has(attributes, hashCode)) {\n // has() returned true, previous is present.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var previous = _this._cumulativeMemoStorage.get(attributes, hashCode);\n delta = _this._aggregator.diff(previous, accumulation);\n }\n // Merge with uncollected active delta.\n if (_this._activeCollectionStorage.has(attributes, hashCode)) {\n // has() returned true, previous is present.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var active = _this._activeCollectionStorage.get(attributes, hashCode);\n delta = _this._aggregator.merge(active, delta);\n }\n // Save the current record and the delta record.\n _this._cumulativeMemoStorage.set(attributes, accumulation, hashCode);\n _this._activeCollectionStorage.set(attributes, delta, hashCode);\n });\n };\n /**\n * Returns a collection of delta metrics. Start time is the when first\n * time event collected.\n */\n DeltaMetricProcessor.prototype.collect = function () {\n var unreportedDelta = this._activeCollectionStorage;\n this._activeCollectionStorage = new AttributeHashMap();\n return unreportedDelta;\n };\n return DeltaMetricProcessor;\n}());\nexport { DeltaMetricProcessor };\n//# sourceMappingURL=DeltaMetricProcessor.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregationTemporality } from '../export/AggregationTemporality';\nimport { AttributeHashMap } from './HashMap';\n/**\n * Internal interface.\n *\n * Provides unique reporting for each collector. Allows synchronous collection\n * of metrics and reports given temporality values.\n */\nvar TemporalMetricProcessor = /** @class */ (function () {\n function TemporalMetricProcessor(_aggregator, collectorHandles) {\n var _this = this;\n this._aggregator = _aggregator;\n this._unreportedAccumulations = new Map();\n this._reportHistory = new Map();\n collectorHandles.forEach(function (handle) {\n _this._unreportedAccumulations.set(handle, []);\n });\n }\n /**\n * Builds the {@link MetricData} streams to report against a specific MetricCollector.\n * @param collector The information of the MetricCollector.\n * @param collectors The registered collectors.\n * @param instrumentDescriptor The instrumentation descriptor that these metrics generated with.\n * @param currentAccumulations The current accumulation of metric data from instruments.\n * @param collectionTime The current collection timestamp.\n * @returns The {@link MetricData} points or `null`.\n */\n TemporalMetricProcessor.prototype.buildMetrics = function (collector, instrumentDescriptor, currentAccumulations, collectionTime) {\n this._stashAccumulations(currentAccumulations);\n var unreportedAccumulations = this._getMergedUnreportedAccumulations(collector);\n var result = unreportedAccumulations;\n var aggregationTemporality;\n // Check our last report time.\n if (this._reportHistory.has(collector)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var last = this._reportHistory.get(collector);\n var lastCollectionTime = last.collectionTime;\n aggregationTemporality = last.aggregationTemporality;\n // Use aggregation temporality + instrument to determine if we do a merge or a diff of\n // previous. We have the following four scenarios:\n // 1. Cumulative Aggregation (temporality) + Delta recording (sync instrument).\n // Here we merge with our last record to get a cumulative aggregation.\n // 2. Cumulative Aggregation + Cumulative recording (async instrument).\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Here we merge with our last record to get a cumulative aggregation.\n // 3. Delta Aggregation + Delta recording\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n // 4. Delta Aggregation + Cumulative recording.\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n if (aggregationTemporality === AggregationTemporality.CUMULATIVE) {\n // We need to make sure the current delta recording gets merged into the previous cumulative\n // for the next cumulative recording.\n result = TemporalMetricProcessor.merge(last.accumulations, unreportedAccumulations, this._aggregator);\n }\n else {\n result = TemporalMetricProcessor.calibrateStartTime(last.accumulations, unreportedAccumulations, lastCollectionTime);\n }\n }\n else {\n // Call into user code to select aggregation temporality for the instrument.\n aggregationTemporality = collector.selectAggregationTemporality(instrumentDescriptor.type);\n }\n // Update last reported (cumulative) accumulation.\n this._reportHistory.set(collector, {\n accumulations: result,\n collectionTime: collectionTime,\n aggregationTemporality: aggregationTemporality,\n });\n var accumulationRecords = AttributesMapToAccumulationRecords(result);\n // do not convert to metric data if there is nothing to convert.\n if (accumulationRecords.length === 0) {\n return undefined;\n }\n return this._aggregator.toMetricData(instrumentDescriptor, aggregationTemporality, accumulationRecords, \n /* endTime */ collectionTime);\n };\n TemporalMetricProcessor.prototype._stashAccumulations = function (currentAccumulation) {\n var e_1, _a;\n var registeredCollectors = this._unreportedAccumulations.keys();\n try {\n for (var registeredCollectors_1 = __values(registeredCollectors), registeredCollectors_1_1 = registeredCollectors_1.next(); !registeredCollectors_1_1.done; registeredCollectors_1_1 = registeredCollectors_1.next()) {\n var collector = registeredCollectors_1_1.value;\n var stash = this._unreportedAccumulations.get(collector);\n if (stash === undefined) {\n stash = [];\n this._unreportedAccumulations.set(collector, stash);\n }\n stash.push(currentAccumulation);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (registeredCollectors_1_1 && !registeredCollectors_1_1.done && (_a = registeredCollectors_1.return)) _a.call(registeredCollectors_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n TemporalMetricProcessor.prototype._getMergedUnreportedAccumulations = function (collector) {\n var e_2, _a;\n var result = new AttributeHashMap();\n var unreportedList = this._unreportedAccumulations.get(collector);\n this._unreportedAccumulations.set(collector, []);\n if (unreportedList === undefined) {\n return result;\n }\n try {\n for (var unreportedList_1 = __values(unreportedList), unreportedList_1_1 = unreportedList_1.next(); !unreportedList_1_1.done; unreportedList_1_1 = unreportedList_1.next()) {\n var it_1 = unreportedList_1_1.value;\n result = TemporalMetricProcessor.merge(result, it_1, this._aggregator);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (unreportedList_1_1 && !unreportedList_1_1.done && (_a = unreportedList_1.return)) _a.call(unreportedList_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return result;\n };\n TemporalMetricProcessor.merge = function (last, current, aggregator) {\n var result = last;\n var iterator = current.entries();\n var next = iterator.next();\n while (next.done !== true) {\n var _a = __read(next.value, 3), key = _a[0], record = _a[1], hash = _a[2];\n if (last.has(key, hash)) {\n var lastAccumulation = last.get(key, hash);\n // last.has() returned true, lastAccumulation is present.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var accumulation = aggregator.merge(lastAccumulation, record);\n result.set(key, accumulation, hash);\n }\n else {\n result.set(key, record, hash);\n }\n next = iterator.next();\n }\n return result;\n };\n /**\n * Calibrate the reported metric streams' startTime to lastCollectionTime. Leaves\n * the new stream to be the initial observation time unchanged.\n */\n TemporalMetricProcessor.calibrateStartTime = function (last, current, lastCollectionTime) {\n var e_3, _a;\n try {\n for (var _b = __values(last.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2), key = _d[0], hash = _d[1];\n var currentAccumulation = current.get(key, hash);\n currentAccumulation === null || currentAccumulation === void 0 ? void 0 : currentAccumulation.setStartTime(lastCollectionTime);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return current;\n };\n return TemporalMetricProcessor;\n}());\nexport { TemporalMetricProcessor };\n// TypeScript complains about converting 3 elements tuple to AccumulationRecord.\nfunction AttributesMapToAccumulationRecords(map) {\n return Array.from(map.entries());\n}\n//# sourceMappingURL=TemporalMetricProcessor.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { MetricStorage } from './MetricStorage';\nimport { DeltaMetricProcessor } from './DeltaMetricProcessor';\nimport { TemporalMetricProcessor } from './TemporalMetricProcessor';\nimport { AttributeHashMap } from './HashMap';\n/**\n * Internal interface.\n *\n * Stores and aggregates {@link MetricData} for asynchronous instruments.\n */\nvar AsyncMetricStorage = /** @class */ (function (_super) {\n __extends(AsyncMetricStorage, _super);\n function AsyncMetricStorage(_instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) {\n var _this = _super.call(this, _instrumentDescriptor) || this;\n _this._attributesProcessor = _attributesProcessor;\n _this._deltaMetricStorage = new DeltaMetricProcessor(aggregator);\n _this._temporalMetricStorage = new TemporalMetricProcessor(aggregator, collectorHandles);\n return _this;\n }\n AsyncMetricStorage.prototype.record = function (measurements, observationTime) {\n var _this = this;\n var processed = new AttributeHashMap();\n Array.from(measurements.entries()).forEach(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], value = _b[1];\n processed.set(_this._attributesProcessor.process(attributes), value);\n });\n this._deltaMetricStorage.batchCumulate(processed, observationTime);\n };\n /**\n * Collects the metrics from this storage. The ObservableCallback is invoked\n * during the collection.\n *\n * Note: This is a stateful operation and may reset any interval-related\n * state for the MetricCollector.\n */\n AsyncMetricStorage.prototype.collect = function (collector, collectionTime) {\n var accumulations = this._deltaMetricStorage.collect();\n return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime);\n };\n return AsyncMetricStorage;\n}(MetricStorage));\nexport { AsyncMetricStorage };\n//# sourceMappingURL=AsyncMetricStorage.js.map","/*\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 getIncompatibilityDetails(existing, otherDescriptor) {\n var incompatibility = '';\n if (existing.unit !== otherDescriptor.unit) {\n incompatibility += \"\\t- Unit '\" + existing.unit + \"' does not match '\" + otherDescriptor.unit + \"'\\n\";\n }\n if (existing.type !== otherDescriptor.type) {\n incompatibility += \"\\t- Type '\" + existing.type + \"' does not match '\" + otherDescriptor.type + \"'\\n\";\n }\n if (existing.valueType !== otherDescriptor.valueType) {\n incompatibility += \"\\t- Value Type '\" + existing.valueType + \"' does not match '\" + otherDescriptor.valueType + \"'\\n\";\n }\n if (existing.description !== otherDescriptor.description) {\n incompatibility += \"\\t- Description '\" + existing.description + \"' does not match '\" + otherDescriptor.description + \"'\\n\";\n }\n return incompatibility;\n}\nexport function getValueTypeConflictResolutionRecipe(existing, otherDescriptor) {\n return \"\\t- use valueType '\" + existing.valueType + \"' on instrument creation or use an instrument name other than '\" + otherDescriptor.name + \"'\";\n}\nexport function getUnitConflictResolutionRecipe(existing, otherDescriptor) {\n return \"\\t- use unit '\" + existing.unit + \"' on instrument creation or use an instrument name other than '\" + otherDescriptor.name + \"'\";\n}\nexport function getTypeConflictResolutionRecipe(existing, otherDescriptor) {\n var selector = {\n name: otherDescriptor.name,\n type: otherDescriptor.type,\n unit: otherDescriptor.unit,\n };\n var selectorString = JSON.stringify(selector);\n return \"\\t- create a new view with a name other than '\" + existing.name + \"' and InstrumentSelector '\" + selectorString + \"'\";\n}\nexport function getDescriptionResolutionRecipe(existing, otherDescriptor) {\n var selector = {\n name: otherDescriptor.name,\n type: otherDescriptor.type,\n unit: otherDescriptor.unit,\n };\n var selectorString = JSON.stringify(selector);\n return \"\\t- create a new view with a name other than '\" + existing.name + \"' and InstrumentSelector '\" + selectorString + \"'\\n \\t- OR - create a new view with the name \" + existing.name + \" and description '\" + existing.description + \"' and InstrumentSelector \" + selectorString + \"\\n \\t- OR - create a new view with the name \" + otherDescriptor.name + \" and description '\" + existing.description + \"' and InstrumentSelector \" + selectorString;\n}\nexport function getConflictResolutionRecipe(existing, otherDescriptor) {\n // Conflicts that cannot be solved via views.\n if (existing.valueType !== otherDescriptor.valueType) {\n return getValueTypeConflictResolutionRecipe(existing, otherDescriptor);\n }\n if (existing.unit !== otherDescriptor.unit) {\n return getUnitConflictResolutionRecipe(existing, otherDescriptor);\n }\n // Conflicts that can be solved via views.\n if (existing.type !== otherDescriptor.type) {\n // this will automatically solve possible description conflicts.\n return getTypeConflictResolutionRecipe(existing, otherDescriptor);\n }\n if (existing.description !== otherDescriptor.description) {\n return getDescriptionResolutionRecipe(existing, otherDescriptor);\n }\n return '';\n}\n//# sourceMappingURL=RegistrationConflicts.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { isDescriptorCompatibleWith, } from '../InstrumentDescriptor';\nimport * as api from '@opentelemetry/api';\nimport { getConflictResolutionRecipe, getIncompatibilityDetails, } from '../view/RegistrationConflicts';\n/**\n * Internal class for storing {@link MetricStorage}\n */\nvar MetricStorageRegistry = /** @class */ (function () {\n function MetricStorageRegistry() {\n this._sharedRegistry = new Map();\n this._perCollectorRegistry = new Map();\n }\n MetricStorageRegistry.create = function () {\n return new MetricStorageRegistry();\n };\n MetricStorageRegistry.prototype.getStorages = function (collector) {\n var e_1, _a, e_2, _b;\n var storages = [];\n try {\n for (var _c = __values(this._sharedRegistry.values()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var metricStorages = _d.value;\n storages = storages.concat(metricStorages);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var perCollectorStorages = this._perCollectorRegistry.get(collector);\n if (perCollectorStorages != null) {\n try {\n for (var _e = __values(perCollectorStorages.values()), _f = _e.next(); !_f.done; _f = _e.next()) {\n var metricStorages = _f.value;\n storages = storages.concat(metricStorages);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return storages;\n };\n MetricStorageRegistry.prototype.register = function (storage) {\n this._registerStorage(storage, this._sharedRegistry);\n };\n MetricStorageRegistry.prototype.registerForCollector = function (collector, storage) {\n var storageMap = this._perCollectorRegistry.get(collector);\n if (storageMap == null) {\n storageMap = new Map();\n this._perCollectorRegistry.set(collector, storageMap);\n }\n this._registerStorage(storage, storageMap);\n };\n MetricStorageRegistry.prototype.findOrUpdateCompatibleStorage = function (expectedDescriptor) {\n var storages = this._sharedRegistry.get(expectedDescriptor.name);\n if (storages === undefined) {\n return null;\n }\n // If the descriptor is compatible, the type of their metric storage\n // (either SyncMetricStorage or AsyncMetricStorage) must be compatible.\n return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages);\n };\n MetricStorageRegistry.prototype.findOrUpdateCompatibleCollectorStorage = function (collector, expectedDescriptor) {\n var storageMap = this._perCollectorRegistry.get(collector);\n if (storageMap === undefined) {\n return null;\n }\n var storages = storageMap.get(expectedDescriptor.name);\n if (storages === undefined) {\n return null;\n }\n // If the descriptor is compatible, the type of their metric storage\n // (either SyncMetricStorage or AsyncMetricStorage) must be compatible.\n return this._findOrUpdateCompatibleStorage(expectedDescriptor, storages);\n };\n MetricStorageRegistry.prototype._registerStorage = function (storage, storageMap) {\n var descriptor = storage.getInstrumentDescriptor();\n var storages = storageMap.get(descriptor.name);\n if (storages === undefined) {\n storageMap.set(descriptor.name, [storage]);\n return;\n }\n storages.push(storage);\n };\n MetricStorageRegistry.prototype._findOrUpdateCompatibleStorage = function (expectedDescriptor, existingStorages) {\n var e_3, _a;\n var compatibleStorage = null;\n try {\n for (var existingStorages_1 = __values(existingStorages), existingStorages_1_1 = existingStorages_1.next(); !existingStorages_1_1.done; existingStorages_1_1 = existingStorages_1.next()) {\n var existingStorage = existingStorages_1_1.value;\n var existingDescriptor = existingStorage.getInstrumentDescriptor();\n if (isDescriptorCompatibleWith(existingDescriptor, expectedDescriptor)) {\n // Use the longer description if it does not match.\n if (existingDescriptor.description !== expectedDescriptor.description) {\n if (expectedDescriptor.description.length >\n existingDescriptor.description.length) {\n existingStorage.updateDescription(expectedDescriptor.description);\n }\n api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered, but has a different description and is incompatible with another registered view.\\n', 'Details:\\n', getIncompatibilityDetails(existingDescriptor, expectedDescriptor), 'The longer description will be used.\\nTo resolve the conflict:', getConflictResolutionRecipe(existingDescriptor, expectedDescriptor));\n }\n // Storage is fully compatible. There will never be more than one pre-existing fully compatible storage.\n compatibleStorage = existingStorage;\n }\n else {\n // The implementation SHOULD warn about duplicate instrument registration\n // conflicts after applying View configuration.\n api.diag.warn('A view or instrument with the name ', expectedDescriptor.name, ' has already been registered and is incompatible with another registered view.\\n', 'Details:\\n', getIncompatibilityDetails(existingDescriptor, expectedDescriptor), 'To resolve the conflict:\\n', getConflictResolutionRecipe(existingDescriptor, expectedDescriptor));\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (existingStorages_1_1 && !existingStorages_1_1.done && (_a = existingStorages_1.return)) _a.call(existingStorages_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return compatibleStorage;\n };\n return MetricStorageRegistry;\n}());\nexport { MetricStorageRegistry };\n//# sourceMappingURL=MetricStorageRegistry.js.map","/*\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 * Internal interface.\n */\nvar MultiMetricStorage = /** @class */ (function () {\n function MultiMetricStorage(_backingStorages) {\n this._backingStorages = _backingStorages;\n }\n MultiMetricStorage.prototype.record = function (value, attributes, context, recordTime) {\n this._backingStorages.forEach(function (it) {\n it.record(value, attributes, context, recordTime);\n });\n };\n return MultiMetricStorage;\n}());\nexport { MultiMetricStorage };\n//# sourceMappingURL=MultiWritableMetricStorage.js.map","/*\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, ValueType, } from '@opentelemetry/api';\nimport { AttributeHashMap } from './state/HashMap';\nimport { isObservableInstrument } from './Instruments';\n/**\n * The class implements {@link ObservableResult} interface.\n */\nvar ObservableResultImpl = /** @class */ (function () {\n function ObservableResultImpl(_instrumentName, _valueType) {\n this._instrumentName = _instrumentName;\n this._valueType = _valueType;\n /**\n * @internal\n */\n this._buffer = new AttributeHashMap();\n }\n /**\n * Observe a measurement of the value associated with the given attributes.\n */\n ObservableResultImpl.prototype.observe = function (value, attributes) {\n if (attributes === void 0) { attributes = {}; }\n if (typeof value !== 'number') {\n diag.warn(\"non-number value provided to metric \" + this._instrumentName + \": \" + value);\n return;\n }\n if (this._valueType === ValueType.INT && !Number.isInteger(value)) {\n diag.warn(\"INT value type cannot accept a floating-point value for \" + this._instrumentName + \", ignoring the fractional digits.\");\n value = Math.trunc(value);\n // ignore non-finite values.\n if (!Number.isInteger(value)) {\n return;\n }\n }\n this._buffer.set(attributes, value);\n };\n return ObservableResultImpl;\n}());\nexport { ObservableResultImpl };\n/**\n * The class implements {@link BatchObservableCallback} interface.\n */\nvar BatchObservableResultImpl = /** @class */ (function () {\n function BatchObservableResultImpl() {\n /**\n * @internal\n */\n this._buffer = new Map();\n }\n /**\n * Observe a measurement of the value associated with the given attributes.\n */\n BatchObservableResultImpl.prototype.observe = function (metric, value, attributes) {\n if (attributes === void 0) { attributes = {}; }\n if (!isObservableInstrument(metric)) {\n return;\n }\n var map = this._buffer.get(metric);\n if (map == null) {\n map = new AttributeHashMap();\n this._buffer.set(metric, map);\n }\n if (typeof value !== 'number') {\n diag.warn(\"non-number value provided to metric \" + metric._descriptor.name + \": \" + value);\n return;\n }\n if (metric._descriptor.valueType === ValueType.INT &&\n !Number.isInteger(value)) {\n diag.warn(\"INT value type cannot accept a floating-point value for \" + metric._descriptor.name + \", ignoring the fractional digits.\");\n value = Math.trunc(value);\n // ignore non-finite values.\n if (!Number.isInteger(value)) {\n return;\n }\n }\n map.set(attributes, value);\n };\n return BatchObservableResultImpl;\n}());\nexport { BatchObservableResultImpl };\n//# sourceMappingURL=ObservableResult.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { diag, } from '@opentelemetry/api';\nimport { isObservableInstrument } from '../Instruments';\nimport { BatchObservableResultImpl, ObservableResultImpl, } from '../ObservableResult';\nimport { callWithTimeout, PromiseAllSettled, isPromiseAllSettledRejectionResult, setEquals, } from '../utils';\n/**\n * An internal interface for managing ObservableCallbacks.\n *\n * Every registered callback associated with a set of instruments are be evaluated\n * exactly once during collection prior to reading data for that instrument.\n */\nvar ObservableRegistry = /** @class */ (function () {\n function ObservableRegistry() {\n this._callbacks = [];\n this._batchCallbacks = [];\n }\n ObservableRegistry.prototype.addCallback = function (callback, instrument) {\n var idx = this._findCallback(callback, instrument);\n if (idx >= 0) {\n return;\n }\n this._callbacks.push({ callback: callback, instrument: instrument });\n };\n ObservableRegistry.prototype.removeCallback = function (callback, instrument) {\n var idx = this._findCallback(callback, instrument);\n if (idx < 0) {\n return;\n }\n this._callbacks.splice(idx, 1);\n };\n ObservableRegistry.prototype.addBatchCallback = function (callback, instruments) {\n // Create a set of unique instruments.\n var observableInstruments = new Set(instruments.filter(isObservableInstrument));\n if (observableInstruments.size === 0) {\n diag.error('BatchObservableCallback is not associated with valid instruments', instruments);\n return;\n }\n var idx = this._findBatchCallback(callback, observableInstruments);\n if (idx >= 0) {\n return;\n }\n this._batchCallbacks.push({ callback: callback, instruments: observableInstruments });\n };\n ObservableRegistry.prototype.removeBatchCallback = function (callback, instruments) {\n // Create a set of unique instruments.\n var observableInstruments = new Set(instruments.filter(isObservableInstrument));\n var idx = this._findBatchCallback(callback, observableInstruments);\n if (idx < 0) {\n return;\n }\n this._batchCallbacks.splice(idx, 1);\n };\n /**\n * @returns a promise of rejected reasons for invoking callbacks.\n */\n ObservableRegistry.prototype.observe = function (collectionTime, timeoutMillis) {\n return __awaiter(this, void 0, void 0, function () {\n var callbackFutures, batchCallbackFutures, results, rejections;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n callbackFutures = this._observeCallbacks(collectionTime, timeoutMillis);\n batchCallbackFutures = this._observeBatchCallbacks(collectionTime, timeoutMillis);\n return [4 /*yield*/, PromiseAllSettled(__spreadArray(__spreadArray([], __read(callbackFutures), false), __read(batchCallbackFutures), false))];\n case 1:\n results = _a.sent();\n rejections = results\n .filter(isPromiseAllSettledRejectionResult)\n .map(function (it) { return it.reason; });\n return [2 /*return*/, rejections];\n }\n });\n });\n };\n ObservableRegistry.prototype._observeCallbacks = function (observationTime, timeoutMillis) {\n var _this = this;\n return this._callbacks.map(function (_a) {\n var callback = _a.callback, instrument = _a.instrument;\n return __awaiter(_this, void 0, void 0, function () {\n var observableResult, callPromise;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n observableResult = new ObservableResultImpl(instrument._descriptor.name, instrument._descriptor.valueType);\n callPromise = Promise.resolve(callback(observableResult));\n if (timeoutMillis != null) {\n callPromise = callWithTimeout(callPromise, timeoutMillis);\n }\n return [4 /*yield*/, callPromise];\n case 1:\n _b.sent();\n instrument._metricStorages.forEach(function (metricStorage) {\n metricStorage.record(observableResult._buffer, observationTime);\n });\n return [2 /*return*/];\n }\n });\n });\n });\n };\n ObservableRegistry.prototype._observeBatchCallbacks = function (observationTime, timeoutMillis) {\n var _this = this;\n return this._batchCallbacks.map(function (_a) {\n var callback = _a.callback, instruments = _a.instruments;\n return __awaiter(_this, void 0, void 0, function () {\n var observableResult, callPromise;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n observableResult = new BatchObservableResultImpl();\n callPromise = Promise.resolve(callback(observableResult));\n if (timeoutMillis != null) {\n callPromise = callWithTimeout(callPromise, timeoutMillis);\n }\n return [4 /*yield*/, callPromise];\n case 1:\n _b.sent();\n instruments.forEach(function (instrument) {\n var buffer = observableResult._buffer.get(instrument);\n if (buffer == null) {\n return;\n }\n instrument._metricStorages.forEach(function (metricStorage) {\n metricStorage.record(buffer, observationTime);\n });\n });\n return [2 /*return*/];\n }\n });\n });\n });\n };\n ObservableRegistry.prototype._findCallback = function (callback, instrument) {\n return this._callbacks.findIndex(function (record) {\n return record.callback === callback && record.instrument === instrument;\n });\n };\n ObservableRegistry.prototype._findBatchCallback = function (callback, instruments) {\n return this._batchCallbacks.findIndex(function (record) {\n return (record.callback === callback &&\n setEquals(record.instruments, instruments));\n });\n };\n return ObservableRegistry;\n}());\nexport { ObservableRegistry };\n//# sourceMappingURL=ObservableRegistry.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { MetricStorage } from './MetricStorage';\nimport { DeltaMetricProcessor } from './DeltaMetricProcessor';\nimport { TemporalMetricProcessor } from './TemporalMetricProcessor';\n/**\n * Internal interface.\n *\n * Stores and aggregates {@link MetricData} for synchronous instruments.\n */\nvar SyncMetricStorage = /** @class */ (function (_super) {\n __extends(SyncMetricStorage, _super);\n function SyncMetricStorage(instrumentDescriptor, aggregator, _attributesProcessor, collectorHandles) {\n var _this = _super.call(this, instrumentDescriptor) || this;\n _this._attributesProcessor = _attributesProcessor;\n _this._deltaMetricStorage = new DeltaMetricProcessor(aggregator);\n _this._temporalMetricStorage = new TemporalMetricProcessor(aggregator, collectorHandles);\n return _this;\n }\n SyncMetricStorage.prototype.record = function (value, attributes, context, recordTime) {\n attributes = this._attributesProcessor.process(attributes, context);\n this._deltaMetricStorage.record(value, attributes, context, recordTime);\n };\n /**\n * Collects the metrics from this storage.\n *\n * Note: This is a stateful operation and may reset any interval-related\n * state for the MetricCollector.\n */\n SyncMetricStorage.prototype.collect = function (collector, collectionTime) {\n var accumulations = this._deltaMetricStorage.collect();\n return this._temporalMetricStorage.buildMetrics(collector, this._instrumentDescriptor, accumulations, collectionTime);\n };\n return SyncMetricStorage;\n}(MetricStorage));\nexport { SyncMetricStorage };\n//# sourceMappingURL=SyncMetricStorage.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * The {@link AttributesProcessor} is responsible for customizing which\n * attribute(s) are to be reported as metrics dimension(s) and adding\n * additional dimension(s) from the {@link Context}.\n */\nvar AttributesProcessor = /** @class */ (function () {\n function AttributesProcessor() {\n }\n AttributesProcessor.Noop = function () {\n return NOOP;\n };\n return AttributesProcessor;\n}());\nexport { AttributesProcessor };\nvar NoopAttributesProcessor = /** @class */ (function (_super) {\n __extends(NoopAttributesProcessor, _super);\n function NoopAttributesProcessor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopAttributesProcessor.prototype.process = function (incoming, _context) {\n return incoming;\n };\n return NoopAttributesProcessor;\n}(AttributesProcessor));\nexport { NoopAttributesProcessor };\n/**\n * {@link AttributesProcessor} that filters by allowed attribute names and drops any names that are not in the\n * allow list.\n */\nvar FilteringAttributesProcessor = /** @class */ (function (_super) {\n __extends(FilteringAttributesProcessor, _super);\n function FilteringAttributesProcessor(_allowedAttributeNames) {\n var _this = _super.call(this) || this;\n _this._allowedAttributeNames = _allowedAttributeNames;\n return _this;\n }\n FilteringAttributesProcessor.prototype.process = function (incoming, _context) {\n var _this = this;\n var filteredAttributes = {};\n Object.keys(incoming)\n .filter(function (attributeName) {\n return _this._allowedAttributeNames.includes(attributeName);\n })\n .forEach(function (attributeName) {\n return (filteredAttributes[attributeName] = incoming[attributeName]);\n });\n return filteredAttributes;\n };\n return FilteringAttributesProcessor;\n}(AttributesProcessor));\nexport { FilteringAttributesProcessor };\nvar NOOP = new NoopAttributesProcessor();\n//# sourceMappingURL=AttributesProcessor.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { createInstrumentDescriptorWithView, } from '../InstrumentDescriptor';\nimport { Meter } from '../Meter';\nimport { isNotNullish } from '../utils';\nimport { AsyncMetricStorage } from './AsyncMetricStorage';\nimport { MetricStorageRegistry } from './MetricStorageRegistry';\nimport { MultiMetricStorage } from './MultiWritableMetricStorage';\nimport { ObservableRegistry } from './ObservableRegistry';\nimport { SyncMetricStorage } from './SyncMetricStorage';\nimport { AttributesProcessor } from '../view/AttributesProcessor';\n/**\n * An internal record for shared meter provider states.\n */\nvar MeterSharedState = /** @class */ (function () {\n function MeterSharedState(_meterProviderSharedState, _instrumentationScope) {\n this._meterProviderSharedState = _meterProviderSharedState;\n this._instrumentationScope = _instrumentationScope;\n this.metricStorageRegistry = new MetricStorageRegistry();\n this.observableRegistry = new ObservableRegistry();\n this.meter = new Meter(this);\n }\n MeterSharedState.prototype.registerMetricStorage = function (descriptor) {\n var storages = this._registerMetricStorage(descriptor, SyncMetricStorage);\n if (storages.length === 1) {\n return storages[0];\n }\n return new MultiMetricStorage(storages);\n };\n MeterSharedState.prototype.registerAsyncMetricStorage = function (descriptor) {\n var storages = this._registerMetricStorage(descriptor, AsyncMetricStorage);\n return storages;\n };\n /**\n * @param collector opaque handle of {@link MetricCollector} which initiated the collection.\n * @param collectionTime the HrTime at which the collection was initiated.\n * @param options options for collection.\n * @returns the list of metric data collected.\n */\n MeterSharedState.prototype.collect = function (collector, collectionTime, options) {\n return __awaiter(this, void 0, void 0, function () {\n var errors, storages, metricDataList;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.observableRegistry.observe(collectionTime, options === null || options === void 0 ? void 0 : options.timeoutMillis)];\n case 1:\n errors = _a.sent();\n storages = this.metricStorageRegistry.getStorages(collector);\n // prevent more allocations if there are no storages.\n if (storages.length === 0) {\n return [2 /*return*/, null];\n }\n metricDataList = storages\n .map(function (metricStorage) {\n return metricStorage.collect(collector, collectionTime);\n })\n .filter(isNotNullish);\n // skip this scope if no data was collected (storage created, but no data observed)\n if (metricDataList.length === 0) {\n return [2 /*return*/, { errors: errors }];\n }\n return [2 /*return*/, {\n scopeMetrics: {\n scope: this._instrumentationScope,\n metrics: metricDataList,\n },\n errors: errors,\n }];\n }\n });\n });\n };\n MeterSharedState.prototype._registerMetricStorage = function (descriptor, MetricStorageType) {\n var _this = this;\n var views = this._meterProviderSharedState.viewRegistry.findViews(descriptor, this._instrumentationScope);\n var storages = views.map(function (view) {\n var viewDescriptor = createInstrumentDescriptorWithView(view, descriptor);\n var compatibleStorage = _this.metricStorageRegistry.findOrUpdateCompatibleStorage(viewDescriptor);\n if (compatibleStorage != null) {\n return compatibleStorage;\n }\n var aggregator = view.aggregation.createAggregator(viewDescriptor);\n var viewStorage = new MetricStorageType(viewDescriptor, aggregator, view.attributesProcessor, _this._meterProviderSharedState.metricCollectors);\n _this.metricStorageRegistry.register(viewStorage);\n return viewStorage;\n });\n // Fallback to the per-collector aggregations if no view is configured for the instrument.\n if (storages.length === 0) {\n var perCollectorAggregations = this._meterProviderSharedState.selectAggregations(descriptor.type);\n var collectorStorages = perCollectorAggregations.map(function (_a) {\n var _b = __read(_a, 2), collector = _b[0], aggregation = _b[1];\n var compatibleStorage = _this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(collector, descriptor);\n if (compatibleStorage != null) {\n return compatibleStorage;\n }\n var aggregator = aggregation.createAggregator(descriptor);\n var storage = new MetricStorageType(descriptor, aggregator, AttributesProcessor.Noop(), [collector]);\n _this.metricStorageRegistry.registerForCollector(collector, storage);\n return storage;\n });\n storages = storages.concat(collectorStorages);\n }\n return storages;\n };\n return MeterSharedState;\n}());\nexport { MeterSharedState };\n//# sourceMappingURL=MeterSharedState.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { instrumentationScopeId } from '../utils';\nimport { ViewRegistry } from '../view/ViewRegistry';\nimport { MeterSharedState } from './MeterSharedState';\n/**\n * An internal record for shared meter provider states.\n */\nvar MeterProviderSharedState = /** @class */ (function () {\n function MeterProviderSharedState(resource) {\n this.resource = resource;\n this.viewRegistry = new ViewRegistry();\n this.metricCollectors = [];\n this.meterSharedStates = new Map();\n }\n MeterProviderSharedState.prototype.getMeterSharedState = function (instrumentationScope) {\n var id = instrumentationScopeId(instrumentationScope);\n var meterSharedState = this.meterSharedStates.get(id);\n if (meterSharedState == null) {\n meterSharedState = new MeterSharedState(this, instrumentationScope);\n this.meterSharedStates.set(id, meterSharedState);\n }\n return meterSharedState;\n };\n MeterProviderSharedState.prototype.selectAggregations = function (instrumentType) {\n var e_1, _a;\n var result = [];\n try {\n for (var _b = __values(this.metricCollectors), _c = _b.next(); !_c.done; _c = _b.next()) {\n var collector = _c.value;\n result.push([collector, collector.selectAggregation(instrumentType)]);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n };\n return MeterProviderSharedState;\n}());\nexport { MeterProviderSharedState };\n//# sourceMappingURL=MeterProviderSharedState.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { millisToHrTime } from '@opentelemetry/core';\n/**\n * An internal opaque interface that the MetricReader receives as\n * MetricProducer. It acts as the storage key to the internal metric stream\n * state for each MetricReader.\n */\nvar MetricCollector = /** @class */ (function () {\n function MetricCollector(_sharedState, _metricReader) {\n this._sharedState = _sharedState;\n this._metricReader = _metricReader;\n }\n MetricCollector.prototype.collect = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var collectionTime, scopeMetrics, errors, meterCollectionPromises;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n collectionTime = millisToHrTime(Date.now());\n scopeMetrics = [];\n errors = [];\n meterCollectionPromises = Array.from(this._sharedState.meterSharedStates.values()).map(function (meterSharedState) { return __awaiter(_this, void 0, void 0, function () {\n var current;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, meterSharedState.collect(this, collectionTime, options)];\n case 1:\n current = _a.sent();\n // only add scope metrics if available\n if ((current === null || current === void 0 ? void 0 : current.scopeMetrics) != null) {\n scopeMetrics.push(current.scopeMetrics);\n }\n // only add errors if available\n if ((current === null || current === void 0 ? void 0 : current.errors) != null) {\n errors.push.apply(errors, __spreadArray([], __read(current.errors), false));\n }\n return [2 /*return*/];\n }\n });\n }); });\n return [4 /*yield*/, Promise.all(meterCollectionPromises)];\n case 1:\n _a.sent();\n return [2 /*return*/, {\n resourceMetrics: {\n resource: this._sharedState.resource,\n scopeMetrics: scopeMetrics,\n },\n errors: errors,\n }];\n }\n });\n });\n };\n /**\n * Delegates for MetricReader.forceFlush.\n */\n MetricCollector.prototype.forceFlush = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._metricReader.forceFlush(options)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Delegates for MetricReader.shutdown.\n */\n MetricCollector.prototype.shutdown = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._metricReader.shutdown(options)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n MetricCollector.prototype.selectAggregationTemporality = function (instrumentType) {\n return this._metricReader.selectAggregationTemporality(instrumentType);\n };\n MetricCollector.prototype.selectAggregation = function (instrumentType) {\n return this._metricReader.selectAggregation(instrumentType);\n };\n return MetricCollector;\n}());\nexport { MetricCollector };\n//# sourceMappingURL=MetricCollector.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { diag, createNoopMeter, } from '@opentelemetry/api';\nimport { Resource } from '@opentelemetry/resources';\nimport { MeterProviderSharedState } from './state/MeterProviderSharedState';\nimport { MetricCollector } from './state/MetricCollector';\n/**\n * @param mergeWithDefaults\n * @param providedResource\n */\nfunction prepareResource(mergeWithDefaults, providedResource) {\n var resource = providedResource !== null && providedResource !== void 0 ? providedResource : Resource.empty();\n if (mergeWithDefaults) {\n return Resource.default().merge(resource);\n }\n return resource;\n}\n/**\n * This class implements the {@link MeterProvider} interface.\n */\nvar MeterProvider = /** @class */ (function () {\n function MeterProvider(options) {\n var e_1, _a, e_2, _b;\n var _c;\n this._shutdown = false;\n this._sharedState = new MeterProviderSharedState(prepareResource((_c = options === null || options === void 0 ? void 0 : options.mergeResourceWithDefaults) !== null && _c !== void 0 ? _c : true, options === null || options === void 0 ? void 0 : options.resource));\n if ((options === null || options === void 0 ? void 0 : options.views) != null && options.views.length > 0) {\n try {\n for (var _d = __values(options.views), _e = _d.next(); !_e.done; _e = _d.next()) {\n var view = _e.value;\n this._sharedState.viewRegistry.addView(view);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_e && !_e.done && (_a = _d.return)) _a.call(_d);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if ((options === null || options === void 0 ? void 0 : options.readers) != null && options.readers.length > 0) {\n try {\n for (var _f = __values(options.readers), _g = _f.next(); !_g.done; _g = _f.next()) {\n var metricReader = _g.value;\n this.addMetricReader(metricReader);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_g && !_g.done && (_b = _f.return)) _b.call(_f);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n /**\n * Get a meter with the configuration of the MeterProvider.\n */\n MeterProvider.prototype.getMeter = function (name, version, options) {\n if (version === void 0) { version = ''; }\n if (options === void 0) { options = {}; }\n // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#meter-creation\n if (this._shutdown) {\n diag.warn('A shutdown MeterProvider cannot provide a Meter');\n return createNoopMeter();\n }\n return this._sharedState.getMeterSharedState({\n name: name,\n version: version,\n schemaUrl: options.schemaUrl,\n }).meter;\n };\n /**\n * Register a {@link MetricReader} to the meter provider. After the\n * registration, the MetricReader can start metrics collection.\n *\n *

NOTE: {@link MetricReader} instances MUST be added before creating any instruments.\n * A {@link MetricReader} instance registered later may receive no or incomplete metric data.\n *\n * @param metricReader the metric reader to be registered.\n *\n * @deprecated This method will be removed in SDK 2.0. Please use\n * {@link MeterProviderOptions.readers} via the {@link MeterProvider} constructor instead\n */\n MeterProvider.prototype.addMetricReader = function (metricReader) {\n var collector = new MetricCollector(this._sharedState, metricReader);\n metricReader.setMetricProducer(collector);\n this._sharedState.metricCollectors.push(collector);\n };\n /**\n * Flush all buffered data and shut down the MeterProvider and all registered\n * MetricReaders.\n *\n * Returns a promise which is resolved when all flushes are complete.\n */\n MeterProvider.prototype.shutdown = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this._shutdown) {\n diag.warn('shutdown may only be called once per MeterProvider');\n return [2 /*return*/];\n }\n this._shutdown = true;\n return [4 /*yield*/, Promise.all(this._sharedState.metricCollectors.map(function (collector) {\n return collector.shutdown(options);\n }))];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Notifies all registered MetricReaders to flush any buffered data.\n *\n * Returns a promise which is resolved when all flushes are complete.\n */\n MeterProvider.prototype.forceFlush = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // do not flush after shutdown\n if (this._shutdown) {\n diag.warn('invalid attempt to force flush after MeterProvider shutdown');\n return [2 /*return*/];\n }\n return [4 /*yield*/, Promise.all(this._sharedState.metricCollectors.map(function (collector) {\n return collector.forceFlush(options);\n }))];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n return MeterProvider;\n}());\nexport { MeterProvider };\n//# sourceMappingURL=MeterProvider.js.map","/*\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 { createContextKey } from '@opentelemetry/api';\nvar SUPPRESS_TRACING_KEY = createContextKey('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nexport function suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexport function unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexport function isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\n//# sourceMappingURL=suppress-tracing.js.map","/*\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 var BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexport var BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexport var BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexport var BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexport var BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexport var BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexport var BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\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 { baggageEntryMetadataFromString, } from '@opentelemetry/api';\nimport { BAGGAGE_ITEMS_SEPARATOR, BAGGAGE_PROPERTIES_SEPARATOR, BAGGAGE_KEY_PAIR_SEPARATOR, BAGGAGE_MAX_TOTAL_LENGTH, } from './constants';\nexport function serializeKeyPairs(keyPairs) {\n return keyPairs.reduce(function (hValue, current) {\n var value = \"\" + hValue + (hValue !== '' ? BAGGAGE_ITEMS_SEPARATOR : '') + current;\n return value.length > BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexport function getKeyPairs(baggage) {\n return baggage.getAllEntries().map(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n var entry = encodeURIComponent(key) + \"=\" + encodeURIComponent(value.value);\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 return entry;\n });\n}\nexport function parsePairKeyValue(entry) {\n var valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n var keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n var separatorIndex = keyPairPart.indexOf(BAGGAGE_KEY_PAIR_SEPARATOR);\n if (separatorIndex <= 0)\n return;\n var key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim());\n var value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());\n var metadata;\n if (valueProps.length > 0) {\n metadata = baggageEntryMetadataFromString(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key: key, value: value, metadata: metadata };\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(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(BAGGAGE_ITEMS_SEPARATOR)\n .map(function (entry) {\n return parsePairKeyValue(entry);\n })\n .filter(function (keyPair) { return keyPair !== undefined && keyPair.value.length > 0; })\n .reduce(function (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//# sourceMappingURL=utils.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { diag } from '@opentelemetry/api';\nexport function sanitizeAttributes(attributes) {\n var e_1, _a;\n var out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n try {\n for (var _b = __values(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2), key = _d[0], val = _d[1];\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 }\n else {\n out[key] = val;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return out;\n}\nexport function isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexport function isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nfunction isHomogeneousAttributeValueArray(arr) {\n var e_2, _a;\n var type;\n try {\n for (var arr_1 = __values(arr), arr_1_1 = arr_1.next(); !arr_1_1.done; arr_1_1 = arr_1.next()) {\n var element = arr_1_1.value;\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (arr_1_1 && !arr_1_1.done && (_a = arr_1.return)) _a.call(arr_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","/*\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';\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() {\n return function (ex) {\n diag.error(stringifyException(ex));\n };\n}\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\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) {\n var result = {};\n var current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(function (propertyName) {\n if (result[propertyName])\n return;\n var value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","/*\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 { loggingErrorHandler } from './logging-error-handler';\n/** The global error handler delegate */\nvar delegateHandler = loggingErrorHandler();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nexport function setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nexport function globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\n//# sourceMappingURL=global-error-handler.js.map","/*\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 var TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues || (TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","/*\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// Updates to this file should also be replicated to @opentelemetry/api too.\n/**\n * - globalThis (New standard)\n * - self (Will return the current window instance for supported browsers)\n * - window (fallback for older browser implementations)\n * - global (NodeJS implementation)\n * - (When all else fails)\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef\nexport var _globalThis = typeof globalThis === 'object'\n ? globalThis\n : typeof self === 'object'\n ? self\n : typeof window === 'object'\n ? window\n : typeof global === 'object'\n ? global\n : {};\n//# sourceMappingURL=globalThis.js.map","/*\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 { DiagLogLevel } from '@opentelemetry/api';\nimport { TracesSamplerValues } from './sampling';\nimport { _globalThis } from '../platform/browser/globalThis';\nvar DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nvar ENVIRONMENT_BOOLEAN_KEYS = ['OTEL_SDK_DISABLED'];\nfunction isEnvVarABoolean(key) {\n return (ENVIRONMENT_BOOLEAN_KEYS.indexOf(key) > -1);\n}\nvar ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_BLRP_EXPORT_TIMEOUT',\n 'OTEL_BLRP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BLRP_MAX_QUEUE_SIZE',\n 'OTEL_BLRP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_OTLP_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nvar ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexport var DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexport var DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\nexport var DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = 128;\nexport var DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexport var DEFAULT_ENVIRONMENT = {\n OTEL_SDK_DISABLED: false,\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_BLRP_EXPORT_TIMEOUT: 30000,\n OTEL_BLRP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BLRP_MAX_QUEUE_SIZE: 2048,\n OTEL_BLRP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_OTLP_LOGS_HEADERS: '',\n OTEL_EXPORTER_OTLP_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 10000,\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT: DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT: DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,\n OTEL_TRACES_EXPORTER: '',\n OTEL_TRACES_SAMPLER: TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_LOGS_EXPORTER: '',\n OTEL_EXPORTER_OTLP_INSECURE: '',\n OTEL_EXPORTER_OTLP_TRACES_INSECURE: '',\n OTEL_EXPORTER_OTLP_METRICS_INSECURE: '',\n OTEL_EXPORTER_OTLP_LOGS_INSECURE: '',\n OTEL_EXPORTER_OTLP_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_METRICS_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_LOGS_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: 'cumulative',\n};\n/**\n * @param key\n * @param environment\n * @param values\n */\nfunction parseBoolean(key, environment, values) {\n if (typeof values[key] === 'undefined') {\n return;\n }\n var value = String(values[key]);\n // support case-insensitive \"true\"\n environment[key] = value.toLowerCase() === 'true';\n}\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min, max) {\n if (min === void 0) { min = -Infinity; }\n if (max === void 0) { max = Infinity; }\n if (typeof values[name] !== 'undefined') {\n var value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator) {\n if (separator === void 0) { separator = DEFAULT_LIST_SEPARATOR; }\n var givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(function (v) { return v.trim(); });\n }\n}\n// The support string -> DiagLogLevel mappings\nvar logLevelMap = {\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 * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n var value = values[key];\n if (typeof value === 'string') {\n var theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nexport function parseEnvironment(values) {\n var environment = {};\n for (var env in DEFAULT_ENVIRONMENT) {\n var key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarABoolean(key)) {\n parseBoolean(key, environment, values);\n }\n else if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n var value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\n/**\n * Get environment in node or browser without\n * populating default values.\n */\nexport function getEnvWithoutDefaults() {\n return typeof process !== 'undefined' && process && process.env\n ? parseEnvironment(process.env)\n : parseEnvironment(_globalThis);\n}\n//# sourceMappingURL=environment.js.map","/*\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 { DEFAULT_ENVIRONMENT, parseEnvironment, } from '../../utils/environment';\nimport { _globalThis } from './globalThis';\n/**\n * Gets the environment variables\n */\nexport function getEnv() {\n var globalEnv = parseEnvironment(_globalThis);\n return Object.assign({}, DEFAULT_ENVIRONMENT, globalEnv);\n}\n//# sourceMappingURL=environment.js.map","/*\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 */\nfunction intValue(charCode) {\n // 0-9\n if (charCode >= 48 && charCode <= 57) {\n return charCode - 48;\n }\n // a-f\n if (charCode >= 97 && charCode <= 102) {\n return charCode - 87;\n }\n // A-F\n return charCode - 55;\n}\nexport function hexToBinary(hexStr) {\n var buf = new Uint8Array(hexStr.length / 2);\n var offset = 0;\n for (var i = 0; i < hexStr.length; i += 2) {\n var hi = intValue(hexStr.charCodeAt(i));\n var lo = intValue(hexStr.charCodeAt(i + 1));\n buf[offset++] = (hi << 4) | lo;\n }\n return buf;\n}\n//# sourceMappingURL=hex-to-binary.js.map","/*\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 var otperformance = performance;\n//# sourceMappingURL=performance.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.22.0';\n//# sourceMappingURL=version.js.map","/*\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 * Creates a const map from the given values\n * @param values - An array of values to be used as keys and values in the map.\n * @returns A populated version of the map with the values and keys derived from the values.\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function createConstMap(values) {\n // eslint-disable-next-line prefer-const, @typescript-eslint/no-explicit-any\n var res = {};\n var len = values.length;\n for (var lp = 0; lp < len; lp++) {\n var val = values[lp];\n if (val) {\n res[String(val).toUpperCase().replace(/[-.]/g, '_')] = val;\n }\n }\n return res;\n}\n//# sourceMappingURL=utils.js.map","/*\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 { createConstMap } from '../internal/utils';\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticAttributes\n//----------------------------------------------------------------------------------------------------------\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn';\nvar TMP_DB_SYSTEM = 'db.system';\nvar TMP_DB_CONNECTION_STRING = 'db.connection_string';\nvar TMP_DB_USER = 'db.user';\nvar TMP_DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname';\nvar TMP_DB_NAME = 'db.name';\nvar TMP_DB_STATEMENT = 'db.statement';\nvar TMP_DB_OPERATION = 'db.operation';\nvar TMP_DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name';\nvar TMP_DB_CASSANDRA_KEYSPACE = 'db.cassandra.keyspace';\nvar TMP_DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size';\nvar TMP_DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level';\nvar TMP_DB_CASSANDRA_TABLE = 'db.cassandra.table';\nvar TMP_DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence';\nvar TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count';\nvar TMP_DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id';\nvar TMP_DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc';\nvar TMP_DB_HBASE_NAMESPACE = 'db.hbase.namespace';\nvar TMP_DB_REDIS_DATABASE_INDEX = 'db.redis.database_index';\nvar TMP_DB_MONGODB_COLLECTION = 'db.mongodb.collection';\nvar TMP_DB_SQL_TABLE = 'db.sql.table';\nvar TMP_EXCEPTION_TYPE = 'exception.type';\nvar TMP_EXCEPTION_MESSAGE = 'exception.message';\nvar TMP_EXCEPTION_STACKTRACE = 'exception.stacktrace';\nvar TMP_EXCEPTION_ESCAPED = 'exception.escaped';\nvar TMP_FAAS_TRIGGER = 'faas.trigger';\nvar TMP_FAAS_EXECUTION = 'faas.execution';\nvar TMP_FAAS_DOCUMENT_COLLECTION = 'faas.document.collection';\nvar TMP_FAAS_DOCUMENT_OPERATION = 'faas.document.operation';\nvar TMP_FAAS_DOCUMENT_TIME = 'faas.document.time';\nvar TMP_FAAS_DOCUMENT_NAME = 'faas.document.name';\nvar TMP_FAAS_TIME = 'faas.time';\nvar TMP_FAAS_CRON = 'faas.cron';\nvar TMP_FAAS_COLDSTART = 'faas.coldstart';\nvar TMP_FAAS_INVOKED_NAME = 'faas.invoked_name';\nvar TMP_FAAS_INVOKED_PROVIDER = 'faas.invoked_provider';\nvar TMP_FAAS_INVOKED_REGION = 'faas.invoked_region';\nvar TMP_NET_TRANSPORT = 'net.transport';\nvar TMP_NET_PEER_IP = 'net.peer.ip';\nvar TMP_NET_PEER_PORT = 'net.peer.port';\nvar TMP_NET_PEER_NAME = 'net.peer.name';\nvar TMP_NET_HOST_IP = 'net.host.ip';\nvar TMP_NET_HOST_PORT = 'net.host.port';\nvar TMP_NET_HOST_NAME = 'net.host.name';\nvar TMP_NET_HOST_CONNECTION_TYPE = 'net.host.connection.type';\nvar TMP_NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype';\nvar TMP_NET_HOST_CARRIER_NAME = 'net.host.carrier.name';\nvar TMP_NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc';\nvar TMP_NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc';\nvar TMP_NET_HOST_CARRIER_ICC = 'net.host.carrier.icc';\nvar TMP_PEER_SERVICE = 'peer.service';\nvar TMP_ENDUSER_ID = 'enduser.id';\nvar TMP_ENDUSER_ROLE = 'enduser.role';\nvar TMP_ENDUSER_SCOPE = 'enduser.scope';\nvar TMP_THREAD_ID = 'thread.id';\nvar TMP_THREAD_NAME = 'thread.name';\nvar TMP_CODE_FUNCTION = 'code.function';\nvar TMP_CODE_NAMESPACE = 'code.namespace';\nvar TMP_CODE_FILEPATH = 'code.filepath';\nvar TMP_CODE_LINENO = 'code.lineno';\nvar TMP_HTTP_METHOD = 'http.method';\nvar TMP_HTTP_URL = 'http.url';\nvar TMP_HTTP_TARGET = 'http.target';\nvar TMP_HTTP_HOST = 'http.host';\nvar TMP_HTTP_SCHEME = 'http.scheme';\nvar TMP_HTTP_STATUS_CODE = 'http.status_code';\nvar TMP_HTTP_FLAVOR = 'http.flavor';\nvar TMP_HTTP_USER_AGENT = 'http.user_agent';\nvar TMP_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length';\nvar TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';\nvar TMP_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\nvar TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';\nvar TMP_HTTP_SERVER_NAME = 'http.server_name';\nvar TMP_HTTP_ROUTE = 'http.route';\nvar TMP_HTTP_CLIENT_IP = 'http.client_ip';\nvar TMP_AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names';\nvar TMP_AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity';\nvar TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics';\nvar TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity';\nvar TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity';\nvar TMP_AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read';\nvar TMP_AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection';\nvar TMP_AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit';\nvar TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get';\nvar TMP_AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name';\nvar TMP_AWS_DYNAMODB_SELECT = 'aws.dynamodb.select';\nvar TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes';\nvar TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes';\nvar TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table';\nvar TMP_AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count';\nvar TMP_AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward';\nvar TMP_AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment';\nvar TMP_AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments';\nvar TMP_AWS_DYNAMODB_COUNT = 'aws.dynamodb.count';\nvar TMP_AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count';\nvar TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions';\nvar TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates';\nvar TMP_MESSAGING_SYSTEM = 'messaging.system';\nvar TMP_MESSAGING_DESTINATION = 'messaging.destination';\nvar TMP_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind';\nvar TMP_MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination';\nvar TMP_MESSAGING_PROTOCOL = 'messaging.protocol';\nvar TMP_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version';\nvar TMP_MESSAGING_URL = 'messaging.url';\nvar TMP_MESSAGING_MESSAGE_ID = 'messaging.message_id';\nvar TMP_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id';\nvar TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message_payload_size_bytes';\nvar TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message_payload_compressed_size_bytes';\nvar TMP_MESSAGING_OPERATION = 'messaging.operation';\nvar TMP_MESSAGING_CONSUMER_ID = 'messaging.consumer_id';\nvar TMP_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key';\nvar TMP_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message_key';\nvar TMP_MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer_group';\nvar TMP_MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id';\nvar TMP_MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition';\nvar TMP_MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone';\nvar TMP_RPC_SYSTEM = 'rpc.system';\nvar TMP_RPC_SERVICE = 'rpc.service';\nvar TMP_RPC_METHOD = 'rpc.method';\nvar TMP_RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code';\nvar TMP_RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version';\nvar TMP_RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id';\nvar TMP_RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code';\nvar TMP_RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message';\nvar TMP_MESSAGE_TYPE = 'message.type';\nvar TMP_MESSAGE_ID = 'message.id';\nvar TMP_MESSAGE_COMPRESSED_SIZE = 'message.compressed_size';\nvar TMP_MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size';\n/**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n */\nexport var SEMATTRS_AWS_LAMBDA_INVOKED_ARN = TMP_AWS_LAMBDA_INVOKED_ARN;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var SEMATTRS_DB_SYSTEM = TMP_DB_SYSTEM;\n/**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n */\nexport var SEMATTRS_DB_CONNECTION_STRING = TMP_DB_CONNECTION_STRING;\n/**\n * Username for accessing the database.\n */\nexport var SEMATTRS_DB_USER = TMP_DB_USER;\n/**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n */\nexport var SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = TMP_DB_JDBC_DRIVER_CLASSNAME;\n/**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n */\nexport var SEMATTRS_DB_NAME = TMP_DB_NAME;\n/**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n */\nexport var SEMATTRS_DB_STATEMENT = TMP_DB_STATEMENT;\n/**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n */\nexport var SEMATTRS_DB_OPERATION = TMP_DB_OPERATION;\n/**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n */\nexport var SEMATTRS_DB_MSSQL_INSTANCE_NAME = TMP_DB_MSSQL_INSTANCE_NAME;\n/**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n */\nexport var SEMATTRS_DB_CASSANDRA_KEYSPACE = TMP_DB_CASSANDRA_KEYSPACE;\n/**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n */\nexport var SEMATTRS_DB_CASSANDRA_PAGE_SIZE = TMP_DB_CASSANDRA_PAGE_SIZE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = TMP_DB_CASSANDRA_CONSISTENCY_LEVEL;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\nexport var SEMATTRS_DB_CASSANDRA_TABLE = TMP_DB_CASSANDRA_TABLE;\n/**\n * Whether or not the query is idempotent.\n */\nexport var SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = TMP_DB_CASSANDRA_IDEMPOTENCE;\n/**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n */\nexport var SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT;\n/**\n * The ID of the coordinating node for a query.\n */\nexport var SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = TMP_DB_CASSANDRA_COORDINATOR_ID;\n/**\n * The data center of the coordinating node for a query.\n */\nexport var SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = TMP_DB_CASSANDRA_COORDINATOR_DC;\n/**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n */\nexport var SEMATTRS_DB_HBASE_NAMESPACE = TMP_DB_HBASE_NAMESPACE;\n/**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n */\nexport var SEMATTRS_DB_REDIS_DATABASE_INDEX = TMP_DB_REDIS_DATABASE_INDEX;\n/**\n * The collection being accessed within the database stated in `db.name`.\n */\nexport var SEMATTRS_DB_MONGODB_COLLECTION = TMP_DB_MONGODB_COLLECTION;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n */\nexport var SEMATTRS_DB_SQL_TABLE = TMP_DB_SQL_TABLE;\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 */\nexport var SEMATTRS_EXCEPTION_TYPE = TMP_EXCEPTION_TYPE;\n/**\n * The exception message.\n */\nexport var SEMATTRS_EXCEPTION_MESSAGE = TMP_EXCEPTION_MESSAGE;\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 */\nexport var SEMATTRS_EXCEPTION_STACKTRACE = TMP_EXCEPTION_STACKTRACE;\n/**\n* SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n*\n* Note: An exception is considered to have escaped (or left) the scope of a span,\nif that span is ended while the exception is still logically "in flight".\nThis may be actually "in flight" in some languages (e.g. if the exception\nis passed to a Context manager's `__exit__` method in Python) but will\nusually be caught at the point of recording the exception in most languages.\n\nIt is usually not possible to determine at the point where an exception is thrown\nwhether it will escape the scope of a span.\nHowever, it is trivial to know that an exception\nwill escape, if one checks for an active exception just before ending the span,\nas done in the [example above](#exception-end-example).\n\nIt follows that an exception may still escape the scope of the span\neven if the `exception.escaped` attribute was not set or set to false,\nsince the event might have been recorded at a time where it was not\nclear whether the exception will escape.\n*/\nexport var SEMATTRS_EXCEPTION_ESCAPED = TMP_EXCEPTION_ESCAPED;\n/**\n * Type of the trigger on which the function is executed.\n */\nexport var SEMATTRS_FAAS_TRIGGER = TMP_FAAS_TRIGGER;\n/**\n * The execution ID of the current function execution.\n */\nexport var SEMATTRS_FAAS_EXECUTION = TMP_FAAS_EXECUTION;\n/**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n */\nexport var SEMATTRS_FAAS_DOCUMENT_COLLECTION = TMP_FAAS_DOCUMENT_COLLECTION;\n/**\n * Describes the type of the operation that was performed on the data.\n */\nexport var SEMATTRS_FAAS_DOCUMENT_OPERATION = TMP_FAAS_DOCUMENT_OPERATION;\n/**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\nexport var SEMATTRS_FAAS_DOCUMENT_TIME = TMP_FAAS_DOCUMENT_TIME;\n/**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n */\nexport var SEMATTRS_FAAS_DOCUMENT_NAME = TMP_FAAS_DOCUMENT_NAME;\n/**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n */\nexport var SEMATTRS_FAAS_TIME = TMP_FAAS_TIME;\n/**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n */\nexport var SEMATTRS_FAAS_CRON = TMP_FAAS_CRON;\n/**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n */\nexport var SEMATTRS_FAAS_COLDSTART = TMP_FAAS_COLDSTART;\n/**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n */\nexport var SEMATTRS_FAAS_INVOKED_NAME = TMP_FAAS_INVOKED_NAME;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\nexport var SEMATTRS_FAAS_INVOKED_PROVIDER = TMP_FAAS_INVOKED_PROVIDER;\n/**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n */\nexport var SEMATTRS_FAAS_INVOKED_REGION = TMP_FAAS_INVOKED_REGION;\n/**\n * Transport protocol used. See note below.\n */\nexport var SEMATTRS_NET_TRANSPORT = TMP_NET_TRANSPORT;\n/**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n */\nexport var SEMATTRS_NET_PEER_IP = TMP_NET_PEER_IP;\n/**\n * Remote port number.\n */\nexport var SEMATTRS_NET_PEER_PORT = TMP_NET_PEER_PORT;\n/**\n * Remote hostname or similar, see note below.\n */\nexport var SEMATTRS_NET_PEER_NAME = TMP_NET_PEER_NAME;\n/**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n */\nexport var SEMATTRS_NET_HOST_IP = TMP_NET_HOST_IP;\n/**\n * Like `net.peer.port` but for the host port.\n */\nexport var SEMATTRS_NET_HOST_PORT = TMP_NET_HOST_PORT;\n/**\n * Local hostname or similar, see note below.\n */\nexport var SEMATTRS_NET_HOST_NAME = TMP_NET_HOST_NAME;\n/**\n * The internet connection type currently being used by the host.\n */\nexport var SEMATTRS_NET_HOST_CONNECTION_TYPE = TMP_NET_HOST_CONNECTION_TYPE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = TMP_NET_HOST_CONNECTION_SUBTYPE;\n/**\n * The name of the mobile carrier.\n */\nexport var SEMATTRS_NET_HOST_CARRIER_NAME = TMP_NET_HOST_CARRIER_NAME;\n/**\n * The mobile carrier country code.\n */\nexport var SEMATTRS_NET_HOST_CARRIER_MCC = TMP_NET_HOST_CARRIER_MCC;\n/**\n * The mobile carrier network code.\n */\nexport var SEMATTRS_NET_HOST_CARRIER_MNC = TMP_NET_HOST_CARRIER_MNC;\n/**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n */\nexport var SEMATTRS_NET_HOST_CARRIER_ICC = TMP_NET_HOST_CARRIER_ICC;\n/**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n */\nexport var SEMATTRS_PEER_SERVICE = TMP_PEER_SERVICE;\n/**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n */\nexport var SEMATTRS_ENDUSER_ID = TMP_ENDUSER_ID;\n/**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n */\nexport var SEMATTRS_ENDUSER_ROLE = TMP_ENDUSER_ROLE;\n/**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n */\nexport var SEMATTRS_ENDUSER_SCOPE = TMP_ENDUSER_SCOPE;\n/**\n * Current "managed" thread ID (as opposed to OS thread ID).\n */\nexport var SEMATTRS_THREAD_ID = TMP_THREAD_ID;\n/**\n * Current thread name.\n */\nexport var SEMATTRS_THREAD_NAME = TMP_THREAD_NAME;\n/**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n */\nexport var SEMATTRS_CODE_FUNCTION = TMP_CODE_FUNCTION;\n/**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n */\nexport var SEMATTRS_CODE_NAMESPACE = TMP_CODE_NAMESPACE;\n/**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n */\nexport var SEMATTRS_CODE_FILEPATH = TMP_CODE_FILEPATH;\n/**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n */\nexport var SEMATTRS_CODE_LINENO = TMP_CODE_LINENO;\n/**\n * HTTP request method.\n */\nexport var SEMATTRS_HTTP_METHOD = TMP_HTTP_METHOD;\n/**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n */\nexport var SEMATTRS_HTTP_URL = TMP_HTTP_URL;\n/**\n * The full request target as passed in a HTTP request line or equivalent.\n */\nexport var SEMATTRS_HTTP_TARGET = TMP_HTTP_TARGET;\n/**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n */\nexport var SEMATTRS_HTTP_HOST = TMP_HTTP_HOST;\n/**\n * The URI scheme identifying the used protocol.\n */\nexport var SEMATTRS_HTTP_SCHEME = TMP_HTTP_SCHEME;\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n */\nexport var SEMATTRS_HTTP_STATUS_CODE = TMP_HTTP_STATUS_CODE;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\nexport var SEMATTRS_HTTP_FLAVOR = TMP_HTTP_FLAVOR;\n/**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n */\nexport var SEMATTRS_HTTP_USER_AGENT = TMP_HTTP_USER_AGENT;\n/**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\nexport var SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = TMP_HTTP_REQUEST_CONTENT_LENGTH;\n/**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n */\nexport var SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n */\nexport var SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = TMP_HTTP_RESPONSE_CONTENT_LENGTH;\n/**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n */\nexport var SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n */\nexport var SEMATTRS_HTTP_SERVER_NAME = TMP_HTTP_SERVER_NAME;\n/**\n * The matched route (path template).\n */\nexport var SEMATTRS_HTTP_ROUTE = TMP_HTTP_ROUTE;\n/**\n* The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n*\n* Note: This is not necessarily the same as `net.peer.ip`, which would\nidentify the network-level peer, which may be a proxy.\n\nThis attribute should be set when a source of information different\nfrom the one used for `net.peer.ip`, is available even if that other\nsource just confirms the same value as `net.peer.ip`.\nRationale: For `net.peer.ip`, one typically does not know if it\ncomes from a proxy, reverse proxy, or the actual client. Setting\n`http.client_ip` when it's the same as `net.peer.ip` means that\none is at least somewhat confident that the address is not that of\nthe closest proxy.\n*/\nexport var SEMATTRS_HTTP_CLIENT_IP = TMP_HTTP_CLIENT_IP;\n/**\n * The keys in the `RequestItems` object field.\n */\nexport var SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = TMP_AWS_DYNAMODB_TABLE_NAMES;\n/**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n */\nexport var SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = TMP_AWS_DYNAMODB_CONSUMED_CAPACITY;\n/**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n */\nexport var SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS;\n/**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY;\n/**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY;\n/**\n * The value of the `ConsistentRead` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = TMP_AWS_DYNAMODB_CONSISTENT_READ;\n/**\n * The value of the `ProjectionExpression` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_PROJECTION = TMP_AWS_DYNAMODB_PROJECTION;\n/**\n * The value of the `Limit` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_LIMIT = TMP_AWS_DYNAMODB_LIMIT;\n/**\n * The value of the `AttributesToGet` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET;\n/**\n * The value of the `IndexName` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_INDEX_NAME = TMP_AWS_DYNAMODB_INDEX_NAME;\n/**\n * The value of the `Select` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_SELECT = TMP_AWS_DYNAMODB_SELECT;\n/**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n */\nexport var SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES;\n/**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n */\nexport var SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES;\n/**\n * The value of the `ExclusiveStartTableName` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE;\n/**\n * The the number of items in the `TableNames` response parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = TMP_AWS_DYNAMODB_TABLE_COUNT;\n/**\n * The value of the `ScanIndexForward` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = TMP_AWS_DYNAMODB_SCAN_FORWARD;\n/**\n * The value of the `Segment` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_SEGMENT = TMP_AWS_DYNAMODB_SEGMENT;\n/**\n * The value of the `TotalSegments` request parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = TMP_AWS_DYNAMODB_TOTAL_SEGMENTS;\n/**\n * The value of the `Count` response parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_COUNT = TMP_AWS_DYNAMODB_COUNT;\n/**\n * The value of the `ScannedCount` response parameter.\n */\nexport var SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = TMP_AWS_DYNAMODB_SCANNED_COUNT;\n/**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n */\nexport var SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS;\n/**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n */\nexport var SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES;\n/**\n * A string identifying the messaging system.\n */\nexport var SEMATTRS_MESSAGING_SYSTEM = TMP_MESSAGING_SYSTEM;\n/**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n */\nexport var SEMATTRS_MESSAGING_DESTINATION = TMP_MESSAGING_DESTINATION;\n/**\n * The kind of message destination.\n */\nexport var SEMATTRS_MESSAGING_DESTINATION_KIND = TMP_MESSAGING_DESTINATION_KIND;\n/**\n * A boolean that is true if the message destination is temporary.\n */\nexport var SEMATTRS_MESSAGING_TEMP_DESTINATION = TMP_MESSAGING_TEMP_DESTINATION;\n/**\n * The name of the transport protocol.\n */\nexport var SEMATTRS_MESSAGING_PROTOCOL = TMP_MESSAGING_PROTOCOL;\n/**\n * The version of the transport protocol.\n */\nexport var SEMATTRS_MESSAGING_PROTOCOL_VERSION = TMP_MESSAGING_PROTOCOL_VERSION;\n/**\n * Connection string.\n */\nexport var SEMATTRS_MESSAGING_URL = TMP_MESSAGING_URL;\n/**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n */\nexport var SEMATTRS_MESSAGING_MESSAGE_ID = TMP_MESSAGING_MESSAGE_ID;\n/**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n */\nexport var SEMATTRS_MESSAGING_CONVERSATION_ID = TMP_MESSAGING_CONVERSATION_ID;\n/**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n */\nexport var SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES;\n/**\n * The compressed size of the message payload in bytes.\n */\nexport var SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\nexport var SEMATTRS_MESSAGING_OPERATION = TMP_MESSAGING_OPERATION;\n/**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n */\nexport var SEMATTRS_MESSAGING_CONSUMER_ID = TMP_MESSAGING_CONSUMER_ID;\n/**\n * RabbitMQ message routing key.\n */\nexport var SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = TMP_MESSAGING_RABBITMQ_ROUTING_KEY;\n/**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n */\nexport var SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = TMP_MESSAGING_KAFKA_MESSAGE_KEY;\n/**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n */\nexport var SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = TMP_MESSAGING_KAFKA_CONSUMER_GROUP;\n/**\n * Client Id for the Consumer or Producer that is handling the message.\n */\nexport var SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = TMP_MESSAGING_KAFKA_CLIENT_ID;\n/**\n * Partition the message is sent to.\n */\nexport var SEMATTRS_MESSAGING_KAFKA_PARTITION = TMP_MESSAGING_KAFKA_PARTITION;\n/**\n * A boolean that is true if the message is a tombstone.\n */\nexport var SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = TMP_MESSAGING_KAFKA_TOMBSTONE;\n/**\n * A string identifying the remoting system.\n */\nexport var SEMATTRS_RPC_SYSTEM = TMP_RPC_SYSTEM;\n/**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n */\nexport var SEMATTRS_RPC_SERVICE = TMP_RPC_SERVICE;\n/**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n */\nexport var SEMATTRS_RPC_METHOD = TMP_RPC_METHOD;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var SEMATTRS_RPC_GRPC_STATUS_CODE = TMP_RPC_GRPC_STATUS_CODE;\n/**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n */\nexport var SEMATTRS_RPC_JSONRPC_VERSION = TMP_RPC_JSONRPC_VERSION;\n/**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n */\nexport var SEMATTRS_RPC_JSONRPC_REQUEST_ID = TMP_RPC_JSONRPC_REQUEST_ID;\n/**\n * `error.code` property of response if it is an error response.\n */\nexport var SEMATTRS_RPC_JSONRPC_ERROR_CODE = TMP_RPC_JSONRPC_ERROR_CODE;\n/**\n * `error.message` property of response if it is an error response.\n */\nexport var SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = TMP_RPC_JSONRPC_ERROR_MESSAGE;\n/**\n * Whether this is a received or sent message.\n */\nexport var SEMATTRS_MESSAGE_TYPE = TMP_MESSAGE_TYPE;\n/**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n */\nexport var SEMATTRS_MESSAGE_ID = TMP_MESSAGE_ID;\n/**\n * Compressed size of the message in bytes.\n */\nexport var SEMATTRS_MESSAGE_COMPRESSED_SIZE = TMP_MESSAGE_COMPRESSED_SIZE;\n/**\n * Uncompressed size of the message in bytes.\n */\nexport var SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = TMP_MESSAGE_UNCOMPRESSED_SIZE;\n/**\n * Create exported Value Map for SemanticAttributes values\n * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification\n */\nexport var SemanticAttributes = \n/*#__PURE__*/ createConstMap([\n TMP_AWS_LAMBDA_INVOKED_ARN,\n TMP_DB_SYSTEM,\n TMP_DB_CONNECTION_STRING,\n TMP_DB_USER,\n TMP_DB_JDBC_DRIVER_CLASSNAME,\n TMP_DB_NAME,\n TMP_DB_STATEMENT,\n TMP_DB_OPERATION,\n TMP_DB_MSSQL_INSTANCE_NAME,\n TMP_DB_CASSANDRA_KEYSPACE,\n TMP_DB_CASSANDRA_PAGE_SIZE,\n TMP_DB_CASSANDRA_CONSISTENCY_LEVEL,\n TMP_DB_CASSANDRA_TABLE,\n TMP_DB_CASSANDRA_IDEMPOTENCE,\n TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT,\n TMP_DB_CASSANDRA_COORDINATOR_ID,\n TMP_DB_CASSANDRA_COORDINATOR_DC,\n TMP_DB_HBASE_NAMESPACE,\n TMP_DB_REDIS_DATABASE_INDEX,\n TMP_DB_MONGODB_COLLECTION,\n TMP_DB_SQL_TABLE,\n TMP_EXCEPTION_TYPE,\n TMP_EXCEPTION_MESSAGE,\n TMP_EXCEPTION_STACKTRACE,\n TMP_EXCEPTION_ESCAPED,\n TMP_FAAS_TRIGGER,\n TMP_FAAS_EXECUTION,\n TMP_FAAS_DOCUMENT_COLLECTION,\n TMP_FAAS_DOCUMENT_OPERATION,\n TMP_FAAS_DOCUMENT_TIME,\n TMP_FAAS_DOCUMENT_NAME,\n TMP_FAAS_TIME,\n TMP_FAAS_CRON,\n TMP_FAAS_COLDSTART,\n TMP_FAAS_INVOKED_NAME,\n TMP_FAAS_INVOKED_PROVIDER,\n TMP_FAAS_INVOKED_REGION,\n TMP_NET_TRANSPORT,\n TMP_NET_PEER_IP,\n TMP_NET_PEER_PORT,\n TMP_NET_PEER_NAME,\n TMP_NET_HOST_IP,\n TMP_NET_HOST_PORT,\n TMP_NET_HOST_NAME,\n TMP_NET_HOST_CONNECTION_TYPE,\n TMP_NET_HOST_CONNECTION_SUBTYPE,\n TMP_NET_HOST_CARRIER_NAME,\n TMP_NET_HOST_CARRIER_MCC,\n TMP_NET_HOST_CARRIER_MNC,\n TMP_NET_HOST_CARRIER_ICC,\n TMP_PEER_SERVICE,\n TMP_ENDUSER_ID,\n TMP_ENDUSER_ROLE,\n TMP_ENDUSER_SCOPE,\n TMP_THREAD_ID,\n TMP_THREAD_NAME,\n TMP_CODE_FUNCTION,\n TMP_CODE_NAMESPACE,\n TMP_CODE_FILEPATH,\n TMP_CODE_LINENO,\n TMP_HTTP_METHOD,\n TMP_HTTP_URL,\n TMP_HTTP_TARGET,\n TMP_HTTP_HOST,\n TMP_HTTP_SCHEME,\n TMP_HTTP_STATUS_CODE,\n TMP_HTTP_FLAVOR,\n TMP_HTTP_USER_AGENT,\n TMP_HTTP_REQUEST_CONTENT_LENGTH,\n TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_SERVER_NAME,\n TMP_HTTP_ROUTE,\n TMP_HTTP_CLIENT_IP,\n TMP_AWS_DYNAMODB_TABLE_NAMES,\n TMP_AWS_DYNAMODB_CONSUMED_CAPACITY,\n TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS,\n TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY,\n TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY,\n TMP_AWS_DYNAMODB_CONSISTENT_READ,\n TMP_AWS_DYNAMODB_PROJECTION,\n TMP_AWS_DYNAMODB_LIMIT,\n TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET,\n TMP_AWS_DYNAMODB_INDEX_NAME,\n TMP_AWS_DYNAMODB_SELECT,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE,\n TMP_AWS_DYNAMODB_TABLE_COUNT,\n TMP_AWS_DYNAMODB_SCAN_FORWARD,\n TMP_AWS_DYNAMODB_SEGMENT,\n TMP_AWS_DYNAMODB_TOTAL_SEGMENTS,\n TMP_AWS_DYNAMODB_COUNT,\n TMP_AWS_DYNAMODB_SCANNED_COUNT,\n TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES,\n TMP_MESSAGING_SYSTEM,\n TMP_MESSAGING_DESTINATION,\n TMP_MESSAGING_DESTINATION_KIND,\n TMP_MESSAGING_TEMP_DESTINATION,\n TMP_MESSAGING_PROTOCOL,\n TMP_MESSAGING_PROTOCOL_VERSION,\n TMP_MESSAGING_URL,\n TMP_MESSAGING_MESSAGE_ID,\n TMP_MESSAGING_CONVERSATION_ID,\n TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES,\n TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES,\n TMP_MESSAGING_OPERATION,\n TMP_MESSAGING_CONSUMER_ID,\n TMP_MESSAGING_RABBITMQ_ROUTING_KEY,\n TMP_MESSAGING_KAFKA_MESSAGE_KEY,\n TMP_MESSAGING_KAFKA_CONSUMER_GROUP,\n TMP_MESSAGING_KAFKA_CLIENT_ID,\n TMP_MESSAGING_KAFKA_PARTITION,\n TMP_MESSAGING_KAFKA_TOMBSTONE,\n TMP_RPC_SYSTEM,\n TMP_RPC_SERVICE,\n TMP_RPC_METHOD,\n TMP_RPC_GRPC_STATUS_CODE,\n TMP_RPC_JSONRPC_VERSION,\n TMP_RPC_JSONRPC_REQUEST_ID,\n TMP_RPC_JSONRPC_ERROR_CODE,\n TMP_RPC_JSONRPC_ERROR_MESSAGE,\n TMP_MESSAGE_TYPE,\n TMP_MESSAGE_ID,\n TMP_MESSAGE_COMPRESSED_SIZE,\n TMP_MESSAGE_UNCOMPRESSED_SIZE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbSystemValues enum definition\n *\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_DBSYSTEMVALUES_OTHER_SQL = 'other_sql';\nvar TMP_DBSYSTEMVALUES_MSSQL = 'mssql';\nvar TMP_DBSYSTEMVALUES_MYSQL = 'mysql';\nvar TMP_DBSYSTEMVALUES_ORACLE = 'oracle';\nvar TMP_DBSYSTEMVALUES_DB2 = 'db2';\nvar TMP_DBSYSTEMVALUES_POSTGRESQL = 'postgresql';\nvar TMP_DBSYSTEMVALUES_REDSHIFT = 'redshift';\nvar TMP_DBSYSTEMVALUES_HIVE = 'hive';\nvar TMP_DBSYSTEMVALUES_CLOUDSCAPE = 'cloudscape';\nvar TMP_DBSYSTEMVALUES_HSQLDB = 'hsqldb';\nvar TMP_DBSYSTEMVALUES_PROGRESS = 'progress';\nvar TMP_DBSYSTEMVALUES_MAXDB = 'maxdb';\nvar TMP_DBSYSTEMVALUES_HANADB = 'hanadb';\nvar TMP_DBSYSTEMVALUES_INGRES = 'ingres';\nvar TMP_DBSYSTEMVALUES_FIRSTSQL = 'firstsql';\nvar TMP_DBSYSTEMVALUES_EDB = 'edb';\nvar TMP_DBSYSTEMVALUES_CACHE = 'cache';\nvar TMP_DBSYSTEMVALUES_ADABAS = 'adabas';\nvar TMP_DBSYSTEMVALUES_FIREBIRD = 'firebird';\nvar TMP_DBSYSTEMVALUES_DERBY = 'derby';\nvar TMP_DBSYSTEMVALUES_FILEMAKER = 'filemaker';\nvar TMP_DBSYSTEMVALUES_INFORMIX = 'informix';\nvar TMP_DBSYSTEMVALUES_INSTANTDB = 'instantdb';\nvar TMP_DBSYSTEMVALUES_INTERBASE = 'interbase';\nvar TMP_DBSYSTEMVALUES_MARIADB = 'mariadb';\nvar TMP_DBSYSTEMVALUES_NETEZZA = 'netezza';\nvar TMP_DBSYSTEMVALUES_PERVASIVE = 'pervasive';\nvar TMP_DBSYSTEMVALUES_POINTBASE = 'pointbase';\nvar TMP_DBSYSTEMVALUES_SQLITE = 'sqlite';\nvar TMP_DBSYSTEMVALUES_SYBASE = 'sybase';\nvar TMP_DBSYSTEMVALUES_TERADATA = 'teradata';\nvar TMP_DBSYSTEMVALUES_VERTICA = 'vertica';\nvar TMP_DBSYSTEMVALUES_H2 = 'h2';\nvar TMP_DBSYSTEMVALUES_COLDFUSION = 'coldfusion';\nvar TMP_DBSYSTEMVALUES_CASSANDRA = 'cassandra';\nvar TMP_DBSYSTEMVALUES_HBASE = 'hbase';\nvar TMP_DBSYSTEMVALUES_MONGODB = 'mongodb';\nvar TMP_DBSYSTEMVALUES_REDIS = 'redis';\nvar TMP_DBSYSTEMVALUES_COUCHBASE = 'couchbase';\nvar TMP_DBSYSTEMVALUES_COUCHDB = 'couchdb';\nvar TMP_DBSYSTEMVALUES_COSMOSDB = 'cosmosdb';\nvar TMP_DBSYSTEMVALUES_DYNAMODB = 'dynamodb';\nvar TMP_DBSYSTEMVALUES_NEO4J = 'neo4j';\nvar TMP_DBSYSTEMVALUES_GEODE = 'geode';\nvar TMP_DBSYSTEMVALUES_ELASTICSEARCH = 'elasticsearch';\nvar TMP_DBSYSTEMVALUES_MEMCACHED = 'memcached';\nvar TMP_DBSYSTEMVALUES_COCKROACHDB = 'cockroachdb';\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_OTHER_SQL = TMP_DBSYSTEMVALUES_OTHER_SQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_MSSQL = TMP_DBSYSTEMVALUES_MSSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_MYSQL = TMP_DBSYSTEMVALUES_MYSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_ORACLE = TMP_DBSYSTEMVALUES_ORACLE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_DB2 = TMP_DBSYSTEMVALUES_DB2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_POSTGRESQL = TMP_DBSYSTEMVALUES_POSTGRESQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_REDSHIFT = TMP_DBSYSTEMVALUES_REDSHIFT;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_HIVE = TMP_DBSYSTEMVALUES_HIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_CLOUDSCAPE = TMP_DBSYSTEMVALUES_CLOUDSCAPE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_HSQLDB = TMP_DBSYSTEMVALUES_HSQLDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_PROGRESS = TMP_DBSYSTEMVALUES_PROGRESS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_MAXDB = TMP_DBSYSTEMVALUES_MAXDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_HANADB = TMP_DBSYSTEMVALUES_HANADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_INGRES = TMP_DBSYSTEMVALUES_INGRES;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_FIRSTSQL = TMP_DBSYSTEMVALUES_FIRSTSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_EDB = TMP_DBSYSTEMVALUES_EDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_CACHE = TMP_DBSYSTEMVALUES_CACHE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_ADABAS = TMP_DBSYSTEMVALUES_ADABAS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_FIREBIRD = TMP_DBSYSTEMVALUES_FIREBIRD;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_DERBY = TMP_DBSYSTEMVALUES_DERBY;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_FILEMAKER = TMP_DBSYSTEMVALUES_FILEMAKER;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_INFORMIX = TMP_DBSYSTEMVALUES_INFORMIX;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_INSTANTDB = TMP_DBSYSTEMVALUES_INSTANTDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_INTERBASE = TMP_DBSYSTEMVALUES_INTERBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_MARIADB = TMP_DBSYSTEMVALUES_MARIADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_NETEZZA = TMP_DBSYSTEMVALUES_NETEZZA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_PERVASIVE = TMP_DBSYSTEMVALUES_PERVASIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_POINTBASE = TMP_DBSYSTEMVALUES_POINTBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_SQLITE = TMP_DBSYSTEMVALUES_SQLITE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_SYBASE = TMP_DBSYSTEMVALUES_SYBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_TERADATA = TMP_DBSYSTEMVALUES_TERADATA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_VERTICA = TMP_DBSYSTEMVALUES_VERTICA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_H2 = TMP_DBSYSTEMVALUES_H2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_COLDFUSION = TMP_DBSYSTEMVALUES_COLDFUSION;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_CASSANDRA = TMP_DBSYSTEMVALUES_CASSANDRA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_HBASE = TMP_DBSYSTEMVALUES_HBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_MONGODB = TMP_DBSYSTEMVALUES_MONGODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_REDIS = TMP_DBSYSTEMVALUES_REDIS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_COUCHBASE = TMP_DBSYSTEMVALUES_COUCHBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_COUCHDB = TMP_DBSYSTEMVALUES_COUCHDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_COSMOSDB = TMP_DBSYSTEMVALUES_COSMOSDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_DYNAMODB = TMP_DBSYSTEMVALUES_DYNAMODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_NEO4J = TMP_DBSYSTEMVALUES_NEO4J;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_GEODE = TMP_DBSYSTEMVALUES_GEODE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_ELASTICSEARCH = TMP_DBSYSTEMVALUES_ELASTICSEARCH;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_MEMCACHED = TMP_DBSYSTEMVALUES_MEMCACHED;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n */\nexport var DBSYSTEMVALUES_COCKROACHDB = TMP_DBSYSTEMVALUES_COCKROACHDB;\n/**\n * The constant map of values for DbSystemValues.\n * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification.\n */\nexport var DbSystemValues = \n/*#__PURE__*/ createConstMap([\n TMP_DBSYSTEMVALUES_OTHER_SQL,\n TMP_DBSYSTEMVALUES_MSSQL,\n TMP_DBSYSTEMVALUES_MYSQL,\n TMP_DBSYSTEMVALUES_ORACLE,\n TMP_DBSYSTEMVALUES_DB2,\n TMP_DBSYSTEMVALUES_POSTGRESQL,\n TMP_DBSYSTEMVALUES_REDSHIFT,\n TMP_DBSYSTEMVALUES_HIVE,\n TMP_DBSYSTEMVALUES_CLOUDSCAPE,\n TMP_DBSYSTEMVALUES_HSQLDB,\n TMP_DBSYSTEMVALUES_PROGRESS,\n TMP_DBSYSTEMVALUES_MAXDB,\n TMP_DBSYSTEMVALUES_HANADB,\n TMP_DBSYSTEMVALUES_INGRES,\n TMP_DBSYSTEMVALUES_FIRSTSQL,\n TMP_DBSYSTEMVALUES_EDB,\n TMP_DBSYSTEMVALUES_CACHE,\n TMP_DBSYSTEMVALUES_ADABAS,\n TMP_DBSYSTEMVALUES_FIREBIRD,\n TMP_DBSYSTEMVALUES_DERBY,\n TMP_DBSYSTEMVALUES_FILEMAKER,\n TMP_DBSYSTEMVALUES_INFORMIX,\n TMP_DBSYSTEMVALUES_INSTANTDB,\n TMP_DBSYSTEMVALUES_INTERBASE,\n TMP_DBSYSTEMVALUES_MARIADB,\n TMP_DBSYSTEMVALUES_NETEZZA,\n TMP_DBSYSTEMVALUES_PERVASIVE,\n TMP_DBSYSTEMVALUES_POINTBASE,\n TMP_DBSYSTEMVALUES_SQLITE,\n TMP_DBSYSTEMVALUES_SYBASE,\n TMP_DBSYSTEMVALUES_TERADATA,\n TMP_DBSYSTEMVALUES_VERTICA,\n TMP_DBSYSTEMVALUES_H2,\n TMP_DBSYSTEMVALUES_COLDFUSION,\n TMP_DBSYSTEMVALUES_CASSANDRA,\n TMP_DBSYSTEMVALUES_HBASE,\n TMP_DBSYSTEMVALUES_MONGODB,\n TMP_DBSYSTEMVALUES_REDIS,\n TMP_DBSYSTEMVALUES_COUCHBASE,\n TMP_DBSYSTEMVALUES_COUCHDB,\n TMP_DBSYSTEMVALUES_COSMOSDB,\n TMP_DBSYSTEMVALUES_DYNAMODB,\n TMP_DBSYSTEMVALUES_NEO4J,\n TMP_DBSYSTEMVALUES_GEODE,\n TMP_DBSYSTEMVALUES_ELASTICSEARCH,\n TMP_DBSYSTEMVALUES_MEMCACHED,\n TMP_DBSYSTEMVALUES_COCKROACHDB,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbCassandraConsistencyLevelValues enum definition\n *\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL = 'all';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = 'each_quorum';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = 'quorum';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = 'local_quorum';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE = 'one';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO = 'two';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE = 'three';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = 'local_one';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY = 'any';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = 'serial';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = 'local_serial';\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_ALL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_TWO = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_THREE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_ANY = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL;\n/**\n * The constant map of values for DbCassandraConsistencyLevelValues.\n * @deprecated Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification.\n */\nexport var DbCassandraConsistencyLevelValues = \n/*#__PURE__*/ createConstMap([\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasTriggerValues enum definition\n *\n * Type of the trigger on which the function is executed.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_FAASTRIGGERVALUES_DATASOURCE = 'datasource';\nvar TMP_FAASTRIGGERVALUES_HTTP = 'http';\nvar TMP_FAASTRIGGERVALUES_PUBSUB = 'pubsub';\nvar TMP_FAASTRIGGERVALUES_TIMER = 'timer';\nvar TMP_FAASTRIGGERVALUES_OTHER = 'other';\n/**\n * Type of the trigger on which the function is executed.\n */\nexport var FAASTRIGGERVALUES_DATASOURCE = TMP_FAASTRIGGERVALUES_DATASOURCE;\n/**\n * Type of the trigger on which the function is executed.\n */\nexport var FAASTRIGGERVALUES_HTTP = TMP_FAASTRIGGERVALUES_HTTP;\n/**\n * Type of the trigger on which the function is executed.\n */\nexport var FAASTRIGGERVALUES_PUBSUB = TMP_FAASTRIGGERVALUES_PUBSUB;\n/**\n * Type of the trigger on which the function is executed.\n */\nexport var FAASTRIGGERVALUES_TIMER = TMP_FAASTRIGGERVALUES_TIMER;\n/**\n * Type of the trigger on which the function is executed.\n */\nexport var FAASTRIGGERVALUES_OTHER = TMP_FAASTRIGGERVALUES_OTHER;\n/**\n * The constant map of values for FaasTriggerValues.\n * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification.\n */\nexport var FaasTriggerValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASTRIGGERVALUES_DATASOURCE,\n TMP_FAASTRIGGERVALUES_HTTP,\n TMP_FAASTRIGGERVALUES_PUBSUB,\n TMP_FAASTRIGGERVALUES_TIMER,\n TMP_FAASTRIGGERVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasDocumentOperationValues enum definition\n *\n * Describes the type of the operation that was performed on the data.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_FAASDOCUMENTOPERATIONVALUES_INSERT = 'insert';\nvar TMP_FAASDOCUMENTOPERATIONVALUES_EDIT = 'edit';\nvar TMP_FAASDOCUMENTOPERATIONVALUES_DELETE = 'delete';\n/**\n * Describes the type of the operation that was performed on the data.\n */\nexport var FAASDOCUMENTOPERATIONVALUES_INSERT = TMP_FAASDOCUMENTOPERATIONVALUES_INSERT;\n/**\n * Describes the type of the operation that was performed on the data.\n */\nexport var FAASDOCUMENTOPERATIONVALUES_EDIT = TMP_FAASDOCUMENTOPERATIONVALUES_EDIT;\n/**\n * Describes the type of the operation that was performed on the data.\n */\nexport var FAASDOCUMENTOPERATIONVALUES_DELETE = TMP_FAASDOCUMENTOPERATIONVALUES_DELETE;\n/**\n * The constant map of values for FaasDocumentOperationValues.\n * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification.\n */\nexport var FaasDocumentOperationValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASDOCUMENTOPERATIONVALUES_INSERT,\n TMP_FAASDOCUMENTOPERATIONVALUES_EDIT,\n TMP_FAASDOCUMENTOPERATIONVALUES_DELETE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasInvokedProviderValues enum definition\n *\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nvar TMP_FAASINVOKEDPROVIDERVALUES_AWS = 'aws';\nvar TMP_FAASINVOKEDPROVIDERVALUES_AZURE = 'azure';\nvar TMP_FAASINVOKEDPROVIDERVALUES_GCP = 'gcp';\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\nexport var FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\nexport var FAASINVOKEDPROVIDERVALUES_AWS = TMP_FAASINVOKEDPROVIDERVALUES_AWS;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\nexport var FAASINVOKEDPROVIDERVALUES_AZURE = TMP_FAASINVOKEDPROVIDERVALUES_AZURE;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n */\nexport var FAASINVOKEDPROVIDERVALUES_GCP = TMP_FAASINVOKEDPROVIDERVALUES_GCP;\n/**\n * The constant map of values for FaasInvokedProviderValues.\n * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification.\n */\nexport var FaasInvokedProviderValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_FAASINVOKEDPROVIDERVALUES_AWS,\n TMP_FAASINVOKEDPROVIDERVALUES_AZURE,\n TMP_FAASINVOKEDPROVIDERVALUES_GCP,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetTransportValues enum definition\n *\n * Transport protocol used. See note below.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_NETTRANSPORTVALUES_IP_TCP = 'ip_tcp';\nvar TMP_NETTRANSPORTVALUES_IP_UDP = 'ip_udp';\nvar TMP_NETTRANSPORTVALUES_IP = 'ip';\nvar TMP_NETTRANSPORTVALUES_UNIX = 'unix';\nvar TMP_NETTRANSPORTVALUES_PIPE = 'pipe';\nvar TMP_NETTRANSPORTVALUES_INPROC = 'inproc';\nvar TMP_NETTRANSPORTVALUES_OTHER = 'other';\n/**\n * Transport protocol used. See note below.\n */\nexport var NETTRANSPORTVALUES_IP_TCP = TMP_NETTRANSPORTVALUES_IP_TCP;\n/**\n * Transport protocol used. See note below.\n */\nexport var NETTRANSPORTVALUES_IP_UDP = TMP_NETTRANSPORTVALUES_IP_UDP;\n/**\n * Transport protocol used. See note below.\n */\nexport var NETTRANSPORTVALUES_IP = TMP_NETTRANSPORTVALUES_IP;\n/**\n * Transport protocol used. See note below.\n */\nexport var NETTRANSPORTVALUES_UNIX = TMP_NETTRANSPORTVALUES_UNIX;\n/**\n * Transport protocol used. See note below.\n */\nexport var NETTRANSPORTVALUES_PIPE = TMP_NETTRANSPORTVALUES_PIPE;\n/**\n * Transport protocol used. See note below.\n */\nexport var NETTRANSPORTVALUES_INPROC = TMP_NETTRANSPORTVALUES_INPROC;\n/**\n * Transport protocol used. See note below.\n */\nexport var NETTRANSPORTVALUES_OTHER = TMP_NETTRANSPORTVALUES_OTHER;\n/**\n * The constant map of values for NetTransportValues.\n * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification.\n */\nexport var NetTransportValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETTRANSPORTVALUES_IP_TCP,\n TMP_NETTRANSPORTVALUES_IP_UDP,\n TMP_NETTRANSPORTVALUES_IP,\n TMP_NETTRANSPORTVALUES_UNIX,\n TMP_NETTRANSPORTVALUES_PIPE,\n TMP_NETTRANSPORTVALUES_INPROC,\n TMP_NETTRANSPORTVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionTypeValues enum definition\n *\n * The internet connection type currently being used by the host.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI = 'wifi';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED = 'wired';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_CELL = 'cell';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = 'unavailable';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = 'unknown';\n/**\n * The internet connection type currently being used by the host.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_WIFI = TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI;\n/**\n * The internet connection type currently being used by the host.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_WIRED = TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED;\n/**\n * The internet connection type currently being used by the host.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_CELL = TMP_NETHOSTCONNECTIONTYPEVALUES_CELL;\n/**\n * The internet connection type currently being used by the host.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE;\n/**\n * The internet connection type currently being used by the host.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN;\n/**\n * The constant map of values for NetHostConnectionTypeValues.\n * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification.\n */\nexport var NetHostConnectionTypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI,\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED,\n TMP_NETHOSTCONNECTIONTYPEVALUES_CELL,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionSubtypeValues enum definition\n *\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = 'gprs';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = 'edge';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = 'umts';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = 'cdma';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = 'evdo_0';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = 'evdo_a';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = 'cdma2000_1xrtt';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = 'hsdpa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = 'hsupa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = 'hspa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = 'iden';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = 'evdo_b';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE = 'lte';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = 'ehrpd';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = 'hspap';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM = 'gsm';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = 'td_scdma';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = 'iwlan';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR = 'nr';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = 'nrnsa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = 'lte_ca';\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_LTE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_GSM = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_NR = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA;\n/**\n * The constant map of values for NetHostConnectionSubtypeValues.\n * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification.\n */\nexport var NetHostConnectionSubtypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HttpFlavorValues enum definition\n *\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_HTTPFLAVORVALUES_HTTP_1_0 = '1.0';\nvar TMP_HTTPFLAVORVALUES_HTTP_1_1 = '1.1';\nvar TMP_HTTPFLAVORVALUES_HTTP_2_0 = '2.0';\nvar TMP_HTTPFLAVORVALUES_SPDY = 'SPDY';\nvar TMP_HTTPFLAVORVALUES_QUIC = 'QUIC';\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\nexport var HTTPFLAVORVALUES_HTTP_1_0 = TMP_HTTPFLAVORVALUES_HTTP_1_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\nexport var HTTPFLAVORVALUES_HTTP_1_1 = TMP_HTTPFLAVORVALUES_HTTP_1_1;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\nexport var HTTPFLAVORVALUES_HTTP_2_0 = TMP_HTTPFLAVORVALUES_HTTP_2_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\nexport var HTTPFLAVORVALUES_SPDY = TMP_HTTPFLAVORVALUES_SPDY;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n */\nexport var HTTPFLAVORVALUES_QUIC = TMP_HTTPFLAVORVALUES_QUIC;\n/**\n * The constant map of values for HttpFlavorValues.\n * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification.\n */\nexport var HttpFlavorValues = {\n HTTP_1_0: TMP_HTTPFLAVORVALUES_HTTP_1_0,\n HTTP_1_1: TMP_HTTPFLAVORVALUES_HTTP_1_1,\n HTTP_2_0: TMP_HTTPFLAVORVALUES_HTTP_2_0,\n SPDY: TMP_HTTPFLAVORVALUES_SPDY,\n QUIC: TMP_HTTPFLAVORVALUES_QUIC,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingDestinationKindValues enum definition\n *\n * The kind of message destination.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE = 'queue';\nvar TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC = 'topic';\n/**\n * The kind of message destination.\n */\nexport var MESSAGINGDESTINATIONKINDVALUES_QUEUE = TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE;\n/**\n * The kind of message destination.\n */\nexport var MESSAGINGDESTINATIONKINDVALUES_TOPIC = TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC;\n/**\n * The constant map of values for MessagingDestinationKindValues.\n * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification.\n */\nexport var MessagingDestinationKindValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE,\n TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingOperationValues enum definition\n *\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_MESSAGINGOPERATIONVALUES_RECEIVE = 'receive';\nvar TMP_MESSAGINGOPERATIONVALUES_PROCESS = 'process';\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\nexport var MESSAGINGOPERATIONVALUES_RECEIVE = TMP_MESSAGINGOPERATIONVALUES_RECEIVE;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n */\nexport var MESSAGINGOPERATIONVALUES_PROCESS = TMP_MESSAGINGOPERATIONVALUES_PROCESS;\n/**\n * The constant map of values for MessagingOperationValues.\n * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification.\n */\nexport var MessagingOperationValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGINGOPERATIONVALUES_RECEIVE,\n TMP_MESSAGINGOPERATIONVALUES_PROCESS,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for RpcGrpcStatusCodeValues enum definition\n *\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_RPCGRPCSTATUSCODEVALUES_OK = 0;\nvar TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED = 1;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2;\nvar TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3;\nvar TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4;\nvar TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5;\nvar TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6;\nvar TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7;\nvar TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8;\nvar TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9;\nvar TMP_RPCGRPCSTATUSCODEVALUES_ABORTED = 10;\nvar TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12;\nvar TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL = 13;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14;\nvar TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_OK = TMP_RPCGRPCSTATUSCODEVALUES_OK;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_CANCELLED = TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNKNOWN = TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_NOT_FOUND = TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_ABORTED = TMP_RPCGRPCSTATUSCODEVALUES_ABORTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_INTERNAL = TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_DATA_LOSS = TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED;\n/**\n * The constant map of values for RpcGrpcStatusCodeValues.\n * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification.\n */\nexport var RpcGrpcStatusCodeValues = {\n OK: TMP_RPCGRPCSTATUSCODEVALUES_OK,\n CANCELLED: TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED,\n UNKNOWN: TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN,\n INVALID_ARGUMENT: TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT,\n DEADLINE_EXCEEDED: TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED,\n NOT_FOUND: TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND,\n ALREADY_EXISTS: TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS,\n PERMISSION_DENIED: TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED,\n RESOURCE_EXHAUSTED: TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED,\n FAILED_PRECONDITION: TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION,\n ABORTED: TMP_RPCGRPCSTATUSCODEVALUES_ABORTED,\n OUT_OF_RANGE: TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE,\n UNIMPLEMENTED: TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED,\n INTERNAL: TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL,\n UNAVAILABLE: TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE,\n DATA_LOSS: TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS,\n UNAUTHENTICATED: TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessageTypeValues enum definition\n *\n * Whether this is a received or sent message.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_MESSAGETYPEVALUES_SENT = 'SENT';\nvar TMP_MESSAGETYPEVALUES_RECEIVED = 'RECEIVED';\n/**\n * Whether this is a received or sent message.\n */\nexport var MESSAGETYPEVALUES_SENT = TMP_MESSAGETYPEVALUES_SENT;\n/**\n * Whether this is a received or sent message.\n */\nexport var MESSAGETYPEVALUES_RECEIVED = TMP_MESSAGETYPEVALUES_RECEIVED;\n/**\n * The constant map of values for MessageTypeValues.\n * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification.\n */\nexport var MessageTypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGETYPEVALUES_SENT,\n TMP_MESSAGETYPEVALUES_RECEIVED,\n]);\n//# sourceMappingURL=SemanticAttributes.js.map","/*\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 { createConstMap } from '../internal/utils';\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticResourceAttributes\n//----------------------------------------------------------------------------------------------------------\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_CLOUD_PROVIDER = 'cloud.provider';\nvar TMP_CLOUD_ACCOUNT_ID = 'cloud.account.id';\nvar TMP_CLOUD_REGION = 'cloud.region';\nvar TMP_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';\nvar TMP_CLOUD_PLATFORM = 'cloud.platform';\nvar TMP_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn';\nvar TMP_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn';\nvar TMP_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype';\nvar TMP_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn';\nvar TMP_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family';\nvar TMP_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision';\nvar TMP_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn';\nvar TMP_AWS_LOG_GROUP_NAMES = 'aws.log.group.names';\nvar TMP_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns';\nvar TMP_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';\nvar TMP_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns';\nvar TMP_CONTAINER_NAME = 'container.name';\nvar TMP_CONTAINER_ID = 'container.id';\nvar TMP_CONTAINER_RUNTIME = 'container.runtime';\nvar TMP_CONTAINER_IMAGE_NAME = 'container.image.name';\nvar TMP_CONTAINER_IMAGE_TAG = 'container.image.tag';\nvar TMP_DEPLOYMENT_ENVIRONMENT = 'deployment.environment';\nvar TMP_DEVICE_ID = 'device.id';\nvar TMP_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier';\nvar TMP_DEVICE_MODEL_NAME = 'device.model.name';\nvar TMP_FAAS_NAME = 'faas.name';\nvar TMP_FAAS_ID = 'faas.id';\nvar TMP_FAAS_VERSION = 'faas.version';\nvar TMP_FAAS_INSTANCE = 'faas.instance';\nvar TMP_FAAS_MAX_MEMORY = 'faas.max_memory';\nvar TMP_HOST_ID = 'host.id';\nvar TMP_HOST_NAME = 'host.name';\nvar TMP_HOST_TYPE = 'host.type';\nvar TMP_HOST_ARCH = 'host.arch';\nvar TMP_HOST_IMAGE_NAME = 'host.image.name';\nvar TMP_HOST_IMAGE_ID = 'host.image.id';\nvar TMP_HOST_IMAGE_VERSION = 'host.image.version';\nvar TMP_K8S_CLUSTER_NAME = 'k8s.cluster.name';\nvar TMP_K8S_NODE_NAME = 'k8s.node.name';\nvar TMP_K8S_NODE_UID = 'k8s.node.uid';\nvar TMP_K8S_NAMESPACE_NAME = 'k8s.namespace.name';\nvar TMP_K8S_POD_UID = 'k8s.pod.uid';\nvar TMP_K8S_POD_NAME = 'k8s.pod.name';\nvar TMP_K8S_CONTAINER_NAME = 'k8s.container.name';\nvar TMP_K8S_REPLICASET_UID = 'k8s.replicaset.uid';\nvar TMP_K8S_REPLICASET_NAME = 'k8s.replicaset.name';\nvar TMP_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';\nvar TMP_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name';\nvar TMP_K8S_STATEFULSET_UID = 'k8s.statefulset.uid';\nvar TMP_K8S_STATEFULSET_NAME = 'k8s.statefulset.name';\nvar TMP_K8S_DAEMONSET_UID = 'k8s.daemonset.uid';\nvar TMP_K8S_DAEMONSET_NAME = 'k8s.daemonset.name';\nvar TMP_K8S_JOB_UID = 'k8s.job.uid';\nvar TMP_K8S_JOB_NAME = 'k8s.job.name';\nvar TMP_K8S_CRONJOB_UID = 'k8s.cronjob.uid';\nvar TMP_K8S_CRONJOB_NAME = 'k8s.cronjob.name';\nvar TMP_OS_TYPE = 'os.type';\nvar TMP_OS_DESCRIPTION = 'os.description';\nvar TMP_OS_NAME = 'os.name';\nvar TMP_OS_VERSION = 'os.version';\nvar TMP_PROCESS_PID = 'process.pid';\nvar TMP_PROCESS_EXECUTABLE_NAME = 'process.executable.name';\nvar TMP_PROCESS_EXECUTABLE_PATH = 'process.executable.path';\nvar TMP_PROCESS_COMMAND = 'process.command';\nvar TMP_PROCESS_COMMAND_LINE = 'process.command_line';\nvar TMP_PROCESS_COMMAND_ARGS = 'process.command_args';\nvar TMP_PROCESS_OWNER = 'process.owner';\nvar TMP_PROCESS_RUNTIME_NAME = 'process.runtime.name';\nvar TMP_PROCESS_RUNTIME_VERSION = 'process.runtime.version';\nvar TMP_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description';\nvar TMP_SERVICE_NAME = 'service.name';\nvar TMP_SERVICE_NAMESPACE = 'service.namespace';\nvar TMP_SERVICE_INSTANCE_ID = 'service.instance.id';\nvar TMP_SERVICE_VERSION = 'service.version';\nvar TMP_TELEMETRY_SDK_NAME = 'telemetry.sdk.name';\nvar TMP_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';\nvar TMP_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';\nvar TMP_TELEMETRY_AUTO_VERSION = 'telemetry.auto.version';\nvar TMP_WEBENGINE_NAME = 'webengine.name';\nvar TMP_WEBENGINE_VERSION = 'webengine.version';\nvar TMP_WEBENGINE_DESCRIPTION = 'webengine.description';\n/**\n * Name of the cloud provider.\n */\nexport var SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER;\n/**\n * The cloud account ID the resource is assigned to.\n */\nexport var SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID;\n/**\n * The geographical region the resource is running. Refer to your provider'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 */\nexport var SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION;\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 "zones" on Alibaba Cloud and Google Cloud.\n */\nexport var SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM;\n/**\n * The Amazon Resource Name (ARN) of an [ECS container instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html).\n */\nexport var SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN;\n/**\n * The ARN of an [ECS cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html).\n */\nexport var SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN;\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\nexport var SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE;\n/**\n * The ARN of an [ECS task definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html).\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN;\n/**\n * The task definition family this task definition is a member of.\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY;\n/**\n * The revision for this task definition.\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION;\n/**\n * The ARN of an EKS cluster.\n */\nexport var SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN;\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 */\nexport var SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES;\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 */\nexport var SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS;\n/**\n * The name(s) of the AWS log stream(s) an application is writing to.\n */\nexport var SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES;\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 */\nexport var SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS;\n/**\n * Container name.\n */\nexport var SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME;\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 */\nexport var SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID;\n/**\n * The container runtime managing this container.\n */\nexport var SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME;\n/**\n * Name of the image the container was built on.\n */\nexport var SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME;\n/**\n * Container image tag.\n */\nexport var SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG;\n/**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n */\nexport var SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT;\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 */\nexport var SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID;\n/**\n * The model identifier for the device.\n *\n * Note: It'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 */\nexport var SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER;\n/**\n * The marketing name for the device model.\n *\n * Note: It's recommended this value represents a human readable version of the device model rather than a machine readable alternative.\n */\nexport var SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME;\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 */\nexport var SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME;\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 "invoked ARN" 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*/\nexport var SEMRESATTRS_FAAS_ID = TMP_FAAS_ID;\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*/\nexport var SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION;\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 */\nexport var SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE;\n/**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It'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 */\nexport var SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY;\n/**\n * Unique host ID. For Cloud, this must be the instance_id assigned by the cloud provider.\n */\nexport var SEMRESATTRS_HOST_ID = TMP_HOST_ID;\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 */\nexport var SEMRESATTRS_HOST_NAME = TMP_HOST_NAME;\n/**\n * Type of host. For Cloud, this must be the machine type.\n */\nexport var SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE;\n/**\n * The CPU architecture the host system is running on.\n */\nexport var SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH;\n/**\n * Name of the VM image or OS install the host was instantiated from.\n */\nexport var SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME;\n/**\n * VM image ID. For Cloud, this value is from the provider.\n */\nexport var SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID;\n/**\n * The version string of the VM image as defined in [Version Attributes](README.md#version-attributes).\n */\nexport var SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION;\n/**\n * The name of the cluster.\n */\nexport var SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME;\n/**\n * The name of the Node.\n */\nexport var SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME;\n/**\n * The UID of the Node.\n */\nexport var SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID;\n/**\n * The name of the namespace that the pod is running in.\n */\nexport var SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME;\n/**\n * The UID of the Pod.\n */\nexport var SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID;\n/**\n * The name of the Pod.\n */\nexport var SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME;\n/**\n * The name of the Container in a Pod template.\n */\nexport var SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME;\n/**\n * The UID of the ReplicaSet.\n */\nexport var SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID;\n/**\n * The name of the ReplicaSet.\n */\nexport var SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME;\n/**\n * The UID of the Deployment.\n */\nexport var SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID;\n/**\n * The name of the Deployment.\n */\nexport var SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME;\n/**\n * The UID of the StatefulSet.\n */\nexport var SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID;\n/**\n * The name of the StatefulSet.\n */\nexport var SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME;\n/**\n * The UID of the DaemonSet.\n */\nexport var SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID;\n/**\n * The name of the DaemonSet.\n */\nexport var SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME;\n/**\n * The UID of the Job.\n */\nexport var SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID;\n/**\n * The name of the Job.\n */\nexport var SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME;\n/**\n * The UID of the CronJob.\n */\nexport var SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID;\n/**\n * The name of the CronJob.\n */\nexport var SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME;\n/**\n * The operating system type.\n */\nexport var SEMRESATTRS_OS_TYPE = TMP_OS_TYPE;\n/**\n * Human readable (not intended to be parsed) OS version information, like e.g. reported by `ver` or `lsb_release -a` commands.\n */\nexport var SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION;\n/**\n * Human readable operating system name.\n */\nexport var SEMRESATTRS_OS_NAME = TMP_OS_NAME;\n/**\n * The version string of the operating system as defined in [Version Attributes](../../resource/semantic_conventions/README.md#version-attributes).\n */\nexport var SEMRESATTRS_OS_VERSION = TMP_OS_VERSION;\n/**\n * Process identifier (PID).\n */\nexport var SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID;\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 */\nexport var SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME;\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 */\nexport var SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH;\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 */\nexport var SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND;\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 */\nexport var SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE;\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 */\nexport var SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS;\n/**\n * The username of the user that owns the process.\n */\nexport var SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER;\n/**\n * The name of the runtime of this process. For compiled native binaries, this SHOULD be the name of the compiler.\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME;\n/**\n * The version of the runtime of this process, as returned by the runtime without modification.\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION;\n/**\n * An additional description about the runtime of the process, for example a specific vendor customization of the runtime environment.\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = TMP_PROCESS_RUNTIME_DESCRIPTION;\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 */\nexport var SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME;\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 */\nexport var SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE;\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 */\nexport var SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID;\n/**\n * The version string of the service API or implementation.\n */\nexport var SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION;\n/**\n * The name of the telemetry SDK as defined above.\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME;\n/**\n * The language of the telemetry SDK.\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE;\n/**\n * The version string of the telemetry SDK.\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION;\n/**\n * The version string of the auto instrumentation agent, if used.\n */\nexport var SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION;\n/**\n * The name of the web engine.\n */\nexport var SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME;\n/**\n * The version of the web engine.\n */\nexport var SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION;\n/**\n * Additional description of the web engine (e.g. detailed version and edition information).\n */\nexport var SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION;\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 var SemanticResourceAttributes = \n/*#__PURE__*/ createConstMap([\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 * Constant values for CloudProviderValues enum definition\n *\n * Name of the cloud provider.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nvar TMP_CLOUDPROVIDERVALUES_AWS = 'aws';\nvar TMP_CLOUDPROVIDERVALUES_AZURE = 'azure';\nvar TMP_CLOUDPROVIDERVALUES_GCP = 'gcp';\n/**\n * Name of the cloud provider.\n */\nexport var CLOUDPROVIDERVALUES_ALIBABA_CLOUD = TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * Name of the cloud provider.\n */\nexport var CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS;\n/**\n * Name of the cloud provider.\n */\nexport var CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE;\n/**\n * Name of the cloud provider.\n */\nexport var CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP;\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 var CloudProviderValues = \n/*#__PURE__*/ createConstMap([\n TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_CLOUDPROVIDERVALUES_AWS,\n TMP_CLOUDPROVIDERVALUES_AZURE,\n TMP_CLOUDPROVIDERVALUES_GCP,\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// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs';\nvar TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc';\nvar TMP_CLOUDPLATFORMVALUES_AWS_EC2 = 'aws_ec2';\nvar TMP_CLOUDPLATFORMVALUES_AWS_ECS = 'aws_ecs';\nvar TMP_CLOUDPLATFORMVALUES_AWS_EKS = 'aws_eks';\nvar TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = 'aws_lambda';\nvar TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = 'aws_elastic_beanstalk';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_VM = 'azure_vm';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = 'azure_container_instances';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_AKS = 'azure_aks';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = 'azure_functions';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = 'azure_app_service';\nvar TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine';\nvar TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run';\nvar TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = 'gcp_kubernetes_engine';\nvar TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions';\nvar TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine';\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AWS_LAMBDA = TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS;\n/**\n * The cloud platform in use.\n *\n * Note: The prefix of the service SHOULD match the one specified in `cloud.provider`.\n */\nexport var CLOUDPLATFORMVALUES_GCP_APP_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE;\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 var CloudPlatformValues = \n/*#__PURE__*/ createConstMap([\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 * 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// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2';\nvar TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate';\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\nexport var AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2;\n/**\n * The [launch type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) for an ECS task.\n */\nexport var AWSECSLAUNCHTYPEVALUES_FARGATE = TMP_AWSECSLAUNCHTYPEVALUES_FARGATE;\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 var AwsEcsLaunchtypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_AWSECSLAUNCHTYPEVALUES_EC2,\n TMP_AWSECSLAUNCHTYPEVALUES_FARGATE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HostArchValues enum definition\n *\n * The CPU architecture the host system is running on.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_HOSTARCHVALUES_AMD64 = 'amd64';\nvar TMP_HOSTARCHVALUES_ARM32 = 'arm32';\nvar TMP_HOSTARCHVALUES_ARM64 = 'arm64';\nvar TMP_HOSTARCHVALUES_IA64 = 'ia64';\nvar TMP_HOSTARCHVALUES_PPC32 = 'ppc32';\nvar TMP_HOSTARCHVALUES_PPC64 = 'ppc64';\nvar TMP_HOSTARCHVALUES_X86 = 'x86';\n/**\n * The CPU architecture the host system is running on.\n */\nexport var HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64;\n/**\n * The CPU architecture the host system is running on.\n */\nexport var HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32;\n/**\n * The CPU architecture the host system is running on.\n */\nexport var HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64;\n/**\n * The CPU architecture the host system is running on.\n */\nexport var HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64;\n/**\n * The CPU architecture the host system is running on.\n */\nexport var HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32;\n/**\n * The CPU architecture the host system is running on.\n */\nexport var HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64;\n/**\n * The CPU architecture the host system is running on.\n */\nexport var HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86;\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 var HostArchValues = \n/*#__PURE__*/ createConstMap([\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 * Constant values for OsTypeValues enum definition\n *\n * The operating system type.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_OSTYPEVALUES_WINDOWS = 'windows';\nvar TMP_OSTYPEVALUES_LINUX = 'linux';\nvar TMP_OSTYPEVALUES_DARWIN = 'darwin';\nvar TMP_OSTYPEVALUES_FREEBSD = 'freebsd';\nvar TMP_OSTYPEVALUES_NETBSD = 'netbsd';\nvar TMP_OSTYPEVALUES_OPENBSD = 'openbsd';\nvar TMP_OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd';\nvar TMP_OSTYPEVALUES_HPUX = 'hpux';\nvar TMP_OSTYPEVALUES_AIX = 'aix';\nvar TMP_OSTYPEVALUES_SOLARIS = 'solaris';\nvar TMP_OSTYPEVALUES_Z_OS = 'z_os';\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS;\n/**\n * The operating system type.\n */\nexport var OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS;\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 var OsTypeValues = \n/*#__PURE__*/ createConstMap([\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 * Constant values for TelemetrySdkLanguageValues enum definition\n *\n * The language of the telemetry SDK.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifable export names for some package types\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_GO = 'go';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = 'php';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs';\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_CPP = TMP_TELEMETRYSDKLANGUAGEVALUES_CPP;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_DOTNET = TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_ERLANG = TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_JAVA = TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_NODEJS = TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_PHP = TMP_TELEMETRYSDKLANGUAGEVALUES_PHP;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_PYTHON = TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_RUBY = TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY;\n/**\n * The language of the telemetry SDK.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_WEBJS = TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS;\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 var TelemetrySdkLanguageValues = \n/*#__PURE__*/ createConstMap([\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//# sourceMappingURL=SemanticResourceAttributes.js.map","/*\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 */\nvar _a;\nimport { VERSION } from '../../version';\nimport { TelemetrySdkLanguageValues, SemanticResourceAttributes, } from '@opentelemetry/semantic-conventions';\n/** Constants describing the SDK in use */\nexport var SDK_INFO = (_a = {},\n _a[SemanticResourceAttributes.TELEMETRY_SDK_NAME] = 'opentelemetry',\n _a[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = 'browser',\n _a[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = TelemetrySdkLanguageValues.WEBJS,\n _a[SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = VERSION,\n _a);\n//# sourceMappingURL=sdk-info.js.map","/*\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 { otperformance as performance } from '../platform';\nvar NANOSECOND_DIGITS = 9;\nvar NANOSECOND_DIGITS_IN_MILLIS = 6;\nvar MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);\nvar SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).\n * @param epochMillis\n */\nexport function millisToHrTime(epochMillis) {\n var epochSeconds = epochMillis / 1000;\n // Decimals only.\n var seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n var nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);\n return [seconds, nanos];\n}\nexport function getTimeOrigin() {\n var timeOrigin = performance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n var perf = performance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nexport function hrTime(performanceNow) {\n var timeOrigin = millisToHrTime(getTimeOrigin());\n var now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : performance.now());\n return addHrTimes(timeOrigin, now);\n}\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nexport function timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\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 }\n else {\n // epoch milliseconds or performance.timeOrigin\n return millisToHrTime(time);\n }\n }\n else if (time instanceof Date) {\n return millisToHrTime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nexport function hrTimeDuration(startTime, endTime) {\n var seconds = endTime[0] - startTime[0];\n var nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nexport function hrTimeToTimeStamp(time) {\n var precision = NANOSECOND_DIGITS;\n var tmp = \"\" + '0'.repeat(precision) + time[1] + \"Z\";\n var nanoString = tmp.substr(tmp.length - precision - 1);\n var date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nexport function hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nexport function hrTimeToMilliseconds(time) {\n return time[0] * 1e3 + time[1] / 1e6;\n}\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nexport function hrTimeToMicroseconds(time) {\n return time[0] * 1e6 + time[1] / 1e3;\n}\n/**\n * check if time is HrTime\n * @param value\n */\nexport function isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nexport function isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\n/**\n * Given 2 HrTime formatted times, return their sum as an HrTime.\n */\nexport function addHrTimes(time1, time2) {\n var out = [time1[0] + time2[0], time1[1] + time2[1]];\n // Nanoseconds\n if (out[1] >= SECOND_TO_NANOSECONDS) {\n out[1] -= SECOND_TO_NANOSECONDS;\n out[0] += 1;\n }\n return out;\n}\n//# sourceMappingURL=time.js.map","/*\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 var ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode || (ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","/*\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 { isSpanContextValid, trace, TraceFlags, } from '@opentelemetry/api';\nimport { isTracingSuppressed } from './suppress-tracing';\nimport { TraceState } from './TraceState';\nexport var TRACE_PARENT_HEADER = 'traceparent';\nexport var TRACE_STATE_HEADER = 'tracestate';\nvar VERSION = '00';\nvar VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nvar TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nvar PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nvar FLAGS_PART = '[\\\\da-f]{2}';\nvar TRACE_PARENT_REGEX = new RegExp(\"^\\\\s?(\" + VERSION_PART + \")-(\" + TRACE_ID_PART + \")-(\" + PARENT_ID_PART + \")-(\" + FLAGS_PART + \")(-.*)?\\\\s?$\");\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nexport function parseTraceParent(traceParent) {\n var match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nvar W3CTraceContextPropagator = /** @class */ (function () {\n function W3CTraceContextPropagator() {\n }\n W3CTraceContextPropagator.prototype.inject = function (context, carrier, setter) {\n var spanContext = trace.getSpanContext(context);\n if (!spanContext ||\n isTracingSuppressed(context) ||\n !isSpanContextValid(spanContext))\n return;\n var traceParent = VERSION + \"-\" + spanContext.traceId + \"-\" + spanContext.spanId + \"-0\" + Number(spanContext.traceFlags || TraceFlags.NONE).toString(16);\n setter.set(carrier, TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n };\n W3CTraceContextPropagator.prototype.extract = function (context, carrier, getter) {\n var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n var traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n var spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n var state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState(typeof state === 'string' ? state : undefined);\n }\n return trace.setSpanContext(context, spanContext);\n };\n W3CTraceContextPropagator.prototype.fields = function () {\n return [TRACE_PARENT_HEADER, TRACE_STATE_HEADER];\n };\n return W3CTraceContextPropagator;\n}());\nexport { W3CTraceContextPropagator };\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","/*\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/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nvar objectTag = '[object Object]';\nvar nullTag = '[object Null]';\nvar undefinedTag = '[object Undefined]';\nvar funcProto = Function.prototype;\nvar funcToString = funcProto.toString;\nvar objectCtorString = funcToString.call(Object);\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\nvar objectProto = Object.prototype;\nvar hasOwnProperty = objectProto.hasOwnProperty;\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nvar nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\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) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString);\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) {\n return value != null && typeof value == 'object';\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) {\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 * 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) {\n var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n var unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\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) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","/*\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/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isPlainObject } from './lodash.merge';\nvar MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var result = args.shift();\n var objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\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(one, two, level, objects) {\n if (level === void 0) { level = 0; }\n var result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (var i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n var keys = Object.keys(two);\n for (var i = 0, j = keys.length; i < j; i++) {\n var key = keys[i];\n result[key] = takeValue(two[key]);\n }\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 var keys = Object.keys(two);\n for (var i = 0, j = keys.length; i < j; i++) {\n var key = keys[i];\n var twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n var obj1 = result[key];\n var obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n var arr1 = objects.get(obj1) || [];\n var arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key: key });\n arr2.push({ obj: two, key: key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n var arr = objects.get(obj[key]) || [];\n for (var i = 0, j = arr.length; i < j; i++) {\n var info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return (!isPrimitive(value) &&\n !isArray(value) &&\n !isFunction(value) &&\n typeof value === 'object');\n}\nfunction isPrimitive(value) {\n return (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}\nfunction shouldMerge(one, two) {\n if (!isPlainObject(one) || !isPlainObject(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Error that is thrown on timeouts.\n */\nvar TimeoutError = /** @class */ (function (_super) {\n __extends(TimeoutError, _super);\n function TimeoutError(message) {\n var _this = _super.call(this, message) || this;\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 return _this;\n }\n return TimeoutError;\n}(Error));\nexport { TimeoutError };\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 *

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(promise, timeout) {\n var timeoutHandle;\n var timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {\n timeoutHandle = setTimeout(function timeoutHandler() {\n reject(new TimeoutError('Operation timed out.'));\n }, timeout);\n });\n return Promise.race([promise, timeoutPromise]).then(function (result) {\n clearTimeout(timeoutHandle);\n return result;\n }, function (reason) {\n clearTimeout(timeoutHandle);\n throw reason;\n });\n}\n//# sourceMappingURL=timeout.js.map","var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\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 urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nexport function isUrlIgnored(url, ignoredUrls) {\n var e_1, _a;\n if (!ignoredUrls) {\n return false;\n }\n try {\n for (var ignoredUrls_1 = __values(ignoredUrls), ignoredUrls_1_1 = ignoredUrls_1.next(); !ignoredUrls_1_1.done; ignoredUrls_1_1 = ignoredUrls_1.next()) {\n var ignoreUrl = ignoredUrls_1_1.value;\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (ignoredUrls_1_1 && !ignoredUrls_1_1.done && (_a = ignoredUrls_1.return)) _a.call(ignoredUrls_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return false;\n}\n//# sourceMappingURL=url.js.map","/*\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 */\nvar Deferred = /** @class */ (function () {\n function Deferred() {\n var _this = this;\n this._promise = new Promise(function (resolve, reject) {\n _this._resolve = resolve;\n _this._reject = reject;\n });\n }\n Object.defineProperty(Deferred.prototype, \"promise\", {\n get: function () {\n return this._promise;\n },\n enumerable: false,\n configurable: true\n });\n Deferred.prototype.resolve = function (val) {\n this._resolve(val);\n };\n Deferred.prototype.reject = function (err) {\n this._reject(err);\n };\n return Deferred;\n}());\nexport { Deferred };\n//# sourceMappingURL=promise.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { Deferred } from './promise';\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nvar BindOnceFuture = /** @class */ (function () {\n function BindOnceFuture(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new Deferred();\n }\n Object.defineProperty(BindOnceFuture.prototype, \"isCalled\", {\n get: function () {\n return this._isCalled;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindOnceFuture.prototype, \"promise\", {\n get: function () {\n return this._deferred.promise;\n },\n enumerable: false,\n configurable: true\n });\n BindOnceFuture.prototype.call = function () {\n var _a;\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve((_a = this._callback).call.apply(_a, __spreadArray([this._that], __read(args), false))).then(function (val) { return _this._deferred.resolve(val); }, function (err) { return _this._deferred.reject(err); });\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n };\n return BindOnceFuture;\n}());\nexport { BindOnceFuture };\n//# sourceMappingURL=callback.js.map","/*\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 { context } from '@opentelemetry/api';\nimport { suppressTracing } from '../trace/suppress-tracing';\n/**\n * @internal\n * Shared functionality used by Exporters while exporting data, including suppresion of Traces.\n */\nexport function _export(exporter, arg) {\n return new Promise(function (resolve) {\n // prevent downstream exporter calls from generating spans\n context.with(suppressTracing(context.active()), function () {\n exporter.export(arg, function (result) {\n resolve(result);\n });\n });\n });\n}\n//# sourceMappingURL=exporter.js.map","/*\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 * from './baggage/propagation/W3CBaggagePropagator';\nexport * from './common/anchored-clock';\nexport * from './common/attributes';\nexport * from './common/global-error-handler';\nexport * from './common/logging-error-handler';\nexport * from './common/time';\nexport * from './common/types';\nexport * from './common/hex-to-binary';\nexport * from './ExportResult';\nimport * as baggageUtils_1 from './baggage/utils';\nexport { baggageUtils_1 as baggageUtils };\nexport * from './platform';\nexport * from './propagation/composite';\nexport * from './trace/W3CTraceContextPropagator';\nexport * from './trace/IdGenerator';\nexport * from './trace/rpc-metadata';\nexport * from './trace/sampler/AlwaysOffSampler';\nexport * from './trace/sampler/AlwaysOnSampler';\nexport * from './trace/sampler/ParentBasedSampler';\nexport * from './trace/sampler/TraceIdRatioBasedSampler';\nexport * from './trace/suppress-tracing';\nexport * from './trace/TraceState';\nexport * from './utils/environment';\nexport * from './utils/merge';\nexport * from './utils/sampling';\nexport * from './utils/timeout';\nexport * from './utils/url';\nexport * from './utils/wrap';\nexport * from './utils/callback';\nexport * from './version';\nimport { _export } from './internal/exporter';\nexport var internal = {\n _export: _export,\n};\n//# sourceMappingURL=index.js.map","/*\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 * AggregationTemporality indicates the way additive quantities are expressed.\n */\nexport var AggregationTemporality;\n(function (AggregationTemporality) {\n AggregationTemporality[AggregationTemporality[\"DELTA\"] = 0] = \"DELTA\";\n AggregationTemporality[AggregationTemporality[\"CUMULATIVE\"] = 1] = \"CUMULATIVE\";\n})(AggregationTemporality || (AggregationTemporality = {}));\n//# sourceMappingURL=AggregationTemporality.js.map","/*\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 * The aggregated point data type.\n */\nexport var DataPointType;\n(function (DataPointType) {\n /**\n * A histogram data point contains a histogram statistics of collected\n * values with a list of explicit bucket boundaries and statistics such\n * as min, max, count, and sum of all collected values.\n */\n DataPointType[DataPointType[\"HISTOGRAM\"] = 0] = \"HISTOGRAM\";\n /**\n * An exponential histogram data point contains a histogram statistics of\n * collected values where bucket boundaries are automatically calculated\n * using an exponential function, and statistics such as min, max, count,\n * and sum of all collected values.\n */\n DataPointType[DataPointType[\"EXPONENTIAL_HISTOGRAM\"] = 1] = \"EXPONENTIAL_HISTOGRAM\";\n /**\n * A gauge metric data point has only a single numeric value.\n */\n DataPointType[DataPointType[\"GAUGE\"] = 2] = \"GAUGE\";\n /**\n * A sum metric data point has a single numeric value and a\n * monotonicity-indicator.\n */\n DataPointType[DataPointType[\"SUM\"] = 3] = \"SUM\";\n})(DataPointType || (DataPointType = {}));\n//# sourceMappingURL=MetricData.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nexport function isNotNullish(item) {\n return item !== undefined && item !== null;\n}\n/**\n * Converting the unordered attributes into unique identifier string.\n * @param attributes user provided unordered MetricAttributes.\n */\nexport function hashAttributes(attributes) {\n var keys = Object.keys(attributes);\n if (keys.length === 0)\n return '';\n // Return a string that is stable on key orders.\n keys = keys.sort();\n return JSON.stringify(keys.map(function (key) { return [key, attributes[key]]; }));\n}\n/**\n * Converting the instrumentation scope object to a unique identifier string.\n * @param instrumentationScope\n */\nexport function instrumentationScopeId(instrumentationScope) {\n var _a, _b;\n return instrumentationScope.name + \":\" + ((_a = instrumentationScope.version) !== null && _a !== void 0 ? _a : '') + \":\" + ((_b = instrumentationScope.schemaUrl) !== null && _b !== void 0 ? _b : '');\n}\n/**\n * Error that is thrown on timeouts.\n */\nvar TimeoutError = /** @class */ (function (_super) {\n __extends(TimeoutError, _super);\n function TimeoutError(message) {\n var _this = _super.call(this, message) || this;\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 return _this;\n }\n return TimeoutError;\n}(Error));\nexport { TimeoutError };\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 *

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(promise, timeout) {\n var timeoutHandle;\n var timeoutPromise = new Promise(function timeoutFunction(_resolve, reject) {\n timeoutHandle = setTimeout(function timeoutHandler() {\n reject(new TimeoutError('Operation timed out.'));\n }, timeout);\n });\n return Promise.race([promise, timeoutPromise]).then(function (result) {\n clearTimeout(timeoutHandle);\n return result;\n }, function (reason) {\n clearTimeout(timeoutHandle);\n throw reason;\n });\n}\n/**\n * Node.js v12.9 lower and browser compatible `Promise.allSettled`.\n */\nexport function PromiseAllSettled(promises) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, Promise.all(promises.map(function (p) { return __awaiter(_this, void 0, void 0, function () {\n var ret, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, p];\n case 1:\n ret = _a.sent();\n return [2 /*return*/, {\n status: 'fulfilled',\n value: ret,\n }];\n case 2:\n e_1 = _a.sent();\n return [2 /*return*/, {\n status: 'rejected',\n reason: e_1,\n }];\n case 3: return [2 /*return*/];\n }\n });\n }); }))];\n });\n });\n}\nexport function isPromiseAllSettledRejectionResult(it) {\n return it.status === 'rejected';\n}\n/**\n * Node.js v11.0 lower and browser compatible `Array.prototype.flatMap`.\n */\nexport function FlatMap(arr, fn) {\n var result = [];\n arr.forEach(function (it) {\n result.push.apply(result, __spreadArray([], __read(fn(it)), false));\n });\n return result;\n}\nexport function setEquals(lhs, rhs) {\n var e_2, _a;\n if (lhs.size !== rhs.size) {\n return false;\n }\n try {\n for (var lhs_1 = __values(lhs), lhs_1_1 = lhs_1.next(); !lhs_1_1.done; lhs_1_1 = lhs_1.next()) {\n var item = lhs_1_1.value;\n if (!rhs.has(item)) {\n return false;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (lhs_1_1 && !lhs_1_1.done && (_a = lhs_1.return)) _a.call(lhs_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return true;\n}\n/**\n * Binary search the sorted array to the find lower bound for the value.\n * @param arr\n * @param value\n * @returns\n */\nexport function binarySearchLB(arr, value) {\n var lo = 0;\n var hi = arr.length - 1;\n while (hi - lo > 1) {\n var mid = Math.trunc((hi + lo) / 2);\n if (arr[mid] <= value) {\n lo = mid;\n }\n else {\n hi = mid - 1;\n }\n }\n if (arr[hi] <= value) {\n return hi;\n }\n else if (arr[lo] <= value) {\n return lo;\n }\n return -1;\n}\nexport function equalsCaseInsensitive(lhs, rhs) {\n return lhs.toLowerCase() === rhs.toLowerCase();\n}\n//# sourceMappingURL=utils.js.map","/*\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/** The kind of aggregator. */\nexport var AggregatorKind;\n(function (AggregatorKind) {\n AggregatorKind[AggregatorKind[\"DROP\"] = 0] = \"DROP\";\n AggregatorKind[AggregatorKind[\"SUM\"] = 1] = \"SUM\";\n AggregatorKind[AggregatorKind[\"LAST_VALUE\"] = 2] = \"LAST_VALUE\";\n AggregatorKind[AggregatorKind[\"HISTOGRAM\"] = 3] = \"HISTOGRAM\";\n AggregatorKind[AggregatorKind[\"EXPONENTIAL_HISTOGRAM\"] = 4] = \"EXPONENTIAL_HISTOGRAM\";\n})(AggregatorKind || (AggregatorKind = {}));\n//# sourceMappingURL=types.js.map","/*\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 { AggregatorKind } from './types';\n/** Basic aggregator for None which keeps no recorded value. */\nvar DropAggregator = /** @class */ (function () {\n function DropAggregator() {\n this.kind = AggregatorKind.DROP;\n }\n DropAggregator.prototype.createAccumulation = function () {\n return undefined;\n };\n DropAggregator.prototype.merge = function (_previous, _delta) {\n return undefined;\n };\n DropAggregator.prototype.diff = function (_previous, _current) {\n return undefined;\n };\n DropAggregator.prototype.toMetricData = function (_descriptor, _aggregationTemporality, _accumulationByAttributes, _endTime) {\n return undefined;\n };\n return DropAggregator;\n}());\nexport { DropAggregator };\n//# sourceMappingURL=Drop.js.map","/*\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 { ValueType, diag } from '@opentelemetry/api';\nimport { equalsCaseInsensitive } from './utils';\n/**\n * Supported types of metric instruments.\n */\nexport var InstrumentType;\n(function (InstrumentType) {\n InstrumentType[\"COUNTER\"] = \"COUNTER\";\n InstrumentType[\"HISTOGRAM\"] = \"HISTOGRAM\";\n InstrumentType[\"UP_DOWN_COUNTER\"] = \"UP_DOWN_COUNTER\";\n InstrumentType[\"OBSERVABLE_COUNTER\"] = \"OBSERVABLE_COUNTER\";\n InstrumentType[\"OBSERVABLE_GAUGE\"] = \"OBSERVABLE_GAUGE\";\n InstrumentType[\"OBSERVABLE_UP_DOWN_COUNTER\"] = \"OBSERVABLE_UP_DOWN_COUNTER\";\n})(InstrumentType || (InstrumentType = {}));\nexport function createInstrumentDescriptor(name, type, options) {\n var _a, _b, _c, _d;\n if (!isValidName(name)) {\n diag.warn(\"Invalid metric name: \\\"\" + name + \"\\\". The metric name should be a ASCII string with a length no greater than 255 characters.\");\n }\n return {\n name: name,\n type: type,\n description: (_a = options === null || options === void 0 ? void 0 : options.description) !== null && _a !== void 0 ? _a : '',\n unit: (_b = options === null || options === void 0 ? void 0 : options.unit) !== null && _b !== void 0 ? _b : '',\n valueType: (_c = options === null || options === void 0 ? void 0 : options.valueType) !== null && _c !== void 0 ? _c : ValueType.DOUBLE,\n advice: (_d = options === null || options === void 0 ? void 0 : options.advice) !== null && _d !== void 0 ? _d : {},\n };\n}\nexport function createInstrumentDescriptorWithView(view, instrument) {\n var _a, _b;\n return {\n name: (_a = view.name) !== null && _a !== void 0 ? _a : instrument.name,\n description: (_b = view.description) !== null && _b !== void 0 ? _b : instrument.description,\n type: instrument.type,\n unit: instrument.unit,\n valueType: instrument.valueType,\n advice: instrument.advice,\n };\n}\nexport function isDescriptorCompatibleWith(descriptor, otherDescriptor) {\n // Names are case-insensitive strings.\n return (equalsCaseInsensitive(descriptor.name, otherDescriptor.name) &&\n descriptor.unit === otherDescriptor.unit &&\n descriptor.type === otherDescriptor.type &&\n descriptor.valueType === otherDescriptor.valueType);\n}\n// ASCII string with a length no greater than 255 characters.\n// NB: the first character counted separately from the rest.\nvar NAME_REGEXP = /^[a-z][a-z0-9_.\\-/]{0,254}$/i;\nexport function isValidName(name) {\n return name.match(NAME_REGEXP) != null;\n}\n//# sourceMappingURL=InstrumentDescriptor.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { DataPointType, } from '../export/MetricData';\nimport { InstrumentType } from '../InstrumentDescriptor';\nimport { binarySearchLB } from '../utils';\nfunction createNewEmptyCheckpoint(boundaries) {\n var counts = boundaries.map(function () { return 0; });\n counts.push(0);\n return {\n buckets: {\n boundaries: boundaries,\n counts: counts,\n },\n sum: 0,\n count: 0,\n hasMinMax: false,\n min: Infinity,\n max: -Infinity,\n };\n}\nvar HistogramAccumulation = /** @class */ (function () {\n function HistogramAccumulation(startTime, _boundaries, _recordMinMax, _current) {\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n if (_current === void 0) { _current = createNewEmptyCheckpoint(_boundaries); }\n this.startTime = startTime;\n this._boundaries = _boundaries;\n this._recordMinMax = _recordMinMax;\n this._current = _current;\n }\n HistogramAccumulation.prototype.record = function (value) {\n // NaN does not fall into any bucket, is not zero and should not be counted,\n // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do.\n if (Number.isNaN(value)) {\n return;\n }\n this._current.count += 1;\n this._current.sum += value;\n if (this._recordMinMax) {\n this._current.min = Math.min(value, this._current.min);\n this._current.max = Math.max(value, this._current.max);\n this._current.hasMinMax = true;\n }\n var idx = binarySearchLB(this._boundaries, value);\n this._current.buckets.counts[idx + 1] += 1;\n };\n HistogramAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n HistogramAccumulation.prototype.toPointValue = function () {\n return this._current;\n };\n return HistogramAccumulation;\n}());\nexport { HistogramAccumulation };\n/**\n * Basic aggregator which observes events and counts them in pre-defined buckets\n * and provides the total sum and count of all observations.\n */\nvar HistogramAggregator = /** @class */ (function () {\n /**\n * @param _boundaries sorted upper bounds of recorded values.\n * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded.\n */\n function HistogramAggregator(_boundaries, _recordMinMax) {\n this._boundaries = _boundaries;\n this._recordMinMax = _recordMinMax;\n this.kind = AggregatorKind.HISTOGRAM;\n }\n HistogramAggregator.prototype.createAccumulation = function (startTime) {\n return new HistogramAccumulation(startTime, this._boundaries, this._recordMinMax);\n };\n /**\n * Return the result of the merge of two histogram accumulations. As long as one Aggregator\n * instance produces all Accumulations with constant boundaries we don't need to worry about\n * merging accumulations with different boundaries.\n */\n HistogramAggregator.prototype.merge = function (previous, delta) {\n var previousValue = previous.toPointValue();\n var deltaValue = delta.toPointValue();\n var previousCounts = previousValue.buckets.counts;\n var deltaCounts = deltaValue.buckets.counts;\n var mergedCounts = new Array(previousCounts.length);\n for (var idx = 0; idx < previousCounts.length; idx++) {\n mergedCounts[idx] = previousCounts[idx] + deltaCounts[idx];\n }\n var min = Infinity;\n var max = -Infinity;\n if (this._recordMinMax) {\n if (previousValue.hasMinMax && deltaValue.hasMinMax) {\n min = Math.min(previousValue.min, deltaValue.min);\n max = Math.max(previousValue.max, deltaValue.max);\n }\n else if (previousValue.hasMinMax) {\n min = previousValue.min;\n max = previousValue.max;\n }\n else if (deltaValue.hasMinMax) {\n min = deltaValue.min;\n max = deltaValue.max;\n }\n }\n return new HistogramAccumulation(previous.startTime, previousValue.buckets.boundaries, this._recordMinMax, {\n buckets: {\n boundaries: previousValue.buckets.boundaries,\n counts: mergedCounts,\n },\n count: previousValue.count + deltaValue.count,\n sum: previousValue.sum + deltaValue.sum,\n hasMinMax: this._recordMinMax &&\n (previousValue.hasMinMax || deltaValue.hasMinMax),\n min: min,\n max: max,\n });\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n HistogramAggregator.prototype.diff = function (previous, current) {\n var previousValue = previous.toPointValue();\n var currentValue = current.toPointValue();\n var previousCounts = previousValue.buckets.counts;\n var currentCounts = currentValue.buckets.counts;\n var diffedCounts = new Array(previousCounts.length);\n for (var idx = 0; idx < previousCounts.length; idx++) {\n diffedCounts[idx] = currentCounts[idx] - previousCounts[idx];\n }\n return new HistogramAccumulation(current.startTime, previousValue.buckets.boundaries, this._recordMinMax, {\n buckets: {\n boundaries: previousValue.buckets.boundaries,\n counts: diffedCounts,\n },\n count: currentValue.count - previousValue.count,\n sum: currentValue.sum - previousValue.sum,\n hasMinMax: false,\n min: Infinity,\n max: -Infinity,\n });\n };\n HistogramAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.HISTOGRAM,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n var pointValue = accumulation.toPointValue();\n // determine if instrument allows negative values.\n var allowsNegativeValues = descriptor.type === InstrumentType.UP_DOWN_COUNTER ||\n descriptor.type === InstrumentType.OBSERVABLE_GAUGE ||\n descriptor.type === InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: {\n min: pointValue.hasMinMax ? pointValue.min : undefined,\n max: pointValue.hasMinMax ? pointValue.max : undefined,\n sum: !allowsNegativeValues ? pointValue.sum : undefined,\n buckets: pointValue.buckets,\n count: pointValue.count,\n },\n };\n }),\n };\n };\n return HistogramAggregator;\n}());\nexport { HistogramAggregator };\n//# sourceMappingURL=Histogram.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\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 */\nvar Buckets = /** @class */ (function () {\n /**\n * The term index refers to the number of the exponential histogram bucket\n * used to determine its boundaries. The lower boundary of a bucket is\n * determined by base ** index and the upper boundary of a bucket is\n * determined by base ** (index + 1). index values are signed to account\n * for values less than or equal to 1.\n *\n * indexBase is the index of the 0th position in the\n * backing array, i.e., backing[0] is the count\n * in the bucket with index `indexBase`.\n *\n * indexStart is the smallest index value represented\n * in the backing array.\n *\n * indexEnd is the largest index value represented in\n * the backing array.\n */\n function Buckets(backing, indexBase, indexStart, indexEnd) {\n if (backing === void 0) { backing = new BucketsBacking(); }\n if (indexBase === void 0) { indexBase = 0; }\n if (indexStart === void 0) { indexStart = 0; }\n if (indexEnd === void 0) { indexEnd = 0; }\n this.backing = backing;\n this.indexBase = indexBase;\n this.indexStart = indexStart;\n this.indexEnd = indexEnd;\n }\n Object.defineProperty(Buckets.prototype, \"offset\", {\n /**\n * Offset is the bucket index of the smallest entry in the counts array\n * @returns {number}\n */\n get: function () {\n return this.indexStart;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Buckets.prototype, \"length\", {\n /**\n * Buckets is a view into the backing array.\n * @returns {number}\n */\n get: function () {\n if (this.backing.length === 0) {\n return 0;\n }\n if (this.indexEnd === this.indexStart && this.at(0) === 0) {\n return 0;\n }\n return this.indexEnd - this.indexStart + 1;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * An array of counts, where count[i] carries the count\n * of the bucket at index (offset+i). count[i] is the count of\n * values greater than base^(offset+i) and less than or equal to\n * base^(offset+i+1).\n * @returns {number} The logical counts based on the backing array\n */\n Buckets.prototype.counts = function () {\n var _this = this;\n return Array.from({ length: this.length }, function (_, i) { return _this.at(i); });\n };\n /**\n * At returns the count of the bucket at a position in the logical\n * array of counts.\n * @param position\n * @returns {number}\n */\n Buckets.prototype.at = function (position) {\n var bias = this.indexBase - this.indexStart;\n if (position < bias) {\n position += this.backing.length;\n }\n position -= bias;\n return this.backing.countAt(position);\n };\n /**\n * incrementBucket increments the backing array index by `increment`\n * @param bucketIndex\n * @param increment\n */\n Buckets.prototype.incrementBucket = function (bucketIndex, increment) {\n this.backing.increment(bucketIndex, increment);\n };\n /**\n * decrementBucket decrements the backing array index by `decrement`\n * if decrement is greater than the current value, it's set to 0.\n * @param bucketIndex\n * @param decrement\n */\n Buckets.prototype.decrementBucket = function (bucketIndex, decrement) {\n this.backing.decrement(bucketIndex, decrement);\n };\n /**\n * trim removes leading and / or trailing zero buckets (which can occur\n * after diffing two histos) and rotates the backing array so that the\n * smallest non-zero index is in the 0th position of the backing array\n */\n Buckets.prototype.trim = function () {\n for (var i = 0; i < this.length; i++) {\n if (this.at(i) !== 0) {\n this.indexStart += i;\n break;\n }\n else if (i === this.length - 1) {\n //the entire array is zeroed out\n this.indexStart = this.indexEnd = this.indexBase = 0;\n return;\n }\n }\n for (var i = this.length - 1; i >= 0; i--) {\n if (this.at(i) !== 0) {\n this.indexEnd -= this.length - i - 1;\n break;\n }\n }\n this._rotate();\n };\n /**\n * downscale first rotates, then collapses 2**`by`-to-1 buckets.\n * @param by\n */\n Buckets.prototype.downscale = function (by) {\n this._rotate();\n var size = 1 + this.indexEnd - this.indexStart;\n var each = 1 << by;\n var inpos = 0;\n var outpos = 0;\n for (var pos = this.indexStart; pos <= this.indexEnd;) {\n var mod = pos % each;\n if (mod < 0) {\n mod += each;\n }\n for (var i = mod; i < each && inpos < size; i++) {\n this._relocateBucket(outpos, inpos);\n inpos++;\n pos++;\n }\n outpos++;\n }\n this.indexStart >>= by;\n this.indexEnd >>= by;\n this.indexBase = this.indexStart;\n };\n /**\n * Clone returns a deep copy of Buckets\n * @returns {Buckets}\n */\n Buckets.prototype.clone = function () {\n return new Buckets(this.backing.clone(), this.indexBase, this.indexStart, this.indexEnd);\n };\n /**\n * _rotate shifts the backing array contents so that indexStart ==\n * indexBase to simplify the downscale logic.\n */\n Buckets.prototype._rotate = function () {\n var bias = this.indexBase - this.indexStart;\n if (bias === 0) {\n return;\n }\n else if (bias > 0) {\n this.backing.reverse(0, this.backing.length);\n this.backing.reverse(0, bias);\n this.backing.reverse(bias, this.backing.length);\n }\n else {\n // negative bias, this can happen when diffing two histograms\n this.backing.reverse(0, this.backing.length);\n this.backing.reverse(0, this.backing.length + bias);\n }\n this.indexBase = this.indexStart;\n };\n /**\n * _relocateBucket adds the count in counts[src] to counts[dest] and\n * resets count[src] to zero.\n */\n Buckets.prototype._relocateBucket = function (dest, src) {\n if (dest === src) {\n return;\n }\n this.incrementBucket(dest, this.backing.emptyBucket(src));\n };\n return Buckets;\n}());\nexport { Buckets };\n/**\n * BucketsBacking holds the raw buckets and some utility methods to\n * manage them.\n */\nvar BucketsBacking = /** @class */ (function () {\n function BucketsBacking(_counts) {\n if (_counts === void 0) { _counts = [0]; }\n this._counts = _counts;\n }\n Object.defineProperty(BucketsBacking.prototype, \"length\", {\n /**\n * length returns the physical size of the backing array, which\n * is >= buckets.length()\n */\n get: function () {\n return this._counts.length;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * countAt returns the count in a specific bucket\n */\n BucketsBacking.prototype.countAt = function (pos) {\n return this._counts[pos];\n };\n /**\n * growTo grows a backing array and copies old entries\n * into their correct new positions.\n */\n BucketsBacking.prototype.growTo = function (newSize, oldPositiveLimit, newPositiveLimit) {\n var tmp = new Array(newSize).fill(0);\n tmp.splice.apply(tmp, __spreadArray([newPositiveLimit,\n this._counts.length - oldPositiveLimit], __read(this._counts.slice(oldPositiveLimit)), false));\n tmp.splice.apply(tmp, __spreadArray([0, oldPositiveLimit], __read(this._counts.slice(0, oldPositiveLimit)), false));\n this._counts = tmp;\n };\n /**\n * reverse the items in the backing array in the range [from, limit).\n */\n BucketsBacking.prototype.reverse = function (from, limit) {\n var num = Math.floor((from + limit) / 2) - from;\n for (var i = 0; i < num; i++) {\n var tmp = this._counts[from + i];\n this._counts[from + i] = this._counts[limit - i - 1];\n this._counts[limit - i - 1] = tmp;\n }\n };\n /**\n * emptyBucket empties the count from a bucket, for\n * moving into another.\n */\n BucketsBacking.prototype.emptyBucket = function (src) {\n var tmp = this._counts[src];\n this._counts[src] = 0;\n return tmp;\n };\n /**\n * increments a bucket by `increment`\n */\n BucketsBacking.prototype.increment = function (bucketIndex, increment) {\n this._counts[bucketIndex] += increment;\n };\n /**\n * decrements a bucket by `decrement`\n */\n BucketsBacking.prototype.decrement = function (bucketIndex, decrement) {\n if (this._counts[bucketIndex] >= decrement) {\n this._counts[bucketIndex] -= decrement;\n }\n else {\n // this should not happen, but we're being defensive against\n // negative counts.\n this._counts[bucketIndex] = 0;\n }\n };\n /**\n * clone returns a deep copy of BucketsBacking\n */\n BucketsBacking.prototype.clone = function () {\n return new BucketsBacking(__spreadArray([], __read(this._counts), false));\n };\n return BucketsBacking;\n}());\n//# sourceMappingURL=Buckets.js.map","/*\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 * The functions and constants in this file allow us to interact\n * with the internal representation of an IEEE 64-bit floating point\n * number. We need to work with all 64-bits, thus, care needs to be\n * taken when working with Javascript's bitwise operators (<<, >>, &,\n * |, etc) as they truncate operands to 32-bits. In order to work around\n * this we work with the 64-bits as two 32-bit halves, perform bitwise\n * operations on them independently, and combine the results (if needed).\n */\nexport var SIGNIFICAND_WIDTH = 52;\n/**\n * EXPONENT_MASK is set to 1 for the hi 32-bits of an IEEE 754\n * floating point exponent: 0x7ff00000.\n */\nvar EXPONENT_MASK = 0x7ff00000;\n/**\n * SIGNIFICAND_MASK is the mask for the significand portion of the hi 32-bits\n * of an IEEE 754 double-precision floating-point value: 0xfffff\n */\nvar SIGNIFICAND_MASK = 0xfffff;\n/**\n * EXPONENT_BIAS is the exponent bias specified for encoding\n * the IEEE 754 double-precision floating point exponent: 1023\n */\nvar EXPONENT_BIAS = 1023;\n/**\n * MIN_NORMAL_EXPONENT is the minimum exponent of a normalized\n * floating point: -1022.\n */\nexport var MIN_NORMAL_EXPONENT = -EXPONENT_BIAS + 1;\n/**\n * MAX_NORMAL_EXPONENT is the maximum exponent of a normalized\n * floating point: 1023.\n */\nexport var MAX_NORMAL_EXPONENT = EXPONENT_BIAS;\n/**\n * MIN_VALUE is the smallest normal number\n */\nexport var MIN_VALUE = Math.pow(2, -1022);\n/**\n * getNormalBase2 extracts the normalized base-2 fractional exponent.\n * This returns k for the equation f x 2**k where f is\n * in the range [1, 2). Note that this function is not called for\n * subnormal numbers.\n * @param {number} value - the value to determine normalized base-2 fractional\n * exponent for\n * @returns {number} the normalized base-2 exponent\n */\nexport function getNormalBase2(value) {\n var dv = new DataView(new ArrayBuffer(8));\n dv.setFloat64(0, value);\n // access the raw 64-bit float as 32-bit uints\n var hiBits = dv.getUint32(0);\n var expBits = (hiBits & EXPONENT_MASK) >> 20;\n return expBits - EXPONENT_BIAS;\n}\n/**\n * GetSignificand returns the 52 bit (unsigned) significand as a signed value.\n * @param {number} value - the floating point number to extract the significand from\n * @returns {number} The 52-bit significand\n */\nexport function getSignificand(value) {\n var dv = new DataView(new ArrayBuffer(8));\n dv.setFloat64(0, value);\n // access the raw 64-bit float as two 32-bit uints\n var hiBits = dv.getUint32(0);\n var loBits = dv.getUint32(4);\n // extract the significand bits from the hi bits and left shift 32 places note:\n // we can't use the native << operator as it will truncate the result to 32-bits\n var significandHiBits = (hiBits & SIGNIFICAND_MASK) * Math.pow(2, 32);\n // combine the hi and lo bits and return\n return significandHiBits + loBits;\n}\n//# sourceMappingURL=ieee754.js.map","/*\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 * Note: other languages provide this as a built in function. This is\n * a naive, but functionally correct implementation. This is used sparingly,\n * when creating a new mapping in a running application.\n *\n * ldexp returns frac × 2**exp. With the following special cases:\n * ldexp(±0, exp) = ±0\n * ldexp(±Inf, exp) = ±Inf\n * ldexp(NaN, exp) = NaN\n * @param frac\n * @param exp\n * @returns {number}\n */\nexport function ldexp(frac, exp) {\n if (frac === 0 ||\n frac === Number.POSITIVE_INFINITY ||\n frac === Number.NEGATIVE_INFINITY ||\n Number.isNaN(frac)) {\n return frac;\n }\n return frac * Math.pow(2, exp);\n}\n/**\n * Computes the next power of two that is greater than or equal to v.\n * This implementation more efficient than, but functionally equivalent\n * to Math.pow(2, Math.ceil(Math.log(x)/Math.log(2))).\n * @param v\n * @returns {number}\n */\nexport function nextGreaterSquare(v) {\n // The following expression computes the least power-of-two\n // that is >= v. There are a number of tricky ways to\n // do this, see https://stackoverflow.com/questions/466204/rounding-up-to-next-power-of-2\n v--;\n v |= v >> 1;\n v |= v >> 2;\n v |= v >> 4;\n v |= v >> 8;\n v |= v >> 16;\n v++;\n return v;\n}\n//# sourceMappingURL=util.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\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 */\nvar MappingError = /** @class */ (function (_super) {\n __extends(MappingError, _super);\n function MappingError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return MappingError;\n}(Error));\nexport { MappingError };\n//# sourceMappingURL=types.js.map","/*\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 ieee754 from './ieee754';\nimport * as util from '../util';\nimport { MappingError } from './types';\n/**\n * ExponentMapping implements exponential mapping functions for\n * scales <=0. For scales > 0 LogarithmMapping should be used.\n */\nvar ExponentMapping = /** @class */ (function () {\n function ExponentMapping(scale) {\n this._shift = -scale;\n }\n /**\n * Maps positive floating point values to indexes corresponding to scale\n * @param value\n * @returns {number} index for provided value at the current scale\n */\n ExponentMapping.prototype.mapToIndex = function (value) {\n if (value < ieee754.MIN_VALUE) {\n return this._minNormalLowerBoundaryIndex();\n }\n var exp = ieee754.getNormalBase2(value);\n // In case the value is an exact power of two, compute a\n // correction of -1. Note, we are using a custom _rightShift\n // to accommodate a 52-bit argument, which the native bitwise\n // operators do not support\n var correction = this._rightShift(ieee754.getSignificand(value) - 1, ieee754.SIGNIFICAND_WIDTH);\n return (exp + correction) >> this._shift;\n };\n /**\n * Returns the lower bucket boundary for the given index for scale\n *\n * @param index\n * @returns {number}\n */\n ExponentMapping.prototype.lowerBoundary = function (index) {\n var minIndex = this._minNormalLowerBoundaryIndex();\n if (index < minIndex) {\n throw new MappingError(\"underflow: \" + index + \" is < minimum lower boundary: \" + minIndex);\n }\n var maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index > maxIndex) {\n throw new MappingError(\"overflow: \" + index + \" is > maximum lower boundary: \" + maxIndex);\n }\n return util.ldexp(1, index << this._shift);\n };\n Object.defineProperty(ExponentMapping.prototype, \"scale\", {\n /**\n * The scale used by this mapping\n * @returns {number}\n */\n get: function () {\n if (this._shift === 0) {\n return 0;\n }\n return -this._shift;\n },\n enumerable: false,\n configurable: true\n });\n ExponentMapping.prototype._minNormalLowerBoundaryIndex = function () {\n var index = ieee754.MIN_NORMAL_EXPONENT >> this._shift;\n if (this._shift < 2) {\n index--;\n }\n return index;\n };\n ExponentMapping.prototype._maxNormalLowerBoundaryIndex = function () {\n return ieee754.MAX_NORMAL_EXPONENT >> this._shift;\n };\n ExponentMapping.prototype._rightShift = function (value, shift) {\n return Math.floor(value * Math.pow(2, -shift));\n };\n return ExponentMapping;\n}());\nexport { ExponentMapping };\n//# sourceMappingURL=ExponentMapping.js.map","/*\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 ieee754 from './ieee754';\nimport * as util from '../util';\nimport { MappingError } from './types';\n/**\n * LogarithmMapping implements exponential mapping functions for scale > 0.\n * For scales <= 0 the exponent mapping should be used.\n */\nvar LogarithmMapping = /** @class */ (function () {\n function LogarithmMapping(scale) {\n this._scale = scale;\n this._scaleFactor = util.ldexp(Math.LOG2E, scale);\n this._inverseFactor = util.ldexp(Math.LN2, -scale);\n }\n /**\n * Maps positive floating point values to indexes corresponding to scale\n * @param value\n * @returns {number} index for provided value at the current scale\n */\n LogarithmMapping.prototype.mapToIndex = function (value) {\n if (value <= ieee754.MIN_VALUE) {\n return this._minNormalLowerBoundaryIndex() - 1;\n }\n // exact power of two special case\n if (ieee754.getSignificand(value) === 0) {\n var exp = ieee754.getNormalBase2(value);\n return (exp << this._scale) - 1;\n }\n // non-power of two cases. use Math.floor to round the scaled logarithm\n var index = Math.floor(Math.log(value) * this._scaleFactor);\n var maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index >= maxIndex) {\n return maxIndex;\n }\n return index;\n };\n /**\n * Returns the lower bucket boundary for the given index for scale\n *\n * @param index\n * @returns {number}\n */\n LogarithmMapping.prototype.lowerBoundary = function (index) {\n var maxIndex = this._maxNormalLowerBoundaryIndex();\n if (index >= maxIndex) {\n if (index === maxIndex) {\n return 2 * Math.exp((index - (1 << this._scale)) / this._scaleFactor);\n }\n throw new MappingError(\"overflow: \" + index + \" is > maximum lower boundary: \" + maxIndex);\n }\n var minIndex = this._minNormalLowerBoundaryIndex();\n if (index <= minIndex) {\n if (index === minIndex) {\n return ieee754.MIN_VALUE;\n }\n else if (index === minIndex - 1) {\n return Math.exp((index + (1 << this._scale)) / this._scaleFactor) / 2;\n }\n throw new MappingError(\"overflow: \" + index + \" is < minimum lower boundary: \" + minIndex);\n }\n return Math.exp(index * this._inverseFactor);\n };\n Object.defineProperty(LogarithmMapping.prototype, \"scale\", {\n /**\n * The scale used by this mapping\n * @returns {number}\n */\n get: function () {\n return this._scale;\n },\n enumerable: false,\n configurable: true\n });\n LogarithmMapping.prototype._minNormalLowerBoundaryIndex = function () {\n return ieee754.MIN_NORMAL_EXPONENT << this._scale;\n };\n LogarithmMapping.prototype._maxNormalLowerBoundaryIndex = function () {\n return ((ieee754.MAX_NORMAL_EXPONENT + 1) << this._scale) - 1;\n };\n return LogarithmMapping;\n}());\nexport { LogarithmMapping };\n//# sourceMappingURL=LogarithmMapping.js.map","/*\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 { ExponentMapping } from './ExponentMapping';\nimport { LogarithmMapping } from './LogarithmMapping';\nimport { MappingError } from './types';\nvar MIN_SCALE = -10;\nvar MAX_SCALE = 20;\nvar PREBUILT_MAPPINGS = Array.from({ length: 31 }, function (_, i) {\n if (i > 10) {\n return new LogarithmMapping(i - 10);\n }\n return new ExponentMapping(i - 10);\n});\n/**\n * getMapping returns an appropriate mapping for the given scale. For scales -10\n * to 0 the underlying type will be ExponentMapping. For scales 1 to 20 the\n * underlying type will be LogarithmMapping.\n * @param scale a number in the range [-10, 20]\n * @returns {Mapping}\n */\nexport function getMapping(scale) {\n if (scale > MAX_SCALE || scale < MIN_SCALE) {\n throw new MappingError(\"expected scale >= \" + MIN_SCALE + \" && <= \" + MAX_SCALE + \", got: \" + scale);\n }\n // mappings are offset by 10. scale -10 is at position 0 and scale 20 is at 30\n return PREBUILT_MAPPINGS[scale + 10];\n}\n//# sourceMappingURL=getMapping.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { DataPointType, } from '../export/MetricData';\nimport { diag } from '@opentelemetry/api';\nimport { InstrumentType } from '../InstrumentDescriptor';\nimport { Buckets } from './exponential-histogram/Buckets';\nimport { getMapping } from './exponential-histogram/mapping/getMapping';\nimport { nextGreaterSquare } from './exponential-histogram/util';\n// HighLow is a utility class used for computing a common scale for\n// two exponential histogram accumulations\nvar HighLow = /** @class */ (function () {\n function HighLow(low, high) {\n this.low = low;\n this.high = high;\n }\n HighLow.combine = function (h1, h2) {\n return new HighLow(Math.min(h1.low, h2.low), Math.max(h1.high, h2.high));\n };\n return HighLow;\n}());\nvar MAX_SCALE = 20;\nvar DEFAULT_MAX_SIZE = 160;\nvar MIN_MAX_SIZE = 2;\nvar ExponentialHistogramAccumulation = /** @class */ (function () {\n function ExponentialHistogramAccumulation(startTime, _maxSize, _recordMinMax, _sum, _count, _zeroCount, _min, _max, _positive, _negative, _mapping) {\n if (startTime === void 0) { startTime = startTime; }\n if (_maxSize === void 0) { _maxSize = DEFAULT_MAX_SIZE; }\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n if (_sum === void 0) { _sum = 0; }\n if (_count === void 0) { _count = 0; }\n if (_zeroCount === void 0) { _zeroCount = 0; }\n if (_min === void 0) { _min = Number.POSITIVE_INFINITY; }\n if (_max === void 0) { _max = Number.NEGATIVE_INFINITY; }\n if (_positive === void 0) { _positive = new Buckets(); }\n if (_negative === void 0) { _negative = new Buckets(); }\n if (_mapping === void 0) { _mapping = getMapping(MAX_SCALE); }\n this.startTime = startTime;\n this._maxSize = _maxSize;\n this._recordMinMax = _recordMinMax;\n this._sum = _sum;\n this._count = _count;\n this._zeroCount = _zeroCount;\n this._min = _min;\n this._max = _max;\n this._positive = _positive;\n this._negative = _negative;\n this._mapping = _mapping;\n if (this._maxSize < MIN_MAX_SIZE) {\n diag.warn(\"Exponential Histogram Max Size set to \" + this._maxSize + \", changing to the minimum size of: \" + MIN_MAX_SIZE);\n this._maxSize = MIN_MAX_SIZE;\n }\n }\n /**\n * record updates a histogram with a single count\n * @param {Number} value\n */\n ExponentialHistogramAccumulation.prototype.record = function (value) {\n this.updateByIncrement(value, 1);\n };\n /**\n * Sets the start time for this accumulation\n * @param {HrTime} startTime\n */\n ExponentialHistogramAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n /**\n * Returns the datapoint representation of this accumulation\n * @param {HrTime} startTime\n */\n ExponentialHistogramAccumulation.prototype.toPointValue = function () {\n return {\n hasMinMax: this._recordMinMax,\n min: this.min,\n max: this.max,\n sum: this.sum,\n positive: {\n offset: this.positive.offset,\n bucketCounts: this.positive.counts(),\n },\n negative: {\n offset: this.negative.offset,\n bucketCounts: this.negative.counts(),\n },\n count: this.count,\n scale: this.scale,\n zeroCount: this.zeroCount,\n };\n };\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"sum\", {\n /**\n * @returns {Number} The sum of values recorded by this accumulation\n */\n get: function () {\n return this._sum;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"min\", {\n /**\n * @returns {Number} The minimum value recorded by this accumulation\n */\n get: function () {\n return this._min;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"max\", {\n /**\n * @returns {Number} The maximum value recorded by this accumulation\n */\n get: function () {\n return this._max;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"count\", {\n /**\n * @returns {Number} The count of values recorded by this accumulation\n */\n get: function () {\n return this._count;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"zeroCount\", {\n /**\n * @returns {Number} The number of 0 values recorded by this accumulation\n */\n get: function () {\n return this._zeroCount;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"scale\", {\n /**\n * @returns {Number} The scale used by thie accumulation\n */\n get: function () {\n if (this._count === this._zeroCount) {\n // all zeros! scale doesn't matter, use zero\n return 0;\n }\n return this._mapping.scale;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"positive\", {\n /**\n * positive holds the postive values\n * @returns {Buckets}\n */\n get: function () {\n return this._positive;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ExponentialHistogramAccumulation.prototype, \"negative\", {\n /**\n * negative holds the negative values by their absolute value\n * @returns {Buckets}\n */\n get: function () {\n return this._negative;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * uppdateByIncr supports updating a histogram with a non-negative\n * increment.\n * @param value\n * @param increment\n */\n ExponentialHistogramAccumulation.prototype.updateByIncrement = function (value, increment) {\n // NaN does not fall into any bucket, is not zero and should not be counted,\n // NaN is never greater than max nor less than min, therefore return as there's nothing for us to do.\n if (Number.isNaN(value)) {\n return;\n }\n if (value > this._max) {\n this._max = value;\n }\n if (value < this._min) {\n this._min = value;\n }\n this._count += increment;\n if (value === 0) {\n this._zeroCount += increment;\n return;\n }\n this._sum += value * increment;\n if (value > 0) {\n this._updateBuckets(this._positive, value, increment);\n }\n else {\n this._updateBuckets(this._negative, -value, increment);\n }\n };\n /**\n * merge combines data from previous value into self\n * @param {ExponentialHistogramAccumulation} previous\n */\n ExponentialHistogramAccumulation.prototype.merge = function (previous) {\n if (this._count === 0) {\n this._min = previous.min;\n this._max = previous.max;\n }\n else if (previous.count !== 0) {\n if (previous.min < this.min) {\n this._min = previous.min;\n }\n if (previous.max > this.max) {\n this._max = previous.max;\n }\n }\n this.startTime = previous.startTime;\n this._sum += previous.sum;\n this._count += previous.count;\n this._zeroCount += previous.zeroCount;\n var minScale = this._minScale(previous);\n this._downscale(this.scale - minScale);\n this._mergeBuckets(this.positive, previous, previous.positive, minScale);\n this._mergeBuckets(this.negative, previous, previous.negative, minScale);\n };\n /**\n * diff substracts other from self\n * @param {ExponentialHistogramAccumulation} other\n */\n ExponentialHistogramAccumulation.prototype.diff = function (other) {\n this._min = Infinity;\n this._max = -Infinity;\n this._sum -= other.sum;\n this._count -= other.count;\n this._zeroCount -= other.zeroCount;\n var minScale = this._minScale(other);\n this._downscale(this.scale - minScale);\n this._diffBuckets(this.positive, other, other.positive, minScale);\n this._diffBuckets(this.negative, other, other.negative, minScale);\n };\n /**\n * clone returns a deep copy of self\n * @returns {ExponentialHistogramAccumulation}\n */\n ExponentialHistogramAccumulation.prototype.clone = function () {\n return new ExponentialHistogramAccumulation(this.startTime, this._maxSize, this._recordMinMax, this._sum, this._count, this._zeroCount, this._min, this._max, this.positive.clone(), this.negative.clone(), this._mapping);\n };\n /**\n * _updateBuckets maps the incoming value to a bucket index for the current\n * scale. If the bucket index is outside of the range of the backing array,\n * it will rescale the backing array and update the mapping for the new scale.\n */\n ExponentialHistogramAccumulation.prototype._updateBuckets = function (buckets, value, increment) {\n var index = this._mapping.mapToIndex(value);\n // rescale the mapping if needed\n var rescalingNeeded = false;\n var high = 0;\n var low = 0;\n if (buckets.length === 0) {\n buckets.indexStart = index;\n buckets.indexEnd = buckets.indexStart;\n buckets.indexBase = buckets.indexStart;\n }\n else if (index < buckets.indexStart &&\n buckets.indexEnd - index >= this._maxSize) {\n rescalingNeeded = true;\n low = index;\n high = buckets.indexEnd;\n }\n else if (index > buckets.indexEnd &&\n index - buckets.indexStart >= this._maxSize) {\n rescalingNeeded = true;\n low = buckets.indexStart;\n high = index;\n }\n // rescale and compute index at new scale\n if (rescalingNeeded) {\n var change = this._changeScale(high, low);\n this._downscale(change);\n index = this._mapping.mapToIndex(value);\n }\n this._incrementIndexBy(buckets, index, increment);\n };\n /**\n * _incrementIndexBy increments the count of the bucket specified by `index`.\n * If the index is outside of the range [buckets.indexStart, buckets.indexEnd]\n * the boundaries of the backing array will be adjusted and more buckets will\n * be added if needed.\n */\n ExponentialHistogramAccumulation.prototype._incrementIndexBy = function (buckets, index, increment) {\n if (increment === 0) {\n // nothing to do for a zero increment, can happen during a merge operation\n return;\n }\n if (buckets.length === 0) {\n buckets.indexStart = buckets.indexEnd = buckets.indexBase = index;\n }\n if (index < buckets.indexStart) {\n var span = buckets.indexEnd - index;\n if (span >= buckets.backing.length) {\n this._grow(buckets, span + 1);\n }\n buckets.indexStart = index;\n }\n else if (index > buckets.indexEnd) {\n var span = index - buckets.indexStart;\n if (span >= buckets.backing.length) {\n this._grow(buckets, span + 1);\n }\n buckets.indexEnd = index;\n }\n var bucketIndex = index - buckets.indexBase;\n if (bucketIndex < 0) {\n bucketIndex += buckets.backing.length;\n }\n buckets.incrementBucket(bucketIndex, increment);\n };\n /**\n * grow resizes the backing array by doubling in size up to maxSize.\n * This extends the array with a bunch of zeros and copies the\n * existing counts to the same position.\n */\n ExponentialHistogramAccumulation.prototype._grow = function (buckets, needed) {\n var size = buckets.backing.length;\n var bias = buckets.indexBase - buckets.indexStart;\n var oldPositiveLimit = size - bias;\n var newSize = nextGreaterSquare(needed);\n if (newSize > this._maxSize) {\n newSize = this._maxSize;\n }\n var newPositiveLimit = newSize - bias;\n buckets.backing.growTo(newSize, oldPositiveLimit, newPositiveLimit);\n };\n /**\n * _changeScale computes how much downscaling is needed by shifting the\n * high and low values until they are separated by no more than size.\n */\n ExponentialHistogramAccumulation.prototype._changeScale = function (high, low) {\n var change = 0;\n while (high - low >= this._maxSize) {\n high >>= 1;\n low >>= 1;\n change++;\n }\n return change;\n };\n /**\n * _downscale subtracts `change` from the current mapping scale.\n */\n ExponentialHistogramAccumulation.prototype._downscale = function (change) {\n if (change === 0) {\n return;\n }\n if (change < 0) {\n // Note: this should be impossible. If we get here it's because\n // there is a bug in the implementation.\n throw new Error(\"impossible change of scale: \" + this.scale);\n }\n var newScale = this._mapping.scale - change;\n this._positive.downscale(change);\n this._negative.downscale(change);\n this._mapping = getMapping(newScale);\n };\n /**\n * _minScale is used by diff and merge to compute an ideal combined scale\n */\n ExponentialHistogramAccumulation.prototype._minScale = function (other) {\n var minScale = Math.min(this.scale, other.scale);\n var highLowPos = HighLow.combine(this._highLowAtScale(this.positive, this.scale, minScale), this._highLowAtScale(other.positive, other.scale, minScale));\n var highLowNeg = HighLow.combine(this._highLowAtScale(this.negative, this.scale, minScale), this._highLowAtScale(other.negative, other.scale, minScale));\n return Math.min(minScale - this._changeScale(highLowPos.high, highLowPos.low), minScale - this._changeScale(highLowNeg.high, highLowNeg.low));\n };\n /**\n * _highLowAtScale is used by diff and merge to compute an ideal combined scale.\n */\n ExponentialHistogramAccumulation.prototype._highLowAtScale = function (buckets, currentScale, newScale) {\n if (buckets.length === 0) {\n return new HighLow(0, -1);\n }\n var shift = currentScale - newScale;\n return new HighLow(buckets.indexStart >> shift, buckets.indexEnd >> shift);\n };\n /**\n * _mergeBuckets translates index values from another histogram and\n * adds the values into the corresponding buckets of this histogram.\n */\n ExponentialHistogramAccumulation.prototype._mergeBuckets = function (ours, other, theirs, scale) {\n var theirOffset = theirs.offset;\n var theirChange = other.scale - scale;\n for (var i = 0; i < theirs.length; i++) {\n this._incrementIndexBy(ours, (theirOffset + i) >> theirChange, theirs.at(i));\n }\n };\n /**\n * _diffBuckets translates index values from another histogram and\n * subtracts the values in the corresponding buckets of this histogram.\n */\n ExponentialHistogramAccumulation.prototype._diffBuckets = function (ours, other, theirs, scale) {\n var theirOffset = theirs.offset;\n var theirChange = other.scale - scale;\n for (var i = 0; i < theirs.length; i++) {\n var ourIndex = (theirOffset + i) >> theirChange;\n var bucketIndex = ourIndex - ours.indexBase;\n if (bucketIndex < 0) {\n bucketIndex += ours.backing.length;\n }\n ours.decrementBucket(bucketIndex, theirs.at(i));\n }\n ours.trim();\n };\n return ExponentialHistogramAccumulation;\n}());\nexport { ExponentialHistogramAccumulation };\n/**\n * Aggregator for ExponentialHistogramAccumlations\n */\nvar ExponentialHistogramAggregator = /** @class */ (function () {\n /**\n * @param _maxSize Maximum number of buckets for each of the positive\n * and negative ranges, exclusive of the zero-bucket.\n * @param _recordMinMax If set to true, min and max will be recorded.\n * Otherwise, min and max will not be recorded.\n */\n function ExponentialHistogramAggregator(_maxSize, _recordMinMax) {\n this._maxSize = _maxSize;\n this._recordMinMax = _recordMinMax;\n this.kind = AggregatorKind.EXPONENTIAL_HISTOGRAM;\n }\n ExponentialHistogramAggregator.prototype.createAccumulation = function (startTime) {\n return new ExponentialHistogramAccumulation(startTime, this._maxSize, this._recordMinMax);\n };\n /**\n * Return the result of the merge of two exponential histogram accumulations.\n */\n ExponentialHistogramAggregator.prototype.merge = function (previous, delta) {\n var result = delta.clone();\n result.merge(previous);\n return result;\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n ExponentialHistogramAggregator.prototype.diff = function (previous, current) {\n var result = current.clone();\n result.diff(previous);\n return result;\n };\n ExponentialHistogramAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.EXPONENTIAL_HISTOGRAM,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n var pointValue = accumulation.toPointValue();\n // determine if instrument allows negative values.\n var allowsNegativeValues = descriptor.type === InstrumentType.UP_DOWN_COUNTER ||\n descriptor.type === InstrumentType.OBSERVABLE_GAUGE ||\n descriptor.type === InstrumentType.OBSERVABLE_UP_DOWN_COUNTER;\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: {\n min: pointValue.hasMinMax ? pointValue.min : undefined,\n max: pointValue.hasMinMax ? pointValue.max : undefined,\n sum: !allowsNegativeValues ? pointValue.sum : undefined,\n positive: {\n offset: pointValue.positive.offset,\n bucketCounts: pointValue.positive.bucketCounts,\n },\n negative: {\n offset: pointValue.negative.offset,\n bucketCounts: pointValue.negative.bucketCounts,\n },\n count: pointValue.count,\n scale: pointValue.scale,\n zeroCount: pointValue.zeroCount,\n },\n };\n }),\n };\n };\n return ExponentialHistogramAggregator;\n}());\nexport { ExponentialHistogramAggregator };\n//# sourceMappingURL=ExponentialHistogram.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { millisToHrTime, hrTimeToMicroseconds } from '@opentelemetry/core';\nimport { DataPointType, } from '../export/MetricData';\nvar LastValueAccumulation = /** @class */ (function () {\n function LastValueAccumulation(startTime, _current, sampleTime) {\n if (_current === void 0) { _current = 0; }\n if (sampleTime === void 0) { sampleTime = [0, 0]; }\n this.startTime = startTime;\n this._current = _current;\n this.sampleTime = sampleTime;\n }\n LastValueAccumulation.prototype.record = function (value) {\n this._current = value;\n this.sampleTime = millisToHrTime(Date.now());\n };\n LastValueAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n LastValueAccumulation.prototype.toPointValue = function () {\n return this._current;\n };\n return LastValueAccumulation;\n}());\nexport { LastValueAccumulation };\n/** Basic aggregator which calculates a LastValue from individual measurements. */\nvar LastValueAggregator = /** @class */ (function () {\n function LastValueAggregator() {\n this.kind = AggregatorKind.LAST_VALUE;\n }\n LastValueAggregator.prototype.createAccumulation = function (startTime) {\n return new LastValueAccumulation(startTime);\n };\n /**\n * Returns the result of the merge of the given accumulations.\n *\n * Return the newly captured (delta) accumulation for LastValueAggregator.\n */\n LastValueAggregator.prototype.merge = function (previous, delta) {\n // nanoseconds may lose precisions.\n var latestAccumulation = hrTimeToMicroseconds(delta.sampleTime) >=\n hrTimeToMicroseconds(previous.sampleTime)\n ? delta\n : previous;\n return new LastValueAccumulation(previous.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n *\n * A delta aggregation is not meaningful to LastValueAggregator, just return\n * the newly captured (delta) accumulation for LastValueAggregator.\n */\n LastValueAggregator.prototype.diff = function (previous, current) {\n // nanoseconds may lose precisions.\n var latestAccumulation = hrTimeToMicroseconds(current.sampleTime) >=\n hrTimeToMicroseconds(previous.sampleTime)\n ? current\n : previous;\n return new LastValueAccumulation(current.startTime, latestAccumulation.toPointValue(), latestAccumulation.sampleTime);\n };\n LastValueAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.GAUGE,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: accumulation.toPointValue(),\n };\n }),\n };\n };\n return LastValueAggregator;\n}());\nexport { LastValueAggregator };\n//# sourceMappingURL=LastValue.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { AggregatorKind, } from './types';\nimport { DataPointType, } from '../export/MetricData';\nvar SumAccumulation = /** @class */ (function () {\n function SumAccumulation(startTime, monotonic, _current, reset) {\n if (_current === void 0) { _current = 0; }\n if (reset === void 0) { reset = false; }\n this.startTime = startTime;\n this.monotonic = monotonic;\n this._current = _current;\n this.reset = reset;\n }\n SumAccumulation.prototype.record = function (value) {\n if (this.monotonic && value < 0) {\n return;\n }\n this._current += value;\n };\n SumAccumulation.prototype.setStartTime = function (startTime) {\n this.startTime = startTime;\n };\n SumAccumulation.prototype.toPointValue = function () {\n return this._current;\n };\n return SumAccumulation;\n}());\nexport { SumAccumulation };\n/** Basic aggregator which calculates a Sum from individual measurements. */\nvar SumAggregator = /** @class */ (function () {\n function SumAggregator(monotonic) {\n this.monotonic = monotonic;\n this.kind = AggregatorKind.SUM;\n }\n SumAggregator.prototype.createAccumulation = function (startTime) {\n return new SumAccumulation(startTime, this.monotonic);\n };\n /**\n * Returns the result of the merge of the given accumulations.\n */\n SumAggregator.prototype.merge = function (previous, delta) {\n var prevPv = previous.toPointValue();\n var deltaPv = delta.toPointValue();\n if (delta.reset) {\n return new SumAccumulation(delta.startTime, this.monotonic, deltaPv, delta.reset);\n }\n return new SumAccumulation(previous.startTime, this.monotonic, prevPv + deltaPv);\n };\n /**\n * Returns a new DELTA aggregation by comparing two cumulative measurements.\n */\n SumAggregator.prototype.diff = function (previous, current) {\n var prevPv = previous.toPointValue();\n var currPv = current.toPointValue();\n /**\n * If the SumAggregator is a monotonic one and the previous point value is\n * greater than the current one, a reset is deemed to be happened.\n * Return the current point value to prevent the value from been reset.\n */\n if (this.monotonic && prevPv > currPv) {\n return new SumAccumulation(current.startTime, this.monotonic, currPv, true);\n }\n return new SumAccumulation(current.startTime, this.monotonic, currPv - prevPv);\n };\n SumAggregator.prototype.toMetricData = function (descriptor, aggregationTemporality, accumulationByAttributes, endTime) {\n return {\n descriptor: descriptor,\n aggregationTemporality: aggregationTemporality,\n dataPointType: DataPointType.SUM,\n dataPoints: accumulationByAttributes.map(function (_a) {\n var _b = __read(_a, 2), attributes = _b[0], accumulation = _b[1];\n return {\n attributes: attributes,\n startTime: accumulation.startTime,\n endTime: endTime,\n value: accumulation.toPointValue(),\n };\n }),\n isMonotonic: this.monotonic,\n };\n };\n return SumAggregator;\n}());\nexport { SumAggregator };\n//# sourceMappingURL=Sum.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as api from '@opentelemetry/api';\nimport { SumAggregator, DropAggregator, LastValueAggregator, HistogramAggregator, ExponentialHistogramAggregator, } from '../aggregator';\nimport { InstrumentType } from '../InstrumentDescriptor';\n/**\n * Configures how measurements are combined into metrics for views.\n *\n * Aggregation provides a set of built-in aggregations via static methods.\n */\nvar Aggregation = /** @class */ (function () {\n function Aggregation() {\n }\n Aggregation.Drop = function () {\n return DROP_AGGREGATION;\n };\n Aggregation.Sum = function () {\n return SUM_AGGREGATION;\n };\n Aggregation.LastValue = function () {\n return LAST_VALUE_AGGREGATION;\n };\n Aggregation.Histogram = function () {\n return HISTOGRAM_AGGREGATION;\n };\n Aggregation.ExponentialHistogram = function () {\n return EXPONENTIAL_HISTOGRAM_AGGREGATION;\n };\n Aggregation.Default = function () {\n return DEFAULT_AGGREGATION;\n };\n return Aggregation;\n}());\nexport { Aggregation };\n/**\n * The default drop aggregation.\n */\nvar DropAggregation = /** @class */ (function (_super) {\n __extends(DropAggregation, _super);\n function DropAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DropAggregation.prototype.createAggregator = function (_instrument) {\n return DropAggregation.DEFAULT_INSTANCE;\n };\n DropAggregation.DEFAULT_INSTANCE = new DropAggregator();\n return DropAggregation;\n}(Aggregation));\nexport { DropAggregation };\n/**\n * The default sum aggregation.\n */\nvar SumAggregation = /** @class */ (function (_super) {\n __extends(SumAggregation, _super);\n function SumAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SumAggregation.prototype.createAggregator = function (instrument) {\n switch (instrument.type) {\n case InstrumentType.COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.HISTOGRAM: {\n return SumAggregation.MONOTONIC_INSTANCE;\n }\n default: {\n return SumAggregation.NON_MONOTONIC_INSTANCE;\n }\n }\n };\n SumAggregation.MONOTONIC_INSTANCE = new SumAggregator(true);\n SumAggregation.NON_MONOTONIC_INSTANCE = new SumAggregator(false);\n return SumAggregation;\n}(Aggregation));\nexport { SumAggregation };\n/**\n * The default last value aggregation.\n */\nvar LastValueAggregation = /** @class */ (function (_super) {\n __extends(LastValueAggregation, _super);\n function LastValueAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LastValueAggregation.prototype.createAggregator = function (_instrument) {\n return LastValueAggregation.DEFAULT_INSTANCE;\n };\n LastValueAggregation.DEFAULT_INSTANCE = new LastValueAggregator();\n return LastValueAggregation;\n}(Aggregation));\nexport { LastValueAggregation };\n/**\n * The default histogram aggregation.\n */\nvar HistogramAggregation = /** @class */ (function (_super) {\n __extends(HistogramAggregation, _super);\n function HistogramAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HistogramAggregation.prototype.createAggregator = function (_instrument) {\n return HistogramAggregation.DEFAULT_INSTANCE;\n };\n HistogramAggregation.DEFAULT_INSTANCE = new HistogramAggregator([0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000], true);\n return HistogramAggregation;\n}(Aggregation));\nexport { HistogramAggregation };\n/**\n * The explicit bucket histogram aggregation.\n */\nvar ExplicitBucketHistogramAggregation = /** @class */ (function (_super) {\n __extends(ExplicitBucketHistogramAggregation, _super);\n /**\n * @param boundaries the bucket boundaries of the histogram aggregation\n * @param _recordMinMax If set to true, min and max will be recorded. Otherwise, min and max will not be recorded.\n */\n function ExplicitBucketHistogramAggregation(boundaries, _recordMinMax) {\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n var _this = _super.call(this) || this;\n _this._recordMinMax = _recordMinMax;\n if (boundaries == null) {\n throw new Error('ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array');\n }\n // Copy the boundaries array for modification.\n boundaries = boundaries.concat();\n // We need to an ordered set to be able to correctly compute count for each\n // boundary since we'll iterate on each in order.\n boundaries = boundaries.sort(function (a, b) { return a - b; });\n // Remove all Infinity from the boundaries.\n var minusInfinityIndex = boundaries.lastIndexOf(-Infinity);\n var infinityIndex = boundaries.indexOf(Infinity);\n if (infinityIndex === -1) {\n infinityIndex = undefined;\n }\n _this._boundaries = boundaries.slice(minusInfinityIndex + 1, infinityIndex);\n return _this;\n }\n ExplicitBucketHistogramAggregation.prototype.createAggregator = function (_instrument) {\n return new HistogramAggregator(this._boundaries, this._recordMinMax);\n };\n return ExplicitBucketHistogramAggregation;\n}(Aggregation));\nexport { ExplicitBucketHistogramAggregation };\nvar ExponentialHistogramAggregation = /** @class */ (function (_super) {\n __extends(ExponentialHistogramAggregation, _super);\n function ExponentialHistogramAggregation(_maxSize, _recordMinMax) {\n if (_maxSize === void 0) { _maxSize = 160; }\n if (_recordMinMax === void 0) { _recordMinMax = true; }\n var _this = _super.call(this) || this;\n _this._maxSize = _maxSize;\n _this._recordMinMax = _recordMinMax;\n return _this;\n }\n ExponentialHistogramAggregation.prototype.createAggregator = function (_instrument) {\n return new ExponentialHistogramAggregator(this._maxSize, this._recordMinMax);\n };\n return ExponentialHistogramAggregation;\n}(Aggregation));\nexport { ExponentialHistogramAggregation };\n/**\n * The default aggregation.\n */\nvar DefaultAggregation = /** @class */ (function (_super) {\n __extends(DefaultAggregation, _super);\n function DefaultAggregation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DefaultAggregation.prototype._resolve = function (instrument) {\n // cast to unknown to disable complaints on the (unreachable) fallback.\n switch (instrument.type) {\n case InstrumentType.COUNTER:\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER: {\n return SUM_AGGREGATION;\n }\n case InstrumentType.OBSERVABLE_GAUGE: {\n return LAST_VALUE_AGGREGATION;\n }\n case InstrumentType.HISTOGRAM: {\n if (instrument.advice.explicitBucketBoundaries) {\n return new ExplicitBucketHistogramAggregation(instrument.advice.explicitBucketBoundaries);\n }\n return HISTOGRAM_AGGREGATION;\n }\n }\n api.diag.warn(\"Unable to recognize instrument type: \" + instrument.type);\n return DROP_AGGREGATION;\n };\n DefaultAggregation.prototype.createAggregator = function (instrument) {\n return this._resolve(instrument).createAggregator(instrument);\n };\n return DefaultAggregation;\n}(Aggregation));\nexport { DefaultAggregation };\nvar DROP_AGGREGATION = new DropAggregation();\nvar SUM_AGGREGATION = new SumAggregation();\nvar LAST_VALUE_AGGREGATION = new LastValueAggregation();\nvar HISTOGRAM_AGGREGATION = new HistogramAggregation();\nvar EXPONENTIAL_HISTOGRAM_AGGREGATION = new ExponentialHistogramAggregation();\nvar DEFAULT_AGGREGATION = new DefaultAggregation();\n//# sourceMappingURL=Aggregation.js.map","/*\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 defaultServiceName() {\n return 'unknown_service';\n}\n//# sourceMappingURL=default-service-name.js.map","/*\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 */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { diag } from '@opentelemetry/api';\nimport { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';\nimport { SDK_INFO } from '@opentelemetry/core';\nimport { defaultServiceName } from './platform';\n/**\n * A Resource describes the entity for which a signals (metrics or trace) are\n * collected.\n */\nvar Resource = /** @class */ (function () {\n function Resource(\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 attributes, asyncAttributesPromise) {\n var _this = this;\n var _a;\n this._attributes = attributes;\n this.asyncAttributesPending = asyncAttributesPromise != null;\n this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(function (asyncAttributes) {\n _this._attributes = Object.assign({}, _this._attributes, asyncAttributes);\n _this.asyncAttributesPending = false;\n return asyncAttributes;\n }, function (err) {\n diag.debug(\"a resource's async attributes promise rejected: %s\", err);\n _this.asyncAttributesPending = false;\n return {};\n });\n }\n /**\n * Returns an empty Resource\n */\n Resource.empty = function () {\n return Resource.EMPTY;\n };\n /**\n * Returns a Resource that identifies the SDK in use.\n */\n Resource.default = function () {\n var _a;\n return new Resource((_a = {},\n _a[SemanticResourceAttributes.SERVICE_NAME] = defaultServiceName(),\n _a[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],\n _a[SemanticResourceAttributes.TELEMETRY_SDK_NAME] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_NAME],\n _a[SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_VERSION],\n _a));\n };\n Object.defineProperty(Resource.prototype, \"attributes\", {\n get: function () {\n var _a;\n if (this.asyncAttributesPending) {\n diag.error('Accessing resource attributes before async attributes settled');\n }\n return (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Returns a promise that will never be rejected. Resolves when all async attributes have finished being added to\n * this Resource's attributes. This is useful in exporters to block until resource detection\n * has finished.\n */\n Resource.prototype.waitForAsyncAttributes = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.asyncAttributesPending) return [3 /*break*/, 2];\n return [4 /*yield*/, this._asyncAttributesPromise];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a new, merged {@link Resource} by merging the current Resource\n * with the other Resource. In case of a collision, other Resource takes\n * precedence.\n *\n * @param other the Resource that will be merged with this.\n * @returns the newly merged Resource.\n */\n Resource.prototype.merge = function (other) {\n var _this = this;\n var _a;\n if (!other)\n return this;\n // SpanAttributes from other resource overwrite attributes from this resource.\n var mergedSyncAttributes = __assign(__assign({}, this._syncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes));\n if (!this._asyncAttributesPromise &&\n !other._asyncAttributesPromise) {\n return new Resource(mergedSyncAttributes);\n }\n var mergedAttributesPromise = Promise.all([\n this._asyncAttributesPromise,\n other._asyncAttributesPromise,\n ]).then(function (_a) {\n var _b;\n var _c = __read(_a, 2), thisAsyncAttributes = _c[0], otherAsyncAttributes = _c[1];\n return __assign(__assign(__assign(__assign({}, _this._syncAttributes), thisAsyncAttributes), ((_b = other._syncAttributes) !== null && _b !== void 0 ? _b : other.attributes)), otherAsyncAttributes);\n });\n return new Resource(mergedSyncAttributes, mergedAttributesPromise);\n };\n Resource.EMPTY = new Resource({});\n return Resource;\n}());\nexport { Resource };\n//# sourceMappingURL=Resource.js.map","/*\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 var AggregationTemporalityPreference;\n(function (AggregationTemporalityPreference) {\n AggregationTemporalityPreference[AggregationTemporalityPreference[\"DELTA\"] = 0] = \"DELTA\";\n AggregationTemporalityPreference[AggregationTemporalityPreference[\"CUMULATIVE\"] = 1] = \"CUMULATIVE\";\n AggregationTemporalityPreference[AggregationTemporalityPreference[\"LOWMEMORY\"] = 2] = \"LOWMEMORY\";\n})(AggregationTemporalityPreference || (AggregationTemporalityPreference = {}));\n//# sourceMappingURL=OTLPMetricExporterOptions.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { getEnv } from '@opentelemetry/core';\nimport { AggregationTemporality, InstrumentType, Aggregation, } from '@opentelemetry/sdk-metrics';\nimport { AggregationTemporalityPreference, } from './OTLPMetricExporterOptions';\nimport { diag } from '@opentelemetry/api';\nexport var CumulativeTemporalitySelector = function () { return AggregationTemporality.CUMULATIVE; };\nexport var DeltaTemporalitySelector = function (instrumentType) {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.HISTOGRAM:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n return AggregationTemporality.CUMULATIVE;\n }\n};\nexport var LowMemoryTemporalitySelector = function (instrumentType) {\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n case InstrumentType.HISTOGRAM:\n return AggregationTemporality.DELTA;\n case InstrumentType.UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n case InstrumentType.OBSERVABLE_COUNTER:\n case InstrumentType.OBSERVABLE_GAUGE:\n return AggregationTemporality.CUMULATIVE;\n }\n};\nfunction chooseTemporalitySelectorFromEnvironment() {\n var env = getEnv();\n var configuredTemporality = env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();\n if (configuredTemporality === 'cumulative') {\n return CumulativeTemporalitySelector;\n }\n if (configuredTemporality === 'delta') {\n return DeltaTemporalitySelector;\n }\n if (configuredTemporality === 'lowmemory') {\n return LowMemoryTemporalitySelector;\n }\n diag.warn(\"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '\" + env.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + \"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.\");\n return CumulativeTemporalitySelector;\n}\nfunction chooseTemporalitySelector(temporalityPreference) {\n // Directly passed preference has priority.\n if (temporalityPreference != null) {\n if (temporalityPreference === AggregationTemporalityPreference.DELTA) {\n return DeltaTemporalitySelector;\n }\n else if (temporalityPreference === AggregationTemporalityPreference.LOWMEMORY) {\n return LowMemoryTemporalitySelector;\n }\n return CumulativeTemporalitySelector;\n }\n return chooseTemporalitySelectorFromEnvironment();\n}\nfunction chooseAggregationSelector(config) {\n if (config === null || config === void 0 ? void 0 : config.aggregationPreference) {\n return config.aggregationPreference;\n }\n else {\n return function (_instrumentType) { return Aggregation.Default(); };\n }\n}\nvar OTLPMetricExporterBase = /** @class */ (function () {\n function OTLPMetricExporterBase(exporter, config) {\n this._otlpExporter = exporter;\n this._aggregationSelector = chooseAggregationSelector(config);\n this._aggregationTemporalitySelector = chooseTemporalitySelector(config === null || config === void 0 ? void 0 : config.temporalityPreference);\n }\n OTLPMetricExporterBase.prototype.export = function (metrics, resultCallback) {\n this._otlpExporter.export([metrics], resultCallback);\n };\n OTLPMetricExporterBase.prototype.shutdown = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._otlpExporter.shutdown()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n OTLPMetricExporterBase.prototype.forceFlush = function () {\n return Promise.resolve();\n };\n OTLPMetricExporterBase.prototype.selectAggregation = function (instrumentType) {\n return this._aggregationSelector(instrumentType);\n };\n OTLPMetricExporterBase.prototype.selectAggregationTemporality = function (instrumentType) {\n return this._aggregationTemporalitySelector(instrumentType);\n };\n return OTLPMetricExporterBase;\n}());\nexport { OTLPMetricExporterBase };\n//# sourceMappingURL=OTLPMetricExporterBase.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { diag } from '@opentelemetry/api';\nimport { getEnv } from '@opentelemetry/core';\nvar DEFAULT_TRACE_TIMEOUT = 10000;\nexport var DEFAULT_EXPORT_MAX_ATTEMPTS = 5;\nexport var DEFAULT_EXPORT_INITIAL_BACKOFF = 1000;\nexport var DEFAULT_EXPORT_MAX_BACKOFF = 5000;\nexport var DEFAULT_EXPORT_BACKOFF_MULTIPLIER = 1.5;\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nexport function parseHeaders(partialHeaders) {\n if (partialHeaders === void 0) { partialHeaders = {}; }\n var headers = {};\n Object.entries(partialHeaders).forEach(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n if (typeof value !== 'undefined') {\n headers[key] = String(value);\n }\n else {\n diag.warn(\"Header \\\"\" + key + \"\\\" has wrong value and will be ignored\");\n }\n });\n return headers;\n}\n/**\n * Adds path (version + signal) to a no per-signal endpoint\n * @param url\n * @param path\n * @returns url + path\n */\nexport function appendResourcePathToUrl(url, path) {\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n return url + path;\n}\n/**\n * Adds root path to signal specific endpoint when endpoint contains no path part and no root path\n * @param url\n * @returns url\n */\nexport function appendRootPathToUrlIfNeeded(url) {\n try {\n var parsedUrl = new URL(url);\n if (parsedUrl.pathname === '') {\n parsedUrl.pathname = parsedUrl.pathname + '/';\n }\n return parsedUrl.toString();\n }\n catch (_a) {\n diag.warn(\"Could not parse export URL: '\" + url + \"'\");\n return url;\n }\n}\n/**\n * Configure exporter trace timeout value from passed in value or environment variables\n * @param timeoutMillis\n * @returns timeout value in milliseconds\n */\nexport function configureExporterTimeout(timeoutMillis) {\n if (typeof timeoutMillis === 'number') {\n if (timeoutMillis <= 0) {\n // OTLP exporter configured timeout - using default value of 10000ms\n return invalidTimeout(timeoutMillis, DEFAULT_TRACE_TIMEOUT);\n }\n return timeoutMillis;\n }\n else {\n return getExporterTimeoutFromEnv();\n }\n}\nfunction getExporterTimeoutFromEnv() {\n var _a;\n var definedTimeout = Number((_a = getEnv().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) !== null && _a !== void 0 ? _a : getEnv().OTEL_EXPORTER_OTLP_TIMEOUT);\n if (definedTimeout <= 0) {\n // OTLP exporter configured timeout - using default value of 10000ms\n return invalidTimeout(definedTimeout, DEFAULT_TRACE_TIMEOUT);\n }\n else {\n return definedTimeout;\n }\n}\n// OTLP exporter configured timeout - using default value of 10000ms\nexport function invalidTimeout(timeout, defaultTimeout) {\n diag.warn('Timeout must be greater than 0', timeout);\n return defaultTimeout;\n}\nexport function isExportRetryable(statusCode) {\n var retryCodes = [429, 502, 503, 504];\n return retryCodes.includes(statusCode);\n}\nexport function parseRetryAfterToMills(retryAfter) {\n if (retryAfter == null) {\n return -1;\n }\n var 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 var delay = new Date(retryAfter).getTime() - Date.now();\n if (delay >= 0) {\n return delay;\n }\n return 0;\n}\n//# sourceMappingURL=util.js.map","/*\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 { ExportResultCode, BindOnceFuture, } from '@opentelemetry/core';\nimport { configureExporterTimeout } from './util';\n/**\n * Collector Exporter abstract base class\n */\nvar OTLPExporterBase = /** @class */ (function () {\n /**\n * @param config\n */\n function OTLPExporterBase(config) {\n if (config === void 0) { config = {}; }\n this._sendingPromises = [];\n this.url = this.getDefaultUrl(config);\n if (typeof config.hostname === 'string') {\n this.hostname = config.hostname;\n }\n this.shutdown = this.shutdown.bind(this);\n this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n this._concurrencyLimit =\n typeof config.concurrencyLimit === 'number'\n ? config.concurrencyLimit\n : 30;\n this.timeoutMillis = configureExporterTimeout(config.timeoutMillis);\n // platform dependent\n this.onInit(config);\n }\n /**\n * Export items.\n * @param items\n * @param resultCallback\n */\n OTLPExporterBase.prototype.export = function (items, resultCallback) {\n if (this._shutdownOnce.isCalled) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Exporter has been shutdown'),\n });\n return;\n }\n if (this._sendingPromises.length >= this._concurrencyLimit) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Concurrent export limit reached'),\n });\n return;\n }\n this._export(items)\n .then(function () {\n resultCallback({ code: ExportResultCode.SUCCESS });\n })\n .catch(function (error) {\n resultCallback({ code: ExportResultCode.FAILED, error: error });\n });\n };\n OTLPExporterBase.prototype._export = function (items) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n try {\n diag.debug('items to be sent', items);\n _this.send(items, resolve, reject);\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /**\n * Shutdown the exporter.\n */\n OTLPExporterBase.prototype.shutdown = function () {\n return this._shutdownOnce.call();\n };\n /**\n * Exports any pending spans in the exporter\n */\n OTLPExporterBase.prototype.forceFlush = function () {\n return Promise.all(this._sendingPromises).then(function () {\n /** ignore resolved values */\n });\n };\n /**\n * Called by _shutdownOnce with BindOnceFuture\n */\n OTLPExporterBase.prototype._shutdown = function () {\n diag.debug('shutdown started');\n this.onShutdown();\n return this.forceFlush();\n };\n return OTLPExporterBase;\n}());\nexport { OTLPExporterBase };\n//# sourceMappingURL=OTLPExporterBase.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Interface for handling error\n */\nvar OTLPExporterError = /** @class */ (function (_super) {\n __extends(OTLPExporterError, _super);\n function OTLPExporterError(message, code, data) {\n var _this = _super.call(this, message) || this;\n _this.name = 'OTLPExporterError';\n _this.data = data;\n _this.code = code;\n return _this;\n }\n return OTLPExporterError;\n}(Error));\nexport { OTLPExporterError };\n//# sourceMappingURL=types.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\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 { OTLPExporterError } from '../../types';\nimport { DEFAULT_EXPORT_MAX_ATTEMPTS, DEFAULT_EXPORT_INITIAL_BACKOFF, DEFAULT_EXPORT_BACKOFF_MULTIPLIER, DEFAULT_EXPORT_MAX_BACKOFF, isExportRetryable, parseRetryAfterToMills, } from '../../util';\n/**\n * Send metrics/spans using browser navigator.sendBeacon\n * @param body\n * @param url\n * @param blobPropertyBag\n * @param onSuccess\n * @param onError\n */\nexport function sendWithBeacon(body, url, blobPropertyBag, onSuccess, onError) {\n if (navigator.sendBeacon(url, new Blob([body], blobPropertyBag))) {\n diag.debug('sendBeacon - can send', body);\n onSuccess();\n }\n else {\n var error = new OTLPExporterError(\"sendBeacon - cannot send \" + body);\n onError(error);\n }\n}\n/**\n * function to send metrics/spans using browser XMLHttpRequest\n * used when navigator.sendBeacon is not available\n * @param body\n * @param url\n * @param headers\n * @param onSuccess\n * @param onError\n */\nexport function sendWithXhr(body, url, headers, exporterTimeout, onSuccess, onError) {\n var retryTimer;\n var xhr;\n var reqIsDestroyed = false;\n var exporterTimer = setTimeout(function () {\n clearTimeout(retryTimer);\n reqIsDestroyed = true;\n if (xhr.readyState === XMLHttpRequest.DONE) {\n var err = new OTLPExporterError('Request Timeout');\n onError(err);\n }\n else {\n xhr.abort();\n }\n }, exporterTimeout);\n var sendWithRetry = function (retries, minDelay) {\n if (retries === void 0) { retries = DEFAULT_EXPORT_MAX_ATTEMPTS; }\n if (minDelay === void 0) { minDelay = DEFAULT_EXPORT_INITIAL_BACKOFF; }\n xhr = new XMLHttpRequest();\n xhr.open('POST', url);\n var defaultHeaders = {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n };\n Object.entries(__assign(__assign({}, defaultHeaders), headers)).forEach(function (_a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n xhr.setRequestHeader(k, v);\n });\n xhr.send(body);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XMLHttpRequest.DONE && reqIsDestroyed === false) {\n if (xhr.status >= 200 && xhr.status <= 299) {\n diag.debug('xhr success', body);\n onSuccess();\n clearTimeout(exporterTimer);\n clearTimeout(retryTimer);\n }\n else if (xhr.status && isExportRetryable(xhr.status) && retries > 0) {\n var retryTime = void 0;\n minDelay = DEFAULT_EXPORT_BACKOFF_MULTIPLIER * minDelay;\n // retry after interval specified in Retry-After header\n if (xhr.getResponseHeader('Retry-After')) {\n retryTime = parseRetryAfterToMills(xhr.getResponseHeader('Retry-After'));\n }\n else {\n // exponential backoff with jitter\n retryTime = Math.round(Math.random() * (DEFAULT_EXPORT_MAX_BACKOFF - minDelay) + minDelay);\n }\n retryTimer = setTimeout(function () {\n sendWithRetry(retries - 1, minDelay);\n }, retryTime);\n }\n else {\n var error = new OTLPExporterError(\"Failed to export with XHR (status: \" + xhr.status + \")\", xhr.status);\n onError(error);\n clearTimeout(exporterTimer);\n clearTimeout(retryTimer);\n }\n }\n };\n xhr.onabort = function () {\n if (reqIsDestroyed) {\n var err = new OTLPExporterError('Request Timeout');\n onError(err);\n }\n clearTimeout(exporterTimer);\n clearTimeout(retryTimer);\n };\n xhr.onerror = function () {\n if (reqIsDestroyed) {\n var err = new OTLPExporterError('Request Timeout');\n onError(err);\n }\n clearTimeout(exporterTimer);\n clearTimeout(retryTimer);\n };\n };\n sendWithRetry();\n}\n//# sourceMappingURL=util.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { OTLPExporterBase } from '../../OTLPExporterBase';\nimport { parseHeaders } from '../../util';\nimport { sendWithBeacon, sendWithXhr } from './util';\nimport { diag } from '@opentelemetry/api';\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\n/**\n * Collector Metric Exporter abstract base class\n */\nvar OTLPExporterBrowserBase = /** @class */ (function (_super) {\n __extends(OTLPExporterBrowserBase, _super);\n /**\n * @param config\n */\n function OTLPExporterBrowserBase(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this, config) || this;\n _this._useXHR = false;\n _this._useXHR =\n !!config.headers || typeof navigator.sendBeacon !== 'function';\n if (_this._useXHR) {\n _this._headers = Object.assign({}, parseHeaders(config.headers), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_HEADERS));\n }\n else {\n _this._headers = {};\n }\n return _this;\n }\n OTLPExporterBrowserBase.prototype.onInit = function () { };\n OTLPExporterBrowserBase.prototype.onShutdown = function () { };\n OTLPExporterBrowserBase.prototype.send = function (items, onSuccess, onError) {\n var _this = this;\n if (this._shutdownOnce.isCalled) {\n diag.debug('Shutdown already started. Cannot send objects');\n return;\n }\n var serviceRequest = this.convert(items);\n var body = JSON.stringify(serviceRequest);\n var promise = new Promise(function (resolve, reject) {\n if (_this._useXHR) {\n sendWithXhr(body, _this.url, _this._headers, _this.timeoutMillis, resolve, reject);\n }\n else {\n sendWithBeacon(body, _this.url, { type: 'application/json' }, resolve, reject);\n }\n }).then(onSuccess, onError);\n this._sendingPromises.push(promise);\n var popPromise = function () {\n var index = _this._sendingPromises.indexOf(promise);\n _this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n };\n return OTLPExporterBrowserBase;\n}(OTLPExporterBase));\nexport { OTLPExporterBrowserBase };\n//# sourceMappingURL=OTLPExporterBrowserBase.js.map","/*\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 { hexToBinary, hrTimeToNanoseconds } from '@opentelemetry/core';\nexport function hrTimeToNanos(hrTime) {\n var NANOSECONDS = BigInt(1000000000);\n return BigInt(hrTime[0]) * NANOSECONDS + BigInt(hrTime[1]);\n}\nexport function toLongBits(value) {\n var low = Number(BigInt.asUintN(32, value));\n var high = Number(BigInt.asUintN(32, value >> BigInt(32)));\n return { low: low, high: high };\n}\nexport function encodeAsLongBits(hrTime) {\n var nanos = hrTimeToNanos(hrTime);\n return toLongBits(nanos);\n}\nexport function encodeAsString(hrTime) {\n var nanos = hrTimeToNanos(hrTime);\n return nanos.toString();\n}\nvar encodeTimestamp = typeof BigInt !== 'undefined' ? encodeAsString : hrTimeToNanoseconds;\nfunction identity(value) {\n return value;\n}\nfunction optionalHexToBinary(str) {\n if (str === undefined)\n return undefined;\n return hexToBinary(str);\n}\nvar DEFAULT_ENCODER = {\n encodeHrTime: encodeAsLongBits,\n encodeSpanContext: hexToBinary,\n encodeOptionalSpanContext: optionalHexToBinary,\n};\nexport function getOtlpEncoder(options) {\n var _a, _b;\n if (options === undefined) {\n return DEFAULT_ENCODER;\n }\n var useLongBits = (_a = options.useLongBits) !== null && _a !== void 0 ? _a : true;\n var useHex = (_b = options.useHex) !== null && _b !== void 0 ? _b : false;\n return {\n encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp,\n encodeSpanContext: useHex ? identity : hexToBinary,\n encodeOptionalSpanContext: useHex ? identity : optionalHexToBinary,\n };\n}\n//# sourceMappingURL=index.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nexport function toAttributes(attributes) {\n return Object.keys(attributes).map(function (key) { return toKeyValue(key, attributes[key]); });\n}\nexport function toKeyValue(key, value) {\n return {\n key: key,\n value: toAnyValue(value),\n };\n}\nexport function toAnyValue(value) {\n var t = typeof value;\n if (t === 'string')\n return { stringValue: value };\n if (t === 'number') {\n if (!Number.isInteger(value))\n return { doubleValue: value };\n return { intValue: value };\n }\n if (t === 'boolean')\n return { boolValue: value };\n if (value instanceof Uint8Array)\n 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).map(function (_a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return toKeyValue(k, v);\n }),\n },\n };\n return {};\n}\n//# sourceMappingURL=internal.js.map","import { toAttributes } from '../common/internal';\nexport function sdkSpanToOtlpSpan(span, encoder) {\n var _a;\n var ctx = span.spanContext();\n var status = span.status;\n return {\n traceId: encoder.encodeSpanContext(ctx.traceId),\n spanId: encoder.encodeSpanContext(ctx.spanId),\n parentSpanId: encoder.encodeOptionalSpanContext(span.parentSpanId),\n traceState: (_a = ctx.traceState) === null || _a === void 0 ? void 0 : _a.serialize(),\n name: span.name,\n // Span kind is offset by 1 because the API does not define a value for unset\n kind: span.kind == null ? 0 : span.kind + 1,\n startTimeUnixNano: encoder.encodeHrTime(span.startTime),\n endTimeUnixNano: encoder.encodeHrTime(span.endTime),\n attributes: toAttributes(span.attributes),\n droppedAttributesCount: span.droppedAttributesCount,\n events: span.events.map(function (event) { return toOtlpSpanEvent(event, encoder); }),\n droppedEventsCount: span.droppedEventsCount,\n status: {\n // API and proto enums share the same values\n code: status.code,\n message: status.message,\n },\n links: span.links.map(function (link) { return toOtlpLink(link, encoder); }),\n droppedLinksCount: span.droppedLinksCount,\n };\n}\nexport function toOtlpLink(link, encoder) {\n var _a;\n return {\n attributes: link.attributes ? toAttributes(link.attributes) : [],\n spanId: encoder.encodeSpanContext(link.context.spanId),\n traceId: encoder.encodeSpanContext(link.context.traceId),\n traceState: (_a = link.context.traceState) === null || _a === void 0 ? void 0 : _a.serialize(),\n droppedAttributesCount: link.droppedAttributesCount || 0,\n };\n}\nexport function toOtlpSpanEvent(timedEvent, encoder) {\n return {\n attributes: timedEvent.attributes\n ? toAttributes(timedEvent.attributes)\n : [],\n name: timedEvent.name,\n timeUnixNano: encoder.encodeHrTime(timedEvent.time),\n droppedAttributesCount: timedEvent.droppedAttributesCount || 0,\n };\n}\n//# sourceMappingURL=internal.js.map","var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { toAttributes } from '../common/internal';\nimport { sdkSpanToOtlpSpan } from './internal';\nimport { getOtlpEncoder } from '../common';\nexport function createExportTraceServiceRequest(spans, options) {\n var encoder = getOtlpEncoder(options);\n return {\n resourceSpans: spanRecordsToResourceSpans(spans, encoder),\n };\n}\nfunction createResourceMap(readableSpans) {\n var e_1, _a;\n var resourceMap = new Map();\n try {\n for (var readableSpans_1 = __values(readableSpans), readableSpans_1_1 = readableSpans_1.next(); !readableSpans_1_1.done; readableSpans_1_1 = readableSpans_1.next()) {\n var record = readableSpans_1_1.value;\n var ilmMap = resourceMap.get(record.resource);\n if (!ilmMap) {\n ilmMap = new Map();\n resourceMap.set(record.resource, ilmMap);\n }\n // TODO this is duplicated in basic tracer. Consolidate on a common helper in core\n var instrumentationLibraryKey = record.instrumentationLibrary.name + \"@\" + (record.instrumentationLibrary.version || '') + \":\" + (record.instrumentationLibrary.schemaUrl || '');\n var records = ilmMap.get(instrumentationLibraryKey);\n if (!records) {\n records = [];\n ilmMap.set(instrumentationLibraryKey, records);\n }\n records.push(record);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (readableSpans_1_1 && !readableSpans_1_1.done && (_a = readableSpans_1.return)) _a.call(readableSpans_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return resourceMap;\n}\nfunction spanRecordsToResourceSpans(readableSpans, encoder) {\n var resourceMap = createResourceMap(readableSpans);\n var out = [];\n var entryIterator = resourceMap.entries();\n var entry = entryIterator.next();\n while (!entry.done) {\n var _a = __read(entry.value, 2), resource = _a[0], ilmMap = _a[1];\n var scopeResourceSpans = [];\n var ilmIterator = ilmMap.values();\n var ilmEntry = ilmIterator.next();\n while (!ilmEntry.done) {\n var scopeSpans = ilmEntry.value;\n if (scopeSpans.length > 0) {\n var _b = scopeSpans[0].instrumentationLibrary, name_1 = _b.name, version = _b.version, schemaUrl = _b.schemaUrl;\n var spans = scopeSpans.map(function (readableSpan) {\n return sdkSpanToOtlpSpan(readableSpan, encoder);\n });\n scopeResourceSpans.push({\n scope: { name: name_1, version: version },\n spans: spans,\n schemaUrl: schemaUrl,\n });\n }\n ilmEntry = ilmIterator.next();\n }\n // TODO SDK types don't provide resource schema URL at this time\n var transformedSpans = {\n resource: {\n attributes: toAttributes(resource.attributes),\n droppedAttributesCount: 0,\n },\n scopeSpans: scopeResourceSpans,\n schemaUrl: undefined,\n };\n out.push(transformedSpans);\n entry = entryIterator.next();\n }\n return out;\n}\n//# sourceMappingURL=index.js.map","/*\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 * AggregationTemporality indicates the way additive quantities are expressed.\n */\nexport var AggregationTemporality;\n(function (AggregationTemporality) {\n AggregationTemporality[AggregationTemporality[\"DELTA\"] = 0] = \"DELTA\";\n AggregationTemporality[AggregationTemporality[\"CUMULATIVE\"] = 1] = \"CUMULATIVE\";\n})(AggregationTemporality || (AggregationTemporality = {}));\n//# sourceMappingURL=AggregationTemporality.js.map","/*\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 * The aggregated point data type.\n */\nexport var DataPointType;\n(function (DataPointType) {\n /**\n * A histogram data point contains a histogram statistics of collected\n * values with a list of explicit bucket boundaries and statistics such\n * as min, max, count, and sum of all collected values.\n */\n DataPointType[DataPointType[\"HISTOGRAM\"] = 0] = \"HISTOGRAM\";\n /**\n * An exponential histogram data point contains a histogram statistics of\n * collected values where bucket boundaries are automatically calculated\n * using an exponential function, and statistics such as min, max, count,\n * and sum of all collected values.\n */\n DataPointType[DataPointType[\"EXPONENTIAL_HISTOGRAM\"] = 1] = \"EXPONENTIAL_HISTOGRAM\";\n /**\n * A gauge metric data point has only a single numeric value.\n */\n DataPointType[DataPointType[\"GAUGE\"] = 2] = \"GAUGE\";\n /**\n * A sum metric data point has a single numeric value and a\n * monotonicity-indicator.\n */\n DataPointType[DataPointType[\"SUM\"] = 3] = \"SUM\";\n})(DataPointType || (DataPointType = {}));\n//# sourceMappingURL=MetricData.js.map","import { ValueType } from '@opentelemetry/api';\nimport { AggregationTemporality, DataPointType, } from '@opentelemetry/sdk-metrics';\nimport { toAttributes } from '../common/internal';\nimport { getOtlpEncoder } from '../common';\nexport function toResourceMetrics(resourceMetrics, options) {\n var encoder = getOtlpEncoder(options);\n return {\n resource: {\n attributes: toAttributes(resourceMetrics.resource.attributes),\n droppedAttributesCount: 0,\n },\n schemaUrl: undefined,\n scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics, encoder),\n };\n}\nexport function toScopeMetrics(scopeMetrics, encoder) {\n return Array.from(scopeMetrics.map(function (metrics) { return ({\n scope: {\n name: metrics.scope.name,\n version: metrics.scope.version,\n },\n metrics: metrics.metrics.map(function (metricData) { return toMetric(metricData, encoder); }),\n schemaUrl: metrics.scope.schemaUrl,\n }); }));\n}\nexport function toMetric(metricData, encoder) {\n var out = {\n name: metricData.descriptor.name,\n description: metricData.descriptor.description,\n unit: metricData.descriptor.unit,\n };\n var aggregationTemporality = toAggregationTemporality(metricData.aggregationTemporality);\n switch (metricData.dataPointType) {\n case DataPointType.SUM:\n out.sum = {\n aggregationTemporality: aggregationTemporality,\n isMonotonic: metricData.isMonotonic,\n dataPoints: toSingularDataPoints(metricData, encoder),\n };\n break;\n case DataPointType.GAUGE:\n out.gauge = {\n dataPoints: toSingularDataPoints(metricData, encoder),\n };\n break;\n case DataPointType.HISTOGRAM:\n out.histogram = {\n aggregationTemporality: aggregationTemporality,\n dataPoints: toHistogramDataPoints(metricData, encoder),\n };\n break;\n case DataPointType.EXPONENTIAL_HISTOGRAM:\n out.exponentialHistogram = {\n aggregationTemporality: aggregationTemporality,\n dataPoints: toExponentialHistogramDataPoints(metricData, encoder),\n };\n break;\n }\n return out;\n}\nfunction toSingularDataPoint(dataPoint, valueType, encoder) {\n var out = {\n attributes: toAttributes(dataPoint.attributes),\n startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime),\n timeUnixNano: encoder.encodeHrTime(dataPoint.endTime),\n };\n switch (valueType) {\n case ValueType.INT:\n out.asInt = dataPoint.value;\n break;\n case ValueType.DOUBLE:\n out.asDouble = dataPoint.value;\n break;\n }\n return out;\n}\nfunction toSingularDataPoints(metricData, encoder) {\n return metricData.dataPoints.map(function (dataPoint) {\n return toSingularDataPoint(dataPoint, metricData.descriptor.valueType, encoder);\n });\n}\nfunction toHistogramDataPoints(metricData, encoder) {\n return metricData.dataPoints.map(function (dataPoint) {\n var histogram = dataPoint.value;\n return {\n attributes: toAttributes(dataPoint.attributes),\n bucketCounts: histogram.buckets.counts,\n explicitBounds: histogram.buckets.boundaries,\n count: histogram.count,\n sum: histogram.sum,\n min: histogram.min,\n max: histogram.max,\n startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime),\n timeUnixNano: encoder.encodeHrTime(dataPoint.endTime),\n };\n });\n}\nfunction toExponentialHistogramDataPoints(metricData, encoder) {\n return metricData.dataPoints.map(function (dataPoint) {\n var histogram = dataPoint.value;\n return {\n attributes: toAttributes(dataPoint.attributes),\n count: histogram.count,\n min: histogram.min,\n max: histogram.max,\n sum: histogram.sum,\n positive: {\n offset: histogram.positive.offset,\n bucketCounts: histogram.positive.bucketCounts,\n },\n negative: {\n offset: histogram.negative.offset,\n bucketCounts: histogram.negative.bucketCounts,\n },\n scale: histogram.scale,\n zeroCount: histogram.zeroCount,\n startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime),\n timeUnixNano: encoder.encodeHrTime(dataPoint.endTime),\n };\n });\n}\nfunction toAggregationTemporality(temporality) {\n switch (temporality) {\n case AggregationTemporality.DELTA:\n return 1 /* AGGREGATION_TEMPORALITY_DELTA */;\n case AggregationTemporality.CUMULATIVE:\n return 2 /* AGGREGATION_TEMPORALITY_CUMULATIVE */;\n }\n}\n//# sourceMappingURL=internal.js.map","import { toResourceMetrics } from './internal';\nexport function createExportMetricsServiceRequest(resourceMetrics, options) {\n return {\n resourceMetrics: resourceMetrics.map(function (metrics) {\n return toResourceMetrics(metrics, options);\n }),\n };\n}\n//# sourceMappingURL=index.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { getOtlpEncoder } from '../common';\nimport { toAnyValue, toAttributes, toKeyValue } from '../common/internal';\nexport function createExportLogsServiceRequest(logRecords, options) {\n var encoder = getOtlpEncoder(options);\n return {\n resourceLogs: logRecordsToResourceLogs(logRecords, encoder),\n };\n}\nfunction createResourceMap(logRecords) {\n var e_1, _a;\n var resourceMap = new Map();\n try {\n for (var logRecords_1 = __values(logRecords), logRecords_1_1 = logRecords_1.next(); !logRecords_1_1.done; logRecords_1_1 = logRecords_1.next()) {\n var record = logRecords_1_1.value;\n var resource = record.resource, _b = record.instrumentationScope, name_1 = _b.name, _c = _b.version, version = _c === void 0 ? '' : _c, _d = _b.schemaUrl, schemaUrl = _d === void 0 ? '' : _d;\n var ismMap = resourceMap.get(resource);\n if (!ismMap) {\n ismMap = new Map();\n resourceMap.set(resource, ismMap);\n }\n var ismKey = name_1 + \"@\" + version + \":\" + schemaUrl;\n var records = ismMap.get(ismKey);\n if (!records) {\n records = [];\n ismMap.set(ismKey, records);\n }\n records.push(record);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (logRecords_1_1 && !logRecords_1_1.done && (_a = logRecords_1.return)) _a.call(logRecords_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return resourceMap;\n}\nfunction logRecordsToResourceLogs(logRecords, encoder) {\n var resourceMap = createResourceMap(logRecords);\n return Array.from(resourceMap, function (_a) {\n var _b = __read(_a, 2), resource = _b[0], ismMap = _b[1];\n return ({\n resource: {\n attributes: toAttributes(resource.attributes),\n droppedAttributesCount: 0,\n },\n scopeLogs: Array.from(ismMap, function (_a) {\n var _b = __read(_a, 2), scopeLogs = _b[1];\n var _c = scopeLogs[0].instrumentationScope, name = _c.name, version = _c.version, schemaUrl = _c.schemaUrl;\n return {\n scope: { name: name, version: version },\n logRecords: scopeLogs.map(function (log) { return toLogRecord(log, encoder); }),\n schemaUrl: schemaUrl,\n };\n }),\n schemaUrl: undefined,\n });\n });\n}\nfunction toLogRecord(log, encoder) {\n var _a, _b, _c;\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: (_a = log.spanContext) === null || _a === void 0 ? void 0 : _a.traceFlags,\n traceId: encoder.encodeOptionalSpanContext((_b = log.spanContext) === null || _b === void 0 ? void 0 : _b.traceId),\n spanId: encoder.encodeOptionalSpanContext((_c = log.spanContext) === null || _c === void 0 ? void 0 : _c.spanId),\n };\n}\nfunction toSeverityNumber(severityNumber) {\n return severityNumber;\n}\nexport function toLogAttributes(attributes) {\n return Object.keys(attributes).map(function (key) { return toKeyValue(key, attributes[key]); });\n}\n//# sourceMappingURL=index.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { OTLPMetricExporterBase } from '../../OTLPMetricExporterBase';\nimport { OTLPExporterBrowserBase, appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';\nimport { createExportMetricsServiceRequest, } from '@opentelemetry/otlp-transformer';\nvar DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/metrics';\nvar DEFAULT_COLLECTOR_URL = \"http://localhost:4318/\" + DEFAULT_COLLECTOR_RESOURCE_PATH;\nvar OTLPExporterBrowserProxy = /** @class */ (function (_super) {\n __extends(OTLPExporterBrowserProxy, _super);\n function OTLPExporterBrowserProxy(config) {\n var _this = _super.call(this, config) || this;\n _this._headers = Object.assign(_this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_METRICS_HEADERS));\n return _this;\n }\n OTLPExporterBrowserProxy.prototype.getDefaultUrl = function (config) {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT)\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n };\n OTLPExporterBrowserProxy.prototype.convert = function (metrics) {\n return createExportMetricsServiceRequest(metrics, { useLongBits: false });\n };\n return OTLPExporterBrowserProxy;\n}(OTLPExporterBrowserBase));\n/**\n * Collector Metric Exporter for Web\n */\nvar OTLPMetricExporter = /** @class */ (function (_super) {\n __extends(OTLPMetricExporter, _super);\n function OTLPMetricExporter(config) {\n return _super.call(this, new OTLPExporterBrowserProxy(config), config) || this;\n }\n return OTLPMetricExporter;\n}(OTLPMetricExporterBase));\nexport { OTLPMetricExporter };\n//# sourceMappingURL=OTLPMetricExporter.js.map","/*\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 { context, diag, TraceFlags } from '@opentelemetry/api';\nimport { BindOnceFuture, ExportResultCode, getEnv, globalErrorHandler, suppressTracing, unrefTimer, } from '@opentelemetry/core';\n/**\n * Implementation of the {@link SpanProcessor} that batches spans exported by\n * the SDK then pushes them to the exporter pipeline.\n */\nvar BatchSpanProcessorBase = /** @class */ (function () {\n function BatchSpanProcessorBase(_exporter, config) {\n this._exporter = _exporter;\n this._isExporting = false;\n this._finishedSpans = [];\n this._droppedSpansCount = 0;\n var env = getEnv();\n this._maxExportBatchSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxExportBatchSize) === 'number'\n ? config.maxExportBatchSize\n : env.OTEL_BSP_MAX_EXPORT_BATCH_SIZE;\n this._maxQueueSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxQueueSize) === 'number'\n ? config.maxQueueSize\n : env.OTEL_BSP_MAX_QUEUE_SIZE;\n this._scheduledDelayMillis =\n typeof (config === null || config === void 0 ? void 0 : config.scheduledDelayMillis) === 'number'\n ? config.scheduledDelayMillis\n : env.OTEL_BSP_SCHEDULE_DELAY;\n this._exportTimeoutMillis =\n typeof (config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) === 'number'\n ? config.exportTimeoutMillis\n : env.OTEL_BSP_EXPORT_TIMEOUT;\n this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n if (this._maxExportBatchSize > this._maxQueueSize) {\n diag.warn('BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize');\n this._maxExportBatchSize = this._maxQueueSize;\n }\n }\n BatchSpanProcessorBase.prototype.forceFlush = function () {\n if (this._shutdownOnce.isCalled) {\n return this._shutdownOnce.promise;\n }\n return this._flushAll();\n };\n // does nothing.\n BatchSpanProcessorBase.prototype.onStart = function (_span, _parentContext) { };\n BatchSpanProcessorBase.prototype.onEnd = function (span) {\n if (this._shutdownOnce.isCalled) {\n return;\n }\n if ((span.spanContext().traceFlags & TraceFlags.SAMPLED) === 0) {\n return;\n }\n this._addToBuffer(span);\n };\n BatchSpanProcessorBase.prototype.shutdown = function () {\n return this._shutdownOnce.call();\n };\n BatchSpanProcessorBase.prototype._shutdown = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.onShutdown();\n })\n .then(function () {\n return _this._flushAll();\n })\n .then(function () {\n return _this._exporter.shutdown();\n });\n };\n /** Add a span in the buffer. */\n BatchSpanProcessorBase.prototype._addToBuffer = function (span) {\n if (this._finishedSpans.length >= this._maxQueueSize) {\n // limit reached, drop span\n if (this._droppedSpansCount === 0) {\n diag.debug('maxQueueSize reached, dropping spans');\n }\n this._droppedSpansCount++;\n return;\n }\n if (this._droppedSpansCount > 0) {\n // some spans were dropped, log once with count of spans dropped\n diag.warn(\"Dropped \" + this._droppedSpansCount + \" spans because maxQueueSize reached\");\n this._droppedSpansCount = 0;\n }\n this._finishedSpans.push(span);\n this._maybeStartTimer();\n };\n /**\n * Send all spans 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 BatchSpanProcessorBase.prototype._flushAll = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var promises = [];\n // calculate number of batches\n var count = Math.ceil(_this._finishedSpans.length / _this._maxExportBatchSize);\n for (var i = 0, j = count; i < j; i++) {\n promises.push(_this._flushOneBatch());\n }\n Promise.all(promises)\n .then(function () {\n resolve();\n })\n .catch(reject);\n });\n };\n BatchSpanProcessorBase.prototype._flushOneBatch = function () {\n var _this = this;\n this._clearTimer();\n if (this._finishedSpans.length === 0) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var timer = setTimeout(function () {\n // don't wait anymore for export, this way the next batch can start\n reject(new Error('Timeout'));\n }, _this._exportTimeoutMillis);\n // prevent downstream exporter calls from generating spans\n context.with(suppressTracing(context.active()), function () {\n // Reset the finished spans buffer here because the next invocations of the _flush method\n // could pass the same finished spans to the exporter if the buffer is cleared\n // outside the execution of this callback.\n var spans = _this._finishedSpans.splice(0, _this._maxExportBatchSize);\n var doExport = function () {\n return _this._exporter.export(spans, function (result) {\n var _a;\n clearTimeout(timer);\n if (result.code === ExportResultCode.SUCCESS) {\n resolve();\n }\n else {\n reject((_a = result.error) !== null && _a !== void 0 ? _a : new Error('BatchSpanProcessor: span export failed'));\n }\n });\n };\n var pendingResources = spans\n .map(function (span) { return span.resource; })\n .filter(function (resource) { return resource.asyncAttributesPending; });\n // Avoid scheduling a promise to make the behavior more predictable and easier to test\n if (pendingResources.length === 0) {\n doExport();\n }\n else {\n Promise.all(pendingResources.map(function (resource) { var _a; return (_a = resource.waitForAsyncAttributes) === null || _a === void 0 ? void 0 : _a.call(resource); })).then(doExport, function (err) {\n globalErrorHandler(err);\n reject(err);\n });\n }\n });\n });\n };\n BatchSpanProcessorBase.prototype._maybeStartTimer = function () {\n var _this = this;\n if (this._isExporting)\n return;\n var flush = function () {\n _this._isExporting = true;\n _this._flushOneBatch()\n .finally(function () {\n _this._isExporting = false;\n if (_this._finishedSpans.length > 0) {\n _this._clearTimer();\n _this._maybeStartTimer();\n }\n })\n .catch(function (e) {\n _this._isExporting = false;\n globalErrorHandler(e);\n });\n };\n // we only wait if the queue doesn't have enough elements yet\n if (this._finishedSpans.length >= this._maxExportBatchSize) {\n return flush();\n }\n if (this._timer !== undefined)\n return;\n this._timer = setTimeout(function () { return flush(); }, this._scheduledDelayMillis);\n unrefTimer(this._timer);\n };\n BatchSpanProcessorBase.prototype._clearTimer = function () {\n if (this._timer !== undefined) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n };\n return BatchSpanProcessorBase;\n}());\nexport { BatchSpanProcessorBase };\n//# sourceMappingURL=BatchSpanProcessorBase.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BatchSpanProcessorBase } from '../../../export/BatchSpanProcessorBase';\nvar BatchSpanProcessor = /** @class */ (function (_super) {\n __extends(BatchSpanProcessor, _super);\n function BatchSpanProcessor(_exporter, config) {\n var _this = _super.call(this, _exporter, config) || this;\n _this.onInit(config);\n return _this;\n }\n BatchSpanProcessor.prototype.onInit = function (config) {\n var _this = this;\n if ((config === null || config === void 0 ? void 0 : config.disableAutoFlushOnDocumentHide) !== true &&\n typeof document !== 'undefined') {\n this._visibilityChangeListener = function () {\n if (document.visibilityState === 'hidden') {\n void _this.forceFlush();\n }\n };\n this._pageHideListener = function () {\n void _this.forceFlush();\n };\n document.addEventListener('visibilitychange', this._visibilityChangeListener);\n // use 'pagehide' event as a fallback for Safari; see https://bugs.webkit.org/show_bug.cgi?id=116769\n document.addEventListener('pagehide', this._pageHideListener);\n }\n };\n BatchSpanProcessor.prototype.onShutdown = function () {\n if (typeof document !== 'undefined') {\n if (this._visibilityChangeListener) {\n document.removeEventListener('visibilitychange', this._visibilityChangeListener);\n }\n if (this._pageHideListener) {\n document.removeEventListener('pagehide', this._pageHideListener);\n }\n }\n };\n return BatchSpanProcessor;\n}(BatchSpanProcessorBase));\nexport { BatchSpanProcessor };\n//# sourceMappingURL=BatchSpanProcessor.js.map","/*\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 { createContextKey } from '@opentelemetry/api';\nvar SUPPRESS_TRACING_KEY = createContextKey('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nexport function suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexport function unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexport function isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\n//# sourceMappingURL=suppress-tracing.js.map","/*\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 var BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexport var BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexport var BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexport var BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexport var BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexport var BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexport var BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\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 { baggageEntryMetadataFromString, } from '@opentelemetry/api';\nimport { BAGGAGE_ITEMS_SEPARATOR, BAGGAGE_PROPERTIES_SEPARATOR, BAGGAGE_KEY_PAIR_SEPARATOR, BAGGAGE_MAX_TOTAL_LENGTH, } from './constants';\nexport function serializeKeyPairs(keyPairs) {\n return keyPairs.reduce(function (hValue, current) {\n var value = \"\" + hValue + (hValue !== '' ? BAGGAGE_ITEMS_SEPARATOR : '') + current;\n return value.length > BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexport function getKeyPairs(baggage) {\n return baggage.getAllEntries().map(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n var entry = encodeURIComponent(key) + \"=\" + encodeURIComponent(value.value);\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 return entry;\n });\n}\nexport function parsePairKeyValue(entry) {\n var valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n var keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n var separatorIndex = keyPairPart.indexOf(BAGGAGE_KEY_PAIR_SEPARATOR);\n if (separatorIndex <= 0)\n return;\n var key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim());\n var value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());\n var metadata;\n if (valueProps.length > 0) {\n metadata = baggageEntryMetadataFromString(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key: key, value: value, metadata: metadata };\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(value) {\n if (typeof value !== 'string' || value.length === 0)\n return {};\n return value\n .split(BAGGAGE_ITEMS_SEPARATOR)\n .map(function (entry) {\n return parsePairKeyValue(entry);\n })\n .filter(function (keyPair) { return keyPair !== undefined && keyPair.value.length > 0; })\n .reduce(function (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//# sourceMappingURL=utils.js.map","/*\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 { propagation, } from '@opentelemetry/api';\nimport { isTracingSuppressed } from '../../trace/suppress-tracing';\nimport { BAGGAGE_HEADER, BAGGAGE_ITEMS_SEPARATOR, BAGGAGE_MAX_NAME_VALUE_PAIRS, BAGGAGE_MAX_PER_NAME_VALUE_PAIRS, } from '../constants';\nimport { getKeyPairs, parsePairKeyValue, serializeKeyPairs } from '../utils';\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nvar W3CBaggagePropagator = /** @class */ (function () {\n function W3CBaggagePropagator() {\n }\n W3CBaggagePropagator.prototype.inject = function (context, carrier, setter) {\n var baggage = propagation.getBaggage(context);\n if (!baggage || isTracingSuppressed(context))\n return;\n var keyPairs = getKeyPairs(baggage)\n .filter(function (pair) {\n return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, BAGGAGE_MAX_NAME_VALUE_PAIRS);\n var headerValue = serializeKeyPairs(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, BAGGAGE_HEADER, headerValue);\n }\n };\n W3CBaggagePropagator.prototype.extract = function (context, carrier, getter) {\n var headerValue = getter.get(carrier, BAGGAGE_HEADER);\n var baggageString = Array.isArray(headerValue)\n ? headerValue.join(BAGGAGE_ITEMS_SEPARATOR)\n : headerValue;\n if (!baggageString)\n return context;\n var baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n var pairs = baggageString.split(BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(function (entry) {\n var keyPair = parsePairKeyValue(entry);\n if (keyPair) {\n var baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return propagation.setBaggage(context, propagation.createBaggage(baggage));\n };\n W3CBaggagePropagator.prototype.fields = function () {\n return [BAGGAGE_HEADER];\n };\n return W3CBaggagePropagator;\n}());\nexport { W3CBaggagePropagator };\n//# sourceMappingURL=W3CBaggagePropagator.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { diag } from '@opentelemetry/api';\nexport function sanitizeAttributes(attributes) {\n var e_1, _a;\n var out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n try {\n for (var _b = __values(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2), key = _d[0], val = _d[1];\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 }\n else {\n out[key] = val;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return out;\n}\nexport function isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexport function isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nfunction isHomogeneousAttributeValueArray(arr) {\n var e_2, _a;\n var type;\n try {\n for (var arr_1 = __values(arr), arr_1_1 = arr_1.next(); !arr_1_1.done; arr_1_1 = arr_1.next()) {\n var element = arr_1_1.value;\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (arr_1_1 && !arr_1_1.done && (_a = arr_1.return)) _a.call(arr_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","/*\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';\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() {\n return function (ex) {\n diag.error(stringifyException(ex));\n };\n}\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\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) {\n var result = {};\n var current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(function (propertyName) {\n if (result[propertyName])\n return;\n var value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","/*\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 { loggingErrorHandler } from './logging-error-handler';\n/** The global error handler delegate */\nvar delegateHandler = loggingErrorHandler();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nexport function setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nexport function globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch (_a) { } // eslint-disable-line no-empty\n}\n//# sourceMappingURL=global-error-handler.js.map","/*\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 var TracesSamplerValues;\n(function (TracesSamplerValues) {\n TracesSamplerValues[\"AlwaysOff\"] = \"always_off\";\n TracesSamplerValues[\"AlwaysOn\"] = \"always_on\";\n TracesSamplerValues[\"ParentBasedAlwaysOff\"] = \"parentbased_always_off\";\n TracesSamplerValues[\"ParentBasedAlwaysOn\"] = \"parentbased_always_on\";\n TracesSamplerValues[\"ParentBasedTraceIdRatio\"] = \"parentbased_traceidratio\";\n TracesSamplerValues[\"TraceIdRatio\"] = \"traceidratio\";\n})(TracesSamplerValues || (TracesSamplerValues = {}));\n//# sourceMappingURL=sampling.js.map","/*\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 { DiagLogLevel } from '@opentelemetry/api';\nimport { TracesSamplerValues } from './sampling';\nvar DEFAULT_LIST_SEPARATOR = ',';\n/**\n * Environment interface to define all names\n */\nvar ENVIRONMENT_BOOLEAN_KEYS = ['OTEL_SDK_DISABLED'];\nfunction isEnvVarABoolean(key) {\n return (ENVIRONMENT_BOOLEAN_KEYS.indexOf(key) > -1);\n}\nvar ENVIRONMENT_NUMBERS_KEYS = [\n 'OTEL_BSP_EXPORT_TIMEOUT',\n 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BSP_MAX_QUEUE_SIZE',\n 'OTEL_BSP_SCHEDULE_DELAY',\n 'OTEL_BLRP_EXPORT_TIMEOUT',\n 'OTEL_BLRP_MAX_EXPORT_BATCH_SIZE',\n 'OTEL_BLRP_MAX_QUEUE_SIZE',\n 'OTEL_BLRP_SCHEDULE_DELAY',\n 'OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT',\n 'OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT',\n 'OTEL_SPAN_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_LINK_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT',\n 'OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT',\n 'OTEL_EXPORTER_OTLP_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_METRICS_TIMEOUT',\n 'OTEL_EXPORTER_OTLP_LOGS_TIMEOUT',\n 'OTEL_EXPORTER_JAEGER_AGENT_PORT',\n];\nfunction isEnvVarANumber(key) {\n return (ENVIRONMENT_NUMBERS_KEYS.indexOf(key) > -1);\n}\nvar ENVIRONMENT_LISTS_KEYS = [\n 'OTEL_NO_PATCH_MODULES',\n 'OTEL_PROPAGATORS',\n 'OTEL_SEMCONV_STABILITY_OPT_IN',\n];\nfunction isEnvVarAList(key) {\n return ENVIRONMENT_LISTS_KEYS.indexOf(key) > -1;\n}\nexport var DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\nexport var DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\nexport var DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT = 128;\nexport var DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT = 128;\n/**\n * Default environment variables\n */\nexport var DEFAULT_ENVIRONMENT = {\n OTEL_SDK_DISABLED: false,\n CONTAINER_NAME: '',\n ECS_CONTAINER_METADATA_URI_V4: '',\n ECS_CONTAINER_METADATA_URI: '',\n HOSTNAME: '',\n KUBERNETES_SERVICE_HOST: '',\n NAMESPACE: '',\n OTEL_BSP_EXPORT_TIMEOUT: 30000,\n OTEL_BSP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BSP_MAX_QUEUE_SIZE: 2048,\n OTEL_BSP_SCHEDULE_DELAY: 5000,\n OTEL_BLRP_EXPORT_TIMEOUT: 30000,\n OTEL_BLRP_MAX_EXPORT_BATCH_SIZE: 512,\n OTEL_BLRP_MAX_QUEUE_SIZE: 2048,\n OTEL_BLRP_SCHEDULE_DELAY: 5000,\n OTEL_EXPORTER_JAEGER_AGENT_HOST: '',\n OTEL_EXPORTER_JAEGER_AGENT_PORT: 6832,\n OTEL_EXPORTER_JAEGER_ENDPOINT: '',\n OTEL_EXPORTER_JAEGER_PASSWORD: '',\n OTEL_EXPORTER_JAEGER_USER: '',\n OTEL_EXPORTER_OTLP_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: '',\n OTEL_EXPORTER_OTLP_HEADERS: '',\n OTEL_EXPORTER_OTLP_TRACES_HEADERS: '',\n OTEL_EXPORTER_OTLP_METRICS_HEADERS: '',\n OTEL_EXPORTER_OTLP_LOGS_HEADERS: '',\n OTEL_EXPORTER_OTLP_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: 10000,\n OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: 10000,\n OTEL_EXPORTER_ZIPKIN_ENDPOINT: 'http://localhost:9411/api/v2/spans',\n OTEL_LOG_LEVEL: DiagLogLevel.INFO,\n OTEL_NO_PATCH_MODULES: [],\n OTEL_PROPAGATORS: ['tracecontext', 'baggage'],\n OTEL_RESOURCE_ATTRIBUTES: '',\n OTEL_SERVICE_NAME: '',\n OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT: DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT: DEFAULT_ATTRIBUTE_COUNT_LIMIT,\n OTEL_SPAN_EVENT_COUNT_LIMIT: 128,\n OTEL_SPAN_LINK_COUNT_LIMIT: 128,\n OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT: DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,\n OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT: DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,\n OTEL_TRACES_EXPORTER: '',\n OTEL_TRACES_SAMPLER: TracesSamplerValues.ParentBasedAlwaysOn,\n OTEL_TRACES_SAMPLER_ARG: '',\n OTEL_LOGS_EXPORTER: '',\n OTEL_EXPORTER_OTLP_INSECURE: '',\n OTEL_EXPORTER_OTLP_TRACES_INSECURE: '',\n OTEL_EXPORTER_OTLP_METRICS_INSECURE: '',\n OTEL_EXPORTER_OTLP_LOGS_INSECURE: '',\n OTEL_EXPORTER_OTLP_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: '',\n OTEL_EXPORTER_OTLP_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY: '',\n OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE: '',\n OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_METRICS_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_LOGS_PROTOCOL: 'http/protobuf',\n OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: 'cumulative',\n OTEL_SEMCONV_STABILITY_OPT_IN: [],\n};\n/**\n * @param key\n * @param environment\n * @param values\n */\nfunction parseBoolean(key, environment, values) {\n if (typeof values[key] === 'undefined') {\n return;\n }\n var value = String(values[key]);\n // support case-insensitive \"true\"\n environment[key] = value.toLowerCase() === 'true';\n}\n/**\n * Parses a variable as number with number validation\n * @param name\n * @param environment\n * @param values\n * @param min\n * @param max\n */\nfunction parseNumber(name, environment, values, min, max) {\n if (min === void 0) { min = -Infinity; }\n if (max === void 0) { max = Infinity; }\n if (typeof values[name] !== 'undefined') {\n var value = Number(values[name]);\n if (!isNaN(value)) {\n if (value < min) {\n environment[name] = min;\n }\n else if (value > max) {\n environment[name] = max;\n }\n else {\n environment[name] = value;\n }\n }\n }\n}\n/**\n * Parses list-like strings from input into output.\n * @param name\n * @param environment\n * @param values\n * @param separator\n */\nfunction parseStringList(name, output, input, separator) {\n if (separator === void 0) { separator = DEFAULT_LIST_SEPARATOR; }\n var givenValue = input[name];\n if (typeof givenValue === 'string') {\n output[name] = givenValue.split(separator).map(function (v) { return v.trim(); });\n }\n}\n// The support string -> DiagLogLevel mappings\nvar logLevelMap = {\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 * Environmentally sets log level if valid log level string is provided\n * @param key\n * @param environment\n * @param values\n */\nfunction setLogLevelFromEnv(key, environment, values) {\n var value = values[key];\n if (typeof value === 'string') {\n var theLevel = logLevelMap[value.toUpperCase()];\n if (theLevel != null) {\n environment[key] = theLevel;\n }\n }\n}\n/**\n * Parses environment values\n * @param values\n */\nexport function parseEnvironment(values) {\n var environment = {};\n for (var env in DEFAULT_ENVIRONMENT) {\n var key = env;\n switch (key) {\n case 'OTEL_LOG_LEVEL':\n setLogLevelFromEnv(key, environment, values);\n break;\n default:\n if (isEnvVarABoolean(key)) {\n parseBoolean(key, environment, values);\n }\n else if (isEnvVarANumber(key)) {\n parseNumber(key, environment, values);\n }\n else if (isEnvVarAList(key)) {\n parseStringList(key, environment, values);\n }\n else {\n var value = values[key];\n if (typeof value !== 'undefined' && value !== null) {\n environment[key] = String(value);\n }\n }\n }\n }\n return environment;\n}\n//# sourceMappingURL=environment.js.map","/*\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// Updates to this file should also be replicated to @opentelemetry/api too.\n/**\n * - globalThis (New standard)\n * - self (Will return the current window instance for supported browsers)\n * - window (fallback for older browser implementations)\n * - global (NodeJS implementation)\n * - (When all else fails)\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef\nexport var _globalThis = typeof globalThis === 'object'\n ? globalThis\n : typeof self === 'object'\n ? self\n : typeof window === 'object'\n ? window\n : typeof global === 'object'\n ? global\n : {};\n//# sourceMappingURL=globalThis.js.map","/*\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 { DEFAULT_ENVIRONMENT, parseEnvironment, } from '../../utils/environment';\nimport { _globalThis } from './globalThis';\n/**\n * Gets the environment variables\n */\nexport function getEnv() {\n var globalEnv = parseEnvironment(_globalThis);\n return Object.assign({}, DEFAULT_ENVIRONMENT, globalEnv);\n}\nexport function getEnvWithoutDefaults() {\n return parseEnvironment(_globalThis);\n}\n//# sourceMappingURL=environment.js.map","/*\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 var otperformance = performance;\n//# sourceMappingURL=performance.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.28.0';\n//# sourceMappingURL=version.js.map","/*\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 { createConstMap } from '../internal/utils';\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticAttributes\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\nvar TMP_AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn';\nvar TMP_DB_SYSTEM = 'db.system';\nvar TMP_DB_CONNECTION_STRING = 'db.connection_string';\nvar TMP_DB_USER = 'db.user';\nvar TMP_DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname';\nvar TMP_DB_NAME = 'db.name';\nvar TMP_DB_STATEMENT = 'db.statement';\nvar TMP_DB_OPERATION = 'db.operation';\nvar TMP_DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name';\nvar TMP_DB_CASSANDRA_KEYSPACE = 'db.cassandra.keyspace';\nvar TMP_DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size';\nvar TMP_DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level';\nvar TMP_DB_CASSANDRA_TABLE = 'db.cassandra.table';\nvar TMP_DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence';\nvar TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count';\nvar TMP_DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id';\nvar TMP_DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc';\nvar TMP_DB_HBASE_NAMESPACE = 'db.hbase.namespace';\nvar TMP_DB_REDIS_DATABASE_INDEX = 'db.redis.database_index';\nvar TMP_DB_MONGODB_COLLECTION = 'db.mongodb.collection';\nvar TMP_DB_SQL_TABLE = 'db.sql.table';\nvar TMP_EXCEPTION_TYPE = 'exception.type';\nvar TMP_EXCEPTION_MESSAGE = 'exception.message';\nvar TMP_EXCEPTION_STACKTRACE = 'exception.stacktrace';\nvar TMP_EXCEPTION_ESCAPED = 'exception.escaped';\nvar TMP_FAAS_TRIGGER = 'faas.trigger';\nvar TMP_FAAS_EXECUTION = 'faas.execution';\nvar TMP_FAAS_DOCUMENT_COLLECTION = 'faas.document.collection';\nvar TMP_FAAS_DOCUMENT_OPERATION = 'faas.document.operation';\nvar TMP_FAAS_DOCUMENT_TIME = 'faas.document.time';\nvar TMP_FAAS_DOCUMENT_NAME = 'faas.document.name';\nvar TMP_FAAS_TIME = 'faas.time';\nvar TMP_FAAS_CRON = 'faas.cron';\nvar TMP_FAAS_COLDSTART = 'faas.coldstart';\nvar TMP_FAAS_INVOKED_NAME = 'faas.invoked_name';\nvar TMP_FAAS_INVOKED_PROVIDER = 'faas.invoked_provider';\nvar TMP_FAAS_INVOKED_REGION = 'faas.invoked_region';\nvar TMP_NET_TRANSPORT = 'net.transport';\nvar TMP_NET_PEER_IP = 'net.peer.ip';\nvar TMP_NET_PEER_PORT = 'net.peer.port';\nvar TMP_NET_PEER_NAME = 'net.peer.name';\nvar TMP_NET_HOST_IP = 'net.host.ip';\nvar TMP_NET_HOST_PORT = 'net.host.port';\nvar TMP_NET_HOST_NAME = 'net.host.name';\nvar TMP_NET_HOST_CONNECTION_TYPE = 'net.host.connection.type';\nvar TMP_NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype';\nvar TMP_NET_HOST_CARRIER_NAME = 'net.host.carrier.name';\nvar TMP_NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc';\nvar TMP_NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc';\nvar TMP_NET_HOST_CARRIER_ICC = 'net.host.carrier.icc';\nvar TMP_PEER_SERVICE = 'peer.service';\nvar TMP_ENDUSER_ID = 'enduser.id';\nvar TMP_ENDUSER_ROLE = 'enduser.role';\nvar TMP_ENDUSER_SCOPE = 'enduser.scope';\nvar TMP_THREAD_ID = 'thread.id';\nvar TMP_THREAD_NAME = 'thread.name';\nvar TMP_CODE_FUNCTION = 'code.function';\nvar TMP_CODE_NAMESPACE = 'code.namespace';\nvar TMP_CODE_FILEPATH = 'code.filepath';\nvar TMP_CODE_LINENO = 'code.lineno';\nvar TMP_HTTP_METHOD = 'http.method';\nvar TMP_HTTP_URL = 'http.url';\nvar TMP_HTTP_TARGET = 'http.target';\nvar TMP_HTTP_HOST = 'http.host';\nvar TMP_HTTP_SCHEME = 'http.scheme';\nvar TMP_HTTP_STATUS_CODE = 'http.status_code';\nvar TMP_HTTP_FLAVOR = 'http.flavor';\nvar TMP_HTTP_USER_AGENT = 'http.user_agent';\nvar TMP_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length';\nvar TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';\nvar TMP_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\nvar TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';\nvar TMP_HTTP_SERVER_NAME = 'http.server_name';\nvar TMP_HTTP_ROUTE = 'http.route';\nvar TMP_HTTP_CLIENT_IP = 'http.client_ip';\nvar TMP_AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names';\nvar TMP_AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity';\nvar TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics';\nvar TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity';\nvar TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity';\nvar TMP_AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read';\nvar TMP_AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection';\nvar TMP_AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit';\nvar TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get';\nvar TMP_AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name';\nvar TMP_AWS_DYNAMODB_SELECT = 'aws.dynamodb.select';\nvar TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes';\nvar TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes';\nvar TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table';\nvar TMP_AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count';\nvar TMP_AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward';\nvar TMP_AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment';\nvar TMP_AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments';\nvar TMP_AWS_DYNAMODB_COUNT = 'aws.dynamodb.count';\nvar TMP_AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count';\nvar TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions';\nvar TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates';\nvar TMP_MESSAGING_SYSTEM = 'messaging.system';\nvar TMP_MESSAGING_DESTINATION = 'messaging.destination';\nvar TMP_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind';\nvar TMP_MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination';\nvar TMP_MESSAGING_PROTOCOL = 'messaging.protocol';\nvar TMP_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version';\nvar TMP_MESSAGING_URL = 'messaging.url';\nvar TMP_MESSAGING_MESSAGE_ID = 'messaging.message_id';\nvar TMP_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id';\nvar TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message_payload_size_bytes';\nvar TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message_payload_compressed_size_bytes';\nvar TMP_MESSAGING_OPERATION = 'messaging.operation';\nvar TMP_MESSAGING_CONSUMER_ID = 'messaging.consumer_id';\nvar TMP_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key';\nvar TMP_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message_key';\nvar TMP_MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer_group';\nvar TMP_MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id';\nvar TMP_MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition';\nvar TMP_MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone';\nvar TMP_RPC_SYSTEM = 'rpc.system';\nvar TMP_RPC_SERVICE = 'rpc.service';\nvar TMP_RPC_METHOD = 'rpc.method';\nvar TMP_RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code';\nvar TMP_RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version';\nvar TMP_RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id';\nvar TMP_RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code';\nvar TMP_RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message';\nvar TMP_MESSAGE_TYPE = 'message.type';\nvar TMP_MESSAGE_ID = 'message.id';\nvar TMP_MESSAGE_COMPRESSED_SIZE = 'message.compressed_size';\nvar TMP_MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size';\n/**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n *\n * @deprecated use ATTR_AWS_LAMBDA_INVOKED_ARN\n */\nexport var SEMATTRS_AWS_LAMBDA_INVOKED_ARN = TMP_AWS_LAMBDA_INVOKED_ARN;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated use ATTR_DB_SYSTEM\n */\nexport var SEMATTRS_DB_SYSTEM = TMP_DB_SYSTEM;\n/**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n *\n * @deprecated use ATTR_DB_CONNECTION_STRING\n */\nexport var SEMATTRS_DB_CONNECTION_STRING = TMP_DB_CONNECTION_STRING;\n/**\n * Username for accessing the database.\n *\n * @deprecated use ATTR_DB_USER\n */\nexport var SEMATTRS_DB_USER = TMP_DB_USER;\n/**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n *\n * @deprecated use ATTR_DB_JDBC_DRIVER_CLASSNAME\n */\nexport var SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = TMP_DB_JDBC_DRIVER_CLASSNAME;\n/**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called "schema name".\n *\n * @deprecated use ATTR_DB_NAME\n */\nexport var SEMATTRS_DB_NAME = TMP_DB_NAME;\n/**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n *\n * @deprecated use ATTR_DB_STATEMENT\n */\nexport var SEMATTRS_DB_STATEMENT = TMP_DB_STATEMENT;\n/**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n *\n * @deprecated use ATTR_DB_OPERATION\n */\nexport var SEMATTRS_DB_OPERATION = TMP_DB_OPERATION;\n/**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n *\n * @deprecated use ATTR_DB_MSSQL_INSTANCE_NAME\n */\nexport var SEMATTRS_DB_MSSQL_INSTANCE_NAME = TMP_DB_MSSQL_INSTANCE_NAME;\n/**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated use ATTR_DB_CASSANDRA_KEYSPACE\n */\nexport var SEMATTRS_DB_CASSANDRA_KEYSPACE = TMP_DB_CASSANDRA_KEYSPACE;\n/**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n *\n * @deprecated use ATTR_DB_CASSANDRA_PAGE_SIZE\n */\nexport var SEMATTRS_DB_CASSANDRA_PAGE_SIZE = TMP_DB_CASSANDRA_PAGE_SIZE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated use ATTR_DB_CASSANDRA_CONSISTENCY_LEVEL\n */\nexport var SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = TMP_DB_CASSANDRA_CONSISTENCY_LEVEL;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n *\n * @deprecated use ATTR_DB_CASSANDRA_TABLE\n */\nexport var SEMATTRS_DB_CASSANDRA_TABLE = TMP_DB_CASSANDRA_TABLE;\n/**\n * Whether or not the query is idempotent.\n *\n * @deprecated use ATTR_DB_CASSANDRA_IDEMPOTENCE\n */\nexport var SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = TMP_DB_CASSANDRA_IDEMPOTENCE;\n/**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n *\n * @deprecated use ATTR_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT\n */\nexport var SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT;\n/**\n * The ID of the coordinating node for a query.\n *\n * @deprecated use ATTR_DB_CASSANDRA_COORDINATOR_ID\n */\nexport var SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = TMP_DB_CASSANDRA_COORDINATOR_ID;\n/**\n * The data center of the coordinating node for a query.\n *\n * @deprecated use ATTR_DB_CASSANDRA_COORDINATOR_DC\n */\nexport var SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = TMP_DB_CASSANDRA_COORDINATOR_DC;\n/**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated use ATTR_DB_HBASE_NAMESPACE\n */\nexport var SEMATTRS_DB_HBASE_NAMESPACE = TMP_DB_HBASE_NAMESPACE;\n/**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated use ATTR_DB_REDIS_DATABASE_INDEX\n */\nexport var SEMATTRS_DB_REDIS_DATABASE_INDEX = TMP_DB_REDIS_DATABASE_INDEX;\n/**\n * The collection being accessed within the database stated in `db.name`.\n *\n * @deprecated use ATTR_DB_MONGODB_COLLECTION\n */\nexport var SEMATTRS_DB_MONGODB_COLLECTION = TMP_DB_MONGODB_COLLECTION;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n *\n * @deprecated use ATTR_DB_SQL_TABLE\n */\nexport var SEMATTRS_DB_SQL_TABLE = TMP_DB_SQL_TABLE;\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 * @deprecated use ATTR_EXCEPTION_TYPE\n */\nexport var SEMATTRS_EXCEPTION_TYPE = TMP_EXCEPTION_TYPE;\n/**\n * The exception message.\n *\n * @deprecated use ATTR_EXCEPTION_MESSAGE\n */\nexport var SEMATTRS_EXCEPTION_MESSAGE = TMP_EXCEPTION_MESSAGE;\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 * @deprecated use ATTR_EXCEPTION_STACKTRACE\n */\nexport var SEMATTRS_EXCEPTION_STACKTRACE = TMP_EXCEPTION_STACKTRACE;\n/**\n* SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n*\n* Note: An exception is considered to have escaped (or left) the scope of a span,\nif that span is ended while the exception is still logically "in flight".\nThis may be actually "in flight" in some languages (e.g. if the exception\nis passed to a Context manager's `__exit__` method in Python) but will\nusually be caught at the point of recording the exception in most languages.\n\nIt is usually not possible to determine at the point where an exception is thrown\nwhether it will escape the scope of a span.\nHowever, it is trivial to know that an exception\nwill escape, if one checks for an active exception just before ending the span,\nas done in the [example above](#exception-end-example).\n\nIt follows that an exception may still escape the scope of the span\neven if the `exception.escaped` attribute was not set or set to false,\nsince the event might have been recorded at a time where it was not\nclear whether the exception will escape.\n*\n* @deprecated use ATTR_EXCEPTION_ESCAPED\n*/\nexport var SEMATTRS_EXCEPTION_ESCAPED = TMP_EXCEPTION_ESCAPED;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated use ATTR_FAAS_TRIGGER\n */\nexport var SEMATTRS_FAAS_TRIGGER = TMP_FAAS_TRIGGER;\n/**\n * The execution ID of the current function execution.\n *\n * @deprecated use ATTR_FAAS_EXECUTION\n */\nexport var SEMATTRS_FAAS_EXECUTION = TMP_FAAS_EXECUTION;\n/**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_COLLECTION\n */\nexport var SEMATTRS_FAAS_DOCUMENT_COLLECTION = TMP_FAAS_DOCUMENT_COLLECTION;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_OPERATION\n */\nexport var SEMATTRS_FAAS_DOCUMENT_OPERATION = TMP_FAAS_DOCUMENT_OPERATION;\n/**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_TIME\n */\nexport var SEMATTRS_FAAS_DOCUMENT_TIME = TMP_FAAS_DOCUMENT_TIME;\n/**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n *\n * @deprecated use ATTR_FAAS_DOCUMENT_NAME\n */\nexport var SEMATTRS_FAAS_DOCUMENT_NAME = TMP_FAAS_DOCUMENT_NAME;\n/**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n *\n * @deprecated use ATTR_FAAS_TIME\n */\nexport var SEMATTRS_FAAS_TIME = TMP_FAAS_TIME;\n/**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n *\n * @deprecated use ATTR_FAAS_CRON\n */\nexport var SEMATTRS_FAAS_CRON = TMP_FAAS_CRON;\n/**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n *\n * @deprecated use ATTR_FAAS_COLDSTART\n */\nexport var SEMATTRS_FAAS_COLDSTART = TMP_FAAS_COLDSTART;\n/**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n *\n * @deprecated use ATTR_FAAS_INVOKED_NAME\n */\nexport var SEMATTRS_FAAS_INVOKED_NAME = TMP_FAAS_INVOKED_NAME;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated use ATTR_FAAS_INVOKED_PROVIDER\n */\nexport var SEMATTRS_FAAS_INVOKED_PROVIDER = TMP_FAAS_INVOKED_PROVIDER;\n/**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n *\n * @deprecated use ATTR_FAAS_INVOKED_REGION\n */\nexport var SEMATTRS_FAAS_INVOKED_REGION = TMP_FAAS_INVOKED_REGION;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated use ATTR_NET_TRANSPORT\n */\nexport var SEMATTRS_NET_TRANSPORT = TMP_NET_TRANSPORT;\n/**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n *\n * @deprecated use ATTR_NET_PEER_IP\n */\nexport var SEMATTRS_NET_PEER_IP = TMP_NET_PEER_IP;\n/**\n * Remote port number.\n *\n * @deprecated use ATTR_NET_PEER_PORT\n */\nexport var SEMATTRS_NET_PEER_PORT = TMP_NET_PEER_PORT;\n/**\n * Remote hostname or similar, see note below.\n *\n * @deprecated use ATTR_NET_PEER_NAME\n */\nexport var SEMATTRS_NET_PEER_NAME = TMP_NET_PEER_NAME;\n/**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n *\n * @deprecated use ATTR_NET_HOST_IP\n */\nexport var SEMATTRS_NET_HOST_IP = TMP_NET_HOST_IP;\n/**\n * Like `net.peer.port` but for the host port.\n *\n * @deprecated use ATTR_NET_HOST_PORT\n */\nexport var SEMATTRS_NET_HOST_PORT = TMP_NET_HOST_PORT;\n/**\n * Local hostname or similar, see note below.\n *\n * @deprecated use ATTR_NET_HOST_NAME\n */\nexport var SEMATTRS_NET_HOST_NAME = TMP_NET_HOST_NAME;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated use ATTR_NET_HOST_CONNECTION_TYPE\n */\nexport var SEMATTRS_NET_HOST_CONNECTION_TYPE = TMP_NET_HOST_CONNECTION_TYPE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated use ATTR_NET_HOST_CONNECTION_SUBTYPE\n */\nexport var SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = TMP_NET_HOST_CONNECTION_SUBTYPE;\n/**\n * The name of the mobile carrier.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_NAME\n */\nexport var SEMATTRS_NET_HOST_CARRIER_NAME = TMP_NET_HOST_CARRIER_NAME;\n/**\n * The mobile carrier country code.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_MCC\n */\nexport var SEMATTRS_NET_HOST_CARRIER_MCC = TMP_NET_HOST_CARRIER_MCC;\n/**\n * The mobile carrier network code.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_MNC\n */\nexport var SEMATTRS_NET_HOST_CARRIER_MNC = TMP_NET_HOST_CARRIER_MNC;\n/**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n *\n * @deprecated use ATTR_NET_HOST_CARRIER_ICC\n */\nexport var SEMATTRS_NET_HOST_CARRIER_ICC = TMP_NET_HOST_CARRIER_ICC;\n/**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n *\n * @deprecated use ATTR_PEER_SERVICE\n */\nexport var SEMATTRS_PEER_SERVICE = TMP_PEER_SERVICE;\n/**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n *\n * @deprecated use ATTR_ENDUSER_ID\n */\nexport var SEMATTRS_ENDUSER_ID = TMP_ENDUSER_ID;\n/**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n *\n * @deprecated use ATTR_ENDUSER_ROLE\n */\nexport var SEMATTRS_ENDUSER_ROLE = TMP_ENDUSER_ROLE;\n/**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n *\n * @deprecated use ATTR_ENDUSER_SCOPE\n */\nexport var SEMATTRS_ENDUSER_SCOPE = TMP_ENDUSER_SCOPE;\n/**\n * Current "managed" thread ID (as opposed to OS thread ID).\n *\n * @deprecated use ATTR_THREAD_ID\n */\nexport var SEMATTRS_THREAD_ID = TMP_THREAD_ID;\n/**\n * Current thread name.\n *\n * @deprecated use ATTR_THREAD_NAME\n */\nexport var SEMATTRS_THREAD_NAME = TMP_THREAD_NAME;\n/**\n * The method or function name, or equivalent (usually rightmost part of the code unit's name).\n *\n * @deprecated use ATTR_CODE_FUNCTION\n */\nexport var SEMATTRS_CODE_FUNCTION = TMP_CODE_FUNCTION;\n/**\n * The "namespace" within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n *\n * @deprecated use ATTR_CODE_NAMESPACE\n */\nexport var SEMATTRS_CODE_NAMESPACE = TMP_CODE_NAMESPACE;\n/**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n *\n * @deprecated use ATTR_CODE_FILEPATH\n */\nexport var SEMATTRS_CODE_FILEPATH = TMP_CODE_FILEPATH;\n/**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n *\n * @deprecated use ATTR_CODE_LINENO\n */\nexport var SEMATTRS_CODE_LINENO = TMP_CODE_LINENO;\n/**\n * HTTP request method.\n *\n * @deprecated use ATTR_HTTP_METHOD\n */\nexport var SEMATTRS_HTTP_METHOD = TMP_HTTP_METHOD;\n/**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute's value should be `https://www.example.com/`.\n *\n * @deprecated use ATTR_HTTP_URL\n */\nexport var SEMATTRS_HTTP_URL = TMP_HTTP_URL;\n/**\n * The full request target as passed in a HTTP request line or equivalent.\n *\n * @deprecated use ATTR_HTTP_TARGET\n */\nexport var SEMATTRS_HTTP_TARGET = TMP_HTTP_TARGET;\n/**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n *\n * @deprecated use ATTR_HTTP_HOST\n */\nexport var SEMATTRS_HTTP_HOST = TMP_HTTP_HOST;\n/**\n * The URI scheme identifying the used protocol.\n *\n * @deprecated use ATTR_HTTP_SCHEME\n */\nexport var SEMATTRS_HTTP_SCHEME = TMP_HTTP_SCHEME;\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n *\n * @deprecated use ATTR_HTTP_STATUS_CODE\n */\nexport var SEMATTRS_HTTP_STATUS_CODE = TMP_HTTP_STATUS_CODE;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated use ATTR_HTTP_FLAVOR\n */\nexport var SEMATTRS_HTTP_FLAVOR = TMP_HTTP_FLAVOR;\n/**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n *\n * @deprecated use ATTR_HTTP_USER_AGENT\n */\nexport var SEMATTRS_HTTP_USER_AGENT = TMP_HTTP_USER_AGENT;\n/**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n *\n * @deprecated use ATTR_HTTP_REQUEST_CONTENT_LENGTH\n */\nexport var SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = TMP_HTTP_REQUEST_CONTENT_LENGTH;\n/**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n *\n * @deprecated use ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED\n */\nexport var SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n *\n * @deprecated use ATTR_HTTP_RESPONSE_CONTENT_LENGTH\n */\nexport var SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = TMP_HTTP_RESPONSE_CONTENT_LENGTH;\n/**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n *\n * @deprecated use ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED\n */\nexport var SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n *\n * @deprecated use ATTR_HTTP_SERVER_NAME\n */\nexport var SEMATTRS_HTTP_SERVER_NAME = TMP_HTTP_SERVER_NAME;\n/**\n * The matched route (path template).\n *\n * @deprecated use ATTR_HTTP_ROUTE\n */\nexport var SEMATTRS_HTTP_ROUTE = TMP_HTTP_ROUTE;\n/**\n* The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n*\n* Note: This is not necessarily the same as `net.peer.ip`, which would\nidentify the network-level peer, which may be a proxy.\n\nThis attribute should be set when a source of information different\nfrom the one used for `net.peer.ip`, is available even if that other\nsource just confirms the same value as `net.peer.ip`.\nRationale: For `net.peer.ip`, one typically does not know if it\ncomes from a proxy, reverse proxy, or the actual client. Setting\n`http.client_ip` when it's the same as `net.peer.ip` means that\none is at least somewhat confident that the address is not that of\nthe closest proxy.\n*\n* @deprecated use ATTR_HTTP_CLIENT_IP\n*/\nexport var SEMATTRS_HTTP_CLIENT_IP = TMP_HTTP_CLIENT_IP;\n/**\n * The keys in the `RequestItems` object field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_TABLE_NAMES\n */\nexport var SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = TMP_AWS_DYNAMODB_TABLE_NAMES;\n/**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY\n */\nexport var SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = TMP_AWS_DYNAMODB_CONSUMED_CAPACITY;\n/**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS\n */\nexport var SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS;\n/**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY\n */\nexport var SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY;\n/**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY\n */\nexport var SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY;\n/**\n * The value of the `ConsistentRead` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_CONSISTENT_READ\n */\nexport var SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = TMP_AWS_DYNAMODB_CONSISTENT_READ;\n/**\n * The value of the `ProjectionExpression` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_PROJECTION\n */\nexport var SEMATTRS_AWS_DYNAMODB_PROJECTION = TMP_AWS_DYNAMODB_PROJECTION;\n/**\n * The value of the `Limit` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_LIMIT\n */\nexport var SEMATTRS_AWS_DYNAMODB_LIMIT = TMP_AWS_DYNAMODB_LIMIT;\n/**\n * The value of the `AttributesToGet` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_ATTRIBUTES_TO_GET\n */\nexport var SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET;\n/**\n * The value of the `IndexName` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_INDEX_NAME\n */\nexport var SEMATTRS_AWS_DYNAMODB_INDEX_NAME = TMP_AWS_DYNAMODB_INDEX_NAME;\n/**\n * The value of the `Select` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SELECT\n */\nexport var SEMATTRS_AWS_DYNAMODB_SELECT = TMP_AWS_DYNAMODB_SELECT;\n/**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES\n */\nexport var SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES;\n/**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES\n */\nexport var SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES;\n/**\n * The value of the `ExclusiveStartTableName` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE\n */\nexport var SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE;\n/**\n * The the number of items in the `TableNames` response parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_TABLE_COUNT\n */\nexport var SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = TMP_AWS_DYNAMODB_TABLE_COUNT;\n/**\n * The value of the `ScanIndexForward` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SCAN_FORWARD\n */\nexport var SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = TMP_AWS_DYNAMODB_SCAN_FORWARD;\n/**\n * The value of the `Segment` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SEGMENT\n */\nexport var SEMATTRS_AWS_DYNAMODB_SEGMENT = TMP_AWS_DYNAMODB_SEGMENT;\n/**\n * The value of the `TotalSegments` request parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS\n */\nexport var SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = TMP_AWS_DYNAMODB_TOTAL_SEGMENTS;\n/**\n * The value of the `Count` response parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_COUNT\n */\nexport var SEMATTRS_AWS_DYNAMODB_COUNT = TMP_AWS_DYNAMODB_COUNT;\n/**\n * The value of the `ScannedCount` response parameter.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_SCANNED_COUNT\n */\nexport var SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = TMP_AWS_DYNAMODB_SCANNED_COUNT;\n/**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS\n */\nexport var SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS;\n/**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n *\n * @deprecated use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES\n */\nexport var SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES;\n/**\n * A string identifying the messaging system.\n *\n * @deprecated use ATTR_MESSAGING_SYSTEM\n */\nexport var SEMATTRS_MESSAGING_SYSTEM = TMP_MESSAGING_SYSTEM;\n/**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n *\n * @deprecated use ATTR_MESSAGING_DESTINATION\n */\nexport var SEMATTRS_MESSAGING_DESTINATION = TMP_MESSAGING_DESTINATION;\n/**\n * The kind of message destination.\n *\n * @deprecated use ATTR_MESSAGING_DESTINATION_KIND\n */\nexport var SEMATTRS_MESSAGING_DESTINATION_KIND = TMP_MESSAGING_DESTINATION_KIND;\n/**\n * A boolean that is true if the message destination is temporary.\n *\n * @deprecated use ATTR_MESSAGING_TEMP_DESTINATION\n */\nexport var SEMATTRS_MESSAGING_TEMP_DESTINATION = TMP_MESSAGING_TEMP_DESTINATION;\n/**\n * The name of the transport protocol.\n *\n * @deprecated use ATTR_MESSAGING_PROTOCOL\n */\nexport var SEMATTRS_MESSAGING_PROTOCOL = TMP_MESSAGING_PROTOCOL;\n/**\n * The version of the transport protocol.\n *\n * @deprecated use ATTR_MESSAGING_PROTOCOL_VERSION\n */\nexport var SEMATTRS_MESSAGING_PROTOCOL_VERSION = TMP_MESSAGING_PROTOCOL_VERSION;\n/**\n * Connection string.\n *\n * @deprecated use ATTR_MESSAGING_URL\n */\nexport var SEMATTRS_MESSAGING_URL = TMP_MESSAGING_URL;\n/**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n *\n * @deprecated use ATTR_MESSAGING_MESSAGE_ID\n */\nexport var SEMATTRS_MESSAGING_MESSAGE_ID = TMP_MESSAGING_MESSAGE_ID;\n/**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID".\n *\n * @deprecated use ATTR_MESSAGING_CONVERSATION_ID\n */\nexport var SEMATTRS_MESSAGING_CONVERSATION_ID = TMP_MESSAGING_CONVERSATION_ID;\n/**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n *\n * @deprecated use ATTR_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES\n */\nexport var SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES;\n/**\n * The compressed size of the message payload in bytes.\n *\n * @deprecated use ATTR_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES\n */\nexport var SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated use ATTR_MESSAGING_OPERATION\n */\nexport var SEMATTRS_MESSAGING_OPERATION = TMP_MESSAGING_OPERATION;\n/**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n *\n * @deprecated use ATTR_MESSAGING_CONSUMER_ID\n */\nexport var SEMATTRS_MESSAGING_CONSUMER_ID = TMP_MESSAGING_CONSUMER_ID;\n/**\n * RabbitMQ message routing key.\n *\n * @deprecated use ATTR_MESSAGING_RABBITMQ_ROUTING_KEY\n */\nexport var SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = TMP_MESSAGING_RABBITMQ_ROUTING_KEY;\n/**\n * Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message_id` in that they're not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_MESSAGE_KEY\n */\nexport var SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = TMP_MESSAGING_KAFKA_MESSAGE_KEY;\n/**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_CONSUMER_GROUP\n */\nexport var SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = TMP_MESSAGING_KAFKA_CONSUMER_GROUP;\n/**\n * Client Id for the Consumer or Producer that is handling the message.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_CLIENT_ID\n */\nexport var SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = TMP_MESSAGING_KAFKA_CLIENT_ID;\n/**\n * Partition the message is sent to.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_PARTITION\n */\nexport var SEMATTRS_MESSAGING_KAFKA_PARTITION = TMP_MESSAGING_KAFKA_PARTITION;\n/**\n * A boolean that is true if the message is a tombstone.\n *\n * @deprecated use ATTR_MESSAGING_KAFKA_TOMBSTONE\n */\nexport var SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = TMP_MESSAGING_KAFKA_TOMBSTONE;\n/**\n * A string identifying the remoting system.\n *\n * @deprecated use ATTR_RPC_SYSTEM\n */\nexport var SEMATTRS_RPC_SYSTEM = TMP_RPC_SYSTEM;\n/**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n *\n * @deprecated use ATTR_RPC_SERVICE\n */\nexport var SEMATTRS_RPC_SERVICE = TMP_RPC_SERVICE;\n/**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n *\n * @deprecated use ATTR_RPC_METHOD\n */\nexport var SEMATTRS_RPC_METHOD = TMP_RPC_METHOD;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated use ATTR_RPC_GRPC_STATUS_CODE\n */\nexport var SEMATTRS_RPC_GRPC_STATUS_CODE = TMP_RPC_GRPC_STATUS_CODE;\n/**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n *\n * @deprecated use ATTR_RPC_JSONRPC_VERSION\n */\nexport var SEMATTRS_RPC_JSONRPC_VERSION = TMP_RPC_JSONRPC_VERSION;\n/**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n *\n * @deprecated use ATTR_RPC_JSONRPC_REQUEST_ID\n */\nexport var SEMATTRS_RPC_JSONRPC_REQUEST_ID = TMP_RPC_JSONRPC_REQUEST_ID;\n/**\n * `error.code` property of response if it is an error response.\n *\n * @deprecated use ATTR_RPC_JSONRPC_ERROR_CODE\n */\nexport var SEMATTRS_RPC_JSONRPC_ERROR_CODE = TMP_RPC_JSONRPC_ERROR_CODE;\n/**\n * `error.message` property of response if it is an error response.\n *\n * @deprecated use ATTR_RPC_JSONRPC_ERROR_MESSAGE\n */\nexport var SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = TMP_RPC_JSONRPC_ERROR_MESSAGE;\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated use ATTR_MESSAGE_TYPE\n */\nexport var SEMATTRS_MESSAGE_TYPE = TMP_MESSAGE_TYPE;\n/**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n *\n * @deprecated use ATTR_MESSAGE_ID\n */\nexport var SEMATTRS_MESSAGE_ID = TMP_MESSAGE_ID;\n/**\n * Compressed size of the message in bytes.\n *\n * @deprecated use ATTR_MESSAGE_COMPRESSED_SIZE\n */\nexport var SEMATTRS_MESSAGE_COMPRESSED_SIZE = TMP_MESSAGE_COMPRESSED_SIZE;\n/**\n * Uncompressed size of the message in bytes.\n *\n * @deprecated use ATTR_MESSAGE_UNCOMPRESSED_SIZE\n */\nexport var SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = TMP_MESSAGE_UNCOMPRESSED_SIZE;\n/**\n * Create exported Value Map for SemanticAttributes values\n * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification\n */\nexport var SemanticAttributes = \n/*#__PURE__*/ createConstMap([\n TMP_AWS_LAMBDA_INVOKED_ARN,\n TMP_DB_SYSTEM,\n TMP_DB_CONNECTION_STRING,\n TMP_DB_USER,\n TMP_DB_JDBC_DRIVER_CLASSNAME,\n TMP_DB_NAME,\n TMP_DB_STATEMENT,\n TMP_DB_OPERATION,\n TMP_DB_MSSQL_INSTANCE_NAME,\n TMP_DB_CASSANDRA_KEYSPACE,\n TMP_DB_CASSANDRA_PAGE_SIZE,\n TMP_DB_CASSANDRA_CONSISTENCY_LEVEL,\n TMP_DB_CASSANDRA_TABLE,\n TMP_DB_CASSANDRA_IDEMPOTENCE,\n TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT,\n TMP_DB_CASSANDRA_COORDINATOR_ID,\n TMP_DB_CASSANDRA_COORDINATOR_DC,\n TMP_DB_HBASE_NAMESPACE,\n TMP_DB_REDIS_DATABASE_INDEX,\n TMP_DB_MONGODB_COLLECTION,\n TMP_DB_SQL_TABLE,\n TMP_EXCEPTION_TYPE,\n TMP_EXCEPTION_MESSAGE,\n TMP_EXCEPTION_STACKTRACE,\n TMP_EXCEPTION_ESCAPED,\n TMP_FAAS_TRIGGER,\n TMP_FAAS_EXECUTION,\n TMP_FAAS_DOCUMENT_COLLECTION,\n TMP_FAAS_DOCUMENT_OPERATION,\n TMP_FAAS_DOCUMENT_TIME,\n TMP_FAAS_DOCUMENT_NAME,\n TMP_FAAS_TIME,\n TMP_FAAS_CRON,\n TMP_FAAS_COLDSTART,\n TMP_FAAS_INVOKED_NAME,\n TMP_FAAS_INVOKED_PROVIDER,\n TMP_FAAS_INVOKED_REGION,\n TMP_NET_TRANSPORT,\n TMP_NET_PEER_IP,\n TMP_NET_PEER_PORT,\n TMP_NET_PEER_NAME,\n TMP_NET_HOST_IP,\n TMP_NET_HOST_PORT,\n TMP_NET_HOST_NAME,\n TMP_NET_HOST_CONNECTION_TYPE,\n TMP_NET_HOST_CONNECTION_SUBTYPE,\n TMP_NET_HOST_CARRIER_NAME,\n TMP_NET_HOST_CARRIER_MCC,\n TMP_NET_HOST_CARRIER_MNC,\n TMP_NET_HOST_CARRIER_ICC,\n TMP_PEER_SERVICE,\n TMP_ENDUSER_ID,\n TMP_ENDUSER_ROLE,\n TMP_ENDUSER_SCOPE,\n TMP_THREAD_ID,\n TMP_THREAD_NAME,\n TMP_CODE_FUNCTION,\n TMP_CODE_NAMESPACE,\n TMP_CODE_FILEPATH,\n TMP_CODE_LINENO,\n TMP_HTTP_METHOD,\n TMP_HTTP_URL,\n TMP_HTTP_TARGET,\n TMP_HTTP_HOST,\n TMP_HTTP_SCHEME,\n TMP_HTTP_STATUS_CODE,\n TMP_HTTP_FLAVOR,\n TMP_HTTP_USER_AGENT,\n TMP_HTTP_REQUEST_CONTENT_LENGTH,\n TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_SERVER_NAME,\n TMP_HTTP_ROUTE,\n TMP_HTTP_CLIENT_IP,\n TMP_AWS_DYNAMODB_TABLE_NAMES,\n TMP_AWS_DYNAMODB_CONSUMED_CAPACITY,\n TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS,\n TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY,\n TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY,\n TMP_AWS_DYNAMODB_CONSISTENT_READ,\n TMP_AWS_DYNAMODB_PROJECTION,\n TMP_AWS_DYNAMODB_LIMIT,\n TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET,\n TMP_AWS_DYNAMODB_INDEX_NAME,\n TMP_AWS_DYNAMODB_SELECT,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE,\n TMP_AWS_DYNAMODB_TABLE_COUNT,\n TMP_AWS_DYNAMODB_SCAN_FORWARD,\n TMP_AWS_DYNAMODB_SEGMENT,\n TMP_AWS_DYNAMODB_TOTAL_SEGMENTS,\n TMP_AWS_DYNAMODB_COUNT,\n TMP_AWS_DYNAMODB_SCANNED_COUNT,\n TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES,\n TMP_MESSAGING_SYSTEM,\n TMP_MESSAGING_DESTINATION,\n TMP_MESSAGING_DESTINATION_KIND,\n TMP_MESSAGING_TEMP_DESTINATION,\n TMP_MESSAGING_PROTOCOL,\n TMP_MESSAGING_PROTOCOL_VERSION,\n TMP_MESSAGING_URL,\n TMP_MESSAGING_MESSAGE_ID,\n TMP_MESSAGING_CONVERSATION_ID,\n TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES,\n TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES,\n TMP_MESSAGING_OPERATION,\n TMP_MESSAGING_CONSUMER_ID,\n TMP_MESSAGING_RABBITMQ_ROUTING_KEY,\n TMP_MESSAGING_KAFKA_MESSAGE_KEY,\n TMP_MESSAGING_KAFKA_CONSUMER_GROUP,\n TMP_MESSAGING_KAFKA_CLIENT_ID,\n TMP_MESSAGING_KAFKA_PARTITION,\n TMP_MESSAGING_KAFKA_TOMBSTONE,\n TMP_RPC_SYSTEM,\n TMP_RPC_SERVICE,\n TMP_RPC_METHOD,\n TMP_RPC_GRPC_STATUS_CODE,\n TMP_RPC_JSONRPC_VERSION,\n TMP_RPC_JSONRPC_REQUEST_ID,\n TMP_RPC_JSONRPC_ERROR_CODE,\n TMP_RPC_JSONRPC_ERROR_MESSAGE,\n TMP_MESSAGE_TYPE,\n TMP_MESSAGE_ID,\n TMP_MESSAGE_COMPRESSED_SIZE,\n TMP_MESSAGE_UNCOMPRESSED_SIZE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbSystemValues enum definition\n *\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\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\nvar TMP_DBSYSTEMVALUES_OTHER_SQL = 'other_sql';\nvar TMP_DBSYSTEMVALUES_MSSQL = 'mssql';\nvar TMP_DBSYSTEMVALUES_MYSQL = 'mysql';\nvar TMP_DBSYSTEMVALUES_ORACLE = 'oracle';\nvar TMP_DBSYSTEMVALUES_DB2 = 'db2';\nvar TMP_DBSYSTEMVALUES_POSTGRESQL = 'postgresql';\nvar TMP_DBSYSTEMVALUES_REDSHIFT = 'redshift';\nvar TMP_DBSYSTEMVALUES_HIVE = 'hive';\nvar TMP_DBSYSTEMVALUES_CLOUDSCAPE = 'cloudscape';\nvar TMP_DBSYSTEMVALUES_HSQLDB = 'hsqldb';\nvar TMP_DBSYSTEMVALUES_PROGRESS = 'progress';\nvar TMP_DBSYSTEMVALUES_MAXDB = 'maxdb';\nvar TMP_DBSYSTEMVALUES_HANADB = 'hanadb';\nvar TMP_DBSYSTEMVALUES_INGRES = 'ingres';\nvar TMP_DBSYSTEMVALUES_FIRSTSQL = 'firstsql';\nvar TMP_DBSYSTEMVALUES_EDB = 'edb';\nvar TMP_DBSYSTEMVALUES_CACHE = 'cache';\nvar TMP_DBSYSTEMVALUES_ADABAS = 'adabas';\nvar TMP_DBSYSTEMVALUES_FIREBIRD = 'firebird';\nvar TMP_DBSYSTEMVALUES_DERBY = 'derby';\nvar TMP_DBSYSTEMVALUES_FILEMAKER = 'filemaker';\nvar TMP_DBSYSTEMVALUES_INFORMIX = 'informix';\nvar TMP_DBSYSTEMVALUES_INSTANTDB = 'instantdb';\nvar TMP_DBSYSTEMVALUES_INTERBASE = 'interbase';\nvar TMP_DBSYSTEMVALUES_MARIADB = 'mariadb';\nvar TMP_DBSYSTEMVALUES_NETEZZA = 'netezza';\nvar TMP_DBSYSTEMVALUES_PERVASIVE = 'pervasive';\nvar TMP_DBSYSTEMVALUES_POINTBASE = 'pointbase';\nvar TMP_DBSYSTEMVALUES_SQLITE = 'sqlite';\nvar TMP_DBSYSTEMVALUES_SYBASE = 'sybase';\nvar TMP_DBSYSTEMVALUES_TERADATA = 'teradata';\nvar TMP_DBSYSTEMVALUES_VERTICA = 'vertica';\nvar TMP_DBSYSTEMVALUES_H2 = 'h2';\nvar TMP_DBSYSTEMVALUES_COLDFUSION = 'coldfusion';\nvar TMP_DBSYSTEMVALUES_CASSANDRA = 'cassandra';\nvar TMP_DBSYSTEMVALUES_HBASE = 'hbase';\nvar TMP_DBSYSTEMVALUES_MONGODB = 'mongodb';\nvar TMP_DBSYSTEMVALUES_REDIS = 'redis';\nvar TMP_DBSYSTEMVALUES_COUCHBASE = 'couchbase';\nvar TMP_DBSYSTEMVALUES_COUCHDB = 'couchdb';\nvar TMP_DBSYSTEMVALUES_COSMOSDB = 'cosmosdb';\nvar TMP_DBSYSTEMVALUES_DYNAMODB = 'dynamodb';\nvar TMP_DBSYSTEMVALUES_NEO4J = 'neo4j';\nvar TMP_DBSYSTEMVALUES_GEODE = 'geode';\nvar TMP_DBSYSTEMVALUES_ELASTICSEARCH = 'elasticsearch';\nvar TMP_DBSYSTEMVALUES_MEMCACHED = 'memcached';\nvar TMP_DBSYSTEMVALUES_COCKROACHDB = 'cockroachdb';\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_OTHER_SQL.\n */\nexport var DBSYSTEMVALUES_OTHER_SQL = TMP_DBSYSTEMVALUES_OTHER_SQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MSSQL.\n */\nexport var DBSYSTEMVALUES_MSSQL = TMP_DBSYSTEMVALUES_MSSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MYSQL.\n */\nexport var DBSYSTEMVALUES_MYSQL = TMP_DBSYSTEMVALUES_MYSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ORACLE.\n */\nexport var DBSYSTEMVALUES_ORACLE = TMP_DBSYSTEMVALUES_ORACLE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DB2.\n */\nexport var DBSYSTEMVALUES_DB2 = TMP_DBSYSTEMVALUES_DB2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_POSTGRESQL.\n */\nexport var DBSYSTEMVALUES_POSTGRESQL = TMP_DBSYSTEMVALUES_POSTGRESQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_REDSHIFT.\n */\nexport var DBSYSTEMVALUES_REDSHIFT = TMP_DBSYSTEMVALUES_REDSHIFT;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HIVE.\n */\nexport var DBSYSTEMVALUES_HIVE = TMP_DBSYSTEMVALUES_HIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CLOUDSCAPE.\n */\nexport var DBSYSTEMVALUES_CLOUDSCAPE = TMP_DBSYSTEMVALUES_CLOUDSCAPE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HSQLDB.\n */\nexport var DBSYSTEMVALUES_HSQLDB = TMP_DBSYSTEMVALUES_HSQLDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_PROGRESS.\n */\nexport var DBSYSTEMVALUES_PROGRESS = TMP_DBSYSTEMVALUES_PROGRESS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MAXDB.\n */\nexport var DBSYSTEMVALUES_MAXDB = TMP_DBSYSTEMVALUES_MAXDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HANADB.\n */\nexport var DBSYSTEMVALUES_HANADB = TMP_DBSYSTEMVALUES_HANADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INGRES.\n */\nexport var DBSYSTEMVALUES_INGRES = TMP_DBSYSTEMVALUES_INGRES;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FIRSTSQL.\n */\nexport var DBSYSTEMVALUES_FIRSTSQL = TMP_DBSYSTEMVALUES_FIRSTSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_EDB.\n */\nexport var DBSYSTEMVALUES_EDB = TMP_DBSYSTEMVALUES_EDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CACHE.\n */\nexport var DBSYSTEMVALUES_CACHE = TMP_DBSYSTEMVALUES_CACHE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ADABAS.\n */\nexport var DBSYSTEMVALUES_ADABAS = TMP_DBSYSTEMVALUES_ADABAS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FIREBIRD.\n */\nexport var DBSYSTEMVALUES_FIREBIRD = TMP_DBSYSTEMVALUES_FIREBIRD;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DERBY.\n */\nexport var DBSYSTEMVALUES_DERBY = TMP_DBSYSTEMVALUES_DERBY;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FILEMAKER.\n */\nexport var DBSYSTEMVALUES_FILEMAKER = TMP_DBSYSTEMVALUES_FILEMAKER;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INFORMIX.\n */\nexport var DBSYSTEMVALUES_INFORMIX = TMP_DBSYSTEMVALUES_INFORMIX;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INSTANTDB.\n */\nexport var DBSYSTEMVALUES_INSTANTDB = TMP_DBSYSTEMVALUES_INSTANTDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INTERBASE.\n */\nexport var DBSYSTEMVALUES_INTERBASE = TMP_DBSYSTEMVALUES_INTERBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MARIADB.\n */\nexport var DBSYSTEMVALUES_MARIADB = TMP_DBSYSTEMVALUES_MARIADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_NETEZZA.\n */\nexport var DBSYSTEMVALUES_NETEZZA = TMP_DBSYSTEMVALUES_NETEZZA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_PERVASIVE.\n */\nexport var DBSYSTEMVALUES_PERVASIVE = TMP_DBSYSTEMVALUES_PERVASIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_POINTBASE.\n */\nexport var DBSYSTEMVALUES_POINTBASE = TMP_DBSYSTEMVALUES_POINTBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_SQLITE.\n */\nexport var DBSYSTEMVALUES_SQLITE = TMP_DBSYSTEMVALUES_SQLITE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_SYBASE.\n */\nexport var DBSYSTEMVALUES_SYBASE = TMP_DBSYSTEMVALUES_SYBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_TERADATA.\n */\nexport var DBSYSTEMVALUES_TERADATA = TMP_DBSYSTEMVALUES_TERADATA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_VERTICA.\n */\nexport var DBSYSTEMVALUES_VERTICA = TMP_DBSYSTEMVALUES_VERTICA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_H2.\n */\nexport var DBSYSTEMVALUES_H2 = TMP_DBSYSTEMVALUES_H2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COLDFUSION.\n */\nexport var DBSYSTEMVALUES_COLDFUSION = TMP_DBSYSTEMVALUES_COLDFUSION;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CASSANDRA.\n */\nexport var DBSYSTEMVALUES_CASSANDRA = TMP_DBSYSTEMVALUES_CASSANDRA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HBASE.\n */\nexport var DBSYSTEMVALUES_HBASE = TMP_DBSYSTEMVALUES_HBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MONGODB.\n */\nexport var DBSYSTEMVALUES_MONGODB = TMP_DBSYSTEMVALUES_MONGODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_REDIS.\n */\nexport var DBSYSTEMVALUES_REDIS = TMP_DBSYSTEMVALUES_REDIS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COUCHBASE.\n */\nexport var DBSYSTEMVALUES_COUCHBASE = TMP_DBSYSTEMVALUES_COUCHBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COUCHDB.\n */\nexport var DBSYSTEMVALUES_COUCHDB = TMP_DBSYSTEMVALUES_COUCHDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COSMOSDB.\n */\nexport var DBSYSTEMVALUES_COSMOSDB = TMP_DBSYSTEMVALUES_COSMOSDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DYNAMODB.\n */\nexport var DBSYSTEMVALUES_DYNAMODB = TMP_DBSYSTEMVALUES_DYNAMODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_NEO4J.\n */\nexport var DBSYSTEMVALUES_NEO4J = TMP_DBSYSTEMVALUES_NEO4J;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_GEODE.\n */\nexport var DBSYSTEMVALUES_GEODE = TMP_DBSYSTEMVALUES_GEODE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ELASTICSEARCH.\n */\nexport var DBSYSTEMVALUES_ELASTICSEARCH = TMP_DBSYSTEMVALUES_ELASTICSEARCH;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MEMCACHED.\n */\nexport var DBSYSTEMVALUES_MEMCACHED = TMP_DBSYSTEMVALUES_MEMCACHED;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COCKROACHDB.\n */\nexport var DBSYSTEMVALUES_COCKROACHDB = TMP_DBSYSTEMVALUES_COCKROACHDB;\n/**\n * The constant map of values for DbSystemValues.\n * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification.\n */\nexport var DbSystemValues = \n/*#__PURE__*/ createConstMap([\n TMP_DBSYSTEMVALUES_OTHER_SQL,\n TMP_DBSYSTEMVALUES_MSSQL,\n TMP_DBSYSTEMVALUES_MYSQL,\n TMP_DBSYSTEMVALUES_ORACLE,\n TMP_DBSYSTEMVALUES_DB2,\n TMP_DBSYSTEMVALUES_POSTGRESQL,\n TMP_DBSYSTEMVALUES_REDSHIFT,\n TMP_DBSYSTEMVALUES_HIVE,\n TMP_DBSYSTEMVALUES_CLOUDSCAPE,\n TMP_DBSYSTEMVALUES_HSQLDB,\n TMP_DBSYSTEMVALUES_PROGRESS,\n TMP_DBSYSTEMVALUES_MAXDB,\n TMP_DBSYSTEMVALUES_HANADB,\n TMP_DBSYSTEMVALUES_INGRES,\n TMP_DBSYSTEMVALUES_FIRSTSQL,\n TMP_DBSYSTEMVALUES_EDB,\n TMP_DBSYSTEMVALUES_CACHE,\n TMP_DBSYSTEMVALUES_ADABAS,\n TMP_DBSYSTEMVALUES_FIREBIRD,\n TMP_DBSYSTEMVALUES_DERBY,\n TMP_DBSYSTEMVALUES_FILEMAKER,\n TMP_DBSYSTEMVALUES_INFORMIX,\n TMP_DBSYSTEMVALUES_INSTANTDB,\n TMP_DBSYSTEMVALUES_INTERBASE,\n TMP_DBSYSTEMVALUES_MARIADB,\n TMP_DBSYSTEMVALUES_NETEZZA,\n TMP_DBSYSTEMVALUES_PERVASIVE,\n TMP_DBSYSTEMVALUES_POINTBASE,\n TMP_DBSYSTEMVALUES_SQLITE,\n TMP_DBSYSTEMVALUES_SYBASE,\n TMP_DBSYSTEMVALUES_TERADATA,\n TMP_DBSYSTEMVALUES_VERTICA,\n TMP_DBSYSTEMVALUES_H2,\n TMP_DBSYSTEMVALUES_COLDFUSION,\n TMP_DBSYSTEMVALUES_CASSANDRA,\n TMP_DBSYSTEMVALUES_HBASE,\n TMP_DBSYSTEMVALUES_MONGODB,\n TMP_DBSYSTEMVALUES_REDIS,\n TMP_DBSYSTEMVALUES_COUCHBASE,\n TMP_DBSYSTEMVALUES_COUCHDB,\n TMP_DBSYSTEMVALUES_COSMOSDB,\n TMP_DBSYSTEMVALUES_DYNAMODB,\n TMP_DBSYSTEMVALUES_NEO4J,\n TMP_DBSYSTEMVALUES_GEODE,\n TMP_DBSYSTEMVALUES_ELASTICSEARCH,\n TMP_DBSYSTEMVALUES_MEMCACHED,\n TMP_DBSYSTEMVALUES_COCKROACHDB,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbCassandraConsistencyLevelValues enum definition\n *\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\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\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL = 'all';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = 'each_quorum';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = 'quorum';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = 'local_quorum';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE = 'one';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO = 'two';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE = 'three';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = 'local_one';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY = 'any';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = 'serial';\nvar TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = 'local_serial';\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ALL.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_ALL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_EACH_QUORUM.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_QUORUM.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_QUORUM.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ONE.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_TWO.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_TWO = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_THREE.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_THREE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_ONE.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ANY.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_ANY = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_SERIAL.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_SERIAL.\n */\nexport var DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL;\n/**\n * The constant map of values for DbCassandraConsistencyLevelValues.\n * @deprecated Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification.\n */\nexport var DbCassandraConsistencyLevelValues = \n/*#__PURE__*/ createConstMap([\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasTriggerValues enum definition\n *\n * Type of the trigger on which the function is executed.\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\nvar TMP_FAASTRIGGERVALUES_DATASOURCE = 'datasource';\nvar TMP_FAASTRIGGERVALUES_HTTP = 'http';\nvar TMP_FAASTRIGGERVALUES_PUBSUB = 'pubsub';\nvar TMP_FAASTRIGGERVALUES_TIMER = 'timer';\nvar TMP_FAASTRIGGERVALUES_OTHER = 'other';\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_DATASOURCE.\n */\nexport var FAASTRIGGERVALUES_DATASOURCE = TMP_FAASTRIGGERVALUES_DATASOURCE;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_HTTP.\n */\nexport var FAASTRIGGERVALUES_HTTP = TMP_FAASTRIGGERVALUES_HTTP;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_PUBSUB.\n */\nexport var FAASTRIGGERVALUES_PUBSUB = TMP_FAASTRIGGERVALUES_PUBSUB;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_TIMER.\n */\nexport var FAASTRIGGERVALUES_TIMER = TMP_FAASTRIGGERVALUES_TIMER;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_OTHER.\n */\nexport var FAASTRIGGERVALUES_OTHER = TMP_FAASTRIGGERVALUES_OTHER;\n/**\n * The constant map of values for FaasTriggerValues.\n * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification.\n */\nexport var FaasTriggerValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASTRIGGERVALUES_DATASOURCE,\n TMP_FAASTRIGGERVALUES_HTTP,\n TMP_FAASTRIGGERVALUES_PUBSUB,\n TMP_FAASTRIGGERVALUES_TIMER,\n TMP_FAASTRIGGERVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasDocumentOperationValues enum definition\n *\n * Describes the type of the operation that was performed on the data.\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\nvar TMP_FAASDOCUMENTOPERATIONVALUES_INSERT = 'insert';\nvar TMP_FAASDOCUMENTOPERATIONVALUES_EDIT = 'edit';\nvar TMP_FAASDOCUMENTOPERATIONVALUES_DELETE = 'delete';\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_INSERT.\n */\nexport var FAASDOCUMENTOPERATIONVALUES_INSERT = TMP_FAASDOCUMENTOPERATIONVALUES_INSERT;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_EDIT.\n */\nexport var FAASDOCUMENTOPERATIONVALUES_EDIT = TMP_FAASDOCUMENTOPERATIONVALUES_EDIT;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_DELETE.\n */\nexport var FAASDOCUMENTOPERATIONVALUES_DELETE = TMP_FAASDOCUMENTOPERATIONVALUES_DELETE;\n/**\n * The constant map of values for FaasDocumentOperationValues.\n * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification.\n */\nexport var FaasDocumentOperationValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASDOCUMENTOPERATIONVALUES_INSERT,\n TMP_FAASDOCUMENTOPERATIONVALUES_EDIT,\n TMP_FAASDOCUMENTOPERATIONVALUES_DELETE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasInvokedProviderValues enum definition\n *\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\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\nvar TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nvar TMP_FAASINVOKEDPROVIDERVALUES_AWS = 'aws';\nvar TMP_FAASINVOKEDPROVIDERVALUES_AZURE = 'azure';\nvar TMP_FAASINVOKEDPROVIDERVALUES_GCP = 'gcp';\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_ALIBABA_CLOUD.\n */\nexport var FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AWS.\n */\nexport var FAASINVOKEDPROVIDERVALUES_AWS = TMP_FAASINVOKEDPROVIDERVALUES_AWS;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AZURE.\n */\nexport var FAASINVOKEDPROVIDERVALUES_AZURE = TMP_FAASINVOKEDPROVIDERVALUES_AZURE;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_GCP.\n */\nexport var FAASINVOKEDPROVIDERVALUES_GCP = TMP_FAASINVOKEDPROVIDERVALUES_GCP;\n/**\n * The constant map of values for FaasInvokedProviderValues.\n * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification.\n */\nexport var FaasInvokedProviderValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_FAASINVOKEDPROVIDERVALUES_AWS,\n TMP_FAASINVOKEDPROVIDERVALUES_AZURE,\n TMP_FAASINVOKEDPROVIDERVALUES_GCP,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetTransportValues enum definition\n *\n * Transport protocol used. See note below.\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\nvar TMP_NETTRANSPORTVALUES_IP_TCP = 'ip_tcp';\nvar TMP_NETTRANSPORTVALUES_IP_UDP = 'ip_udp';\nvar TMP_NETTRANSPORTVALUES_IP = 'ip';\nvar TMP_NETTRANSPORTVALUES_UNIX = 'unix';\nvar TMP_NETTRANSPORTVALUES_PIPE = 'pipe';\nvar TMP_NETTRANSPORTVALUES_INPROC = 'inproc';\nvar TMP_NETTRANSPORTVALUES_OTHER = 'other';\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP_TCP.\n */\nexport var NETTRANSPORTVALUES_IP_TCP = TMP_NETTRANSPORTVALUES_IP_TCP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP_UDP.\n */\nexport var NETTRANSPORTVALUES_IP_UDP = TMP_NETTRANSPORTVALUES_IP_UDP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP.\n */\nexport var NETTRANSPORTVALUES_IP = TMP_NETTRANSPORTVALUES_IP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_UNIX.\n */\nexport var NETTRANSPORTVALUES_UNIX = TMP_NETTRANSPORTVALUES_UNIX;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_PIPE.\n */\nexport var NETTRANSPORTVALUES_PIPE = TMP_NETTRANSPORTVALUES_PIPE;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_INPROC.\n */\nexport var NETTRANSPORTVALUES_INPROC = TMP_NETTRANSPORTVALUES_INPROC;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_OTHER.\n */\nexport var NETTRANSPORTVALUES_OTHER = TMP_NETTRANSPORTVALUES_OTHER;\n/**\n * The constant map of values for NetTransportValues.\n * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification.\n */\nexport var NetTransportValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETTRANSPORTVALUES_IP_TCP,\n TMP_NETTRANSPORTVALUES_IP_UDP,\n TMP_NETTRANSPORTVALUES_IP,\n TMP_NETTRANSPORTVALUES_UNIX,\n TMP_NETTRANSPORTVALUES_PIPE,\n TMP_NETTRANSPORTVALUES_INPROC,\n TMP_NETTRANSPORTVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionTypeValues enum definition\n *\n * The internet connection type currently being used by the host.\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\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI = 'wifi';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED = 'wired';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_CELL = 'cell';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = 'unavailable';\nvar TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = 'unknown';\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_WIFI.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_WIFI = TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_WIRED.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_WIRED = TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_CELL.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_CELL = TMP_NETHOSTCONNECTIONTYPEVALUES_CELL;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_UNAVAILABLE.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NET_HOST_CONNECTION_TYPE_VALUE_UNKNOWN.\n */\nexport var NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN;\n/**\n * The constant map of values for NetHostConnectionTypeValues.\n * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification.\n */\nexport var NetHostConnectionTypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI,\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED,\n TMP_NETHOSTCONNECTIONTYPEVALUES_CELL,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionSubtypeValues enum definition\n *\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\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\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = 'gprs';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = 'edge';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = 'umts';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = 'cdma';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = 'evdo_0';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = 'evdo_a';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = 'cdma2000_1xrtt';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = 'hsdpa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = 'hsupa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = 'hspa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = 'iden';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = 'evdo_b';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE = 'lte';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = 'ehrpd';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = 'hspap';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM = 'gsm';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = 'td_scdma';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = 'iwlan';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR = 'nr';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = 'nrnsa';\nvar TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = 'lte_ca';\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_GPRS.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EDGE.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_UMTS.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_CDMA.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_0.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_A.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_CDMA2000_1XRTT.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSDPA.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSUPA.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSPA.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_IDEN.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EVDO_B.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_LTE.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_LTE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_EHRPD.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_HSPAP.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_GSM.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_GSM = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_TD_SCDMA.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_IWLAN.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_NR.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_NR = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_NRNSA.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NET_HOST_CONNECTION_SUBTYPE_VALUE_LTE_CA.\n */\nexport var NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA;\n/**\n * The constant map of values for NetHostConnectionSubtypeValues.\n * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification.\n */\nexport var NetHostConnectionSubtypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HttpFlavorValues enum definition\n *\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\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\nvar TMP_HTTPFLAVORVALUES_HTTP_1_0 = '1.0';\nvar TMP_HTTPFLAVORVALUES_HTTP_1_1 = '1.1';\nvar TMP_HTTPFLAVORVALUES_HTTP_2_0 = '2.0';\nvar TMP_HTTPFLAVORVALUES_SPDY = 'SPDY';\nvar TMP_HTTPFLAVORVALUES_QUIC = 'QUIC';\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_0.\n */\nexport var HTTPFLAVORVALUES_HTTP_1_0 = TMP_HTTPFLAVORVALUES_HTTP_1_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_1.\n */\nexport var HTTPFLAVORVALUES_HTTP_1_1 = TMP_HTTPFLAVORVALUES_HTTP_1_1;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_2_0.\n */\nexport var HTTPFLAVORVALUES_HTTP_2_0 = TMP_HTTPFLAVORVALUES_HTTP_2_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_SPDY.\n */\nexport var HTTPFLAVORVALUES_SPDY = TMP_HTTPFLAVORVALUES_SPDY;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_QUIC.\n */\nexport var HTTPFLAVORVALUES_QUIC = TMP_HTTPFLAVORVALUES_QUIC;\n/**\n * The constant map of values for HttpFlavorValues.\n * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification.\n */\nexport var HttpFlavorValues = {\n HTTP_1_0: TMP_HTTPFLAVORVALUES_HTTP_1_0,\n HTTP_1_1: TMP_HTTPFLAVORVALUES_HTTP_1_1,\n HTTP_2_0: TMP_HTTPFLAVORVALUES_HTTP_2_0,\n SPDY: TMP_HTTPFLAVORVALUES_SPDY,\n QUIC: TMP_HTTPFLAVORVALUES_QUIC,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingDestinationKindValues enum definition\n *\n * The kind of message destination.\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\nvar TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE = 'queue';\nvar TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC = 'topic';\n/**\n * The kind of message destination.\n *\n * @deprecated Use MESSAGING_DESTINATION_KIND_VALUE_QUEUE.\n */\nexport var MESSAGINGDESTINATIONKINDVALUES_QUEUE = TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE;\n/**\n * The kind of message destination.\n *\n * @deprecated Use MESSAGING_DESTINATION_KIND_VALUE_TOPIC.\n */\nexport var MESSAGINGDESTINATIONKINDVALUES_TOPIC = TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC;\n/**\n * The constant map of values for MessagingDestinationKindValues.\n * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification.\n */\nexport var MessagingDestinationKindValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE,\n TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingOperationValues enum definition\n *\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\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\nvar TMP_MESSAGINGOPERATIONVALUES_RECEIVE = 'receive';\nvar TMP_MESSAGINGOPERATIONVALUES_PROCESS = 'process';\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_VALUE_RECEIVE.\n */\nexport var MESSAGINGOPERATIONVALUES_RECEIVE = TMP_MESSAGINGOPERATIONVALUES_RECEIVE;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is "send", this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_VALUE_PROCESS.\n */\nexport var MESSAGINGOPERATIONVALUES_PROCESS = TMP_MESSAGINGOPERATIONVALUES_PROCESS;\n/**\n * The constant map of values for MessagingOperationValues.\n * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification.\n */\nexport var MessagingOperationValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGINGOPERATIONVALUES_RECEIVE,\n TMP_MESSAGINGOPERATIONVALUES_PROCESS,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for RpcGrpcStatusCodeValues enum definition\n *\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\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\nvar TMP_RPCGRPCSTATUSCODEVALUES_OK = 0;\nvar TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED = 1;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2;\nvar TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3;\nvar TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4;\nvar TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5;\nvar TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6;\nvar TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7;\nvar TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8;\nvar TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9;\nvar TMP_RPCGRPCSTATUSCODEVALUES_ABORTED = 10;\nvar TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12;\nvar TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL = 13;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14;\nvar TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15;\nvar TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OK.\n */\nexport var RPCGRPCSTATUSCODEVALUES_OK = TMP_RPCGRPCSTATUSCODEVALUES_OK;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_CANCELLED.\n */\nexport var RPCGRPCSTATUSCODEVALUES_CANCELLED = TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNKNOWN.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNKNOWN = TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INVALID_ARGUMENT.\n */\nexport var RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DEADLINE_EXCEEDED.\n */\nexport var RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_NOT_FOUND.\n */\nexport var RPCGRPCSTATUSCODEVALUES_NOT_FOUND = TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ALREADY_EXISTS.\n */\nexport var RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_PERMISSION_DENIED.\n */\nexport var RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_RESOURCE_EXHAUSTED.\n */\nexport var RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_FAILED_PRECONDITION.\n */\nexport var RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ABORTED.\n */\nexport var RPCGRPCSTATUSCODEVALUES_ABORTED = TMP_RPCGRPCSTATUSCODEVALUES_ABORTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OUT_OF_RANGE.\n */\nexport var RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNIMPLEMENTED.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INTERNAL.\n */\nexport var RPCGRPCSTATUSCODEVALUES_INTERNAL = TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAVAILABLE.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DATA_LOSS.\n */\nexport var RPCGRPCSTATUSCODEVALUES_DATA_LOSS = TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAUTHENTICATED.\n */\nexport var RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED;\n/**\n * The constant map of values for RpcGrpcStatusCodeValues.\n * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification.\n */\nexport var RpcGrpcStatusCodeValues = {\n OK: TMP_RPCGRPCSTATUSCODEVALUES_OK,\n CANCELLED: TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED,\n UNKNOWN: TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN,\n INVALID_ARGUMENT: TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT,\n DEADLINE_EXCEEDED: TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED,\n NOT_FOUND: TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND,\n ALREADY_EXISTS: TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS,\n PERMISSION_DENIED: TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED,\n RESOURCE_EXHAUSTED: TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED,\n FAILED_PRECONDITION: TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION,\n ABORTED: TMP_RPCGRPCSTATUSCODEVALUES_ABORTED,\n OUT_OF_RANGE: TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE,\n UNIMPLEMENTED: TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED,\n INTERNAL: TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL,\n UNAVAILABLE: TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE,\n DATA_LOSS: TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS,\n UNAUTHENTICATED: TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessageTypeValues enum definition\n *\n * Whether this is a received or sent message.\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\nvar TMP_MESSAGETYPEVALUES_SENT = 'SENT';\nvar TMP_MESSAGETYPEVALUES_RECEIVED = 'RECEIVED';\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated Use MESSAGE_TYPE_VALUE_SENT.\n */\nexport var MESSAGETYPEVALUES_SENT = TMP_MESSAGETYPEVALUES_SENT;\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated Use MESSAGE_TYPE_VALUE_RECEIVED.\n */\nexport var MESSAGETYPEVALUES_RECEIVED = TMP_MESSAGETYPEVALUES_RECEIVED;\n/**\n * The constant map of values for MessageTypeValues.\n * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification.\n */\nexport var MessageTypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGETYPEVALUES_SENT,\n TMP_MESSAGETYPEVALUES_RECEIVED,\n]);\n//# sourceMappingURL=SemanticAttributes.js.map","/*\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 { createConstMap } from '../internal/utils';\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticResourceAttributes\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\nvar TMP_CLOUD_PROVIDER = 'cloud.provider';\nvar TMP_CLOUD_ACCOUNT_ID = 'cloud.account.id';\nvar TMP_CLOUD_REGION = 'cloud.region';\nvar TMP_CLOUD_AVAILABILITY_ZONE = 'cloud.availability_zone';\nvar TMP_CLOUD_PLATFORM = 'cloud.platform';\nvar TMP_AWS_ECS_CONTAINER_ARN = 'aws.ecs.container.arn';\nvar TMP_AWS_ECS_CLUSTER_ARN = 'aws.ecs.cluster.arn';\nvar TMP_AWS_ECS_LAUNCHTYPE = 'aws.ecs.launchtype';\nvar TMP_AWS_ECS_TASK_ARN = 'aws.ecs.task.arn';\nvar TMP_AWS_ECS_TASK_FAMILY = 'aws.ecs.task.family';\nvar TMP_AWS_ECS_TASK_REVISION = 'aws.ecs.task.revision';\nvar TMP_AWS_EKS_CLUSTER_ARN = 'aws.eks.cluster.arn';\nvar TMP_AWS_LOG_GROUP_NAMES = 'aws.log.group.names';\nvar TMP_AWS_LOG_GROUP_ARNS = 'aws.log.group.arns';\nvar TMP_AWS_LOG_STREAM_NAMES = 'aws.log.stream.names';\nvar TMP_AWS_LOG_STREAM_ARNS = 'aws.log.stream.arns';\nvar TMP_CONTAINER_NAME = 'container.name';\nvar TMP_CONTAINER_ID = 'container.id';\nvar TMP_CONTAINER_RUNTIME = 'container.runtime';\nvar TMP_CONTAINER_IMAGE_NAME = 'container.image.name';\nvar TMP_CONTAINER_IMAGE_TAG = 'container.image.tag';\nvar TMP_DEPLOYMENT_ENVIRONMENT = 'deployment.environment';\nvar TMP_DEVICE_ID = 'device.id';\nvar TMP_DEVICE_MODEL_IDENTIFIER = 'device.model.identifier';\nvar TMP_DEVICE_MODEL_NAME = 'device.model.name';\nvar TMP_FAAS_NAME = 'faas.name';\nvar TMP_FAAS_ID = 'faas.id';\nvar TMP_FAAS_VERSION = 'faas.version';\nvar TMP_FAAS_INSTANCE = 'faas.instance';\nvar TMP_FAAS_MAX_MEMORY = 'faas.max_memory';\nvar TMP_HOST_ID = 'host.id';\nvar TMP_HOST_NAME = 'host.name';\nvar TMP_HOST_TYPE = 'host.type';\nvar TMP_HOST_ARCH = 'host.arch';\nvar TMP_HOST_IMAGE_NAME = 'host.image.name';\nvar TMP_HOST_IMAGE_ID = 'host.image.id';\nvar TMP_HOST_IMAGE_VERSION = 'host.image.version';\nvar TMP_K8S_CLUSTER_NAME = 'k8s.cluster.name';\nvar TMP_K8S_NODE_NAME = 'k8s.node.name';\nvar TMP_K8S_NODE_UID = 'k8s.node.uid';\nvar TMP_K8S_NAMESPACE_NAME = 'k8s.namespace.name';\nvar TMP_K8S_POD_UID = 'k8s.pod.uid';\nvar TMP_K8S_POD_NAME = 'k8s.pod.name';\nvar TMP_K8S_CONTAINER_NAME = 'k8s.container.name';\nvar TMP_K8S_REPLICASET_UID = 'k8s.replicaset.uid';\nvar TMP_K8S_REPLICASET_NAME = 'k8s.replicaset.name';\nvar TMP_K8S_DEPLOYMENT_UID = 'k8s.deployment.uid';\nvar TMP_K8S_DEPLOYMENT_NAME = 'k8s.deployment.name';\nvar TMP_K8S_STATEFULSET_UID = 'k8s.statefulset.uid';\nvar TMP_K8S_STATEFULSET_NAME = 'k8s.statefulset.name';\nvar TMP_K8S_DAEMONSET_UID = 'k8s.daemonset.uid';\nvar TMP_K8S_DAEMONSET_NAME = 'k8s.daemonset.name';\nvar TMP_K8S_JOB_UID = 'k8s.job.uid';\nvar TMP_K8S_JOB_NAME = 'k8s.job.name';\nvar TMP_K8S_CRONJOB_UID = 'k8s.cronjob.uid';\nvar TMP_K8S_CRONJOB_NAME = 'k8s.cronjob.name';\nvar TMP_OS_TYPE = 'os.type';\nvar TMP_OS_DESCRIPTION = 'os.description';\nvar TMP_OS_NAME = 'os.name';\nvar TMP_OS_VERSION = 'os.version';\nvar TMP_PROCESS_PID = 'process.pid';\nvar TMP_PROCESS_EXECUTABLE_NAME = 'process.executable.name';\nvar TMP_PROCESS_EXECUTABLE_PATH = 'process.executable.path';\nvar TMP_PROCESS_COMMAND = 'process.command';\nvar TMP_PROCESS_COMMAND_LINE = 'process.command_line';\nvar TMP_PROCESS_COMMAND_ARGS = 'process.command_args';\nvar TMP_PROCESS_OWNER = 'process.owner';\nvar TMP_PROCESS_RUNTIME_NAME = 'process.runtime.name';\nvar TMP_PROCESS_RUNTIME_VERSION = 'process.runtime.version';\nvar TMP_PROCESS_RUNTIME_DESCRIPTION = 'process.runtime.description';\nvar TMP_SERVICE_NAME = 'service.name';\nvar TMP_SERVICE_NAMESPACE = 'service.namespace';\nvar TMP_SERVICE_INSTANCE_ID = 'service.instance.id';\nvar TMP_SERVICE_VERSION = 'service.version';\nvar TMP_TELEMETRY_SDK_NAME = 'telemetry.sdk.name';\nvar TMP_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';\nvar TMP_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';\nvar TMP_TELEMETRY_AUTO_VERSION = 'telemetry.auto.version';\nvar TMP_WEBENGINE_NAME = 'webengine.name';\nvar TMP_WEBENGINE_VERSION = 'webengine.version';\nvar TMP_WEBENGINE_DESCRIPTION = 'webengine.description';\n/**\n * Name of the cloud provider.\n *\n * @deprecated use ATTR_CLOUD_PROVIDER\n */\nexport var SEMRESATTRS_CLOUD_PROVIDER = TMP_CLOUD_PROVIDER;\n/**\n * The cloud account ID the resource is assigned to.\n *\n * @deprecated use ATTR_CLOUD_ACCOUNT_ID\n */\nexport var SEMRESATTRS_CLOUD_ACCOUNT_ID = TMP_CLOUD_ACCOUNT_ID;\n/**\n * The geographical region the resource is running. Refer to your provider'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\n */\nexport var SEMRESATTRS_CLOUD_REGION = TMP_CLOUD_REGION;\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 "zones" on Alibaba Cloud and Google Cloud.\n *\n * @deprecated use ATTR_CLOUD_AVAILABILITY_ZONE\n */\nexport var SEMRESATTRS_CLOUD_AVAILABILITY_ZONE = TMP_CLOUD_AVAILABILITY_ZONE;\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\n */\nexport var SEMRESATTRS_CLOUD_PLATFORM = TMP_CLOUD_PLATFORM;\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\n */\nexport var SEMRESATTRS_AWS_ECS_CONTAINER_ARN = TMP_AWS_ECS_CONTAINER_ARN;\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\n */\nexport var SEMRESATTRS_AWS_ECS_CLUSTER_ARN = TMP_AWS_ECS_CLUSTER_ARN;\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\n */\nexport var SEMRESATTRS_AWS_ECS_LAUNCHTYPE = TMP_AWS_ECS_LAUNCHTYPE;\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\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_ARN = TMP_AWS_ECS_TASK_ARN;\n/**\n * The task definition family this task definition is a member of.\n *\n * @deprecated use ATTR_AWS_ECS_TASK_FAMILY\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_FAMILY = TMP_AWS_ECS_TASK_FAMILY;\n/**\n * The revision for this task definition.\n *\n * @deprecated use ATTR_AWS_ECS_TASK_REVISION\n */\nexport var SEMRESATTRS_AWS_ECS_TASK_REVISION = TMP_AWS_ECS_TASK_REVISION;\n/**\n * The ARN of an EKS cluster.\n *\n * @deprecated use ATTR_AWS_EKS_CLUSTER_ARN\n */\nexport var SEMRESATTRS_AWS_EKS_CLUSTER_ARN = TMP_AWS_EKS_CLUSTER_ARN;\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\n */\nexport var SEMRESATTRS_AWS_LOG_GROUP_NAMES = TMP_AWS_LOG_GROUP_NAMES;\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\n */\nexport var SEMRESATTRS_AWS_LOG_GROUP_ARNS = TMP_AWS_LOG_GROUP_ARNS;\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\n */\nexport var SEMRESATTRS_AWS_LOG_STREAM_NAMES = TMP_AWS_LOG_STREAM_NAMES;\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\n */\nexport var SEMRESATTRS_AWS_LOG_STREAM_ARNS = TMP_AWS_LOG_STREAM_ARNS;\n/**\n * Container name.\n *\n * @deprecated use ATTR_CONTAINER_NAME\n */\nexport var SEMRESATTRS_CONTAINER_NAME = TMP_CONTAINER_NAME;\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\n */\nexport var SEMRESATTRS_CONTAINER_ID = TMP_CONTAINER_ID;\n/**\n * The container runtime managing this container.\n *\n * @deprecated use ATTR_CONTAINER_RUNTIME\n */\nexport var SEMRESATTRS_CONTAINER_RUNTIME = TMP_CONTAINER_RUNTIME;\n/**\n * Name of the image the container was built on.\n *\n * @deprecated use ATTR_CONTAINER_IMAGE_NAME\n */\nexport var SEMRESATTRS_CONTAINER_IMAGE_NAME = TMP_CONTAINER_IMAGE_NAME;\n/**\n * Container image tag.\n *\n * @deprecated use ATTR_CONTAINER_IMAGE_TAG\n */\nexport var SEMRESATTRS_CONTAINER_IMAGE_TAG = TMP_CONTAINER_IMAGE_TAG;\n/**\n * Name of the [deployment environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka deployment tier).\n *\n * @deprecated use ATTR_DEPLOYMENT_ENVIRONMENT\n */\nexport var SEMRESATTRS_DEPLOYMENT_ENVIRONMENT = TMP_DEPLOYMENT_ENVIRONMENT;\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\n */\nexport var SEMRESATTRS_DEVICE_ID = TMP_DEVICE_ID;\n/**\n * The model identifier for the device.\n *\n * Note: It'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\n */\nexport var SEMRESATTRS_DEVICE_MODEL_IDENTIFIER = TMP_DEVICE_MODEL_IDENTIFIER;\n/**\n * The marketing name for the device model.\n *\n * Note: It'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\n */\nexport var SEMRESATTRS_DEVICE_MODEL_NAME = TMP_DEVICE_MODEL_NAME;\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\n */\nexport var SEMRESATTRS_FAAS_NAME = TMP_FAAS_NAME;\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 "invoked ARN" 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_FAAS_ID\n*/\nexport var SEMRESATTRS_FAAS_ID = TMP_FAAS_ID;\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\n*/\nexport var SEMRESATTRS_FAAS_VERSION = TMP_FAAS_VERSION;\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\n */\nexport var SEMRESATTRS_FAAS_INSTANCE = TMP_FAAS_INSTANCE;\n/**\n * The amount of memory available to the serverless function in MiB.\n *\n * Note: It'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\n */\nexport var SEMRESATTRS_FAAS_MAX_MEMORY = TMP_FAAS_MAX_MEMORY;\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\n */\nexport var SEMRESATTRS_HOST_ID = TMP_HOST_ID;\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\n */\nexport var SEMRESATTRS_HOST_NAME = TMP_HOST_NAME;\n/**\n * Type of host. For Cloud, this must be the machine type.\n *\n * @deprecated use ATTR_HOST_TYPE\n */\nexport var SEMRESATTRS_HOST_TYPE = TMP_HOST_TYPE;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated use ATTR_HOST_ARCH\n */\nexport var SEMRESATTRS_HOST_ARCH = TMP_HOST_ARCH;\n/**\n * Name of the VM image or OS install the host was instantiated from.\n *\n * @deprecated use ATTR_HOST_IMAGE_NAME\n */\nexport var SEMRESATTRS_HOST_IMAGE_NAME = TMP_HOST_IMAGE_NAME;\n/**\n * VM image ID. For Cloud, this value is from the provider.\n *\n * @deprecated use ATTR_HOST_IMAGE_ID\n */\nexport var SEMRESATTRS_HOST_IMAGE_ID = TMP_HOST_IMAGE_ID;\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\n */\nexport var SEMRESATTRS_HOST_IMAGE_VERSION = TMP_HOST_IMAGE_VERSION;\n/**\n * The name of the cluster.\n *\n * @deprecated use ATTR_K8S_CLUSTER_NAME\n */\nexport var SEMRESATTRS_K8S_CLUSTER_NAME = TMP_K8S_CLUSTER_NAME;\n/**\n * The name of the Node.\n *\n * @deprecated use ATTR_K8S_NODE_NAME\n */\nexport var SEMRESATTRS_K8S_NODE_NAME = TMP_K8S_NODE_NAME;\n/**\n * The UID of the Node.\n *\n * @deprecated use ATTR_K8S_NODE_UID\n */\nexport var SEMRESATTRS_K8S_NODE_UID = TMP_K8S_NODE_UID;\n/**\n * The name of the namespace that the pod is running in.\n *\n * @deprecated use ATTR_K8S_NAMESPACE_NAME\n */\nexport var SEMRESATTRS_K8S_NAMESPACE_NAME = TMP_K8S_NAMESPACE_NAME;\n/**\n * The UID of the Pod.\n *\n * @deprecated use ATTR_K8S_POD_UID\n */\nexport var SEMRESATTRS_K8S_POD_UID = TMP_K8S_POD_UID;\n/**\n * The name of the Pod.\n *\n * @deprecated use ATTR_K8S_POD_NAME\n */\nexport var SEMRESATTRS_K8S_POD_NAME = TMP_K8S_POD_NAME;\n/**\n * The name of the Container in a Pod template.\n *\n * @deprecated use ATTR_K8S_CONTAINER_NAME\n */\nexport var SEMRESATTRS_K8S_CONTAINER_NAME = TMP_K8S_CONTAINER_NAME;\n/**\n * The UID of the ReplicaSet.\n *\n * @deprecated use ATTR_K8S_REPLICASET_UID\n */\nexport var SEMRESATTRS_K8S_REPLICASET_UID = TMP_K8S_REPLICASET_UID;\n/**\n * The name of the ReplicaSet.\n *\n * @deprecated use ATTR_K8S_REPLICASET_NAME\n */\nexport var SEMRESATTRS_K8S_REPLICASET_NAME = TMP_K8S_REPLICASET_NAME;\n/**\n * The UID of the Deployment.\n *\n * @deprecated use ATTR_K8S_DEPLOYMENT_UID\n */\nexport var SEMRESATTRS_K8S_DEPLOYMENT_UID = TMP_K8S_DEPLOYMENT_UID;\n/**\n * The name of the Deployment.\n *\n * @deprecated use ATTR_K8S_DEPLOYMENT_NAME\n */\nexport var SEMRESATTRS_K8S_DEPLOYMENT_NAME = TMP_K8S_DEPLOYMENT_NAME;\n/**\n * The UID of the StatefulSet.\n *\n * @deprecated use ATTR_K8S_STATEFULSET_UID\n */\nexport var SEMRESATTRS_K8S_STATEFULSET_UID = TMP_K8S_STATEFULSET_UID;\n/**\n * The name of the StatefulSet.\n *\n * @deprecated use ATTR_K8S_STATEFULSET_NAME\n */\nexport var SEMRESATTRS_K8S_STATEFULSET_NAME = TMP_K8S_STATEFULSET_NAME;\n/**\n * The UID of the DaemonSet.\n *\n * @deprecated use ATTR_K8S_DAEMONSET_UID\n */\nexport var SEMRESATTRS_K8S_DAEMONSET_UID = TMP_K8S_DAEMONSET_UID;\n/**\n * The name of the DaemonSet.\n *\n * @deprecated use ATTR_K8S_DAEMONSET_NAME\n */\nexport var SEMRESATTRS_K8S_DAEMONSET_NAME = TMP_K8S_DAEMONSET_NAME;\n/**\n * The UID of the Job.\n *\n * @deprecated use ATTR_K8S_JOB_UID\n */\nexport var SEMRESATTRS_K8S_JOB_UID = TMP_K8S_JOB_UID;\n/**\n * The name of the Job.\n *\n * @deprecated use ATTR_K8S_JOB_NAME\n */\nexport var SEMRESATTRS_K8S_JOB_NAME = TMP_K8S_JOB_NAME;\n/**\n * The UID of the CronJob.\n *\n * @deprecated use ATTR_K8S_CRONJOB_UID\n */\nexport var SEMRESATTRS_K8S_CRONJOB_UID = TMP_K8S_CRONJOB_UID;\n/**\n * The name of the CronJob.\n *\n * @deprecated use ATTR_K8S_CRONJOB_NAME\n */\nexport var SEMRESATTRS_K8S_CRONJOB_NAME = TMP_K8S_CRONJOB_NAME;\n/**\n * The operating system type.\n *\n * @deprecated use ATTR_OS_TYPE\n */\nexport var SEMRESATTRS_OS_TYPE = TMP_OS_TYPE;\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\n */\nexport var SEMRESATTRS_OS_DESCRIPTION = TMP_OS_DESCRIPTION;\n/**\n * Human readable operating system name.\n *\n * @deprecated use ATTR_OS_NAME\n */\nexport var SEMRESATTRS_OS_NAME = TMP_OS_NAME;\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\n */\nexport var SEMRESATTRS_OS_VERSION = TMP_OS_VERSION;\n/**\n * Process identifier (PID).\n *\n * @deprecated use ATTR_PROCESS_PID\n */\nexport var SEMRESATTRS_PROCESS_PID = TMP_PROCESS_PID;\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\n */\nexport var SEMRESATTRS_PROCESS_EXECUTABLE_NAME = TMP_PROCESS_EXECUTABLE_NAME;\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\n */\nexport var SEMRESATTRS_PROCESS_EXECUTABLE_PATH = TMP_PROCESS_EXECUTABLE_PATH;\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\n */\nexport var SEMRESATTRS_PROCESS_COMMAND = TMP_PROCESS_COMMAND;\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\n */\nexport var SEMRESATTRS_PROCESS_COMMAND_LINE = TMP_PROCESS_COMMAND_LINE;\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\n */\nexport var SEMRESATTRS_PROCESS_COMMAND_ARGS = TMP_PROCESS_COMMAND_ARGS;\n/**\n * The username of the user that owns the process.\n *\n * @deprecated use ATTR_PROCESS_OWNER\n */\nexport var SEMRESATTRS_PROCESS_OWNER = TMP_PROCESS_OWNER;\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\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_NAME = TMP_PROCESS_RUNTIME_NAME;\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\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_VERSION = TMP_PROCESS_RUNTIME_VERSION;\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\n */\nexport var SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION = TMP_PROCESS_RUNTIME_DESCRIPTION;\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 var SEMRESATTRS_SERVICE_NAME = TMP_SERVICE_NAME;\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\n */\nexport var SEMRESATTRS_SERVICE_NAMESPACE = TMP_SERVICE_NAMESPACE;\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\n */\nexport var SEMRESATTRS_SERVICE_INSTANCE_ID = TMP_SERVICE_INSTANCE_ID;\n/**\n * The version string of the service API or implementation.\n *\n * @deprecated use ATTR_SERVICE_VERSION\n */\nexport var SEMRESATTRS_SERVICE_VERSION = TMP_SERVICE_VERSION;\n/**\n * The name of the telemetry SDK as defined above.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_NAME\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_NAME = TMP_TELEMETRY_SDK_NAME;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_LANGUAGE\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_LANGUAGE = TMP_TELEMETRY_SDK_LANGUAGE;\n/**\n * The version string of the telemetry SDK.\n *\n * @deprecated use ATTR_TELEMETRY_SDK_VERSION\n */\nexport var SEMRESATTRS_TELEMETRY_SDK_VERSION = TMP_TELEMETRY_SDK_VERSION;\n/**\n * The version string of the auto instrumentation agent, if used.\n *\n * @deprecated use ATTR_TELEMETRY_AUTO_VERSION\n */\nexport var SEMRESATTRS_TELEMETRY_AUTO_VERSION = TMP_TELEMETRY_AUTO_VERSION;\n/**\n * The name of the web engine.\n *\n * @deprecated use ATTR_WEBENGINE_NAME\n */\nexport var SEMRESATTRS_WEBENGINE_NAME = TMP_WEBENGINE_NAME;\n/**\n * The version of the web engine.\n *\n * @deprecated use ATTR_WEBENGINE_VERSION\n */\nexport var SEMRESATTRS_WEBENGINE_VERSION = TMP_WEBENGINE_VERSION;\n/**\n * Additional description of the web engine (e.g. detailed version and edition information).\n *\n * @deprecated use ATTR_WEBENGINE_DESCRIPTION\n */\nexport var SEMRESATTRS_WEBENGINE_DESCRIPTION = TMP_WEBENGINE_DESCRIPTION;\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 var SemanticResourceAttributes = \n/*#__PURE__*/ createConstMap([\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 * Constant values for CloudProviderValues enum definition\n *\n * Name of the cloud provider.\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\nvar TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nvar TMP_CLOUDPROVIDERVALUES_AWS = 'aws';\nvar TMP_CLOUDPROVIDERVALUES_AZURE = 'azure';\nvar TMP_CLOUDPROVIDERVALUES_GCP = 'gcp';\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_ALIBABA_CLOUD.\n */\nexport var CLOUDPROVIDERVALUES_ALIBABA_CLOUD = TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AWS.\n */\nexport var CLOUDPROVIDERVALUES_AWS = TMP_CLOUDPROVIDERVALUES_AWS;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_AZURE.\n */\nexport var CLOUDPROVIDERVALUES_AZURE = TMP_CLOUDPROVIDERVALUES_AZURE;\n/**\n * Name of the cloud provider.\n *\n * @deprecated Use CLOUD_PROVIDER_VALUE_GCP.\n */\nexport var CLOUDPROVIDERVALUES_GCP = TMP_CLOUDPROVIDERVALUES_GCP;\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 var CloudProviderValues = \n/*#__PURE__*/ createConstMap([\n TMP_CLOUDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_CLOUDPROVIDERVALUES_AWS,\n TMP_CLOUDPROVIDERVALUES_AZURE,\n TMP_CLOUDPROVIDERVALUES_GCP,\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// 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\nvar TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = 'alibaba_cloud_ecs';\nvar TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = 'alibaba_cloud_fc';\nvar TMP_CLOUDPLATFORMVALUES_AWS_EC2 = 'aws_ec2';\nvar TMP_CLOUDPLATFORMVALUES_AWS_ECS = 'aws_ecs';\nvar TMP_CLOUDPLATFORMVALUES_AWS_EKS = 'aws_eks';\nvar TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA = 'aws_lambda';\nvar TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = 'aws_elastic_beanstalk';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_VM = 'azure_vm';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = 'azure_container_instances';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_AKS = 'azure_aks';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = 'azure_functions';\nvar TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = 'azure_app_service';\nvar TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = 'gcp_compute_engine';\nvar TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = 'gcp_cloud_run';\nvar TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = 'gcp_kubernetes_engine';\nvar TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = 'gcp_cloud_functions';\nvar TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE = 'gcp_app_engine';\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.\n */\nexport var CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS;\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.\n */\nexport var CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC = TMP_CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_EC2 = TMP_CLOUDPLATFORMVALUES_AWS_EC2;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_ECS = TMP_CLOUDPLATFORMVALUES_AWS_ECS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_EKS = TMP_CLOUDPLATFORMVALUES_AWS_EKS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_LAMBDA = TMP_CLOUDPLATFORMVALUES_AWS_LAMBDA;\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.\n */\nexport var CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK = TMP_CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_VM = TMP_CLOUDPLATFORMVALUES_AZURE_VM;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES = TMP_CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_AKS = TMP_CLOUDPLATFORMVALUES_AZURE_AKS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_AZURE_FUNCTIONS;\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.\n */\nexport var CLOUDPLATFORMVALUES_AZURE_APP_SERVICE = TMP_CLOUDPLATFORMVALUES_AZURE_APP_SERVICE;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_CLOUD_RUN = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_RUN;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS = TMP_CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS;\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.\n */\nexport var CLOUDPLATFORMVALUES_GCP_APP_ENGINE = TMP_CLOUDPLATFORMVALUES_GCP_APP_ENGINE;\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 var CloudPlatformValues = \n/*#__PURE__*/ createConstMap([\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 * 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// 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\nvar TMP_AWSECSLAUNCHTYPEVALUES_EC2 = 'ec2';\nvar TMP_AWSECSLAUNCHTYPEVALUES_FARGATE = 'fargate';\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.\n */\nexport var AWSECSLAUNCHTYPEVALUES_EC2 = TMP_AWSECSLAUNCHTYPEVALUES_EC2;\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.\n */\nexport var AWSECSLAUNCHTYPEVALUES_FARGATE = TMP_AWSECSLAUNCHTYPEVALUES_FARGATE;\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 var AwsEcsLaunchtypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_AWSECSLAUNCHTYPEVALUES_EC2,\n TMP_AWSECSLAUNCHTYPEVALUES_FARGATE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HostArchValues enum definition\n *\n * The CPU architecture the host system is running on.\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\nvar TMP_HOSTARCHVALUES_AMD64 = 'amd64';\nvar TMP_HOSTARCHVALUES_ARM32 = 'arm32';\nvar TMP_HOSTARCHVALUES_ARM64 = 'arm64';\nvar TMP_HOSTARCHVALUES_IA64 = 'ia64';\nvar TMP_HOSTARCHVALUES_PPC32 = 'ppc32';\nvar TMP_HOSTARCHVALUES_PPC64 = 'ppc64';\nvar TMP_HOSTARCHVALUES_X86 = 'x86';\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_AMD64.\n */\nexport var HOSTARCHVALUES_AMD64 = TMP_HOSTARCHVALUES_AMD64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM32.\n */\nexport var HOSTARCHVALUES_ARM32 = TMP_HOSTARCHVALUES_ARM32;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_ARM64.\n */\nexport var HOSTARCHVALUES_ARM64 = TMP_HOSTARCHVALUES_ARM64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_IA64.\n */\nexport var HOSTARCHVALUES_IA64 = TMP_HOSTARCHVALUES_IA64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC32.\n */\nexport var HOSTARCHVALUES_PPC32 = TMP_HOSTARCHVALUES_PPC32;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_PPC64.\n */\nexport var HOSTARCHVALUES_PPC64 = TMP_HOSTARCHVALUES_PPC64;\n/**\n * The CPU architecture the host system is running on.\n *\n * @deprecated Use HOST_ARCH_VALUE_X86.\n */\nexport var HOSTARCHVALUES_X86 = TMP_HOSTARCHVALUES_X86;\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 var HostArchValues = \n/*#__PURE__*/ createConstMap([\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 * Constant values for OsTypeValues enum definition\n *\n * The operating system type.\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\nvar TMP_OSTYPEVALUES_WINDOWS = 'windows';\nvar TMP_OSTYPEVALUES_LINUX = 'linux';\nvar TMP_OSTYPEVALUES_DARWIN = 'darwin';\nvar TMP_OSTYPEVALUES_FREEBSD = 'freebsd';\nvar TMP_OSTYPEVALUES_NETBSD = 'netbsd';\nvar TMP_OSTYPEVALUES_OPENBSD = 'openbsd';\nvar TMP_OSTYPEVALUES_DRAGONFLYBSD = 'dragonflybsd';\nvar TMP_OSTYPEVALUES_HPUX = 'hpux';\nvar TMP_OSTYPEVALUES_AIX = 'aix';\nvar TMP_OSTYPEVALUES_SOLARIS = 'solaris';\nvar TMP_OSTYPEVALUES_Z_OS = 'z_os';\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_WINDOWS.\n */\nexport var OSTYPEVALUES_WINDOWS = TMP_OSTYPEVALUES_WINDOWS;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_LINUX.\n */\nexport var OSTYPEVALUES_LINUX = TMP_OSTYPEVALUES_LINUX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DARWIN.\n */\nexport var OSTYPEVALUES_DARWIN = TMP_OSTYPEVALUES_DARWIN;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_FREEBSD.\n */\nexport var OSTYPEVALUES_FREEBSD = TMP_OSTYPEVALUES_FREEBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_NETBSD.\n */\nexport var OSTYPEVALUES_NETBSD = TMP_OSTYPEVALUES_NETBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_OPENBSD.\n */\nexport var OSTYPEVALUES_OPENBSD = TMP_OSTYPEVALUES_OPENBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_DRAGONFLYBSD.\n */\nexport var OSTYPEVALUES_DRAGONFLYBSD = TMP_OSTYPEVALUES_DRAGONFLYBSD;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_HPUX.\n */\nexport var OSTYPEVALUES_HPUX = TMP_OSTYPEVALUES_HPUX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_AIX.\n */\nexport var OSTYPEVALUES_AIX = TMP_OSTYPEVALUES_AIX;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_SOLARIS.\n */\nexport var OSTYPEVALUES_SOLARIS = TMP_OSTYPEVALUES_SOLARIS;\n/**\n * The operating system type.\n *\n * @deprecated Use OS_TYPE_VALUE_Z_OS.\n */\nexport var OSTYPEVALUES_Z_OS = TMP_OSTYPEVALUES_Z_OS;\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 var OsTypeValues = \n/*#__PURE__*/ createConstMap([\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 * Constant values for TelemetrySdkLanguageValues enum definition\n *\n * The language of the telemetry SDK.\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\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_CPP = 'cpp';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET = 'dotnet';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG = 'erlang';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_GO = 'go';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA = 'java';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS = 'nodejs';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_PHP = 'php';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON = 'python';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY = 'ruby';\nvar TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS = 'webjs';\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_CPP.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_CPP = TMP_TELEMETRYSDKLANGUAGEVALUES_CPP;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_DOTNET = TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_ERLANG = TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_GO.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_GO = TMP_TELEMETRYSDKLANGUAGEVALUES_GO;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_JAVA.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_JAVA = TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_NODEJS = TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PHP.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_PHP = TMP_TELEMETRYSDKLANGUAGEVALUES_PHP;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_PYTHON = TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_RUBY.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_RUBY = TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY;\n/**\n * The language of the telemetry SDK.\n *\n * @deprecated Use TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS.\n */\nexport var TELEMETRYSDKLANGUAGEVALUES_WEBJS = TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS;\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 var TelemetrySdkLanguageValues = \n/*#__PURE__*/ createConstMap([\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//# sourceMappingURL=SemanticResourceAttributes.js.map","/*\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 */\nvar _a;\nimport { VERSION } from '../../version';\nimport { SEMRESATTRS_TELEMETRY_SDK_NAME, SEMRESATTRS_PROCESS_RUNTIME_NAME, SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, TELEMETRYSDKLANGUAGEVALUES_WEBJS, SEMRESATTRS_TELEMETRY_SDK_VERSION, } from '@opentelemetry/semantic-conventions';\n/** Constants describing the SDK in use */\nexport var SDK_INFO = (_a = {},\n _a[SEMRESATTRS_TELEMETRY_SDK_NAME] = 'opentelemetry',\n _a[SEMRESATTRS_PROCESS_RUNTIME_NAME] = 'browser',\n _a[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE] = TELEMETRYSDKLANGUAGEVALUES_WEBJS,\n _a[SEMRESATTRS_TELEMETRY_SDK_VERSION] = VERSION,\n _a);\n//# sourceMappingURL=sdk-info.js.map","/*\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 { otperformance as performance } from '../platform';\nvar NANOSECOND_DIGITS = 9;\nvar NANOSECOND_DIGITS_IN_MILLIS = 6;\nvar MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);\nvar SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).\n * @param epochMillis\n */\nexport function millisToHrTime(epochMillis) {\n var epochSeconds = epochMillis / 1000;\n // Decimals only.\n var seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n var nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);\n return [seconds, nanos];\n}\nexport function getTimeOrigin() {\n var timeOrigin = performance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n var perf = performance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nexport function hrTime(performanceNow) {\n var timeOrigin = millisToHrTime(getTimeOrigin());\n var now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : performance.now());\n return addHrTimes(timeOrigin, now);\n}\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nexport function timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\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 }\n else {\n // epoch milliseconds or performance.timeOrigin\n return millisToHrTime(time);\n }\n }\n else if (time instanceof Date) {\n return millisToHrTime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nexport function hrTimeDuration(startTime, endTime) {\n var seconds = endTime[0] - startTime[0];\n var nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nexport function hrTimeToTimeStamp(time) {\n var precision = NANOSECOND_DIGITS;\n var tmp = \"\" + '0'.repeat(precision) + time[1] + \"Z\";\n var nanoString = tmp.substr(tmp.length - precision - 1);\n var date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nexport function hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nexport function hrTimeToMilliseconds(time) {\n return time[0] * 1e3 + time[1] / 1e6;\n}\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nexport function hrTimeToMicroseconds(time) {\n return time[0] * 1e6 + time[1] / 1e3;\n}\n/**\n * check if time is HrTime\n * @param value\n */\nexport function isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nexport function isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\n/**\n * Given 2 HrTime formatted times, return their sum as an HrTime.\n */\nexport function addHrTimes(time1, time2) {\n var out = [time1[0] + time2[0], time1[1] + time2[1]];\n // Nanoseconds\n if (out[1] >= SECOND_TO_NANOSECONDS) {\n out[1] -= SECOND_TO_NANOSECONDS;\n out[0] += 1;\n }\n return out;\n}\n//# sourceMappingURL=time.js.map","/*\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 var ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode || (ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { diag, } from '@opentelemetry/api';\n/** Combines multiple propagators into a single propagator. */\nvar CompositePropagator = /** @class */ (function () {\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n function CompositePropagator(config) {\n if (config === void 0) { config = {}; }\n var _a;\n this._propagators = (_a = config.propagators) !== null && _a !== void 0 ? _a : [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(function (p) { return (typeof p.fields === 'function' ? p.fields() : []); })\n .reduce(function (x, y) { return x.concat(y); }, [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n CompositePropagator.prototype.inject = function (context, carrier, setter) {\n var e_1, _a;\n try {\n for (var _b = __values(this._propagators), _c = _b.next(); !_c.done; _c = _b.next()) {\n var propagator = _c.value;\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n diag.warn(\"Failed to inject with \" + propagator.constructor.name + \". Err: \" + err.message);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n CompositePropagator.prototype.extract = function (context, carrier, getter) {\n return this._propagators.reduce(function (ctx, propagator) {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n diag.warn(\"Failed to extract with \" + propagator.constructor.name + \". Err: \" + err.message);\n }\n return ctx;\n }, context);\n };\n CompositePropagator.prototype.fields = function () {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n };\n return CompositePropagator;\n}());\nexport { CompositePropagator };\n//# sourceMappingURL=composite.js.map","/*\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 */\nvar VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nvar VALID_KEY = \"[a-z]\" + VALID_KEY_CHAR_RANGE + \"{0,255}\";\nvar VALID_VENDOR_KEY = \"[a-z0-9]\" + VALID_KEY_CHAR_RANGE + \"{0,240}@[a-z]\" + VALID_KEY_CHAR_RANGE + \"{0,13}\";\nvar VALID_KEY_REGEX = new RegExp(\"^(?:\" + VALID_KEY + \"|\" + VALID_VENDOR_KEY + \")$\");\nvar VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nvar INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nexport function validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nexport function validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\n//# sourceMappingURL=validators.js.map","/*\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 { validateKey, validateValue } from '../internal/validators';\nvar MAX_TRACE_STATE_ITEMS = 32;\nvar MAX_TRACE_STATE_LEN = 512;\nvar LIST_MEMBERS_SEPARATOR = ',';\nvar LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nvar TraceState = /** @class */ (function () {\n function TraceState(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n TraceState.prototype.set = function (key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n var traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n };\n TraceState.prototype.unset = function (key) {\n var traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n };\n TraceState.prototype.get = function (key) {\n return this._internalState.get(key);\n };\n TraceState.prototype.serialize = function () {\n var _this = this;\n return this._keys()\n .reduce(function (agg, key) {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + _this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n };\n TraceState.prototype._parse = function (rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce(function (agg, part) {\n var listMember = part.trim(); // Optional Whitespace (OWS) handling\n var i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n var key = listMember.slice(0, i);\n var value = listMember.slice(i + 1, part.length);\n if (validateKey(key) && validateValue(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n };\n TraceState.prototype._keys = function () {\n return Array.from(this._internalState.keys()).reverse();\n };\n TraceState.prototype._clone = function () {\n var traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n };\n return TraceState;\n}());\nexport { TraceState };\n//# sourceMappingURL=TraceState.js.map","/*\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 { isSpanContextValid, trace, TraceFlags, } from '@opentelemetry/api';\nimport { isTracingSuppressed } from './suppress-tracing';\nimport { TraceState } from './TraceState';\nexport var TRACE_PARENT_HEADER = 'traceparent';\nexport var TRACE_STATE_HEADER = 'tracestate';\nvar VERSION = '00';\nvar VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nvar TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nvar PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nvar FLAGS_PART = '[\\\\da-f]{2}';\nvar TRACE_PARENT_REGEX = new RegExp(\"^\\\\s?(\" + VERSION_PART + \")-(\" + TRACE_ID_PART + \")-(\" + PARENT_ID_PART + \")-(\" + FLAGS_PART + \")(-.*)?\\\\s?$\");\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nexport function parseTraceParent(traceParent) {\n var match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nvar W3CTraceContextPropagator = /** @class */ (function () {\n function W3CTraceContextPropagator() {\n }\n W3CTraceContextPropagator.prototype.inject = function (context, carrier, setter) {\n var spanContext = trace.getSpanContext(context);\n if (!spanContext ||\n isTracingSuppressed(context) ||\n !isSpanContextValid(spanContext))\n return;\n var traceParent = VERSION + \"-\" + spanContext.traceId + \"-\" + spanContext.spanId + \"-0\" + Number(spanContext.traceFlags || TraceFlags.NONE).toString(16);\n setter.set(carrier, TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n };\n W3CTraceContextPropagator.prototype.extract = function (context, carrier, getter) {\n var traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n var traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n var spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n var traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n var state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState(typeof state === 'string' ? state : undefined);\n }\n return trace.setSpanContext(context, spanContext);\n };\n W3CTraceContextPropagator.prototype.fields = function () {\n return [TRACE_PARENT_HEADER, TRACE_STATE_HEADER];\n };\n return W3CTraceContextPropagator;\n}());\nexport { W3CTraceContextPropagator };\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","/*\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/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nvar objectTag = '[object Object]';\nvar nullTag = '[object Null]';\nvar undefinedTag = '[object Undefined]';\nvar funcProto = Function.prototype;\nvar funcToString = funcProto.toString;\nvar objectCtorString = funcToString.call(Object);\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\nvar objectProto = Object.prototype;\nvar hasOwnProperty = objectProto.hasOwnProperty;\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nvar nativeObjectToString = objectProto.toString;\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\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) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString);\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) {\n return value != null && typeof value == 'object';\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) {\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 * 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) {\n var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n var unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\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) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","/*\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/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isPlainObject } from './lodash.merge';\nvar MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var result = args.shift();\n var objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\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(one, two, level, objects) {\n if (level === void 0) { level = 0; }\n var result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (var i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n var keys = Object.keys(two);\n for (var i = 0, j = keys.length; i < j; i++) {\n var key = keys[i];\n result[key] = takeValue(two[key]);\n }\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 var keys = Object.keys(two);\n for (var i = 0, j = keys.length; i < j; i++) {\n var key = keys[i];\n var twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n var obj1 = result[key];\n var obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n var arr1 = objects.get(obj1) || [];\n var arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key: key });\n arr2.push({ obj: two, key: key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n var arr = objects.get(obj[key]) || [];\n for (var i = 0, j = arr.length; i < j; i++) {\n var info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return (!isPrimitive(value) &&\n !isArray(value) &&\n !isFunction(value) &&\n typeof value === 'object');\n}\nfunction isPrimitive(value) {\n return (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}\nfunction shouldMerge(one, two) {\n if (!isPlainObject(one) || !isPlainObject(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","/*\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 */\nvar Deferred = /** @class */ (function () {\n function Deferred() {\n var _this = this;\n this._promise = new Promise(function (resolve, reject) {\n _this._resolve = resolve;\n _this._reject = reject;\n });\n }\n Object.defineProperty(Deferred.prototype, \"promise\", {\n get: function () {\n return this._promise;\n },\n enumerable: false,\n configurable: true\n });\n Deferred.prototype.resolve = function (val) {\n this._resolve(val);\n };\n Deferred.prototype.reject = function (err) {\n this._reject(err);\n };\n return Deferred;\n}());\nexport { Deferred };\n//# sourceMappingURL=promise.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { Deferred } from './promise';\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nvar BindOnceFuture = /** @class */ (function () {\n function BindOnceFuture(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n this._isCalled = false;\n this._deferred = new Deferred();\n }\n Object.defineProperty(BindOnceFuture.prototype, \"isCalled\", {\n get: function () {\n return this._isCalled;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BindOnceFuture.prototype, \"promise\", {\n get: function () {\n return this._deferred.promise;\n },\n enumerable: false,\n configurable: true\n });\n BindOnceFuture.prototype.call = function () {\n var _a;\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve((_a = this._callback).call.apply(_a, __spreadArray([this._that], __read(args), false))).then(function (val) { return _this._deferred.resolve(val); }, function (err) { return _this._deferred.reject(err); });\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n };\n return BindOnceFuture;\n}());\nexport { BindOnceFuture };\n//# sourceMappingURL=callback.js.map","/*\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// Event name definitions\nexport var ExceptionEventName = 'exception';\n//# sourceMappingURL=enums.js.map","/*\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 */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { diag, SpanStatusCode, } from '@opentelemetry/api';\nimport { addHrTimes, millisToHrTime, getTimeOrigin, hrTime, hrTimeDuration, isAttributeValue, isTimeInput, isTimeInputHrTime, otperformance, sanitizeAttributes, } from '@opentelemetry/core';\nimport { SEMATTRS_EXCEPTION_MESSAGE, SEMATTRS_EXCEPTION_STACKTRACE, SEMATTRS_EXCEPTION_TYPE, } from '@opentelemetry/semantic-conventions';\nimport { ExceptionEventName } from './enums';\n/**\n * This class represents a span.\n */\nvar Span = /** @class */ (function () {\n /**\n * Constructs a new Span instance.\n *\n * @deprecated calling Span constructor directly is not supported. Please use tracer.startSpan.\n * */\n function Span(parentTracer, context, spanName, spanContext, kind, parentSpanId, links, startTime, _deprecatedClock, // keeping this argument even though it is unused to ensure backwards compatibility\n attributes) {\n if (links === void 0) { links = []; }\n this.attributes = {};\n this.links = [];\n this.events = [];\n this._droppedAttributesCount = 0;\n this._droppedEventsCount = 0;\n this._droppedLinksCount = 0;\n this.status = {\n code: SpanStatusCode.UNSET,\n };\n this.endTime = [0, 0];\n this._ended = false;\n this._duration = [-1, -1];\n this.name = spanName;\n this._spanContext = spanContext;\n this.parentSpanId = parentSpanId;\n this.kind = kind;\n this.links = links;\n var now = Date.now();\n this._performanceStartTime = otperformance.now();\n this._performanceOffset =\n now - (this._performanceStartTime + getTimeOrigin());\n this._startTimeProvided = startTime != null;\n this.startTime = this._getTime(startTime !== null && startTime !== void 0 ? startTime : now);\n this.resource = parentTracer.resource;\n this.instrumentationLibrary = parentTracer.instrumentationLibrary;\n this._spanLimits = parentTracer.getSpanLimits();\n this._attributeValueLengthLimit =\n this._spanLimits.attributeValueLengthLimit || 0;\n if (attributes != null) {\n this.setAttributes(attributes);\n }\n this._spanProcessor = parentTracer.getActiveSpanProcessor();\n this._spanProcessor.onStart(this, context);\n }\n Span.prototype.spanContext = function () {\n return this._spanContext;\n };\n Span.prototype.setAttribute = function (key, value) {\n if (value == null || this._isSpanEnded())\n return this;\n if (key.length === 0) {\n diag.warn(\"Invalid attribute key: \" + key);\n return this;\n }\n if (!isAttributeValue(value)) {\n diag.warn(\"Invalid attribute value set for key: \" + key);\n return this;\n }\n if (Object.keys(this.attributes).length >=\n this._spanLimits.attributeCountLimit &&\n !Object.prototype.hasOwnProperty.call(this.attributes, key)) {\n this._droppedAttributesCount++;\n return this;\n }\n this.attributes[key] = this._truncateToSize(value);\n return this;\n };\n Span.prototype.setAttributes = function (attributes) {\n var e_1, _a;\n try {\n for (var _b = __values(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2), k = _d[0], v = _d[1];\n this.setAttribute(k, v);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return this;\n };\n /**\n *\n * @param name Span Name\n * @param [attributesOrStartTime] Span attributes or start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [timeStamp] Specified time stamp for the event\n */\n Span.prototype.addEvent = function (name, attributesOrStartTime, timeStamp) {\n if (this._isSpanEnded())\n return this;\n if (this._spanLimits.eventCountLimit === 0) {\n diag.warn('No events allowed.');\n this._droppedEventsCount++;\n return this;\n }\n if (this.events.length >= this._spanLimits.eventCountLimit) {\n if (this._droppedEventsCount === 0) {\n diag.debug('Dropping extra events.');\n }\n this.events.shift();\n this._droppedEventsCount++;\n }\n if (isTimeInput(attributesOrStartTime)) {\n if (!isTimeInput(timeStamp)) {\n timeStamp = attributesOrStartTime;\n }\n attributesOrStartTime = undefined;\n }\n var attributes = sanitizeAttributes(attributesOrStartTime);\n this.events.push({\n name: name,\n attributes: attributes,\n time: this._getTime(timeStamp),\n droppedAttributesCount: 0,\n });\n return this;\n };\n Span.prototype.addLink = function (link) {\n this.links.push(link);\n return this;\n };\n Span.prototype.addLinks = function (links) {\n var _a;\n (_a = this.links).push.apply(_a, __spreadArray([], __read(links), false));\n return this;\n };\n Span.prototype.setStatus = function (status) {\n if (this._isSpanEnded())\n return this;\n this.status = __assign({}, status);\n // When using try-catch, the caught \"error\" is of type `any`. When then assigning `any` to `status.message`,\n // TypeScript will not error. While this can happen during use of any API, it is more common on Span#setStatus()\n // as it's likely used in a catch-block. Therefore, we validate if `status.message` is actually a string, null, or\n // undefined to avoid an incorrect type causing issues downstream.\n if (this.status.message != null && typeof status.message !== 'string') {\n diag.warn(\"Dropping invalid status.message of type '\" + typeof status.message + \"', expected 'string'\");\n delete this.status.message;\n }\n return this;\n };\n Span.prototype.updateName = function (name) {\n if (this._isSpanEnded())\n return this;\n this.name = name;\n return this;\n };\n Span.prototype.end = function (endTime) {\n if (this._isSpanEnded()) {\n diag.error(this.name + \" \" + this._spanContext.traceId + \"-\" + this._spanContext.spanId + \" - You can only call end() on a span once.\");\n return;\n }\n this._ended = true;\n this.endTime = this._getTime(endTime);\n this._duration = hrTimeDuration(this.startTime, this.endTime);\n if (this._duration[0] < 0) {\n diag.warn('Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.', this.startTime, this.endTime);\n this.endTime = this.startTime.slice();\n this._duration = [0, 0];\n }\n if (this._droppedEventsCount > 0) {\n diag.warn(\"Dropped \" + this._droppedEventsCount + \" events because eventCountLimit reached\");\n }\n this._spanProcessor.onEnd(this);\n };\n Span.prototype._getTime = function (inp) {\n if (typeof inp === 'number' && inp <= otperformance.now()) {\n // must be a performance timestamp\n // apply correction and convert to hrtime\n return hrTime(inp + this._performanceOffset);\n }\n if (typeof inp === 'number') {\n return millisToHrTime(inp);\n }\n if (inp instanceof Date) {\n return millisToHrTime(inp.getTime());\n }\n if (isTimeInputHrTime(inp)) {\n return inp;\n }\n if (this._startTimeProvided) {\n // if user provided a time for the start manually\n // we can't use duration to calculate event/end times\n return millisToHrTime(Date.now());\n }\n var msDuration = otperformance.now() - this._performanceStartTime;\n return addHrTimes(this.startTime, millisToHrTime(msDuration));\n };\n Span.prototype.isRecording = function () {\n return this._ended === false;\n };\n Span.prototype.recordException = function (exception, time) {\n var attributes = {};\n if (typeof exception === 'string') {\n attributes[SEMATTRS_EXCEPTION_MESSAGE] = exception;\n }\n else if (exception) {\n if (exception.code) {\n attributes[SEMATTRS_EXCEPTION_TYPE] = exception.code.toString();\n }\n else if (exception.name) {\n attributes[SEMATTRS_EXCEPTION_TYPE] = exception.name;\n }\n if (exception.message) {\n attributes[SEMATTRS_EXCEPTION_MESSAGE] = exception.message;\n }\n if (exception.stack) {\n attributes[SEMATTRS_EXCEPTION_STACKTRACE] = exception.stack;\n }\n }\n // these are minimum requirements from spec\n if (attributes[SEMATTRS_EXCEPTION_TYPE] ||\n attributes[SEMATTRS_EXCEPTION_MESSAGE]) {\n this.addEvent(ExceptionEventName, attributes, time);\n }\n else {\n diag.warn(\"Failed to record an exception \" + exception);\n }\n };\n Object.defineProperty(Span.prototype, \"duration\", {\n get: function () {\n return this._duration;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Span.prototype, \"ended\", {\n get: function () {\n return this._ended;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Span.prototype, \"droppedAttributesCount\", {\n get: function () {\n return this._droppedAttributesCount;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Span.prototype, \"droppedEventsCount\", {\n get: function () {\n return this._droppedEventsCount;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Span.prototype, \"droppedLinksCount\", {\n get: function () {\n return this._droppedLinksCount;\n },\n enumerable: false,\n configurable: true\n });\n Span.prototype._isSpanEnded = function () {\n if (this._ended) {\n diag.warn(\"Can not execute the operation on ended Span {traceId: \" + this._spanContext.traceId + \", spanId: \" + this._spanContext.spanId + \"}\");\n }\n return this._ended;\n };\n // Utility function to truncate given value within size\n // for value type of string, will truncate to given limit\n // for type of non-string, will return same value\n Span.prototype._truncateToLimitUtil = function (value, limit) {\n if (value.length <= limit) {\n return value;\n }\n return value.substr(0, limit);\n };\n /**\n * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then\n * return string with truncated to {@code attributeValueLengthLimit} characters\n *\n * If the given attribute value is array of strings then\n * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters\n *\n * Otherwise return same Attribute {@code value}\n *\n * @param value Attribute value\n * @returns truncated attribute value if required, otherwise same value\n */\n Span.prototype._truncateToSize = function (value) {\n var _this = this;\n var limit = this._attributeValueLengthLimit;\n // Check limit\n if (limit <= 0) {\n // Negative values are invalid, so do not truncate\n diag.warn(\"Attribute value limit must be positive, got \" + limit);\n return value;\n }\n // String\n if (typeof value === 'string') {\n return this._truncateToLimitUtil(value, limit);\n }\n // Array of strings\n if (Array.isArray(value)) {\n return value.map(function (val) {\n return typeof val === 'string' ? _this._truncateToLimitUtil(val, limit) : val;\n });\n }\n // Other types, no need to apply value length limit\n return value;\n };\n return Span;\n}());\nexport { Span };\n//# sourceMappingURL=Span.js.map","/*\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 * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nexport var SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision || (SamplingDecision = {}));\n//# sourceMappingURL=Sampler.js.map","/*\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 { SamplingDecision } from '../Sampler';\n/** Sampler that samples no traces. */\nvar AlwaysOffSampler = /** @class */ (function () {\n function AlwaysOffSampler() {\n }\n AlwaysOffSampler.prototype.shouldSample = function () {\n return {\n decision: SamplingDecision.NOT_RECORD,\n };\n };\n AlwaysOffSampler.prototype.toString = function () {\n return 'AlwaysOffSampler';\n };\n return AlwaysOffSampler;\n}());\nexport { AlwaysOffSampler };\n//# sourceMappingURL=AlwaysOffSampler.js.map","/*\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 { SamplingDecision } from '../Sampler';\n/** Sampler that samples all traces. */\nvar AlwaysOnSampler = /** @class */ (function () {\n function AlwaysOnSampler() {\n }\n AlwaysOnSampler.prototype.shouldSample = function () {\n return {\n decision: SamplingDecision.RECORD_AND_SAMPLED,\n };\n };\n AlwaysOnSampler.prototype.toString = function () {\n return 'AlwaysOnSampler';\n };\n return AlwaysOnSampler;\n}());\nexport { AlwaysOnSampler };\n//# sourceMappingURL=AlwaysOnSampler.js.map","/*\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 { isSpanContextValid, TraceFlags, trace, } from '@opentelemetry/api';\nimport { globalErrorHandler } from '@opentelemetry/core';\nimport { AlwaysOffSampler } from './AlwaysOffSampler';\nimport { AlwaysOnSampler } from './AlwaysOnSampler';\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nvar ParentBasedSampler = /** @class */ (function () {\n function ParentBasedSampler(config) {\n var _a, _b, _c, _d;\n this._root = config.root;\n if (!this._root) {\n globalErrorHandler(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler();\n }\n this._remoteParentSampled =\n (_a = config.remoteParentSampled) !== null && _a !== void 0 ? _a : new AlwaysOnSampler();\n this._remoteParentNotSampled =\n (_b = config.remoteParentNotSampled) !== null && _b !== void 0 ? _b : new AlwaysOffSampler();\n this._localParentSampled =\n (_c = config.localParentSampled) !== null && _c !== void 0 ? _c : new AlwaysOnSampler();\n this._localParentNotSampled =\n (_d = config.localParentNotSampled) !== null && _d !== void 0 ? _d : new AlwaysOffSampler();\n }\n ParentBasedSampler.prototype.shouldSample = function (context, traceId, spanName, spanKind, attributes, links) {\n var parentContext = trace.getSpanContext(context);\n if (!parentContext || !isSpanContextValid(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n };\n ParentBasedSampler.prototype.toString = function () {\n return \"ParentBased{root=\" + this._root.toString() + \", remoteParentSampled=\" + this._remoteParentSampled.toString() + \", remoteParentNotSampled=\" + this._remoteParentNotSampled.toString() + \", localParentSampled=\" + this._localParentSampled.toString() + \", localParentNotSampled=\" + this._localParentNotSampled.toString() + \"}\";\n };\n return ParentBasedSampler;\n}());\nexport { ParentBasedSampler };\n//# sourceMappingURL=ParentBasedSampler.js.map","/*\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 { isValidTraceId } from '@opentelemetry/api';\nimport { SamplingDecision } from '../Sampler';\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nvar TraceIdRatioBasedSampler = /** @class */ (function () {\n function TraceIdRatioBasedSampler(_ratio) {\n if (_ratio === void 0) { _ratio = 0; }\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n TraceIdRatioBasedSampler.prototype.shouldSample = function (context, traceId) {\n return {\n decision: isValidTraceId(traceId) && this._accumulate(traceId) < this._upperBound\n ? SamplingDecision.RECORD_AND_SAMPLED\n : SamplingDecision.NOT_RECORD,\n };\n };\n TraceIdRatioBasedSampler.prototype.toString = function () {\n return \"TraceIdRatioBased{\" + this._ratio + \"}\";\n };\n TraceIdRatioBasedSampler.prototype._normalize = function (ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n };\n TraceIdRatioBasedSampler.prototype._accumulate = function (traceId) {\n var accumulation = 0;\n for (var i = 0; i < traceId.length / 8; i++) {\n var pos = i * 8;\n var part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n };\n return TraceIdRatioBasedSampler;\n}());\nexport { TraceIdRatioBasedSampler };\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","/*\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 { getEnv, TracesSamplerValues } from '@opentelemetry/core';\nimport { AlwaysOffSampler } from './sampler/AlwaysOffSampler';\nimport { AlwaysOnSampler } from './sampler/AlwaysOnSampler';\nimport { ParentBasedSampler } from './sampler/ParentBasedSampler';\nimport { TraceIdRatioBasedSampler } from './sampler/TraceIdRatioBasedSampler';\nvar env = getEnv();\nvar FALLBACK_OTEL_TRACES_SAMPLER = TracesSamplerValues.AlwaysOn;\nvar DEFAULT_RATIO = 1;\n/**\n * Load default configuration. For fields with primitive values, any user-provided\n * value will override the corresponding default value. For fields with\n * non-primitive values (like `spanLimits`), the user-provided value will be\n * used to extend the default value.\n */\n// object needs to be wrapped in this function and called when needed otherwise\n// envs are parsed before tests are ran - causes tests using these envs to fail\nexport function loadDefaultConfig() {\n var _env = getEnv();\n return {\n sampler: buildSamplerFromEnv(env),\n forceFlushTimeoutMillis: 30000,\n generalLimits: {\n attributeValueLengthLimit: _env.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n attributeCountLimit: _env.OTEL_ATTRIBUTE_COUNT_LIMIT,\n },\n spanLimits: {\n attributeValueLengthLimit: _env.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n attributeCountLimit: _env.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,\n linkCountLimit: _env.OTEL_SPAN_LINK_COUNT_LIMIT,\n eventCountLimit: _env.OTEL_SPAN_EVENT_COUNT_LIMIT,\n attributePerEventCountLimit: _env.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,\n attributePerLinkCountLimit: _env.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,\n },\n mergeResourceWithDefaults: true,\n };\n}\n/**\n * Based on environment, builds a sampler, complies with specification.\n * @param environment optional, by default uses getEnv(), but allows passing a value to reuse parsed environment\n */\nexport function buildSamplerFromEnv(environment) {\n if (environment === void 0) { environment = getEnv(); }\n switch (environment.OTEL_TRACES_SAMPLER) {\n case TracesSamplerValues.AlwaysOn:\n return new AlwaysOnSampler();\n case TracesSamplerValues.AlwaysOff:\n return new AlwaysOffSampler();\n case TracesSamplerValues.ParentBasedAlwaysOn:\n return new ParentBasedSampler({\n root: new AlwaysOnSampler(),\n });\n case TracesSamplerValues.ParentBasedAlwaysOff:\n return new ParentBasedSampler({\n root: new AlwaysOffSampler(),\n });\n case TracesSamplerValues.TraceIdRatio:\n return new TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment));\n case TracesSamplerValues.ParentBasedTraceIdRatio:\n return new ParentBasedSampler({\n root: new TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv(environment)),\n });\n default:\n diag.error(\"OTEL_TRACES_SAMPLER value \\\"\" + environment.OTEL_TRACES_SAMPLER + \" invalid, defaulting to \" + FALLBACK_OTEL_TRACES_SAMPLER + \"\\\".\");\n return new AlwaysOnSampler();\n }\n}\nfunction getSamplerProbabilityFromEnv(environment) {\n if (environment.OTEL_TRACES_SAMPLER_ARG === undefined ||\n environment.OTEL_TRACES_SAMPLER_ARG === '') {\n diag.error(\"OTEL_TRACES_SAMPLER_ARG is blank, defaulting to \" + DEFAULT_RATIO + \".\");\n return DEFAULT_RATIO;\n }\n var probability = Number(environment.OTEL_TRACES_SAMPLER_ARG);\n if (isNaN(probability)) {\n diag.error(\"OTEL_TRACES_SAMPLER_ARG=\" + environment.OTEL_TRACES_SAMPLER_ARG + \" was given, but it is invalid, defaulting to \" + DEFAULT_RATIO + \".\");\n return DEFAULT_RATIO;\n }\n if (probability < 0 || probability > 1) {\n diag.error(\"OTEL_TRACES_SAMPLER_ARG=\" + environment.OTEL_TRACES_SAMPLER_ARG + \" was given, but it is out of range ([0..1]), defaulting to \" + DEFAULT_RATIO + \".\");\n return DEFAULT_RATIO;\n }\n return probability;\n}\n//# sourceMappingURL=config.js.map","/*\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 { buildSamplerFromEnv, loadDefaultConfig } from './config';\nimport { DEFAULT_ATTRIBUTE_COUNT_LIMIT, DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, getEnvWithoutDefaults, } from '@opentelemetry/core';\n/**\n * Function to merge Default configuration (as specified in './config') with\n * user provided configurations.\n */\nexport function mergeConfig(userConfig) {\n var perInstanceDefaults = {\n sampler: buildSamplerFromEnv(),\n };\n var DEFAULT_CONFIG = loadDefaultConfig();\n var target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig);\n target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {});\n target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {});\n return target;\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 userConfig User provided tracer configuration\n */\nexport function reconfigureLimits(userConfig) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n var spanLimits = Object.assign({}, userConfig.spanLimits);\n var parsedEnvConfig = getEnvWithoutDefaults();\n /**\n * Reassign span attribute count limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeCountLimit =\n (_f = (_e = (_d = (_b = (_a = userConfig.spanLimits) === null || _a === void 0 ? void 0 : _a.attributeCountLimit) !== null && _b !== void 0 ? _b : (_c = userConfig.generalLimits) === null || _c === void 0 ? void 0 : _c.attributeCountLimit) !== null && _d !== void 0 ? _d : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) !== null && _e !== void 0 ? _e : parsedEnvConfig.OTEL_ATTRIBUTE_COUNT_LIMIT) !== null && _f !== void 0 ? _f : DEFAULT_ATTRIBUTE_COUNT_LIMIT;\n /**\n * Reassign span attribute value length limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeValueLengthLimit =\n (_m = (_l = (_k = (_h = (_g = userConfig.spanLimits) === null || _g === void 0 ? void 0 : _g.attributeValueLengthLimit) !== null && _h !== void 0 ? _h : (_j = userConfig.generalLimits) === null || _j === void 0 ? void 0 : _j.attributeValueLengthLimit) !== null && _k !== void 0 ? _k : parsedEnvConfig.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _l !== void 0 ? _l : parsedEnvConfig.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _m !== void 0 ? _m : DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;\n return Object.assign({}, userConfig, { spanLimits: spanLimits });\n}\n//# sourceMappingURL=utility.js.map","/*\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 { context, diag, TraceFlags } from '@opentelemetry/api';\nimport { BindOnceFuture, ExportResultCode, getEnv, globalErrorHandler, suppressTracing, unrefTimer, } from '@opentelemetry/core';\n/**\n * Implementation of the {@link SpanProcessor} that batches spans exported by\n * the SDK then pushes them to the exporter pipeline.\n */\nvar BatchSpanProcessorBase = /** @class */ (function () {\n function BatchSpanProcessorBase(_exporter, config) {\n this._exporter = _exporter;\n this._isExporting = false;\n this._finishedSpans = [];\n this._droppedSpansCount = 0;\n var env = getEnv();\n this._maxExportBatchSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxExportBatchSize) === 'number'\n ? config.maxExportBatchSize\n : env.OTEL_BSP_MAX_EXPORT_BATCH_SIZE;\n this._maxQueueSize =\n typeof (config === null || config === void 0 ? void 0 : config.maxQueueSize) === 'number'\n ? config.maxQueueSize\n : env.OTEL_BSP_MAX_QUEUE_SIZE;\n this._scheduledDelayMillis =\n typeof (config === null || config === void 0 ? void 0 : config.scheduledDelayMillis) === 'number'\n ? config.scheduledDelayMillis\n : env.OTEL_BSP_SCHEDULE_DELAY;\n this._exportTimeoutMillis =\n typeof (config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) === 'number'\n ? config.exportTimeoutMillis\n : env.OTEL_BSP_EXPORT_TIMEOUT;\n this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n if (this._maxExportBatchSize > this._maxQueueSize) {\n diag.warn('BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize');\n this._maxExportBatchSize = this._maxQueueSize;\n }\n }\n BatchSpanProcessorBase.prototype.forceFlush = function () {\n if (this._shutdownOnce.isCalled) {\n return this._shutdownOnce.promise;\n }\n return this._flushAll();\n };\n // does nothing.\n BatchSpanProcessorBase.prototype.onStart = function (_span, _parentContext) { };\n BatchSpanProcessorBase.prototype.onEnd = function (span) {\n if (this._shutdownOnce.isCalled) {\n return;\n }\n if ((span.spanContext().traceFlags & TraceFlags.SAMPLED) === 0) {\n return;\n }\n this._addToBuffer(span);\n };\n BatchSpanProcessorBase.prototype.shutdown = function () {\n return this._shutdownOnce.call();\n };\n BatchSpanProcessorBase.prototype._shutdown = function () {\n var _this = this;\n return Promise.resolve()\n .then(function () {\n return _this.onShutdown();\n })\n .then(function () {\n return _this._flushAll();\n })\n .then(function () {\n return _this._exporter.shutdown();\n });\n };\n /** Add a span in the buffer. */\n BatchSpanProcessorBase.prototype._addToBuffer = function (span) {\n if (this._finishedSpans.length >= this._maxQueueSize) {\n // limit reached, drop span\n if (this._droppedSpansCount === 0) {\n diag.debug('maxQueueSize reached, dropping spans');\n }\n this._droppedSpansCount++;\n return;\n }\n if (this._droppedSpansCount > 0) {\n // some spans were dropped, log once with count of spans dropped\n diag.warn(\"Dropped \" + this._droppedSpansCount + \" spans because maxQueueSize reached\");\n this._droppedSpansCount = 0;\n }\n this._finishedSpans.push(span);\n this._maybeStartTimer();\n };\n /**\n * Send all spans 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 BatchSpanProcessorBase.prototype._flushAll = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var promises = [];\n // calculate number of batches\n var count = Math.ceil(_this._finishedSpans.length / _this._maxExportBatchSize);\n for (var i = 0, j = count; i < j; i++) {\n promises.push(_this._flushOneBatch());\n }\n Promise.all(promises)\n .then(function () {\n resolve();\n })\n .catch(reject);\n });\n };\n BatchSpanProcessorBase.prototype._flushOneBatch = function () {\n var _this = this;\n this._clearTimer();\n if (this._finishedSpans.length === 0) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n var timer = setTimeout(function () {\n // don't wait anymore for export, this way the next batch can start\n reject(new Error('Timeout'));\n }, _this._exportTimeoutMillis);\n // prevent downstream exporter calls from generating spans\n context.with(suppressTracing(context.active()), function () {\n // Reset the finished spans buffer here because the next invocations of the _flush method\n // could pass the same finished spans to the exporter if the buffer is cleared\n // outside the execution of this callback.\n var spans;\n if (_this._finishedSpans.length <= _this._maxExportBatchSize) {\n spans = _this._finishedSpans;\n _this._finishedSpans = [];\n }\n else {\n spans = _this._finishedSpans.splice(0, _this._maxExportBatchSize);\n }\n var doExport = function () {\n return _this._exporter.export(spans, function (result) {\n var _a;\n clearTimeout(timer);\n if (result.code === ExportResultCode.SUCCESS) {\n resolve();\n }\n else {\n reject((_a = result.error) !== null && _a !== void 0 ? _a : new Error('BatchSpanProcessor: span export failed'));\n }\n });\n };\n var pendingResources = null;\n for (var i = 0, len = spans.length; i < len; i++) {\n var span = spans[i];\n if (span.resource.asyncAttributesPending &&\n span.resource.waitForAsyncAttributes) {\n pendingResources !== null && pendingResources !== void 0 ? pendingResources : (pendingResources = []);\n pendingResources.push(span.resource.waitForAsyncAttributes());\n }\n }\n // Avoid scheduling a promise to make the behavior more predictable and easier to test\n if (pendingResources === null) {\n doExport();\n }\n else {\n Promise.all(pendingResources).then(doExport, function (err) {\n globalErrorHandler(err);\n reject(err);\n });\n }\n });\n });\n };\n BatchSpanProcessorBase.prototype._maybeStartTimer = function () {\n var _this = this;\n if (this._isExporting)\n return;\n var flush = function () {\n _this._isExporting = true;\n _this._flushOneBatch()\n .finally(function () {\n _this._isExporting = false;\n if (_this._finishedSpans.length > 0) {\n _this._clearTimer();\n _this._maybeStartTimer();\n }\n })\n .catch(function (e) {\n _this._isExporting = false;\n globalErrorHandler(e);\n });\n };\n // we only wait if the queue doesn't have enough elements yet\n if (this._finishedSpans.length >= this._maxExportBatchSize) {\n return flush();\n }\n if (this._timer !== undefined)\n return;\n this._timer = setTimeout(function () { return flush(); }, this._scheduledDelayMillis);\n unrefTimer(this._timer);\n };\n BatchSpanProcessorBase.prototype._clearTimer = function () {\n if (this._timer !== undefined) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n };\n return BatchSpanProcessorBase;\n}());\nexport { BatchSpanProcessorBase };\n//# sourceMappingURL=BatchSpanProcessorBase.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BatchSpanProcessorBase } from '../../../export/BatchSpanProcessorBase';\nimport { globalErrorHandler } from '@opentelemetry/core';\nvar BatchSpanProcessor = /** @class */ (function (_super) {\n __extends(BatchSpanProcessor, _super);\n function BatchSpanProcessor(_exporter, config) {\n var _this = _super.call(this, _exporter, config) || this;\n _this.onInit(config);\n return _this;\n }\n BatchSpanProcessor.prototype.onInit = function (config) {\n var _this = this;\n if ((config === null || config === void 0 ? void 0 : config.disableAutoFlushOnDocumentHide) !== true &&\n typeof document !== 'undefined') {\n this._visibilityChangeListener = function () {\n if (document.visibilityState === 'hidden') {\n _this.forceFlush().catch(function (error) {\n globalErrorHandler(error);\n });\n }\n };\n this._pageHideListener = function () {\n _this.forceFlush().catch(function (error) {\n globalErrorHandler(error);\n });\n };\n document.addEventListener('visibilitychange', this._visibilityChangeListener);\n // use 'pagehide' event as a fallback for Safari; see https://bugs.webkit.org/show_bug.cgi?id=116769\n document.addEventListener('pagehide', this._pageHideListener);\n }\n };\n BatchSpanProcessor.prototype.onShutdown = function () {\n if (typeof document !== 'undefined') {\n if (this._visibilityChangeListener) {\n document.removeEventListener('visibilitychange', this._visibilityChangeListener);\n }\n if (this._pageHideListener) {\n document.removeEventListener('pagehide', this._pageHideListener);\n }\n }\n };\n return BatchSpanProcessor;\n}(BatchSpanProcessorBase));\nexport { BatchSpanProcessor };\n//# sourceMappingURL=BatchSpanProcessor.js.map","/*\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 */\nvar SPAN_ID_BYTES = 8;\nvar TRACE_ID_BYTES = 16;\nvar RandomIdGenerator = /** @class */ (function () {\n function RandomIdGenerator() {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n this.generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n this.generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n }\n return RandomIdGenerator;\n}());\nexport { RandomIdGenerator };\nvar SHARED_CHAR_CODES_ARRAY = Array(32);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (var i = 0; i < bytes * 2; i++) {\n SHARED_CHAR_CODES_ARRAY[i] = Math.floor(Math.random() * 16) + 48;\n // valid hex characters in the range 48-57 and 97-102\n if (SHARED_CHAR_CODES_ARRAY[i] >= 58) {\n SHARED_CHAR_CODES_ARRAY[i] += 39;\n }\n }\n return String.fromCharCode.apply(null, SHARED_CHAR_CODES_ARRAY.slice(0, bytes * 2));\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","/*\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 api from '@opentelemetry/api';\nimport { sanitizeAttributes, isTracingSuppressed, } from '@opentelemetry/core';\nimport { Span } from './Span';\nimport { mergeConfig } from './utility';\nimport { RandomIdGenerator } from './platform';\n/**\n * This class represents a basic tracer.\n */\nvar Tracer = /** @class */ (function () {\n /**\n * Constructs a new Tracer instance.\n */\n function Tracer(instrumentationLibrary, config, _tracerProvider) {\n this._tracerProvider = _tracerProvider;\n var localConfig = mergeConfig(config);\n this._sampler = localConfig.sampler;\n this._generalLimits = localConfig.generalLimits;\n this._spanLimits = localConfig.spanLimits;\n this._idGenerator = config.idGenerator || new RandomIdGenerator();\n this.resource = _tracerProvider.resource;\n this.instrumentationLibrary = instrumentationLibrary;\n }\n /**\n * Starts a new Span or returns the default NoopSpan based on the sampling\n * decision.\n */\n Tracer.prototype.startSpan = function (name, options, context) {\n var _a, _b, _c;\n if (options === void 0) { options = {}; }\n if (context === void 0) { context = api.context.active(); }\n // remove span from context in case a root span is requested via options\n if (options.root) {\n context = api.trace.deleteSpan(context);\n }\n var parentSpan = api.trace.getSpan(context);\n if (isTracingSuppressed(context)) {\n api.diag.debug('Instrumentation suppressed, returning Noop Span');\n var nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);\n return nonRecordingSpan;\n }\n var parentSpanContext = parentSpan === null || parentSpan === void 0 ? void 0 : parentSpan.spanContext();\n var spanId = this._idGenerator.generateSpanId();\n var traceId;\n var traceState;\n var parentSpanId;\n if (!parentSpanContext ||\n !api.trace.isSpanContextValid(parentSpanContext)) {\n // New root span.\n traceId = this._idGenerator.generateTraceId();\n }\n else {\n // New child span.\n traceId = parentSpanContext.traceId;\n traceState = parentSpanContext.traceState;\n parentSpanId = parentSpanContext.spanId;\n }\n var spanKind = (_a = options.kind) !== null && _a !== void 0 ? _a : api.SpanKind.INTERNAL;\n var links = ((_b = options.links) !== null && _b !== void 0 ? _b : []).map(function (link) {\n return {\n context: link.context,\n attributes: sanitizeAttributes(link.attributes),\n };\n });\n var attributes = sanitizeAttributes(options.attributes);\n // make sampling decision\n var samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links);\n traceState = (_c = samplingResult.traceState) !== null && _c !== void 0 ? _c : traceState;\n var traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED\n ? api.TraceFlags.SAMPLED\n : api.TraceFlags.NONE;\n var spanContext = { traceId: traceId, spanId: spanId, traceFlags: traceFlags, traceState: traceState };\n if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {\n api.diag.debug('Recording is off, propagating context in a non-recording span');\n var nonRecordingSpan = api.trace.wrapSpanContext(spanContext);\n return nonRecordingSpan;\n }\n // Set initial span attributes. The attributes object may have been mutated\n // by the sampler, so we sanitize the merged attributes before setting them.\n var initAttributes = sanitizeAttributes(Object.assign(attributes, samplingResult.attributes));\n var span = new Span(this, context, name, spanContext, spanKind, parentSpanId, links, options.startTime, undefined, initAttributes);\n return span;\n };\n Tracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) {\n var opts;\n var ctx;\n var fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n var parentContext = ctx !== null && ctx !== void 0 ? ctx : api.context.active();\n var span = this.startSpan(name, opts, parentContext);\n var contextWithSpanSet = api.trace.setSpan(parentContext, span);\n return api.context.with(contextWithSpanSet, fn, undefined, span);\n };\n /** Returns the active {@link GeneralLimits}. */\n Tracer.prototype.getGeneralLimits = function () {\n return this._generalLimits;\n };\n /** Returns the active {@link SpanLimits}. */\n Tracer.prototype.getSpanLimits = function () {\n return this._spanLimits;\n };\n Tracer.prototype.getActiveSpanProcessor = function () {\n return this._tracerProvider.getActiveSpanProcessor();\n };\n return Tracer;\n}());\nexport { Tracer };\n//# sourceMappingURL=Tracer.js.map","/*\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 defaultServiceName() {\n return 'unknown_service';\n}\n//# sourceMappingURL=default-service-name.js.map","/*\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 */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { diag } from '@opentelemetry/api';\nimport { SEMRESATTRS_SERVICE_NAME, SEMRESATTRS_TELEMETRY_SDK_LANGUAGE, SEMRESATTRS_TELEMETRY_SDK_NAME, SEMRESATTRS_TELEMETRY_SDK_VERSION, } from '@opentelemetry/semantic-conventions';\nimport { SDK_INFO } from '@opentelemetry/core';\nimport { defaultServiceName } from './platform';\n/**\n * A Resource describes the entity for which a signals (metrics or trace) are\n * collected.\n */\nvar Resource = /** @class */ (function () {\n function Resource(\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 attributes, asyncAttributesPromise) {\n var _this = this;\n var _a;\n this._attributes = attributes;\n this.asyncAttributesPending = asyncAttributesPromise != null;\n this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(function (asyncAttributes) {\n _this._attributes = Object.assign({}, _this._attributes, asyncAttributes);\n _this.asyncAttributesPending = false;\n return asyncAttributes;\n }, function (err) {\n diag.debug(\"a resource's async attributes promise rejected: %s\", err);\n _this.asyncAttributesPending = false;\n return {};\n });\n }\n /**\n * Returns an empty Resource\n */\n Resource.empty = function () {\n return Resource.EMPTY;\n };\n /**\n * Returns a Resource that identifies the SDK in use.\n */\n Resource.default = function () {\n var _a;\n return new Resource((_a = {},\n _a[SEMRESATTRS_SERVICE_NAME] = defaultServiceName(),\n _a[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE] = SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_LANGUAGE],\n _a[SEMRESATTRS_TELEMETRY_SDK_NAME] = SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_NAME],\n _a[SEMRESATTRS_TELEMETRY_SDK_VERSION] = SDK_INFO[SEMRESATTRS_TELEMETRY_SDK_VERSION],\n _a));\n };\n Object.defineProperty(Resource.prototype, \"attributes\", {\n get: function () {\n var _a;\n if (this.asyncAttributesPending) {\n diag.error('Accessing resource attributes before async attributes settled');\n }\n return (_a = this._attributes) !== null && _a !== void 0 ? _a : {};\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Returns a promise that will never be rejected. Resolves when all async attributes have finished being added to\n * this Resource's attributes. This is useful in exporters to block until resource detection\n * has finished.\n */\n Resource.prototype.waitForAsyncAttributes = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.asyncAttributesPending) return [3 /*break*/, 2];\n return [4 /*yield*/, this._asyncAttributesPromise];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a new, merged {@link Resource} by merging the current Resource\n * with the other Resource. In case of a collision, other Resource takes\n * precedence.\n *\n * @param other the Resource that will be merged with this.\n * @returns the newly merged Resource.\n */\n Resource.prototype.merge = function (other) {\n var _this = this;\n var _a;\n if (!other)\n return this;\n // SpanAttributes from other resource overwrite attributes from this resource.\n var mergedSyncAttributes = __assign(__assign({}, this._syncAttributes), ((_a = other._syncAttributes) !== null && _a !== void 0 ? _a : other.attributes));\n if (!this._asyncAttributesPromise &&\n !other._asyncAttributesPromise) {\n return new Resource(mergedSyncAttributes);\n }\n var mergedAttributesPromise = Promise.all([\n this._asyncAttributesPromise,\n other._asyncAttributesPromise,\n ]).then(function (_a) {\n var _b;\n var _c = __read(_a, 2), thisAsyncAttributes = _c[0], otherAsyncAttributes = _c[1];\n return __assign(__assign(__assign(__assign({}, _this._syncAttributes), thisAsyncAttributes), ((_b = other._syncAttributes) !== null && _b !== void 0 ? _b : other.attributes)), otherAsyncAttributes);\n });\n return new Resource(mergedSyncAttributes, mergedAttributesPromise);\n };\n Resource.EMPTY = new Resource({});\n return Resource;\n}());\nexport { Resource };\n//# sourceMappingURL=Resource.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { globalErrorHandler } from '@opentelemetry/core';\n/**\n * Implementation of the {@link SpanProcessor} that simply forwards all\n * received events to a list of {@link SpanProcessor}s.\n */\nvar MultiSpanProcessor = /** @class */ (function () {\n function MultiSpanProcessor(_spanProcessors) {\n this._spanProcessors = _spanProcessors;\n }\n MultiSpanProcessor.prototype.forceFlush = function () {\n var e_1, _a;\n var promises = [];\n try {\n for (var _b = __values(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {\n var spanProcessor = _c.value;\n promises.push(spanProcessor.forceFlush());\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return new Promise(function (resolve) {\n Promise.all(promises)\n .then(function () {\n resolve();\n })\n .catch(function (error) {\n globalErrorHandler(error || new Error('MultiSpanProcessor: forceFlush failed'));\n resolve();\n });\n });\n };\n MultiSpanProcessor.prototype.onStart = function (span, context) {\n var e_2, _a;\n try {\n for (var _b = __values(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {\n var spanProcessor = _c.value;\n spanProcessor.onStart(span, context);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n };\n MultiSpanProcessor.prototype.onEnd = function (span) {\n var e_3, _a;\n try {\n for (var _b = __values(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {\n var spanProcessor = _c.value;\n spanProcessor.onEnd(span);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n MultiSpanProcessor.prototype.shutdown = function () {\n var e_4, _a;\n var promises = [];\n try {\n for (var _b = __values(this._spanProcessors), _c = _b.next(); !_c.done; _c = _b.next()) {\n var spanProcessor = _c.value;\n promises.push(spanProcessor.shutdown());\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n return new Promise(function (resolve, reject) {\n Promise.all(promises).then(function () {\n resolve();\n }, reject);\n });\n };\n return MultiSpanProcessor;\n}());\nexport { MultiSpanProcessor };\n//# sourceMappingURL=MultiSpanProcessor.js.map","/*\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/** No-op implementation of SpanProcessor */\nvar NoopSpanProcessor = /** @class */ (function () {\n function NoopSpanProcessor() {\n }\n NoopSpanProcessor.prototype.onStart = function (_span, _context) { };\n NoopSpanProcessor.prototype.onEnd = function (_span) { };\n NoopSpanProcessor.prototype.shutdown = function () {\n return Promise.resolve();\n };\n NoopSpanProcessor.prototype.forceFlush = function () {\n return Promise.resolve();\n };\n return NoopSpanProcessor;\n}());\nexport { NoopSpanProcessor };\n//# sourceMappingURL=NoopSpanProcessor.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { context, diag, propagation, trace, } from '@opentelemetry/api';\nimport { CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator, getEnv, merge, } from '@opentelemetry/core';\nimport { Resource } from '@opentelemetry/resources';\nimport { Tracer } from '.';\nimport { loadDefaultConfig } from './config';\nimport { MultiSpanProcessor } from './MultiSpanProcessor';\nimport { NoopSpanProcessor } from './export/NoopSpanProcessor';\nimport { BatchSpanProcessor } from './platform';\nimport { reconfigureLimits } from './utility';\nexport var ForceFlushState;\n(function (ForceFlushState) {\n ForceFlushState[ForceFlushState[\"resolved\"] = 0] = \"resolved\";\n ForceFlushState[ForceFlushState[\"timeout\"] = 1] = \"timeout\";\n ForceFlushState[ForceFlushState[\"error\"] = 2] = \"error\";\n ForceFlushState[ForceFlushState[\"unresolved\"] = 3] = \"unresolved\";\n})(ForceFlushState || (ForceFlushState = {}));\n/**\n * This class represents a basic tracer provider which platform libraries can extend\n */\nvar BasicTracerProvider = /** @class */ (function () {\n function BasicTracerProvider(config) {\n if (config === void 0) { config = {}; }\n var _a, _b;\n this._registeredSpanProcessors = [];\n this._tracers = new Map();\n var mergedConfig = merge({}, loadDefaultConfig(), reconfigureLimits(config));\n this.resource = (_a = mergedConfig.resource) !== null && _a !== void 0 ? _a : Resource.empty();\n if (mergedConfig.mergeResourceWithDefaults) {\n this.resource = Resource.default().merge(this.resource);\n }\n this._config = Object.assign({}, mergedConfig, {\n resource: this.resource,\n });\n if ((_b = config.spanProcessors) === null || _b === void 0 ? void 0 : _b.length) {\n this._registeredSpanProcessors = __spreadArray([], __read(config.spanProcessors), false);\n this.activeSpanProcessor = new MultiSpanProcessor(this._registeredSpanProcessors);\n }\n else {\n var defaultExporter = this._buildExporterFromEnv();\n if (defaultExporter !== undefined) {\n var batchProcessor = new BatchSpanProcessor(defaultExporter);\n this.activeSpanProcessor = batchProcessor;\n }\n else {\n this.activeSpanProcessor = new NoopSpanProcessor();\n }\n }\n }\n BasicTracerProvider.prototype.getTracer = function (name, version, options) {\n var key = name + \"@\" + (version || '') + \":\" + ((options === null || options === void 0 ? void 0 : options.schemaUrl) || '');\n if (!this._tracers.has(key)) {\n this._tracers.set(key, new Tracer({ name: name, version: version, schemaUrl: options === null || options === void 0 ? void 0 : options.schemaUrl }, this._config, this));\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this._tracers.get(key);\n };\n /**\n * @deprecated please use {@link TracerConfig} spanProcessors property\n * Adds a new {@link SpanProcessor} to this tracer.\n * @param spanProcessor the new SpanProcessor to be added.\n */\n BasicTracerProvider.prototype.addSpanProcessor = function (spanProcessor) {\n if (this._registeredSpanProcessors.length === 0) {\n // since we might have enabled by default a batchProcessor, we disable it\n // before adding the new one\n this.activeSpanProcessor\n .shutdown()\n .catch(function (err) {\n return diag.error('Error while trying to shutdown current span processor', err);\n });\n }\n this._registeredSpanProcessors.push(spanProcessor);\n this.activeSpanProcessor = new MultiSpanProcessor(this._registeredSpanProcessors);\n };\n BasicTracerProvider.prototype.getActiveSpanProcessor = function () {\n return this.activeSpanProcessor;\n };\n /**\n * Register this TracerProvider for use with the OpenTelemetry API.\n * Undefined values may be replaced with defaults, and\n * null values will be skipped.\n *\n * @param config Configuration object for SDK registration\n */\n BasicTracerProvider.prototype.register = function (config) {\n if (config === void 0) { config = {}; }\n trace.setGlobalTracerProvider(this);\n if (config.propagator === undefined) {\n config.propagator = this._buildPropagatorFromEnv();\n }\n if (config.contextManager) {\n context.setGlobalContextManager(config.contextManager);\n }\n if (config.propagator) {\n propagation.setGlobalPropagator(config.propagator);\n }\n };\n BasicTracerProvider.prototype.forceFlush = function () {\n var timeout = this._config.forceFlushTimeoutMillis;\n var promises = this._registeredSpanProcessors.map(function (spanProcessor) {\n return new Promise(function (resolve) {\n var state;\n var timeoutInterval = setTimeout(function () {\n resolve(new Error(\"Span processor did not completed within timeout period of \" + timeout + \" ms\"));\n state = ForceFlushState.timeout;\n }, timeout);\n spanProcessor\n .forceFlush()\n .then(function () {\n clearTimeout(timeoutInterval);\n if (state !== ForceFlushState.timeout) {\n state = ForceFlushState.resolved;\n resolve(state);\n }\n })\n .catch(function (error) {\n clearTimeout(timeoutInterval);\n state = ForceFlushState.error;\n resolve(error);\n });\n });\n });\n return new Promise(function (resolve, reject) {\n Promise.all(promises)\n .then(function (results) {\n var errors = results.filter(function (result) { return result !== ForceFlushState.resolved; });\n if (errors.length > 0) {\n reject(errors);\n }\n else {\n resolve();\n }\n })\n .catch(function (error) { return reject([error]); });\n });\n };\n BasicTracerProvider.prototype.shutdown = function () {\n return this.activeSpanProcessor.shutdown();\n };\n /**\n * TS cannot yet infer the type of this.constructor:\n * https://github.com/Microsoft/TypeScript/issues/3841#issuecomment-337560146\n * There is no need to override either of the getters in your child class.\n * The type of the registered component maps should be the same across all\n * classes in the inheritance tree.\n */\n BasicTracerProvider.prototype._getPropagator = function (name) {\n var _a;\n return (_a = this.constructor._registeredPropagators.get(name)) === null || _a === void 0 ? void 0 : _a();\n };\n BasicTracerProvider.prototype._getSpanExporter = function (name) {\n var _a;\n return (_a = this.constructor._registeredExporters.get(name)) === null || _a === void 0 ? void 0 : _a();\n };\n BasicTracerProvider.prototype._buildPropagatorFromEnv = function () {\n var _this = this;\n // per spec, propagators from env must be deduplicated\n var uniquePropagatorNames = Array.from(new Set(getEnv().OTEL_PROPAGATORS));\n var propagators = uniquePropagatorNames.map(function (name) {\n var propagator = _this._getPropagator(name);\n if (!propagator) {\n diag.warn(\"Propagator \\\"\" + name + \"\\\" requested through environment variable is unavailable.\");\n }\n return propagator;\n });\n var validPropagators = propagators.reduce(function (list, item) {\n if (item) {\n list.push(item);\n }\n return list;\n }, []);\n if (validPropagators.length === 0) {\n return;\n }\n else if (uniquePropagatorNames.length === 1) {\n return validPropagators[0];\n }\n else {\n return new CompositePropagator({\n propagators: validPropagators,\n });\n }\n };\n BasicTracerProvider.prototype._buildExporterFromEnv = function () {\n var exporterName = getEnv().OTEL_TRACES_EXPORTER;\n if (exporterName === 'none' || exporterName === '')\n return;\n var exporter = this._getSpanExporter(exporterName);\n if (!exporter) {\n diag.error(\"Exporter \\\"\" + exporterName + \"\\\" requested through environment variable is unavailable.\");\n }\n return exporter;\n };\n BasicTracerProvider._registeredPropagators = new Map([\n ['tracecontext', function () { return new W3CTraceContextPropagator(); }],\n ['baggage', function () { return new W3CBaggagePropagator(); }],\n ]);\n BasicTracerProvider._registeredExporters = new Map();\n return BasicTracerProvider;\n}());\nexport { BasicTracerProvider };\n//# sourceMappingURL=BasicTracerProvider.js.map","/*\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 */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ROOT_CONTEXT } from '@opentelemetry/api';\n/**\n * Stack Context Manager for managing the state in web\n * it doesn't fully support the async calls though\n */\nvar StackContextManager = /** @class */ (function () {\n function StackContextManager() {\n /**\n * whether the context manager is enabled or not\n */\n this._enabled = false;\n /**\n * Keeps the reference to current context\n */\n this._currentContext = ROOT_CONTEXT;\n }\n /**\n *\n * @param context\n * @param target Function to be executed within the context\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n StackContextManager.prototype._bindFunction = function (context, target) {\n if (context === void 0) { context = ROOT_CONTEXT; }\n var manager = this;\n var contextWrapper = function () {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return manager.with(context, function () { return target.apply(_this, args); });\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n return contextWrapper;\n };\n /**\n * Returns the active context\n */\n StackContextManager.prototype.active = function () {\n return this._currentContext;\n };\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n StackContextManager.prototype.bind = function (context, target) {\n // if no specific context to propagate is given, we use the current one\n if (context === undefined) {\n context = this.active();\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n return target;\n };\n /**\n * Disable the context manager (clears the current context)\n */\n StackContextManager.prototype.disable = function () {\n this._currentContext = ROOT_CONTEXT;\n this._enabled = false;\n return this;\n };\n /**\n * Enables the context manager and creates a default(root) context\n */\n StackContextManager.prototype.enable = function () {\n if (this._enabled) {\n return this;\n }\n this._enabled = true;\n this._currentContext = ROOT_CONTEXT;\n return this;\n };\n /**\n * Calls the callback function [fn] with the provided [context]. If [context] is undefined then it will use the window.\n * The context will be set as active\n * @param context\n * @param fn Callback function\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n StackContextManager.prototype.with = function (context, fn, thisArg) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n var previousContext = this._currentContext;\n this._currentContext = context || ROOT_CONTEXT;\n try {\n return fn.call.apply(fn, __spreadArray([thisArg], __read(args), false));\n }\n finally {\n this._currentContext = previousContext;\n }\n };\n return StackContextManager;\n}());\nexport { StackContextManager };\n//# sourceMappingURL=StackContextManager.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BasicTracerProvider, } from '@opentelemetry/sdk-trace-base';\nimport { StackContextManager } from './StackContextManager';\n/**\n * This class represents a web tracer with {@link StackContextManager}\n */\nvar WebTracerProvider = /** @class */ (function (_super) {\n __extends(WebTracerProvider, _super);\n /**\n * Constructs a new Tracer instance.\n * @param config Web Tracer config\n */\n function WebTracerProvider(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this, config) || this;\n if (config.contextManager) {\n throw ('contextManager should be defined in register method not in' +\n ' constructor');\n }\n if (config.propagator) {\n throw 'propagator should be defined in register method not in constructor';\n }\n return _this;\n }\n /**\n * Register this TracerProvider for use with the OpenTelemetry API.\n * Undefined values may be replaced with defaults, and\n * null values will be skipped.\n *\n * @param config Configuration object for SDK registration\n */\n WebTracerProvider.prototype.register = function (config) {\n if (config === void 0) { config = {}; }\n if (config.contextManager === undefined) {\n config.contextManager = new StackContextManager();\n }\n if (config.contextManager) {\n config.contextManager.enable();\n }\n _super.prototype.register.call(this, config);\n };\n return WebTracerProvider;\n}(BasicTracerProvider));\nexport { WebTracerProvider };\n//# sourceMappingURL=WebTracerProvider.js.map","/*\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 var PerformanceTimingNames;\n(function (PerformanceTimingNames) {\n PerformanceTimingNames[\"CONNECT_END\"] = \"connectEnd\";\n PerformanceTimingNames[\"CONNECT_START\"] = \"connectStart\";\n PerformanceTimingNames[\"DECODED_BODY_SIZE\"] = \"decodedBodySize\";\n PerformanceTimingNames[\"DOM_COMPLETE\"] = \"domComplete\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_END\"] = \"domContentLoadedEventEnd\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_START\"] = \"domContentLoadedEventStart\";\n PerformanceTimingNames[\"DOM_INTERACTIVE\"] = \"domInteractive\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_END\"] = \"domainLookupEnd\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_START\"] = \"domainLookupStart\";\n PerformanceTimingNames[\"ENCODED_BODY_SIZE\"] = \"encodedBodySize\";\n PerformanceTimingNames[\"FETCH_START\"] = \"fetchStart\";\n PerformanceTimingNames[\"LOAD_EVENT_END\"] = \"loadEventEnd\";\n PerformanceTimingNames[\"LOAD_EVENT_START\"] = \"loadEventStart\";\n PerformanceTimingNames[\"NAVIGATION_START\"] = \"navigationStart\";\n PerformanceTimingNames[\"REDIRECT_END\"] = \"redirectEnd\";\n PerformanceTimingNames[\"REDIRECT_START\"] = \"redirectStart\";\n PerformanceTimingNames[\"REQUEST_START\"] = \"requestStart\";\n PerformanceTimingNames[\"RESPONSE_END\"] = \"responseEnd\";\n PerformanceTimingNames[\"RESPONSE_START\"] = \"responseStart\";\n PerformanceTimingNames[\"SECURE_CONNECTION_START\"] = \"secureConnectionStart\";\n PerformanceTimingNames[\"UNLOAD_EVENT_END\"] = \"unloadEventEnd\";\n PerformanceTimingNames[\"UNLOAD_EVENT_START\"] = \"unloadEventStart\";\n})(PerformanceTimingNames || (PerformanceTimingNames = {}));\n//# sourceMappingURL=PerformanceTimingNames.js.map","/*\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 { PerformanceTimingNames as PTN } from './enums/PerformanceTimingNames';\nimport { hrTimeToNanoseconds, timeInputToHrTime, urlMatches, } from '@opentelemetry/core';\nimport { SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH, SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, } from '@opentelemetry/semantic-conventions';\n// Used to normalize relative URLs\nvar urlNormalizingAnchor;\nfunction getUrlNormalizingAnchor() {\n if (!urlNormalizingAnchor) {\n urlNormalizingAnchor = document.createElement('a');\n }\n return urlNormalizingAnchor;\n}\n/**\n * Helper function to be able to use enum as typed key in type and in interface when using forEach\n * @param obj\n * @param key\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function hasKey(obj, key) {\n return key in obj;\n}\n/**\n * Helper function for starting an event on span based on {@link PerformanceEntries}\n * @param span\n * @param performanceName name of performance entry for time start\n * @param entries\n * @param refPerfName name of performance entry to use for reference\n */\nexport function addSpanNetworkEvent(span, performanceName, entries, refPerfName) {\n var perfTime = undefined;\n var refTime = undefined;\n if (hasKey(entries, performanceName) &&\n typeof entries[performanceName] === 'number') {\n perfTime = entries[performanceName];\n }\n var refName = refPerfName || PTN.FETCH_START;\n // Use a reference time which is the earliest possible value so that the performance timings that are earlier should not be added\n // using FETCH START time in case no reference is provided\n if (hasKey(entries, refName) && typeof entries[refName] === 'number') {\n refTime = entries[refName];\n }\n if (perfTime !== undefined && refTime !== undefined && perfTime >= refTime) {\n span.addEvent(performanceName, perfTime);\n return span;\n }\n return undefined;\n}\n/**\n * Helper function for adding network events\n * @param span\n * @param resource\n */\nexport function addSpanNetworkEvents(span, resource) {\n addSpanNetworkEvent(span, PTN.FETCH_START, resource);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_START, resource);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_END, resource);\n addSpanNetworkEvent(span, PTN.CONNECT_START, resource);\n if (hasKey(resource, 'name') &&\n resource['name'].startsWith('https:')) {\n addSpanNetworkEvent(span, PTN.SECURE_CONNECTION_START, resource);\n }\n addSpanNetworkEvent(span, PTN.CONNECT_END, resource);\n addSpanNetworkEvent(span, PTN.REQUEST_START, resource);\n addSpanNetworkEvent(span, PTN.RESPONSE_START, resource);\n addSpanNetworkEvent(span, PTN.RESPONSE_END, resource);\n var encodedLength = resource[PTN.ENCODED_BODY_SIZE];\n if (encodedLength !== undefined) {\n span.setAttribute(SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH, encodedLength);\n }\n var decodedLength = resource[PTN.DECODED_BODY_SIZE];\n // Spec: Not set if transport encoding not used (in which case encoded and decoded sizes match)\n if (decodedLength !== undefined && encodedLength !== decodedLength) {\n span.setAttribute(SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, decodedLength);\n }\n}\n/**\n * sort resources by startTime\n * @param filteredResources\n */\nexport function sortResources(filteredResources) {\n return filteredResources.slice().sort(function (a, b) {\n var valueA = a[PTN.FETCH_START];\n var valueB = b[PTN.FETCH_START];\n if (valueA > valueB) {\n return 1;\n }\n else if (valueA < valueB) {\n return -1;\n }\n return 0;\n });\n}\n/** Returns the origin if present (if in browser context). */\nfunction getOrigin() {\n return typeof location !== 'undefined' ? location.origin : undefined;\n}\n/**\n * Get closest performance resource ignoring the resources that have been\n * already used.\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n * @param initiatorType\n */\nexport function getResource(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType) {\n if (ignoredResources === void 0) { ignoredResources = new WeakSet(); }\n // de-relativize the URL before usage (does no harm to absolute URLs)\n var parsedSpanUrl = parseUrl(spanUrl);\n spanUrl = parsedSpanUrl.toString();\n var filteredResources = filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType);\n if (filteredResources.length === 0) {\n return {\n mainRequest: undefined,\n };\n }\n if (filteredResources.length === 1) {\n return {\n mainRequest: filteredResources[0],\n };\n }\n var sorted = sortResources(filteredResources);\n if (parsedSpanUrl.origin !== getOrigin() && sorted.length > 1) {\n var corsPreFlightRequest = sorted[0];\n var mainRequest = findMainRequest(sorted, corsPreFlightRequest[PTN.RESPONSE_END], endTimeHR);\n var responseEnd = corsPreFlightRequest[PTN.RESPONSE_END];\n var fetchStart = mainRequest[PTN.FETCH_START];\n // no corsPreFlightRequest\n if (fetchStart < responseEnd) {\n mainRequest = corsPreFlightRequest;\n corsPreFlightRequest = undefined;\n }\n return {\n corsPreFlightRequest: corsPreFlightRequest,\n mainRequest: mainRequest,\n };\n }\n else {\n return {\n mainRequest: filteredResources[0],\n };\n }\n}\n/**\n * Will find the main request skipping the cors pre flight requests\n * @param resources\n * @param corsPreFlightRequestEndTime\n * @param spanEndTimeHR\n */\nfunction findMainRequest(resources, corsPreFlightRequestEndTime, spanEndTimeHR) {\n var spanEndTime = hrTimeToNanoseconds(spanEndTimeHR);\n var minTime = hrTimeToNanoseconds(timeInputToHrTime(corsPreFlightRequestEndTime));\n var mainRequest = resources[1];\n var bestGap;\n var length = resources.length;\n for (var i = 1; i < length; i++) {\n var resource = resources[i];\n var resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n var resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n var currentGap = spanEndTime - resourceEndTime;\n if (resourceStartTime >= minTime && (!bestGap || currentGap < bestGap)) {\n bestGap = currentGap;\n mainRequest = resource;\n }\n }\n return mainRequest;\n}\n/**\n * Filter all resources that has started and finished according to span start time and end time.\n * It will return the closest resource to a start time\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n */\nfunction filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType) {\n var startTime = hrTimeToNanoseconds(startTimeHR);\n var endTime = hrTimeToNanoseconds(endTimeHR);\n var filteredResources = resources.filter(function (resource) {\n var resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n var resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n return (resource.initiatorType.toLowerCase() ===\n (initiatorType || 'xmlhttprequest') &&\n resource.name === spanUrl &&\n resourceStartTime >= startTime &&\n resourceEndTime <= endTime);\n });\n if (filteredResources.length > 0) {\n filteredResources = filteredResources.filter(function (resource) {\n return !ignoredResources.has(resource);\n });\n }\n return filteredResources;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element.\n * @param url\n */\nexport function parseUrl(url) {\n if (typeof URL === 'function') {\n return new URL(url, typeof document !== 'undefined'\n ? document.baseURI\n : typeof location !== 'undefined' // Some JS runtimes (e.g. Deno) don't define this\n ? location.href\n : undefined);\n }\n var element = getUrlNormalizingAnchor();\n element.href = url;\n return element;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element and serialize\n * it to a string.\n *\n * Performs the steps described in https://html.spec.whatwg.org/multipage/urls-and-fetching.html#parse-a-url\n *\n * @param url\n */\nexport function normalizeUrl(url) {\n var urlLike = parseUrl(url);\n return urlLike.href;\n}\n/**\n * Get element XPath\n * @param target - target element\n * @param optimised - when id attribute of element is present the xpath can be\n * simplified to contain id\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function getElementXPath(target, optimised) {\n if (target.nodeType === Node.DOCUMENT_NODE) {\n return '/';\n }\n var targetValue = getNodeValue(target, optimised);\n if (optimised && targetValue.indexOf('@id') > 0) {\n return targetValue;\n }\n var xpath = '';\n if (target.parentNode) {\n xpath += getElementXPath(target.parentNode, false);\n }\n xpath += targetValue;\n return xpath;\n}\n/**\n * get node index within the siblings\n * @param target\n */\nfunction getNodeIndex(target) {\n if (!target.parentNode) {\n return 0;\n }\n var allowedTypes = [target.nodeType];\n if (target.nodeType === Node.CDATA_SECTION_NODE) {\n allowedTypes.push(Node.TEXT_NODE);\n }\n var elements = Array.from(target.parentNode.childNodes);\n elements = elements.filter(function (element) {\n var localName = element.localName;\n return (allowedTypes.indexOf(element.nodeType) >= 0 &&\n localName === target.localName);\n });\n if (elements.length >= 1) {\n return elements.indexOf(target) + 1; // xpath starts from 1\n }\n // if there are no other similar child xpath doesn't need index\n return 0;\n}\n/**\n * get node value for xpath\n * @param target\n * @param optimised\n */\nfunction getNodeValue(target, optimised) {\n var nodeType = target.nodeType;\n var index = getNodeIndex(target);\n var nodeValue = '';\n if (nodeType === Node.ELEMENT_NODE) {\n var id = target.getAttribute('id');\n if (optimised && id) {\n return \"//*[@id=\\\"\" + id + \"\\\"]\";\n }\n nodeValue = target.localName;\n }\n else if (nodeType === Node.TEXT_NODE ||\n nodeType === Node.CDATA_SECTION_NODE) {\n nodeValue = 'text()';\n }\n else if (nodeType === Node.COMMENT_NODE) {\n nodeValue = 'comment()';\n }\n else {\n return '';\n }\n // if index is 1 it can be omitted in xpath\n if (nodeValue && index > 1) {\n return \"/\" + nodeValue + \"[\" + index + \"]\";\n }\n return \"/\" + nodeValue;\n}\n/**\n * Checks if trace headers should be propagated\n * @param spanUrl\n * @private\n */\nexport function shouldPropagateTraceHeaders(spanUrl, propagateTraceHeaderCorsUrls) {\n var propagateTraceHeaderUrls = propagateTraceHeaderCorsUrls || [];\n if (typeof propagateTraceHeaderUrls === 'string' ||\n propagateTraceHeaderUrls instanceof RegExp) {\n propagateTraceHeaderUrls = [propagateTraceHeaderUrls];\n }\n var parsedSpanUrl = parseUrl(spanUrl);\n if (parsedSpanUrl.origin === getOrigin()) {\n return true;\n }\n else {\n return propagateTraceHeaderUrls.some(function (propagateTraceHeaderUrl) {\n return urlMatches(spanUrl, propagateTraceHeaderUrl);\n });\n }\n}\n//# sourceMappingURL=utils.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { getEnv, baggageUtils } from '@opentelemetry/core';\nimport { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, OTLPExporterBrowserBase, } from '@opentelemetry/otlp-exporter-base';\nimport { createExportTraceServiceRequest, } from '@opentelemetry/otlp-transformer';\nvar DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/traces';\nvar DEFAULT_COLLECTOR_URL = \"http://localhost:4318/\" + DEFAULT_COLLECTOR_RESOURCE_PATH;\n/**\n * Collector Trace Exporter for Web\n */\nvar OTLPTraceExporter = /** @class */ (function (_super) {\n __extends(OTLPTraceExporter, _super);\n function OTLPTraceExporter(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this, config) || this;\n _this._headers = Object.assign(_this._headers, baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_TRACES_HEADERS));\n return _this;\n }\n OTLPTraceExporter.prototype.convert = function (spans) {\n return createExportTraceServiceRequest(spans, {\n useHex: true,\n useLongBits: false,\n });\n };\n OTLPTraceExporter.prototype.getDefaultUrl = function (config) {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n };\n return OTLPTraceExporter;\n}(OTLPExporterBrowserBase));\nexport { OTLPTraceExporter };\n//# sourceMappingURL=OTLPTraceExporter.js.map","/*\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 { getEnv } from '@opentelemetry/core';\nimport { appendResourcePathToUrl, appendRootPathToUrlIfNeeded, } from '@opentelemetry/otlp-exporter-base';\nvar DEFAULT_COLLECTOR_RESOURCE_PATH = 'v1/logs';\nexport var DEFAULT_COLLECTOR_URL = \"http://localhost:4318/\" + DEFAULT_COLLECTOR_RESOURCE_PATH;\n/**\n * common get default url\n * @param config exporter config\n * @returns url string\n */\nexport function getDefaultUrl(config) {\n return typeof config.url === 'string'\n ? config.url\n : getEnv().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length > 0\n ? appendRootPathToUrlIfNeeded(getEnv().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT)\n : getEnv().OTEL_EXPORTER_OTLP_ENDPOINT.length > 0\n ? appendResourcePathToUrl(getEnv().OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_COLLECTOR_RESOURCE_PATH)\n : DEFAULT_COLLECTOR_URL;\n}\n//# sourceMappingURL=config.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { OTLPExporterBrowserBase } from '@opentelemetry/otlp-exporter-base';\nimport { baggageUtils, getEnv } from '@opentelemetry/core';\nimport { createExportLogsServiceRequest } from '@opentelemetry/otlp-transformer';\nimport { getDefaultUrl } from '../config';\n/**\n * Collector Logs Exporter for Web\n */\nvar OTLPLogExporter = /** @class */ (function (_super) {\n __extends(OTLPLogExporter, _super);\n function OTLPLogExporter(config) {\n if (config === void 0) { config = {}; }\n var _this = \n // load OTEL_EXPORTER_OTLP_LOGS_TIMEOUT env var\n _super.call(this, __assign({ timeoutMillis: getEnv().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT }, config)) || this;\n _this._headers = __assign(__assign({}, _this._headers), baggageUtils.parseKeyPairsIntoRecord(getEnv().OTEL_EXPORTER_OTLP_LOGS_HEADERS));\n return _this;\n }\n OTLPLogExporter.prototype.convert = function (logRecords) {\n return createExportLogsServiceRequest(logRecords, {\n useHex: true,\n useLongBits: false,\n });\n };\n OTLPLogExporter.prototype.getDefaultUrl = function (config) {\n return getDefaultUrl(config);\n };\n return OTLPLogExporter;\n}(OTLPExporterBrowserBase));\nexport { OTLPLogExporter };\n//# sourceMappingURL=OTLPLogExporter.js.map","/*\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 var SeverityNumber;\n(function (SeverityNumber) {\n SeverityNumber[SeverityNumber[\"UNSPECIFIED\"] = 0] = \"UNSPECIFIED\";\n SeverityNumber[SeverityNumber[\"TRACE\"] = 1] = \"TRACE\";\n SeverityNumber[SeverityNumber[\"TRACE2\"] = 2] = \"TRACE2\";\n SeverityNumber[SeverityNumber[\"TRACE3\"] = 3] = \"TRACE3\";\n SeverityNumber[SeverityNumber[\"TRACE4\"] = 4] = \"TRACE4\";\n SeverityNumber[SeverityNumber[\"DEBUG\"] = 5] = \"DEBUG\";\n SeverityNumber[SeverityNumber[\"DEBUG2\"] = 6] = \"DEBUG2\";\n SeverityNumber[SeverityNumber[\"DEBUG3\"] = 7] = \"DEBUG3\";\n SeverityNumber[SeverityNumber[\"DEBUG4\"] = 8] = \"DEBUG4\";\n SeverityNumber[SeverityNumber[\"INFO\"] = 9] = \"INFO\";\n SeverityNumber[SeverityNumber[\"INFO2\"] = 10] = \"INFO2\";\n SeverityNumber[SeverityNumber[\"INFO3\"] = 11] = \"INFO3\";\n SeverityNumber[SeverityNumber[\"INFO4\"] = 12] = \"INFO4\";\n SeverityNumber[SeverityNumber[\"WARN\"] = 13] = \"WARN\";\n SeverityNumber[SeverityNumber[\"WARN2\"] = 14] = \"WARN2\";\n SeverityNumber[SeverityNumber[\"WARN3\"] = 15] = \"WARN3\";\n SeverityNumber[SeverityNumber[\"WARN4\"] = 16] = \"WARN4\";\n SeverityNumber[SeverityNumber[\"ERROR\"] = 17] = \"ERROR\";\n SeverityNumber[SeverityNumber[\"ERROR2\"] = 18] = \"ERROR2\";\n SeverityNumber[SeverityNumber[\"ERROR3\"] = 19] = \"ERROR3\";\n SeverityNumber[SeverityNumber[\"ERROR4\"] = 20] = \"ERROR4\";\n SeverityNumber[SeverityNumber[\"FATAL\"] = 21] = \"FATAL\";\n SeverityNumber[SeverityNumber[\"FATAL2\"] = 22] = \"FATAL2\";\n SeverityNumber[SeverityNumber[\"FATAL3\"] = 23] = \"FATAL3\";\n SeverityNumber[SeverityNumber[\"FATAL4\"] = 24] = \"FATAL4\";\n})(SeverityNumber || (SeverityNumber = {}));\n//# sourceMappingURL=LogRecord.js.map","/*\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 */\nvar NoopLogger = /** @class */ (function () {\n function NoopLogger() {\n }\n NoopLogger.prototype.emit = function (_logRecord) { };\n return NoopLogger;\n}());\nexport { NoopLogger };\nexport var NOOP_LOGGER = new NoopLogger();\n//# sourceMappingURL=NoopLogger.js.map","/*\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 */\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { diag } from '@opentelemetry/api';\nimport * as api from '@opentelemetry/api';\nimport { timeInputToHrTime, isAttributeValue, } from '@opentelemetry/core';\nvar LogRecord = /** @class */ (function () {\n function LogRecord(_sharedState, instrumentationScope, logRecord) {\n this.attributes = {};\n this.totalAttributesCount = 0;\n this._isReadonly = false;\n var timestamp = logRecord.timestamp, observedTimestamp = logRecord.observedTimestamp, severityNumber = logRecord.severityNumber, severityText = logRecord.severityText, body = logRecord.body, _a = logRecord.attributes, attributes = _a === void 0 ? {} : _a, context = logRecord.context;\n var now = Date.now();\n this.hrTime = timeInputToHrTime(timestamp !== null && timestamp !== void 0 ? timestamp : now);\n this.hrTimeObserved = timeInputToHrTime(observedTimestamp !== null && observedTimestamp !== void 0 ? observedTimestamp : now);\n if (context) {\n var 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 Object.defineProperty(LogRecord.prototype, \"severityText\", {\n get: function () {\n return this._severityText;\n },\n set: function (severityText) {\n if (this._isLogRecordReadonly()) {\n return;\n }\n this._severityText = severityText;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LogRecord.prototype, \"severityNumber\", {\n get: function () {\n return this._severityNumber;\n },\n set: function (severityNumber) {\n if (this._isLogRecordReadonly()) {\n return;\n }\n this._severityNumber = severityNumber;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LogRecord.prototype, \"body\", {\n get: function () {\n return this._body;\n },\n set: function (body) {\n if (this._isLogRecordReadonly()) {\n return;\n }\n this._body = body;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(LogRecord.prototype, \"droppedAttributesCount\", {\n get: function () {\n return this.totalAttributesCount - Object.keys(this.attributes).length;\n },\n enumerable: false,\n configurable: true\n });\n LogRecord.prototype.setAttribute = function (key, value) {\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 (!isAttributeValue(value) &&\n !(typeof value === 'object' &&\n !Array.isArray(value) &&\n Object.keys(value).length > 0)) {\n api.diag.warn(\"Invalid attribute value set for key: \" + key);\n return this;\n }\n this.totalAttributesCount += 1;\n if (Object.keys(this.attributes).length >=\n this._logRecordLimits.attributeCountLimit &&\n !Object.prototype.hasOwnProperty.call(this.attributes, key)) {\n return this;\n }\n if (isAttributeValue(value)) {\n this.attributes[key] = this._truncateToSize(value);\n }\n else {\n this.attributes[key] = value;\n }\n return this;\n };\n LogRecord.prototype.setAttributes = function (attributes) {\n var e_1, _a;\n try {\n for (var _b = __values(Object.entries(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var _d = __read(_c.value, 2), k = _d[0], v = _d[1];\n this.setAttribute(k, v);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return this;\n };\n LogRecord.prototype.setBody = function (body) {\n this.body = body;\n return this;\n };\n LogRecord.prototype.setSeverityNumber = function (severityNumber) {\n this.severityNumber = severityNumber;\n return this;\n };\n LogRecord.prototype.setSeverityText = function (severityText) {\n this.severityText = severityText;\n return this;\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 LogRecord.prototype._makeReadonly = function () {\n this._isReadonly = true;\n };\n LogRecord.prototype._truncateToSize = function (value) {\n var _this = this;\n var 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 // String\n if (typeof value === 'string') {\n return this._truncateToLimitUtil(value, limit);\n }\n // Array of strings\n if (Array.isArray(value)) {\n return value.map(function (val) {\n return typeof val === 'string' ? _this._truncateToLimitUtil(val, limit) : val;\n });\n }\n // Other types, no need to apply value length limit\n return value;\n };\n LogRecord.prototype._truncateToLimitUtil = function (value, limit) {\n if (value.length <= limit) {\n return value;\n }\n return value.substring(0, limit);\n };\n LogRecord.prototype._isLogRecordReadonly = function () {\n if (this._isReadonly) {\n diag.warn('Can not execute the operation on emitted log record');\n }\n return this._isReadonly;\n };\n return LogRecord;\n}());\nexport { LogRecord };\n//# sourceMappingURL=LogRecord.js.map","/*\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 */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { context } from '@opentelemetry/api';\nimport { LogRecord } from './LogRecord';\nvar Logger = /** @class */ (function () {\n function Logger(instrumentationScope, _sharedState) {\n this.instrumentationScope = instrumentationScope;\n this._sharedState = _sharedState;\n }\n Logger.prototype.emit = function (logRecord) {\n var 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 var logRecordInstance = new LogRecord(this._sharedState, this.instrumentationScope, __assign({ context: currentContext }, logRecord));\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 return Logger;\n}());\nexport { Logger };\n//# sourceMappingURL=Logger.js.map","/*\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 { DEFAULT_ATTRIBUTE_COUNT_LIMIT, DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT, getEnv, getEnvWithoutDefaults, } from '@opentelemetry/core';\nexport function loadDefaultConfig() {\n return {\n forceFlushTimeoutMillis: 30000,\n logRecordLimits: {\n attributeValueLengthLimit: getEnv().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n attributeCountLimit: getEnv().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT,\n },\n includeTraceContext: true,\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(logRecordLimits) {\n var _a, _b, _c, _d, _e, _f;\n var parsedEnvConfig = getEnvWithoutDefaults();\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: (_c = (_b = (_a = logRecordLimits.attributeCountLimit) !== null && _a !== void 0 ? _a : parsedEnvConfig.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT) !== null && _b !== void 0 ? _b : parsedEnvConfig.OTEL_ATTRIBUTE_COUNT_LIMIT) !== null && _c !== void 0 ? _c : DEFAULT_ATTRIBUTE_COUNT_LIMIT,\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: (_f = (_e = (_d = logRecordLimits.attributeValueLengthLimit) !== null && _d !== void 0 ? _d : parsedEnvConfig.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _e !== void 0 ? _e : parsedEnvConfig.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT) !== null && _f !== void 0 ? _f : DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,\n };\n}\n//# sourceMappingURL=config.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { callWithTimeout } from '@opentelemetry/core';\n/**\n * Implementation of the {@link LogRecordProcessor} that simply forwards all\n * received events to a list of {@link LogRecordProcessor}s.\n */\nvar MultiLogRecordProcessor = /** @class */ (function () {\n function MultiLogRecordProcessor(processors, forceFlushTimeoutMillis) {\n this.processors = processors;\n this.forceFlushTimeoutMillis = forceFlushTimeoutMillis;\n }\n MultiLogRecordProcessor.prototype.forceFlush = function () {\n return __awaiter(this, void 0, void 0, function () {\n var timeout;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n timeout = this.forceFlushTimeoutMillis;\n return [4 /*yield*/, Promise.all(this.processors.map(function (processor) {\n return callWithTimeout(processor.forceFlush(), timeout);\n }))];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n MultiLogRecordProcessor.prototype.onEmit = function (logRecord, context) {\n this.processors.forEach(function (processors) {\n return processors.onEmit(logRecord, context);\n });\n };\n MultiLogRecordProcessor.prototype.shutdown = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, Promise.all(this.processors.map(function (processor) { return processor.shutdown(); }))];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n return MultiLogRecordProcessor;\n}());\nexport { MultiLogRecordProcessor };\n//# sourceMappingURL=MultiLogRecordProcessor.js.map","/*\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 */\nvar NoopLogRecordProcessor = /** @class */ (function () {\n function NoopLogRecordProcessor() {\n }\n NoopLogRecordProcessor.prototype.forceFlush = function () {\n return Promise.resolve();\n };\n NoopLogRecordProcessor.prototype.onEmit = function (_logRecord, _context) { };\n NoopLogRecordProcessor.prototype.shutdown = function () {\n return Promise.resolve();\n };\n return NoopLogRecordProcessor;\n}());\nexport { NoopLogRecordProcessor };\n//# sourceMappingURL=NoopLogRecordProcessor.js.map","/*\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 { NoopLogRecordProcessor } from '../export/NoopLogRecordProcessor';\nvar LoggerProviderSharedState = /** @class */ (function () {\n function LoggerProviderSharedState(resource, forceFlushTimeoutMillis, logRecordLimits) {\n this.resource = resource;\n this.forceFlushTimeoutMillis = forceFlushTimeoutMillis;\n this.logRecordLimits = logRecordLimits;\n this.loggers = new Map();\n this.registeredLogRecordProcessors = [];\n this.activeProcessor = new NoopLogRecordProcessor();\n }\n return LoggerProviderSharedState;\n}());\nexport { LoggerProviderSharedState };\n//# sourceMappingURL=LoggerProviderSharedState.js.map","/*\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 { NOOP_LOGGER } from '@opentelemetry/api-logs';\nimport { Resource } from '@opentelemetry/resources';\nimport { BindOnceFuture, merge } from '@opentelemetry/core';\nimport { Logger } from './Logger';\nimport { loadDefaultConfig, reconfigureLimits } from './config';\nimport { MultiLogRecordProcessor } from './MultiLogRecordProcessor';\nimport { LoggerProviderSharedState } from './internal/LoggerProviderSharedState';\nexport var DEFAULT_LOGGER_NAME = 'unknown';\nvar LoggerProvider = /** @class */ (function () {\n function LoggerProvider(config) {\n if (config === void 0) { config = {}; }\n var _a = merge({}, loadDefaultConfig(), config), _b = _a.resource, resource = _b === void 0 ? Resource.default() : _b, logRecordLimits = _a.logRecordLimits, forceFlushTimeoutMillis = _a.forceFlushTimeoutMillis;\n this._sharedState = new LoggerProviderSharedState(resource, forceFlushTimeoutMillis, reconfigureLimits(logRecordLimits));\n this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n }\n /**\n * Get a logger with the configuration of the LoggerProvider.\n */\n LoggerProvider.prototype.getLogger = function (name, version, options) {\n if (this._shutdownOnce.isCalled) {\n diag.warn('A shutdown LoggerProvider cannot provide a Logger');\n return NOOP_LOGGER;\n }\n if (!name) {\n diag.warn('Logger requested without instrumentation scope name.');\n }\n var loggerName = name || DEFAULT_LOGGER_NAME;\n var key = loggerName + \"@\" + (version || '') + \":\" + ((options === null || options === void 0 ? void 0 : options.schemaUrl) || '');\n if (!this._sharedState.loggers.has(key)) {\n this._sharedState.loggers.set(key, new Logger({ name: loggerName, version: version, schemaUrl: options === null || options === void 0 ? void 0 : options.schemaUrl }, this._sharedState));\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this._sharedState.loggers.get(key);\n };\n /**\n * Adds a new {@link LogRecordProcessor} to this logger.\n * @param processor the new LogRecordProcessor to be added.\n */\n LoggerProvider.prototype.addLogRecordProcessor = function (processor) {\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(function (err) {\n return diag.error('Error while trying to shutdown current log record processor', err);\n });\n }\n this._sharedState.registeredLogRecordProcessors.push(processor);\n this._sharedState.activeProcessor = new MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors, this._sharedState.forceFlushTimeoutMillis);\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 LoggerProvider.prototype.forceFlush = function () {\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 * 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 LoggerProvider.prototype.shutdown = function () {\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 LoggerProvider.prototype._shutdown = function () {\n return this._sharedState.activeProcessor.shutdown();\n };\n return LoggerProvider;\n}());\nexport { LoggerProvider };\n//# sourceMappingURL=LoggerProvider.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { diag } from '@opentelemetry/api';\nimport { ExportResultCode, getEnv, globalErrorHandler, unrefTimer, BindOnceFuture, internal, callWithTimeout, } from '@opentelemetry/core';\nvar BatchLogRecordProcessorBase = /** @class */ (function () {\n function BatchLogRecordProcessorBase(_exporter, config) {\n var _a, _b, _c, _d;\n this._exporter = _exporter;\n this._finishedLogRecords = [];\n var env = getEnv();\n this._maxExportBatchSize =\n (_a = config === null || config === void 0 ? void 0 : config.maxExportBatchSize) !== null && _a !== void 0 ? _a : env.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE;\n this._maxQueueSize = (_b = config === null || config === void 0 ? void 0 : config.maxQueueSize) !== null && _b !== void 0 ? _b : env.OTEL_BLRP_MAX_QUEUE_SIZE;\n this._scheduledDelayMillis =\n (_c = config === null || config === void 0 ? void 0 : config.scheduledDelayMillis) !== null && _c !== void 0 ? _c : env.OTEL_BLRP_SCHEDULE_DELAY;\n this._exportTimeoutMillis =\n (_d = config === null || config === void 0 ? void 0 : config.exportTimeoutMillis) !== null && _d !== void 0 ? _d : env.OTEL_BLRP_EXPORT_TIMEOUT;\n this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n if (this._maxExportBatchSize > this._maxQueueSize) {\n diag.warn('BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize');\n this._maxExportBatchSize = this._maxQueueSize;\n }\n }\n BatchLogRecordProcessorBase.prototype.onEmit = function (logRecord) {\n if (this._shutdownOnce.isCalled) {\n return;\n }\n this._addToBuffer(logRecord);\n };\n BatchLogRecordProcessorBase.prototype.forceFlush = function () {\n if (this._shutdownOnce.isCalled) {\n return this._shutdownOnce.promise;\n }\n return this._flushAll();\n };\n BatchLogRecordProcessorBase.prototype.shutdown = function () {\n return this._shutdownOnce.call();\n };\n BatchLogRecordProcessorBase.prototype._shutdown = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.onShutdown();\n return [4 /*yield*/, this._flushAll()];\n case 1:\n _a.sent();\n return [4 /*yield*/, this._exporter.shutdown()];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /** Add a LogRecord in the buffer. */\n BatchLogRecordProcessorBase.prototype._addToBuffer = function (logRecord) {\n if (this._finishedLogRecords.length >= this._maxQueueSize) {\n return;\n }\n this._finishedLogRecords.push(logRecord);\n this._maybeStartTimer();\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 BatchLogRecordProcessorBase.prototype._flushAll = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var promises = [];\n var batchCount = Math.ceil(_this._finishedLogRecords.length / _this._maxExportBatchSize);\n for (var i = 0; i < batchCount; i++) {\n promises.push(_this._flushOneBatch());\n }\n Promise.all(promises)\n .then(function () {\n resolve();\n })\n .catch(reject);\n });\n };\n BatchLogRecordProcessorBase.prototype._flushOneBatch = function () {\n var _this = this;\n this._clearTimer();\n if (this._finishedLogRecords.length === 0) {\n return Promise.resolve();\n }\n return new Promise(function (resolve, reject) {\n callWithTimeout(_this._export(_this._finishedLogRecords.splice(0, _this._maxExportBatchSize)), _this._exportTimeoutMillis)\n .then(function () { return resolve(); })\n .catch(reject);\n });\n };\n BatchLogRecordProcessorBase.prototype._maybeStartTimer = function () {\n var _this = this;\n if (this._timer !== undefined) {\n return;\n }\n this._timer = setTimeout(function () {\n _this._flushOneBatch()\n .then(function () {\n if (_this._finishedLogRecords.length > 0) {\n _this._clearTimer();\n _this._maybeStartTimer();\n }\n })\n .catch(function (e) {\n globalErrorHandler(e);\n });\n }, this._scheduledDelayMillis);\n unrefTimer(this._timer);\n };\n BatchLogRecordProcessorBase.prototype._clearTimer = function () {\n if (this._timer !== undefined) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n };\n BatchLogRecordProcessorBase.prototype._export = function (logRecords) {\n var _this = this;\n var doExport = function () {\n return internal\n ._export(_this._exporter, logRecords)\n .then(function (result) {\n var _a;\n if (result.code !== ExportResultCode.SUCCESS) {\n globalErrorHandler((_a = result.error) !== null && _a !== void 0 ? _a : new Error(\"BatchLogRecordProcessor: log record export failed (status \" + result + \")\"));\n }\n })\n .catch(globalErrorHandler);\n };\n var pendingResources = logRecords\n .map(function (logRecord) { return logRecord.resource; })\n .filter(function (resource) { return resource.asyncAttributesPending; });\n // Avoid scheduling a promise to make the behavior more predictable and easier to test\n if (pendingResources.length === 0) {\n return doExport();\n }\n else {\n return Promise.all(pendingResources.map(function (resource) { var _a; return (_a = resource.waitForAsyncAttributes) === null || _a === void 0 ? void 0 : _a.call(resource); })).then(doExport, globalErrorHandler);\n }\n };\n return BatchLogRecordProcessorBase;\n}());\nexport { BatchLogRecordProcessorBase };\n//# sourceMappingURL=BatchLogRecordProcessorBase.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { BatchLogRecordProcessorBase } from '../../../export/BatchLogRecordProcessorBase';\nvar BatchLogRecordProcessor = /** @class */ (function (_super) {\n __extends(BatchLogRecordProcessor, _super);\n function BatchLogRecordProcessor(exporter, config) {\n var _this = _super.call(this, exporter, config) || this;\n _this._onInit(config);\n return _this;\n }\n BatchLogRecordProcessor.prototype.onShutdown = function () {\n if (typeof document === 'undefined') {\n return;\n }\n if (this._visibilityChangeListener) {\n document.removeEventListener('visibilitychange', this._visibilityChangeListener);\n }\n if (this._pageHideListener) {\n document.removeEventListener('pagehide', this._pageHideListener);\n }\n };\n BatchLogRecordProcessor.prototype._onInit = function (config) {\n var _this = this;\n if ((config === null || config === void 0 ? void 0 : config.disableAutoFlushOnDocumentHide) === true ||\n typeof document === 'undefined') {\n return;\n }\n this._visibilityChangeListener = function () {\n if (document.visibilityState === 'hidden') {\n void _this.forceFlush();\n }\n };\n this._pageHideListener = function () {\n void _this.forceFlush();\n };\n document.addEventListener('visibilitychange', this._visibilityChangeListener);\n // use 'pagehide' event as a fallback for Safari; see https://bugs.webkit.org/show_bug.cgi?id=116769\n document.addEventListener('pagehide', this._pageHideListener);\n };\n return BatchLogRecordProcessor;\n}(BatchLogRecordProcessorBase));\nexport { BatchLogRecordProcessor };\n//# sourceMappingURL=BatchLogRecordProcessor.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar AI21Logger = /** @class */ (function () {\n function AI21Logger(_a) {\n var otelLogger = _a.otelLogger;\n this.otelLogger = otelLogger;\n }\n AI21Logger.prototype.emit = function (logRecord) {\n var severityNumber = logRecord.severityNumber, body = logRecord.body, error = logRecord.error, user = logRecord.user, featureFlag = logRecord.featureFlag, attributes = logRecord.attributes;\n var customAttributes = __assign({ \"feature_flag.key\": featureFlag === null || featureFlag === void 0 ? void 0 : featureFlag.key, \"feature_flag.variant\": featureFlag === null || featureFlag === void 0 ? void 0 : featureFlag.variant, \"exception.message\": error === null || error === void 0 ? void 0 : error.message, \"exception.stacktrace\": error === null || error === void 0 ? void 0 : error.stack, \"exception.type\": error === null || error === void 0 ? void 0 : error.name, \"user.id\": user === null || user === void 0 ? void 0 : user.id, \"user.experiment\": user === null || user === void 0 ? void 0 : user.experiment }, attributes);\n for (var attribute in customAttributes) {\n if (customAttributes.hasOwnProperty(attribute) &&\n !customAttributes[attribute]) {\n delete customAttributes[attribute];\n }\n }\n this.otelLogger.emit({\n body: body,\n severityNumber: severityNumber,\n attributes: customAttributes,\n });\n };\n return AI21Logger;\n}());\nexport default AI21Logger;\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 */\nvar NoopLogger = /** @class */ (function () {\n function NoopLogger() {\n }\n NoopLogger.prototype.emit = function (_logRecord) { };\n return NoopLogger;\n}());\nexport { NoopLogger };\nexport var NOOP_LOGGER = new NoopLogger();\n//# sourceMappingURL=NoopLogger.js.map","/*\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 { NoopLogger } from './NoopLogger';\nvar NoopLoggerProvider = /** @class */ (function () {\n function NoopLoggerProvider() {\n }\n NoopLoggerProvider.prototype.getLogger = function (_name, _version, _options) {\n return new NoopLogger();\n };\n return NoopLoggerProvider;\n}());\nexport { NoopLoggerProvider };\nexport var NOOP_LOGGER_PROVIDER = new NoopLoggerProvider();\n//# sourceMappingURL=NoopLoggerProvider.js.map","/*\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// Updates to this file should also be replicated to @opentelemetry/api and\n// @opentelemetry/core too.\n/**\n * - globalThis (New standard)\n * - self (Will return the current window instance for supported browsers)\n * - window (fallback for older browser implementations)\n * - global (NodeJS implementation)\n * - (When all else fails)\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef\nexport var _globalThis = typeof globalThis === 'object'\n ? globalThis\n : typeof self === 'object'\n ? self\n : typeof window === 'object'\n ? window\n : typeof global === 'object'\n ? global\n : {};\n//# sourceMappingURL=globalThis.js.map","/*\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 { _globalThis } from '../platform';\nexport var GLOBAL_LOGS_API_KEY = Symbol.for('io.opentelemetry.js.api.logs');\nexport var _global = _globalThis;\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(requiredVersion, instance, fallback) {\n return function (version) {\n return 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 var API_BACKWARDS_COMPATIBILITY_VERSION = 1;\n//# sourceMappingURL=global-utils.js.map","/*\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 { API_BACKWARDS_COMPATIBILITY_VERSION, GLOBAL_LOGS_API_KEY, _global, makeGetter, } from '../internal/global-utils';\nimport { NOOP_LOGGER_PROVIDER } from '../NoopLoggerProvider';\nvar LogsAPI = /** @class */ (function () {\n function LogsAPI() {\n }\n LogsAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new LogsAPI();\n }\n return this._instance;\n };\n LogsAPI.prototype.setGlobalLoggerProvider = function (provider) {\n if (_global[GLOBAL_LOGS_API_KEY]) {\n return this.getLoggerProvider();\n }\n _global[GLOBAL_LOGS_API_KEY] = makeGetter(API_BACKWARDS_COMPATIBILITY_VERSION, provider, NOOP_LOGGER_PROVIDER);\n return provider;\n };\n /**\n * Returns the global logger provider.\n *\n * @returns LoggerProvider\n */\n LogsAPI.prototype.getLoggerProvider = function () {\n var _a, _b;\n return ((_b = (_a = _global[GLOBAL_LOGS_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(_global, API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : NOOP_LOGGER_PROVIDER);\n };\n /**\n * Returns a logger from the global logger provider.\n *\n * @returns Logger\n */\n LogsAPI.prototype.getLogger = function (name, version, options) {\n return this.getLoggerProvider().getLogger(name, version, options);\n };\n /** Remove the global logger provider */\n LogsAPI.prototype.disable = function () {\n delete _global[GLOBAL_LOGS_API_KEY];\n };\n return LogsAPI;\n}());\nexport { LogsAPI };\n//# sourceMappingURL=logs.js.map","/*\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 * from './types/Logger';\nexport * from './types/LoggerProvider';\nexport * from './types/LogRecord';\nexport * from './types/LoggerOptions';\nexport * from './NoopLogger';\nexport * from './NoopLoggerProvider';\nimport { LogsAPI } from './api/logs';\nexport var logs = LogsAPI.getInstance();\n//# sourceMappingURL=index.js.map","/*\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 * Parses the options and returns instrumentations, node plugins and\n * web plugins\n * @param options\n */\nexport function parseInstrumentationOptions(options) {\n if (options === void 0) { options = []; }\n var instrumentations = [];\n for (var i = 0, j = options.length; i < j; i++) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var option = options[i];\n if (Array.isArray(option)) {\n var results = parseInstrumentationOptions(option);\n instrumentations = instrumentations.concat(results.instrumentations);\n }\n else if (typeof option === 'function') {\n instrumentations.push(new option());\n }\n else if (option.instrumentationName) {\n instrumentations.push(option);\n }\n }\n return { instrumentations: instrumentations };\n}\n/**\n * Enable instrumentations\n * @param instrumentations\n * @param tracerProvider\n * @param meterProvider\n */\nexport function enableInstrumentations(instrumentations, tracerProvider, meterProvider, loggerProvider) {\n for (var i = 0, j = instrumentations.length; i < j; i++) {\n var instrumentation = instrumentations[i];\n if (tracerProvider) {\n instrumentation.setTracerProvider(tracerProvider);\n }\n if (meterProvider) {\n instrumentation.setMeterProvider(meterProvider);\n }\n if (loggerProvider && instrumentation.setLoggerProvider) {\n instrumentation.setLoggerProvider(loggerProvider);\n }\n // instrumentations have been already enabled during creation\n // so enable only if user prevented that by setting enabled to false\n // this is to prevent double enabling but when calling register all\n // instrumentations should be now enabled\n if (!instrumentation.getConfig().enabled) {\n instrumentation.enable();\n }\n }\n}\n/**\n * Disable instrumentations\n * @param instrumentations\n */\nexport function disableInstrumentations(instrumentations) {\n instrumentations.forEach(function (instrumentation) { return instrumentation.disable(); });\n}\n//# sourceMappingURL=autoLoaderUtils.js.map","/*\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 { trace, metrics } from '@opentelemetry/api';\nimport { logs } from '@opentelemetry/api-logs';\nimport { disableInstrumentations, enableInstrumentations, parseInstrumentationOptions, } from './autoLoaderUtils';\n/**\n * It will register instrumentations and plugins\n * @param options\n * @return returns function to unload instrumentation and plugins that were\n * registered\n */\nexport function registerInstrumentations(options) {\n var instrumentations = parseInstrumentationOptions(options.instrumentations).instrumentations;\n var tracerProvider = options.tracerProvider || trace.getTracerProvider();\n var meterProvider = options.meterProvider || metrics.getMeterProvider();\n var loggerProvider = options.loggerProvider || logs.getLoggerProvider();\n enableInstrumentations(instrumentations, tracerProvider, meterProvider, loggerProvider);\n return function () {\n disableInstrumentations(instrumentations);\n };\n}\n//# sourceMappingURL=autoLoader.js.map","'use strict'\n\nfunction isFunction (funktion) {\n return typeof funktion === 'function'\n}\n\n// Default to complaining loudly when things don't go according to plan.\nvar logger = console.error.bind(console)\n\n// Sets a property on an object, preserving its enumerability.\n// This function assumes that the property is already writable.\nfunction defineProperty (obj, name, value) {\n var enumerable = !!obj[name] && obj.propertyIsEnumerable(name)\n Object.defineProperty(obj, name, {\n configurable: true,\n enumerable: enumerable,\n writable: true,\n value: value\n })\n}\n\n// Keep initialization idempotent.\nfunction shimmer (options) {\n if (options && options.logger) {\n if (!isFunction(options.logger)) logger(\"new logger isn't a function, not replacing\")\n else logger = options.logger\n }\n}\n\nfunction wrap (nodule, name, wrapper) {\n if (!nodule || !nodule[name]) {\n logger('no original function ' + name + ' to wrap')\n return\n }\n\n if (!wrapper) {\n logger('no wrapper function')\n logger((new Error()).stack)\n return\n }\n\n if (!isFunction(nodule[name]) || !isFunction(wrapper)) {\n logger('original object and wrapper must be functions')\n return\n }\n\n var original = nodule[name]\n var wrapped = wrapper(original, name)\n\n defineProperty(wrapped, '__original', original)\n defineProperty(wrapped, '__unwrap', function () {\n if (nodule[name] === wrapped) defineProperty(nodule, name, original)\n })\n defineProperty(wrapped, '__wrapped', true)\n\n defineProperty(nodule, name, wrapped)\n return wrapped\n}\n\nfunction massWrap (nodules, names, wrapper) {\n if (!nodules) {\n logger('must provide one or more modules to patch')\n logger((new Error()).stack)\n return\n } else if (!Array.isArray(nodules)) {\n nodules = [nodules]\n }\n\n if (!(names && Array.isArray(names))) {\n logger('must provide one or more functions to wrap on modules')\n return\n }\n\n nodules.forEach(function (nodule) {\n names.forEach(function (name) {\n wrap(nodule, name, wrapper)\n })\n })\n}\n\nfunction unwrap (nodule, name) {\n if (!nodule || !nodule[name]) {\n logger('no function to unwrap.')\n logger((new Error()).stack)\n return\n }\n\n if (!nodule[name].__unwrap) {\n logger('no original to unwrap to -- has ' + name + ' already been unwrapped?')\n } else {\n return nodule[name].__unwrap()\n }\n}\n\nfunction massUnwrap (nodules, names) {\n if (!nodules) {\n logger('must provide one or more modules to patch')\n logger((new Error()).stack)\n return\n } else if (!Array.isArray(nodules)) {\n nodules = [nodules]\n }\n\n if (!(names && Array.isArray(names))) {\n logger('must provide one or more functions to unwrap on modules')\n return\n }\n\n nodules.forEach(function (nodule) {\n names.forEach(function (name) {\n unwrap(nodule, name)\n })\n })\n}\n\nshimmer.wrap = wrap\nshimmer.massWrap = massWrap\nshimmer.unwrap = unwrap\nshimmer.massUnwrap = massUnwrap\n\nmodule.exports = shimmer\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 */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { diag, metrics, trace, } from '@opentelemetry/api';\nimport { logs } from '@opentelemetry/api-logs';\nimport * as shimmer from 'shimmer';\n/**\n * Base abstract internal class for instrumenting node and web plugins\n */\nvar InstrumentationAbstract = /** @class */ (function () {\n function InstrumentationAbstract(instrumentationName, instrumentationVersion, config) {\n if (config === void 0) { config = {}; }\n this.instrumentationName = instrumentationName;\n this.instrumentationVersion = instrumentationVersion;\n /* Api to wrap instrumented method */\n this._wrap = shimmer.wrap;\n /* Api to unwrap instrumented methods */\n this._unwrap = shimmer.unwrap;\n /* Api to mass wrap instrumented method */\n this._massWrap = shimmer.massWrap;\n /* Api to mass unwrap instrumented methods */\n this._massUnwrap = shimmer.massUnwrap;\n this._config = __assign({ enabled: true }, config);\n this._diag = diag.createComponentLogger({\n namespace: instrumentationName,\n });\n this._tracer = trace.getTracer(instrumentationName, instrumentationVersion);\n this._meter = metrics.getMeter(instrumentationName, instrumentationVersion);\n this._logger = logs.getLogger(instrumentationName, instrumentationVersion);\n this._updateMetricInstruments();\n }\n Object.defineProperty(InstrumentationAbstract.prototype, \"meter\", {\n /* Returns meter */\n get: function () {\n return this._meter;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Sets MeterProvider to this plugin\n * @param meterProvider\n */\n InstrumentationAbstract.prototype.setMeterProvider = function (meterProvider) {\n this._meter = meterProvider.getMeter(this.instrumentationName, this.instrumentationVersion);\n this._updateMetricInstruments();\n };\n Object.defineProperty(InstrumentationAbstract.prototype, \"logger\", {\n /* Returns logger */\n get: function () {\n return this._logger;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Sets LoggerProvider to this plugin\n * @param loggerProvider\n */\n InstrumentationAbstract.prototype.setLoggerProvider = function (loggerProvider) {\n this._logger = loggerProvider.getLogger(this.instrumentationName, this.instrumentationVersion);\n };\n /**\n * @experimental\n *\n * Get module definitions defined by {@link init}.\n * This can be used for experimental compile-time instrumentation.\n *\n * @returns an array of {@link InstrumentationModuleDefinition}\n */\n InstrumentationAbstract.prototype.getModuleDefinitions = function () {\n var _a;\n var initResult = (_a = this.init()) !== null && _a !== void 0 ? _a : [];\n if (!Array.isArray(initResult)) {\n return [initResult];\n }\n return initResult;\n };\n /**\n * Sets the new metric instruments with the current Meter.\n */\n InstrumentationAbstract.prototype._updateMetricInstruments = function () {\n return;\n };\n /* Returns InstrumentationConfig */\n InstrumentationAbstract.prototype.getConfig = function () {\n return this._config;\n };\n /**\n * Sets InstrumentationConfig to this plugin\n * @param InstrumentationConfig\n */\n InstrumentationAbstract.prototype.setConfig = function (config) {\n if (config === void 0) { config = {}; }\n this._config = Object.assign({}, config);\n };\n /**\n * Sets TraceProvider to this plugin\n * @param tracerProvider\n */\n InstrumentationAbstract.prototype.setTracerProvider = function (tracerProvider) {\n this._tracer = tracerProvider.getTracer(this.instrumentationName, this.instrumentationVersion);\n };\n Object.defineProperty(InstrumentationAbstract.prototype, \"tracer\", {\n /* Returns tracer */\n get: function () {\n return this._tracer;\n },\n enumerable: false,\n configurable: true\n });\n return InstrumentationAbstract;\n}());\nexport { InstrumentationAbstract };\n//# sourceMappingURL=instrumentation.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { InstrumentationAbstract } from '../../instrumentation';\n/**\n * Base abstract class for instrumenting web plugins\n */\nvar InstrumentationBase = /** @class */ (function (_super) {\n __extends(InstrumentationBase, _super);\n function InstrumentationBase(instrumentationName, instrumentationVersion, config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this, instrumentationName, instrumentationVersion, config) || this;\n if (_this._config.enabled) {\n _this.enable();\n }\n return _this;\n }\n return InstrumentationBase;\n}(InstrumentationAbstract));\nexport { InstrumentationBase };\n//# sourceMappingURL=instrumentation.js.map","/*\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 */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n/**\n * function to execute patched function and being able to catch errors\n * @param execute - function to be executed\n * @param onFinish - callback to run when execute finishes\n */\nexport function safeExecuteInTheMiddle(execute, onFinish, preventThrowingError) {\n var error;\n var result;\n try {\n result = execute();\n }\n catch (e) {\n error = e;\n }\n finally {\n onFinish(error, result);\n if (error && !preventThrowingError) {\n // eslint-disable-next-line no-unsafe-finally\n throw error;\n }\n // eslint-disable-next-line no-unsafe-finally\n return result;\n }\n}\n/**\n * Async function to execute patched function and being able to catch errors\n * @param execute - function to be executed\n * @param onFinish - callback to run when execute finishes\n */\nexport function safeExecuteInTheMiddleAsync(execute, onFinish, preventThrowingError) {\n return __awaiter(this, void 0, void 0, function () {\n var error, result, e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, 3, 4]);\n return [4 /*yield*/, execute()];\n case 1:\n result = _a.sent();\n return [3 /*break*/, 4];\n case 2:\n e_1 = _a.sent();\n error = e_1;\n return [3 /*break*/, 4];\n case 3:\n onFinish(error, result);\n if (error && !preventThrowingError) {\n // eslint-disable-next-line no-unsafe-finally\n throw error;\n }\n // eslint-disable-next-line no-unsafe-finally\n return [2 /*return*/, result];\n case 4: return [2 /*return*/];\n }\n });\n });\n}\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nexport function isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\n//# sourceMappingURL=utils.js.map","/*\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 var AttributeNames;\n(function (AttributeNames) {\n AttributeNames[\"DOCUMENT_LOAD\"] = \"documentLoad\";\n AttributeNames[\"DOCUMENT_FETCH\"] = \"documentFetch\";\n AttributeNames[\"RESOURCE_FETCH\"] = \"resourceFetch\";\n})(AttributeNames || (AttributeNames = {}));\n//# sourceMappingURL=AttributeNames.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '0.36.0';\n//# sourceMappingURL=version.js.map","/*\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 var EventNames;\n(function (EventNames) {\n EventNames[\"FIRST_PAINT\"] = \"firstPaint\";\n EventNames[\"FIRST_CONTENTFUL_PAINT\"] = \"firstContentfulPaint\";\n})(EventNames || (EventNames = {}));\n//# sourceMappingURL=EventNames.js.map","/*\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 { otperformance } from '@opentelemetry/core';\nimport { hasKey, PerformanceTimingNames as PTN, } from '@opentelemetry/sdk-trace-web';\nimport { EventNames } from './enums/EventNames';\nexport var getPerformanceNavigationEntries = function () {\n var _a, _b;\n var entries = {};\n var performanceNavigationTiming = (_b = (_a = otperformance).getEntriesByType) === null || _b === void 0 ? void 0 : _b.call(_a, 'navigation')[0];\n if (performanceNavigationTiming) {\n var keys = Object.values(PTN);\n keys.forEach(function (key) {\n if (hasKey(performanceNavigationTiming, key)) {\n var value = performanceNavigationTiming[key];\n if (typeof value === 'number') {\n entries[key] = value;\n }\n }\n });\n }\n else {\n // // fallback to previous version\n var perf = otperformance;\n var performanceTiming_1 = perf.timing;\n if (performanceTiming_1) {\n var keys = Object.values(PTN);\n keys.forEach(function (key) {\n if (hasKey(performanceTiming_1, key)) {\n var value = performanceTiming_1[key];\n if (typeof value === 'number') {\n entries[key] = value;\n }\n }\n });\n }\n }\n return entries;\n};\nvar performancePaintNames = {\n 'first-paint': EventNames.FIRST_PAINT,\n 'first-contentful-paint': EventNames.FIRST_CONTENTFUL_PAINT,\n};\nexport var addSpanPerformancePaintEvents = function (span) {\n var _a, _b;\n var performancePaintTiming = (_b = (_a = otperformance).getEntriesByType) === null || _b === void 0 ? void 0 : _b.call(_a, 'paint');\n if (performancePaintTiming) {\n performancePaintTiming.forEach(function (_a) {\n var name = _a.name, startTime = _a.startTime;\n if (hasKey(performancePaintNames, name)) {\n span.addEvent(performancePaintNames[name], startTime);\n }\n });\n }\n};\n//# sourceMappingURL=utils.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { context, propagation, trace, ROOT_CONTEXT, } from '@opentelemetry/api';\nimport { otperformance, TRACE_PARENT_HEADER } from '@opentelemetry/core';\nimport { addSpanNetworkEvent, addSpanNetworkEvents, hasKey, PerformanceTimingNames as PTN, } from '@opentelemetry/sdk-trace-web';\nimport { InstrumentationBase, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { VERSION } from './version';\nimport { SemanticAttributes } from '@opentelemetry/semantic-conventions';\nimport { addSpanPerformancePaintEvents, getPerformanceNavigationEntries, } from './utils';\n/**\n * This class represents a document load plugin\n */\nvar DocumentLoadInstrumentation = /** @class */ (function (_super) {\n __extends(DocumentLoadInstrumentation, _super);\n /**\n *\n * @param config\n */\n function DocumentLoadInstrumentation(config) {\n if (config === void 0) { config = {}; }\n var _this = _super.call(this, '@opentelemetry/instrumentation-document-load', VERSION, config) || this;\n _this.component = 'document-load';\n _this.version = '1';\n _this.moduleName = _this.component;\n return _this;\n }\n DocumentLoadInstrumentation.prototype.init = function () { };\n /**\n * callback to be executed when page is loaded\n */\n DocumentLoadInstrumentation.prototype._onDocumentLoaded = function () {\n var _this = this;\n // Timeout is needed as load event doesn't have yet the performance metrics for loadEnd.\n // Support for event \"loadend\" is very limited and cannot be used\n window.setTimeout(function () {\n _this._collectPerformance();\n });\n };\n /**\n * Adds spans for all resources\n * @param rootSpan\n */\n DocumentLoadInstrumentation.prototype._addResourcesSpans = function (rootSpan) {\n var _this = this;\n var _a, _b;\n var resources = (_b = (_a = otperformance).getEntriesByType) === null || _b === void 0 ? void 0 : _b.call(_a, 'resource');\n if (resources) {\n resources.forEach(function (resource) {\n _this._initResourceSpan(resource, rootSpan);\n });\n }\n };\n /**\n * Collects information about performance and creates appropriate spans\n */\n DocumentLoadInstrumentation.prototype._collectPerformance = function () {\n var _this = this;\n var metaElement = Array.from(document.getElementsByTagName('meta')).find(function (e) { return e.getAttribute('name') === TRACE_PARENT_HEADER; });\n var entries = getPerformanceNavigationEntries();\n var traceparent = (metaElement && metaElement.content) || '';\n context.with(propagation.extract(ROOT_CONTEXT, { traceparent: traceparent }), function () {\n var _a;\n var rootSpan = _this._startSpan(AttributeNames.DOCUMENT_LOAD, PTN.FETCH_START, entries);\n if (!rootSpan) {\n return;\n }\n context.with(trace.setSpan(context.active(), rootSpan), function () {\n var fetchSpan = _this._startSpan(AttributeNames.DOCUMENT_FETCH, PTN.FETCH_START, entries);\n if (fetchSpan) {\n fetchSpan.setAttribute(SemanticAttributes.HTTP_URL, location.href);\n context.with(trace.setSpan(context.active(), fetchSpan), function () {\n var _a;\n addSpanNetworkEvents(fetchSpan, entries);\n _this._addCustomAttributesOnSpan(fetchSpan, (_a = _this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentFetch);\n _this._endSpan(fetchSpan, PTN.RESPONSE_END, entries);\n });\n }\n });\n rootSpan.setAttribute(SemanticAttributes.HTTP_URL, location.href);\n rootSpan.setAttribute(SemanticAttributes.HTTP_USER_AGENT, navigator.userAgent);\n _this._addResourcesSpans(rootSpan);\n addSpanNetworkEvent(rootSpan, PTN.FETCH_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.UNLOAD_EVENT_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.UNLOAD_EVENT_END, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_INTERACTIVE, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_CONTENT_LOADED_EVENT_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_CONTENT_LOADED_EVENT_END, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_COMPLETE, entries);\n addSpanNetworkEvent(rootSpan, PTN.LOAD_EVENT_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.LOAD_EVENT_END, entries);\n addSpanPerformancePaintEvents(rootSpan);\n _this._addCustomAttributesOnSpan(rootSpan, (_a = _this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.documentLoad);\n _this._endSpan(rootSpan, PTN.LOAD_EVENT_END, entries);\n });\n };\n /**\n * Helper function for ending span\n * @param span\n * @param performanceName name of performance entry for time end\n * @param entries\n */\n DocumentLoadInstrumentation.prototype._endSpan = function (span, performanceName, entries) {\n // span can be undefined when entries are missing the certain performance - the span will not be created\n if (span) {\n if (hasKey(entries, performanceName)) {\n span.end(entries[performanceName]);\n }\n else {\n // just end span\n span.end();\n }\n }\n };\n /**\n * Creates and ends a span with network information about resource added as timed events\n * @param resource\n * @param parentSpan\n */\n DocumentLoadInstrumentation.prototype._initResourceSpan = function (resource, parentSpan) {\n var _a;\n var span = this._startSpan(AttributeNames.RESOURCE_FETCH, PTN.FETCH_START, resource, parentSpan);\n if (span) {\n span.setAttribute(SemanticAttributes.HTTP_URL, resource.name);\n addSpanNetworkEvents(span, resource);\n this._addCustomAttributesOnResourceSpan(span, resource, (_a = this._getConfig().applyCustomAttributesOnSpan) === null || _a === void 0 ? void 0 : _a.resourceFetch);\n this._endSpan(span, PTN.RESPONSE_END, resource);\n }\n };\n /**\n * Helper function for starting a span\n * @param spanName name of span\n * @param performanceName name of performance entry for time start\n * @param entries\n * @param parentSpan\n */\n DocumentLoadInstrumentation.prototype._startSpan = function (spanName, performanceName, entries, parentSpan) {\n if (hasKey(entries, performanceName) &&\n typeof entries[performanceName] === 'number') {\n var span = this.tracer.startSpan(spanName, {\n startTime: entries[performanceName],\n }, parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined);\n return span;\n }\n return undefined;\n };\n /**\n * executes callback {_onDocumentLoaded} when the page is loaded\n */\n DocumentLoadInstrumentation.prototype._waitForPageLoad = function () {\n if (window.document.readyState === 'complete') {\n this._onDocumentLoaded();\n }\n else {\n this._onDocumentLoaded = this._onDocumentLoaded.bind(this);\n window.addEventListener('load', this._onDocumentLoaded);\n }\n };\n DocumentLoadInstrumentation.prototype._getConfig = function () {\n return this._config;\n };\n /**\n * adds custom attributes to root span if configured\n */\n DocumentLoadInstrumentation.prototype._addCustomAttributesOnSpan = function (span, applyCustomAttributesOnSpan) {\n var _this = this;\n if (applyCustomAttributesOnSpan) {\n safeExecuteInTheMiddle(function () { return applyCustomAttributesOnSpan(span); }, function (error) {\n if (!error) {\n return;\n }\n _this._diag.error('addCustomAttributesOnSpan', error);\n }, true);\n }\n };\n /**\n * adds custom attributes to span if configured\n */\n DocumentLoadInstrumentation.prototype._addCustomAttributesOnResourceSpan = function (span, resource, applyCustomAttributesOnSpan) {\n var _this = this;\n if (applyCustomAttributesOnSpan) {\n safeExecuteInTheMiddle(function () { return applyCustomAttributesOnSpan(span, resource); }, function (error) {\n if (!error) {\n return;\n }\n _this._diag.error('addCustomAttributesOnResourceSpan', error);\n }, true);\n }\n };\n /**\n * implements enable function\n */\n DocumentLoadInstrumentation.prototype.enable = function () {\n // remove previously attached load to avoid adding the same event twice\n // in case of multiple enable calling.\n window.removeEventListener('load', this._onDocumentLoaded);\n this._waitForPageLoad();\n };\n /**\n * implements disable function\n */\n DocumentLoadInstrumentation.prototype.disable = function () {\n window.removeEventListener('load', this._onDocumentLoaded);\n };\n return DocumentLoadInstrumentation;\n}(InstrumentationBase));\nexport { DocumentLoadInstrumentation };\n//# sourceMappingURL=instrumentation.js.map","/*\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 var PerformanceTimingNames;\n(function (PerformanceTimingNames) {\n PerformanceTimingNames[\"CONNECT_END\"] = \"connectEnd\";\n PerformanceTimingNames[\"CONNECT_START\"] = \"connectStart\";\n PerformanceTimingNames[\"DECODED_BODY_SIZE\"] = \"decodedBodySize\";\n PerformanceTimingNames[\"DOM_COMPLETE\"] = \"domComplete\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_END\"] = \"domContentLoadedEventEnd\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_START\"] = \"domContentLoadedEventStart\";\n PerformanceTimingNames[\"DOM_INTERACTIVE\"] = \"domInteractive\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_END\"] = \"domainLookupEnd\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_START\"] = \"domainLookupStart\";\n PerformanceTimingNames[\"ENCODED_BODY_SIZE\"] = \"encodedBodySize\";\n PerformanceTimingNames[\"FETCH_START\"] = \"fetchStart\";\n PerformanceTimingNames[\"LOAD_EVENT_END\"] = \"loadEventEnd\";\n PerformanceTimingNames[\"LOAD_EVENT_START\"] = \"loadEventStart\";\n PerformanceTimingNames[\"NAVIGATION_START\"] = \"navigationStart\";\n PerformanceTimingNames[\"REDIRECT_END\"] = \"redirectEnd\";\n PerformanceTimingNames[\"REDIRECT_START\"] = \"redirectStart\";\n PerformanceTimingNames[\"REQUEST_START\"] = \"requestStart\";\n PerformanceTimingNames[\"RESPONSE_END\"] = \"responseEnd\";\n PerformanceTimingNames[\"RESPONSE_START\"] = \"responseStart\";\n PerformanceTimingNames[\"SECURE_CONNECTION_START\"] = \"secureConnectionStart\";\n PerformanceTimingNames[\"UNLOAD_EVENT_END\"] = \"unloadEventEnd\";\n PerformanceTimingNames[\"UNLOAD_EVENT_START\"] = \"unloadEventStart\";\n})(PerformanceTimingNames || (PerformanceTimingNames = {}));\n//# sourceMappingURL=PerformanceTimingNames.js.map","/*\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 { PerformanceTimingNames as PTN } from './enums/PerformanceTimingNames';\nimport { hrTimeToNanoseconds, timeInputToHrTime, urlMatches, } from '@opentelemetry/core';\nimport { SemanticAttributes } from '@opentelemetry/semantic-conventions';\n// Used to normalize relative URLs\nvar urlNormalizingAnchor;\nfunction getUrlNormalizingAnchor() {\n if (!urlNormalizingAnchor) {\n urlNormalizingAnchor = document.createElement('a');\n }\n return urlNormalizingAnchor;\n}\n/**\n * Helper function to be able to use enum as typed key in type and in interface when using forEach\n * @param obj\n * @param key\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function hasKey(obj, key) {\n return key in obj;\n}\n/**\n * Helper function for starting an event on span based on {@link PerformanceEntries}\n * @param span\n * @param performanceName name of performance entry for time start\n * @param entries\n */\nexport function addSpanNetworkEvent(span, performanceName, entries) {\n if (hasKey(entries, performanceName) &&\n typeof entries[performanceName] === 'number') {\n span.addEvent(performanceName, entries[performanceName]);\n return span;\n }\n return undefined;\n}\n/**\n * Helper function for adding network events\n * @param span\n * @param resource\n */\nexport function addSpanNetworkEvents(span, resource) {\n addSpanNetworkEvent(span, PTN.FETCH_START, resource);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_START, resource);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_END, resource);\n addSpanNetworkEvent(span, PTN.CONNECT_START, resource);\n if (hasKey(resource, 'name') &&\n resource['name'].startsWith('https:')) {\n addSpanNetworkEvent(span, PTN.SECURE_CONNECTION_START, resource);\n }\n addSpanNetworkEvent(span, PTN.CONNECT_END, resource);\n addSpanNetworkEvent(span, PTN.REQUEST_START, resource);\n addSpanNetworkEvent(span, PTN.RESPONSE_START, resource);\n addSpanNetworkEvent(span, PTN.RESPONSE_END, resource);\n var encodedLength = resource[PTN.ENCODED_BODY_SIZE];\n if (encodedLength !== undefined) {\n span.setAttribute(SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH, encodedLength);\n }\n var decodedLength = resource[PTN.DECODED_BODY_SIZE];\n // Spec: Not set if transport encoding not used (in which case encoded and decoded sizes match)\n if (decodedLength !== undefined && encodedLength !== decodedLength) {\n span.setAttribute(SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, decodedLength);\n }\n}\n/**\n * sort resources by startTime\n * @param filteredResources\n */\nexport function sortResources(filteredResources) {\n return filteredResources.slice().sort(function (a, b) {\n var valueA = a[PTN.FETCH_START];\n var valueB = b[PTN.FETCH_START];\n if (valueA > valueB) {\n return 1;\n }\n else if (valueA < valueB) {\n return -1;\n }\n return 0;\n });\n}\n/** Returns the origin if present (if in browser context). */\nfunction getOrigin() {\n return typeof location !== 'undefined' ? location.origin : undefined;\n}\n/**\n * Get closest performance resource ignoring the resources that have been\n * already used.\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n * @param initiatorType\n */\nexport function getResource(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType) {\n if (ignoredResources === void 0) { ignoredResources = new WeakSet(); }\n // de-relativize the URL before usage (does no harm to absolute URLs)\n var parsedSpanUrl = parseUrl(spanUrl);\n spanUrl = parsedSpanUrl.toString();\n var filteredResources = filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType);\n if (filteredResources.length === 0) {\n return {\n mainRequest: undefined,\n };\n }\n if (filteredResources.length === 1) {\n return {\n mainRequest: filteredResources[0],\n };\n }\n var sorted = sortResources(filteredResources);\n if (parsedSpanUrl.origin !== getOrigin() && sorted.length > 1) {\n var corsPreFlightRequest = sorted[0];\n var mainRequest = findMainRequest(sorted, corsPreFlightRequest[PTN.RESPONSE_END], endTimeHR);\n var responseEnd = corsPreFlightRequest[PTN.RESPONSE_END];\n var fetchStart = mainRequest[PTN.FETCH_START];\n // no corsPreFlightRequest\n if (fetchStart < responseEnd) {\n mainRequest = corsPreFlightRequest;\n corsPreFlightRequest = undefined;\n }\n return {\n corsPreFlightRequest: corsPreFlightRequest,\n mainRequest: mainRequest,\n };\n }\n else {\n return {\n mainRequest: filteredResources[0],\n };\n }\n}\n/**\n * Will find the main request skipping the cors pre flight requests\n * @param resources\n * @param corsPreFlightRequestEndTime\n * @param spanEndTimeHR\n */\nfunction findMainRequest(resources, corsPreFlightRequestEndTime, spanEndTimeHR) {\n var spanEndTime = hrTimeToNanoseconds(spanEndTimeHR);\n var minTime = hrTimeToNanoseconds(timeInputToHrTime(corsPreFlightRequestEndTime));\n var mainRequest = resources[1];\n var bestGap;\n var length = resources.length;\n for (var i = 1; i < length; i++) {\n var resource = resources[i];\n var resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n var resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n var currentGap = spanEndTime - resourceEndTime;\n if (resourceStartTime >= minTime && (!bestGap || currentGap < bestGap)) {\n bestGap = currentGap;\n mainRequest = resource;\n }\n }\n return mainRequest;\n}\n/**\n * Filter all resources that has started and finished according to span start time and end time.\n * It will return the closest resource to a start time\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n */\nfunction filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType) {\n var startTime = hrTimeToNanoseconds(startTimeHR);\n var endTime = hrTimeToNanoseconds(endTimeHR);\n var filteredResources = resources.filter(function (resource) {\n var resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n var resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n return (resource.initiatorType.toLowerCase() ===\n (initiatorType || 'xmlhttprequest') &&\n resource.name === spanUrl &&\n resourceStartTime >= startTime &&\n resourceEndTime <= endTime);\n });\n if (filteredResources.length > 0) {\n filteredResources = filteredResources.filter(function (resource) {\n return !ignoredResources.has(resource);\n });\n }\n return filteredResources;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element.\n * @param url\n */\nexport function parseUrl(url) {\n if (typeof URL === 'function') {\n return new URL(url, typeof document !== 'undefined'\n ? document.baseURI\n : typeof location !== 'undefined' // Some JS runtimes (e.g. Deno) don't define this\n ? location.href\n : undefined);\n }\n var element = getUrlNormalizingAnchor();\n element.href = url;\n return element;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element and serialize\n * it to a string.\n *\n * Performs the steps described in https://html.spec.whatwg.org/multipage/urls-and-fetching.html#parse-a-url\n *\n * @param url\n */\nexport function normalizeUrl(url) {\n var urlLike = parseUrl(url);\n return urlLike.href;\n}\n/**\n * Get element XPath\n * @param target - target element\n * @param optimised - when id attribute of element is present the xpath can be\n * simplified to contain id\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function getElementXPath(target, optimised) {\n if (target.nodeType === Node.DOCUMENT_NODE) {\n return '/';\n }\n var targetValue = getNodeValue(target, optimised);\n if (optimised && targetValue.indexOf('@id') > 0) {\n return targetValue;\n }\n var xpath = '';\n if (target.parentNode) {\n xpath += getElementXPath(target.parentNode, false);\n }\n xpath += targetValue;\n return xpath;\n}\n/**\n * get node index within the siblings\n * @param target\n */\nfunction getNodeIndex(target) {\n if (!target.parentNode) {\n return 0;\n }\n var allowedTypes = [target.nodeType];\n if (target.nodeType === Node.CDATA_SECTION_NODE) {\n allowedTypes.push(Node.TEXT_NODE);\n }\n var elements = Array.from(target.parentNode.childNodes);\n elements = elements.filter(function (element) {\n var localName = element.localName;\n return (allowedTypes.indexOf(element.nodeType) >= 0 &&\n localName === target.localName);\n });\n if (elements.length >= 1) {\n return elements.indexOf(target) + 1; // xpath starts from 1\n }\n // if there are no other similar child xpath doesn't need index\n return 0;\n}\n/**\n * get node value for xpath\n * @param target\n * @param optimised\n */\nfunction getNodeValue(target, optimised) {\n var nodeType = target.nodeType;\n var index = getNodeIndex(target);\n var nodeValue = '';\n if (nodeType === Node.ELEMENT_NODE) {\n var id = target.getAttribute('id');\n if (optimised && id) {\n return \"//*[@id=\\\"\" + id + \"\\\"]\";\n }\n nodeValue = target.localName;\n }\n else if (nodeType === Node.TEXT_NODE ||\n nodeType === Node.CDATA_SECTION_NODE) {\n nodeValue = 'text()';\n }\n else if (nodeType === Node.COMMENT_NODE) {\n nodeValue = 'comment()';\n }\n else {\n return '';\n }\n // if index is 1 it can be omitted in xpath\n if (nodeValue && index > 1) {\n return \"/\" + nodeValue + \"[\" + index + \"]\";\n }\n return \"/\" + nodeValue;\n}\n/**\n * Checks if trace headers should be propagated\n * @param spanUrl\n * @private\n */\nexport function shouldPropagateTraceHeaders(spanUrl, propagateTraceHeaderCorsUrls) {\n var propagateTraceHeaderUrls = propagateTraceHeaderCorsUrls || [];\n if (typeof propagateTraceHeaderUrls === 'string' ||\n propagateTraceHeaderUrls instanceof RegExp) {\n propagateTraceHeaderUrls = [propagateTraceHeaderUrls];\n }\n var parsedSpanUrl = parseUrl(spanUrl);\n if (parsedSpanUrl.origin === getOrigin()) {\n return true;\n }\n else {\n return propagateTraceHeaderUrls.some(function (propagateTraceHeaderUrl) {\n return urlMatches(spanUrl, propagateTraceHeaderUrl);\n });\n }\n}\n//# sourceMappingURL=utils.js.map","/*\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 * https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/http.md\n */\nexport var AttributeNames;\n(function (AttributeNames) {\n AttributeNames[\"COMPONENT\"] = \"component\";\n AttributeNames[\"HTTP_ERROR_NAME\"] = \"http.error_name\";\n AttributeNames[\"HTTP_STATUS_TEXT\"] = \"http.status_text\";\n})(AttributeNames || (AttributeNames = {}));\n//# sourceMappingURL=AttributeNames.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '0.49.1';\n//# sourceMappingURL=version.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar _a;\nimport * as api from '@opentelemetry/api';\nimport { isWrapped, InstrumentationBase, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation';\nimport * as core from '@opentelemetry/core';\nimport * as web from '@opentelemetry/sdk-trace-web';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { SemanticAttributes } from '@opentelemetry/semantic-conventions';\nimport { VERSION } from './version';\nimport { _globalThis } from '@opentelemetry/core';\n// how long to wait for observer to collect information about resources\n// this is needed as event \"load\" is called before observer\n// hard to say how long it should really wait, seems like 300ms is\n// safe enough\nvar OBSERVER_WAIT_TIME_MS = 300;\nvar isNode = typeof process === 'object' && ((_a = process.release) === null || _a === void 0 ? void 0 : _a.name) === 'node';\n/**\n * This class represents a fetch plugin for auto instrumentation\n */\nvar FetchInstrumentation = /** @class */ (function (_super) {\n __extends(FetchInstrumentation, _super);\n function FetchInstrumentation(config) {\n var _this = _super.call(this, '@opentelemetry/instrumentation-fetch', VERSION, config) || this;\n _this.component = 'fetch';\n _this.version = VERSION;\n _this.moduleName = _this.component;\n _this._usedResources = new WeakSet();\n _this._tasksCount = 0;\n return _this;\n }\n FetchInstrumentation.prototype.init = function () { };\n FetchInstrumentation.prototype._getConfig = function () {\n return this._config;\n };\n /**\n * Add cors pre flight child span\n * @param span\n * @param corsPreFlightRequest\n */\n FetchInstrumentation.prototype._addChildSpan = function (span, corsPreFlightRequest) {\n var childSpan = this.tracer.startSpan('CORS Preflight', {\n startTime: corsPreFlightRequest[web.PerformanceTimingNames.FETCH_START],\n }, api.trace.setSpan(api.context.active(), span));\n if (!this._getConfig().ignoreNetworkEvents) {\n web.addSpanNetworkEvents(childSpan, corsPreFlightRequest);\n }\n childSpan.end(corsPreFlightRequest[web.PerformanceTimingNames.RESPONSE_END]);\n };\n /**\n * Adds more attributes to span just before ending it\n * @param span\n * @param response\n */\n FetchInstrumentation.prototype._addFinalSpanAttributes = function (span, response) {\n var parsedUrl = web.parseUrl(response.url);\n span.setAttribute(SemanticAttributes.HTTP_STATUS_CODE, response.status);\n if (response.statusText != null) {\n span.setAttribute(AttributeNames.HTTP_STATUS_TEXT, response.statusText);\n }\n span.setAttribute(SemanticAttributes.HTTP_HOST, parsedUrl.host);\n span.setAttribute(SemanticAttributes.HTTP_SCHEME, parsedUrl.protocol.replace(':', ''));\n if (typeof navigator !== 'undefined') {\n span.setAttribute(SemanticAttributes.HTTP_USER_AGENT, navigator.userAgent);\n }\n };\n /**\n * Add headers\n * @param options\n * @param spanUrl\n */\n FetchInstrumentation.prototype._addHeaders = function (options, spanUrl) {\n if (!web.shouldPropagateTraceHeaders(spanUrl, this._getConfig().propagateTraceHeaderCorsUrls)) {\n var headers = {};\n api.propagation.inject(api.context.active(), headers);\n if (Object.keys(headers).length > 0) {\n this._diag.debug('headers inject skipped due to CORS policy');\n }\n return;\n }\n if (options instanceof Request) {\n api.propagation.inject(api.context.active(), options.headers, {\n set: function (h, k, v) { return h.set(k, typeof v === 'string' ? v : String(v)); },\n });\n }\n else if (options.headers instanceof Headers) {\n api.propagation.inject(api.context.active(), options.headers, {\n set: function (h, k, v) { return h.set(k, typeof v === 'string' ? v : String(v)); },\n });\n }\n else if (options.headers instanceof Map) {\n api.propagation.inject(api.context.active(), options.headers, {\n set: function (h, k, v) { return h.set(k, typeof v === 'string' ? v : String(v)); },\n });\n }\n else {\n var headers = {};\n api.propagation.inject(api.context.active(), headers);\n options.headers = Object.assign({}, headers, options.headers || {});\n }\n };\n /**\n * Clears the resource timings and all resources assigned with spans\n * when {@link FetchPluginConfig.clearTimingResources} is\n * set to true (default false)\n * @private\n */\n FetchInstrumentation.prototype._clearResources = function () {\n if (this._tasksCount === 0 && this._getConfig().clearTimingResources) {\n performance.clearResourceTimings();\n this._usedResources = new WeakSet();\n }\n };\n /**\n * Creates a new span\n * @param url\n * @param options\n */\n FetchInstrumentation.prototype._createSpan = function (url, options) {\n var _a;\n if (options === void 0) { options = {}; }\n if (core.isUrlIgnored(url, this._getConfig().ignoreUrls)) {\n this._diag.debug('ignoring span as url matches ignored url');\n return;\n }\n var method = (options.method || 'GET').toUpperCase();\n var spanName = \"HTTP \" + method;\n return this.tracer.startSpan(spanName, {\n kind: api.SpanKind.CLIENT,\n attributes: (_a = {},\n _a[AttributeNames.COMPONENT] = this.moduleName,\n _a[SemanticAttributes.HTTP_METHOD] = method,\n _a[SemanticAttributes.HTTP_URL] = url,\n _a),\n });\n };\n /**\n * Finds appropriate resource and add network events to the span\n * @param span\n * @param resourcesObserver\n * @param endTime\n */\n FetchInstrumentation.prototype._findResourceAndAddNetworkEvents = function (span, resourcesObserver, endTime) {\n var resources = resourcesObserver.entries;\n if (!resources.length) {\n if (!performance.getEntriesByType) {\n return;\n }\n // fallback - either Observer is not available or it took longer\n // then OBSERVER_WAIT_TIME_MS and observer didn't collect enough\n // information\n resources = performance.getEntriesByType('resource');\n }\n var resource = web.getResource(resourcesObserver.spanUrl, resourcesObserver.startTime, endTime, resources, this._usedResources, 'fetch');\n if (resource.mainRequest) {\n var mainRequest = resource.mainRequest;\n this._markResourceAsUsed(mainRequest);\n var corsPreFlightRequest = resource.corsPreFlightRequest;\n if (corsPreFlightRequest) {\n this._addChildSpan(span, corsPreFlightRequest);\n this._markResourceAsUsed(corsPreFlightRequest);\n }\n if (!this._getConfig().ignoreNetworkEvents) {\n web.addSpanNetworkEvents(span, mainRequest);\n }\n }\n };\n /**\n * Marks certain [resource]{@link PerformanceResourceTiming} when information\n * from this is used to add events to span.\n * This is done to avoid reusing the same resource again for next span\n * @param resource\n */\n FetchInstrumentation.prototype._markResourceAsUsed = function (resource) {\n this._usedResources.add(resource);\n };\n /**\n * Finish span, add attributes, network events etc.\n * @param span\n * @param spanData\n * @param response\n */\n FetchInstrumentation.prototype._endSpan = function (span, spanData, response) {\n var _this = this;\n var endTime = core.millisToHrTime(Date.now());\n var performanceEndTime = core.hrTime();\n this._addFinalSpanAttributes(span, response);\n setTimeout(function () {\n var _a;\n (_a = spanData.observer) === null || _a === void 0 ? void 0 : _a.disconnect();\n _this._findResourceAndAddNetworkEvents(span, spanData, performanceEndTime);\n _this._tasksCount--;\n _this._clearResources();\n span.end(endTime);\n }, OBSERVER_WAIT_TIME_MS);\n };\n /**\n * Patches the constructor of fetch\n */\n FetchInstrumentation.prototype._patchConstructor = function () {\n var _this = this;\n return function (original) {\n var plugin = _this;\n return function patchConstructor() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var self = this;\n var url = web.parseUrl(args[0] instanceof Request ? args[0].url : String(args[0])).href;\n var options = args[0] instanceof Request ? args[0] : args[1] || {};\n var createdSpan = plugin._createSpan(url, options);\n if (!createdSpan) {\n return original.apply(this, args);\n }\n var spanData = plugin._prepareSpanData(url);\n function endSpanOnError(span, error) {\n plugin._applyAttributesAfterFetch(span, options, error);\n plugin._endSpan(span, spanData, {\n status: error.status || 0,\n statusText: error.message,\n url: url,\n });\n }\n function endSpanOnSuccess(span, response) {\n plugin._applyAttributesAfterFetch(span, options, response);\n if (response.status >= 200 && response.status < 400) {\n plugin._endSpan(span, spanData, response);\n }\n else {\n plugin._endSpan(span, spanData, {\n status: response.status,\n statusText: response.statusText,\n url: url,\n });\n }\n }\n function onSuccess(span, resolve, response) {\n try {\n var resClone = response.clone();\n var resClone4Hook_1 = response.clone();\n var body = resClone.body;\n if (body) {\n var reader_1 = body.getReader();\n var read_1 = function () {\n reader_1.read().then(function (_a) {\n var done = _a.done;\n if (done) {\n endSpanOnSuccess(span, resClone4Hook_1);\n }\n else {\n read_1();\n }\n }, function (error) {\n endSpanOnError(span, error);\n });\n };\n read_1();\n }\n else {\n // some older browsers don't have .body implemented\n endSpanOnSuccess(span, response);\n }\n }\n finally {\n resolve(response);\n }\n }\n function onError(span, reject, error) {\n try {\n endSpanOnError(span, error);\n }\n finally {\n reject(error);\n }\n }\n return new Promise(function (resolve, reject) {\n return api.context.with(api.trace.setSpan(api.context.active(), createdSpan), function () {\n plugin._addHeaders(options, url);\n plugin._tasksCount++;\n // TypeScript complains about arrow function captured a this typed as globalThis\n // ts(7041)\n return original\n .apply(self, options instanceof Request ? [options] : [url, options])\n .then(onSuccess.bind(self, createdSpan, resolve), onError.bind(self, createdSpan, reject));\n });\n });\n };\n };\n };\n FetchInstrumentation.prototype._applyAttributesAfterFetch = function (span, request, result) {\n var _this = this;\n var applyCustomAttributesOnSpan = this._getConfig().applyCustomAttributesOnSpan;\n if (applyCustomAttributesOnSpan) {\n safeExecuteInTheMiddle(function () { return applyCustomAttributesOnSpan(span, request, result); }, function (error) {\n if (!error) {\n return;\n }\n _this._diag.error('applyCustomAttributesOnSpan', error);\n }, true);\n }\n };\n /**\n * Prepares a span data - needed later for matching appropriate network\n * resources\n * @param spanUrl\n */\n FetchInstrumentation.prototype._prepareSpanData = function (spanUrl) {\n var startTime = core.hrTime();\n var entries = [];\n if (typeof PerformanceObserver !== 'function') {\n return { entries: entries, startTime: startTime, spanUrl: spanUrl };\n }\n var observer = new PerformanceObserver(function (list) {\n var perfObsEntries = list.getEntries();\n perfObsEntries.forEach(function (entry) {\n if (entry.initiatorType === 'fetch' && entry.name === spanUrl) {\n entries.push(entry);\n }\n });\n });\n observer.observe({\n entryTypes: ['resource'],\n });\n return { entries: entries, observer: observer, startTime: startTime, spanUrl: spanUrl };\n };\n /**\n * implements enable function\n */\n FetchInstrumentation.prototype.enable = function () {\n if (isNode) {\n // Node.js v18+ *does* have a global `fetch()`, but this package does not\n // support instrumenting it.\n this._diag.warn(\"this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()\");\n return;\n }\n if (isWrapped(fetch)) {\n this._unwrap(_globalThis, 'fetch');\n this._diag.debug('removing previous patch for constructor');\n }\n this._wrap(_globalThis, 'fetch', this._patchConstructor());\n };\n /**\n * implements unpatch function\n */\n FetchInstrumentation.prototype.disable = function () {\n if (isNode) {\n return;\n }\n this._unwrap(_globalThis, 'fetch');\n this._usedResources = new WeakSet();\n };\n return FetchInstrumentation;\n}(InstrumentationBase));\nexport { FetchInstrumentation };\n//# sourceMappingURL=fetch.js.map","/*\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 var AttributeNames;\n(function (AttributeNames) {\n AttributeNames[\"EVENT_TYPE\"] = \"event_type\";\n AttributeNames[\"TARGET_ELEMENT\"] = \"target_element\";\n AttributeNames[\"TARGET_XPATH\"] = \"target_xpath\";\n AttributeNames[\"HTTP_URL\"] = \"http.url\";\n})(AttributeNames || (AttributeNames = {}));\n//# sourceMappingURL=AttributeNames.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '0.36.0';\n//# sourceMappingURL=version.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/// \nimport { isWrapped, InstrumentationBase } from '@opentelemetry/instrumentation';\nimport * as api from '@opentelemetry/api';\nimport { hrTime } from '@opentelemetry/core';\nimport { getElementXPath } from '@opentelemetry/sdk-trace-web';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { VERSION } from './version';\nvar ZONE_CONTEXT_KEY = 'OT_ZONE_CONTEXT';\nvar EVENT_NAVIGATION_NAME = 'Navigation:';\nvar DEFAULT_EVENT_NAMES = ['click'];\nfunction defaultShouldPreventSpanCreation() {\n return false;\n}\n/**\n * This class represents a UserInteraction plugin for auto instrumentation.\n * If zone.js is available then it patches the zone otherwise it patches\n * addEventListener of HTMLElement\n */\nvar UserInteractionInstrumentation = /** @class */ (function (_super) {\n __extends(UserInteractionInstrumentation, _super);\n function UserInteractionInstrumentation(config) {\n var _a;\n var _this = _super.call(this, '@opentelemetry/instrumentation-user-interaction', VERSION, config) || this;\n _this.version = VERSION;\n _this.moduleName = 'user-interaction';\n _this._spansData = new WeakMap();\n // for addEventListener/removeEventListener state\n _this._wrappedListeners = new WeakMap();\n // for event bubbling\n _this._eventsSpanMap = new WeakMap();\n _this._eventNames = new Set((_a = config === null || config === void 0 ? void 0 : config.eventNames) !== null && _a !== void 0 ? _a : DEFAULT_EVENT_NAMES);\n _this._shouldPreventSpanCreation =\n typeof (config === null || config === void 0 ? void 0 : config.shouldPreventSpanCreation) === 'function'\n ? config.shouldPreventSpanCreation\n : defaultShouldPreventSpanCreation;\n return _this;\n }\n UserInteractionInstrumentation.prototype.init = function () { };\n /**\n * This will check if last task was timeout and will save the time to\n * fix the user interaction when nothing happens\n * This timeout comes from xhr plugin which is needed to collect information\n * about last xhr main request from observer\n * @param task\n * @param span\n */\n UserInteractionInstrumentation.prototype._checkForTimeout = function (task, span) {\n var spanData = this._spansData.get(span);\n if (spanData) {\n if (task.source === 'setTimeout') {\n spanData.hrTimeLastTimeout = hrTime();\n }\n else if (task.source !== 'Promise.then' &&\n task.source !== 'setTimeout') {\n spanData.hrTimeLastTimeout = undefined;\n }\n }\n };\n /**\n * Controls whether or not to create a span, based on the event type.\n */\n UserInteractionInstrumentation.prototype._allowEventName = function (eventName) {\n return this._eventNames.has(eventName);\n };\n /**\n * Creates a new span\n * @param element\n * @param eventName\n * @param parentSpan\n */\n UserInteractionInstrumentation.prototype._createSpan = function (element, eventName, parentSpan) {\n var _a;\n if (!(element instanceof HTMLElement)) {\n return undefined;\n }\n if (!element.getAttribute) {\n return undefined;\n }\n if (element.hasAttribute('disabled')) {\n return undefined;\n }\n if (!this._allowEventName(eventName)) {\n return undefined;\n }\n var xpath = getElementXPath(element, true);\n try {\n var span = this.tracer.startSpan(eventName, {\n attributes: (_a = {},\n _a[AttributeNames.EVENT_TYPE] = eventName,\n _a[AttributeNames.TARGET_ELEMENT] = element.tagName,\n _a[AttributeNames.TARGET_XPATH] = xpath,\n _a[AttributeNames.HTTP_URL] = window.location.href,\n _a),\n }, parentSpan\n ? api.trace.setSpan(api.context.active(), parentSpan)\n : undefined);\n if (this._shouldPreventSpanCreation(eventName, element, span) === true) {\n return undefined;\n }\n this._spansData.set(span, {\n taskCount: 0,\n });\n return span;\n }\n catch (e) {\n this._diag.error('failed to start create new user interaction span', e);\n }\n return undefined;\n };\n /**\n * Decrement number of tasks that left in zone,\n * This is needed to be able to end span when no more tasks left\n * @param span\n */\n UserInteractionInstrumentation.prototype._decrementTask = function (span) {\n var spanData = this._spansData.get(span);\n if (spanData) {\n spanData.taskCount--;\n if (spanData.taskCount === 0) {\n this._tryToEndSpan(span, spanData.hrTimeLastTimeout);\n }\n }\n };\n /**\n * Return the current span\n * @param zone\n * @private\n */\n UserInteractionInstrumentation.prototype._getCurrentSpan = function (zone) {\n var context = zone.get(ZONE_CONTEXT_KEY);\n if (context) {\n return api.trace.getSpan(context);\n }\n return context;\n };\n /**\n * Increment number of tasks that are run within the same zone.\n * This is needed to be able to end span when no more tasks left\n * @param span\n */\n UserInteractionInstrumentation.prototype._incrementTask = function (span) {\n var spanData = this._spansData.get(span);\n if (spanData) {\n spanData.taskCount++;\n }\n };\n /**\n * Returns true iff we should use the patched callback; false if it's already been patched\n */\n UserInteractionInstrumentation.prototype.addPatchedListener = function (on, type, listener, wrappedListener) {\n var listener2Type = this._wrappedListeners.get(listener);\n if (!listener2Type) {\n listener2Type = new Map();\n this._wrappedListeners.set(listener, listener2Type);\n }\n var element2patched = listener2Type.get(type);\n if (!element2patched) {\n element2patched = new Map();\n listener2Type.set(type, element2patched);\n }\n if (element2patched.has(on)) {\n return false;\n }\n element2patched.set(on, wrappedListener);\n return true;\n };\n /**\n * Returns the patched version of the callback (or undefined)\n */\n UserInteractionInstrumentation.prototype.removePatchedListener = function (on, type, listener) {\n var listener2Type = this._wrappedListeners.get(listener);\n if (!listener2Type) {\n return undefined;\n }\n var element2patched = listener2Type.get(type);\n if (!element2patched) {\n return undefined;\n }\n var patched = element2patched.get(on);\n if (patched) {\n element2patched.delete(on);\n if (element2patched.size === 0) {\n listener2Type.delete(type);\n if (listener2Type.size === 0) {\n this._wrappedListeners.delete(listener);\n }\n }\n }\n return patched;\n };\n // utility method to deal with the Function|EventListener nature of addEventListener\n UserInteractionInstrumentation.prototype._invokeListener = function (listener, target, args) {\n if (typeof listener === 'function') {\n return listener.apply(target, args);\n }\n else {\n return listener.handleEvent(args[0]);\n }\n };\n /**\n * This patches the addEventListener of HTMLElement to be able to\n * auto instrument the click events\n * This is done when zone is not available\n */\n UserInteractionInstrumentation.prototype._patchAddEventListener = function () {\n var plugin = this;\n return function (original) {\n return function addEventListenerPatched(type, listener, useCapture) {\n // Forward calls with listener = null\n if (!listener) {\n return original.call(this, type, listener, useCapture);\n }\n // filter out null (typeof null === 'object')\n var once = useCapture && typeof useCapture === 'object' && useCapture.once;\n var patchedListener = function () {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var parentSpan;\n var event = args[0];\n var target = event === null || event === void 0 ? void 0 : event.target;\n if (event) {\n parentSpan = plugin._eventsSpanMap.get(event);\n }\n if (once) {\n plugin.removePatchedListener(this, type, listener);\n }\n var span = plugin._createSpan(target, type, parentSpan);\n if (span) {\n if (event) {\n plugin._eventsSpanMap.set(event, span);\n }\n return api.context.with(api.trace.setSpan(api.context.active(), span), function () {\n var result = plugin._invokeListener(listener, _this, args);\n // no zone so end span immediately\n span.end();\n return result;\n });\n }\n else {\n return plugin._invokeListener(listener, this, args);\n }\n };\n if (plugin.addPatchedListener(this, type, listener, patchedListener)) {\n return original.call(this, type, patchedListener, useCapture);\n }\n };\n };\n };\n /**\n * This patches the removeEventListener of HTMLElement to handle the fact that\n * we patched the original callbacks\n * This is done when zone is not available\n */\n UserInteractionInstrumentation.prototype._patchRemoveEventListener = function () {\n var plugin = this;\n return function (original) {\n return function removeEventListenerPatched(type, listener, useCapture) {\n var wrappedListener = plugin.removePatchedListener(this, type, listener);\n if (wrappedListener) {\n return original.call(this, type, wrappedListener, useCapture);\n }\n else {\n return original.call(this, type, listener, useCapture);\n }\n };\n };\n };\n /**\n * Most browser provide event listener api via EventTarget in prototype chain.\n * Exception to this is IE 11 which has it on the prototypes closest to EventTarget:\n *\n * * - has addEventListener in IE\n * ** - has addEventListener in all other browsers\n * ! - missing in IE\n *\n * HTMLElement -> Element -> Node * -> EventTarget **! -> Object\n * Document -> Node * -> EventTarget **! -> Object\n * Window * -> WindowProperties ! -> EventTarget **! -> Object\n */\n UserInteractionInstrumentation.prototype._getPatchableEventTargets = function () {\n return window.EventTarget\n ? [EventTarget.prototype]\n : [Node.prototype, Window.prototype];\n };\n /**\n * Patches the history api\n */\n UserInteractionInstrumentation.prototype._patchHistoryApi = function () {\n this._unpatchHistoryApi();\n this._wrap(history, 'replaceState', this._patchHistoryMethod());\n this._wrap(history, 'pushState', this._patchHistoryMethod());\n this._wrap(history, 'back', this._patchHistoryMethod());\n this._wrap(history, 'forward', this._patchHistoryMethod());\n this._wrap(history, 'go', this._patchHistoryMethod());\n };\n /**\n * Patches the certain history api method\n */\n UserInteractionInstrumentation.prototype._patchHistoryMethod = function () {\n var plugin = this;\n return function (original) {\n return function patchHistoryMethod() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var url = \"\" + location.pathname + location.hash + location.search;\n var result = original.apply(this, args);\n var urlAfter = \"\" + location.pathname + location.hash + location.search;\n if (url !== urlAfter) {\n plugin._updateInteractionName(urlAfter);\n }\n return result;\n };\n };\n };\n /**\n * unpatch the history api methods\n */\n UserInteractionInstrumentation.prototype._unpatchHistoryApi = function () {\n if (isWrapped(history.replaceState))\n this._unwrap(history, 'replaceState');\n if (isWrapped(history.pushState))\n this._unwrap(history, 'pushState');\n if (isWrapped(history.back))\n this._unwrap(history, 'back');\n if (isWrapped(history.forward))\n this._unwrap(history, 'forward');\n if (isWrapped(history.go))\n this._unwrap(history, 'go');\n };\n /**\n * Updates interaction span name\n * @param url\n */\n UserInteractionInstrumentation.prototype._updateInteractionName = function (url) {\n var span = api.trace.getSpan(api.context.active());\n if (span && typeof span.updateName === 'function') {\n span.updateName(EVENT_NAVIGATION_NAME + \" \" + url);\n }\n };\n /**\n * Patches zone cancel task - this is done to be able to correctly\n * decrement the number of remaining tasks\n */\n UserInteractionInstrumentation.prototype._patchZoneCancelTask = function () {\n var plugin = this;\n return function (original) {\n return function patchCancelTask(task) {\n var currentZone = Zone.current;\n var currentSpan = plugin._getCurrentSpan(currentZone);\n if (currentSpan && plugin._shouldCountTask(task, currentZone)) {\n plugin._decrementTask(currentSpan);\n }\n return original.call(this, task);\n };\n };\n };\n /**\n * Patches zone schedule task - this is done to be able to correctly\n * increment the number of tasks running within current zone but also to\n * save time in case of timeout running from xhr plugin when waiting for\n * main request from PerformanceResourceTiming\n */\n UserInteractionInstrumentation.prototype._patchZoneScheduleTask = function () {\n var plugin = this;\n return function (original) {\n return function patchScheduleTask(task) {\n var currentZone = Zone.current;\n var currentSpan = plugin._getCurrentSpan(currentZone);\n if (currentSpan && plugin._shouldCountTask(task, currentZone)) {\n plugin._incrementTask(currentSpan);\n plugin._checkForTimeout(task, currentSpan);\n }\n return original.call(this, task);\n };\n };\n };\n /**\n * Patches zone run task - this is done to be able to create a span when\n * user interaction starts\n * @private\n */\n UserInteractionInstrumentation.prototype._patchZoneRunTask = function () {\n var plugin = this;\n return function (original) {\n return function patchRunTask(task, applyThis, applyArgs) {\n var event = Array.isArray(applyArgs) && applyArgs[0] instanceof Event\n ? applyArgs[0]\n : undefined;\n var target = event === null || event === void 0 ? void 0 : event.target;\n var span;\n var activeZone = this;\n if (target) {\n span = plugin._createSpan(target, task.eventName);\n if (span) {\n plugin._incrementTask(span);\n return activeZone.run(function () {\n try {\n return api.context.with(api.trace.setSpan(api.context.active(), span), function () {\n var currentZone = Zone.current;\n task._zone = currentZone;\n return original.call(currentZone, task, applyThis, applyArgs);\n });\n }\n finally {\n plugin._decrementTask(span);\n }\n });\n }\n }\n else {\n span = plugin._getCurrentSpan(activeZone);\n }\n try {\n return original.call(activeZone, task, applyThis, applyArgs);\n }\n finally {\n if (span && plugin._shouldCountTask(task, activeZone)) {\n plugin._decrementTask(span);\n }\n }\n };\n };\n };\n /**\n * Decides if task should be counted.\n * @param task\n * @param currentZone\n * @private\n */\n UserInteractionInstrumentation.prototype._shouldCountTask = function (task, currentZone) {\n if (task._zone) {\n currentZone = task._zone;\n }\n if (!currentZone || !task.data || task.data.isPeriodic) {\n return false;\n }\n var currentSpan = this._getCurrentSpan(currentZone);\n if (!currentSpan) {\n return false;\n }\n if (!this._spansData.get(currentSpan)) {\n return false;\n }\n return task.type === 'macroTask' || task.type === 'microTask';\n };\n /**\n * Will try to end span when such span still exists.\n * @param span\n * @param endTime\n * @private\n */\n UserInteractionInstrumentation.prototype._tryToEndSpan = function (span, endTime) {\n if (span) {\n var spanData = this._spansData.get(span);\n if (spanData) {\n span.end(endTime);\n this._spansData.delete(span);\n }\n }\n };\n /**\n * implements enable function\n */\n UserInteractionInstrumentation.prototype.enable = function () {\n var _this = this;\n var ZoneWithPrototype = this.getZoneWithPrototype();\n this._diag.debug('applying patch to', this.moduleName, this.version, 'zone:', !!ZoneWithPrototype);\n if (ZoneWithPrototype) {\n if (isWrapped(ZoneWithPrototype.prototype.runTask)) {\n this._unwrap(ZoneWithPrototype.prototype, 'runTask');\n this._diag.debug('removing previous patch from method runTask');\n }\n if (isWrapped(ZoneWithPrototype.prototype.scheduleTask)) {\n this._unwrap(ZoneWithPrototype.prototype, 'scheduleTask');\n this._diag.debug('removing previous patch from method scheduleTask');\n }\n if (isWrapped(ZoneWithPrototype.prototype.cancelTask)) {\n this._unwrap(ZoneWithPrototype.prototype, 'cancelTask');\n this._diag.debug('removing previous patch from method cancelTask');\n }\n this._zonePatched = true;\n this._wrap(ZoneWithPrototype.prototype, 'runTask', this._patchZoneRunTask());\n this._wrap(ZoneWithPrototype.prototype, 'scheduleTask', this._patchZoneScheduleTask());\n this._wrap(ZoneWithPrototype.prototype, 'cancelTask', this._patchZoneCancelTask());\n }\n else {\n this._zonePatched = false;\n var targets = this._getPatchableEventTargets();\n targets.forEach(function (target) {\n if (isWrapped(target.addEventListener)) {\n _this._unwrap(target, 'addEventListener');\n _this._diag.debug('removing previous patch from method addEventListener');\n }\n if (isWrapped(target.removeEventListener)) {\n _this._unwrap(target, 'removeEventListener');\n _this._diag.debug('removing previous patch from method removeEventListener');\n }\n _this._wrap(target, 'addEventListener', _this._patchAddEventListener());\n _this._wrap(target, 'removeEventListener', _this._patchRemoveEventListener());\n });\n }\n this._patchHistoryApi();\n };\n /**\n * implements unpatch function\n */\n UserInteractionInstrumentation.prototype.disable = function () {\n var _this = this;\n var ZoneWithPrototype = this.getZoneWithPrototype();\n this._diag.debug('removing patch from', this.moduleName, this.version, 'zone:', !!ZoneWithPrototype);\n if (ZoneWithPrototype && this._zonePatched) {\n if (isWrapped(ZoneWithPrototype.prototype.runTask)) {\n this._unwrap(ZoneWithPrototype.prototype, 'runTask');\n }\n if (isWrapped(ZoneWithPrototype.prototype.scheduleTask)) {\n this._unwrap(ZoneWithPrototype.prototype, 'scheduleTask');\n }\n if (isWrapped(ZoneWithPrototype.prototype.cancelTask)) {\n this._unwrap(ZoneWithPrototype.prototype, 'cancelTask');\n }\n }\n else {\n var targets = this._getPatchableEventTargets();\n targets.forEach(function (target) {\n if (isWrapped(target.addEventListener)) {\n _this._unwrap(target, 'addEventListener');\n }\n if (isWrapped(target.removeEventListener)) {\n _this._unwrap(target, 'removeEventListener');\n }\n });\n }\n this._unpatchHistoryApi();\n };\n /**\n * returns Zone\n */\n UserInteractionInstrumentation.prototype.getZoneWithPrototype = function () {\n var _window = window;\n return _window.Zone;\n };\n return UserInteractionInstrumentation;\n}(InstrumentationBase));\nexport { UserInteractionInstrumentation };\n//# sourceMappingURL=instrumentation.js.map","/*\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 var PerformanceTimingNames;\n(function (PerformanceTimingNames) {\n PerformanceTimingNames[\"CONNECT_END\"] = \"connectEnd\";\n PerformanceTimingNames[\"CONNECT_START\"] = \"connectStart\";\n PerformanceTimingNames[\"DECODED_BODY_SIZE\"] = \"decodedBodySize\";\n PerformanceTimingNames[\"DOM_COMPLETE\"] = \"domComplete\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_END\"] = \"domContentLoadedEventEnd\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_START\"] = \"domContentLoadedEventStart\";\n PerformanceTimingNames[\"DOM_INTERACTIVE\"] = \"domInteractive\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_END\"] = \"domainLookupEnd\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_START\"] = \"domainLookupStart\";\n PerformanceTimingNames[\"ENCODED_BODY_SIZE\"] = \"encodedBodySize\";\n PerformanceTimingNames[\"FETCH_START\"] = \"fetchStart\";\n PerformanceTimingNames[\"LOAD_EVENT_END\"] = \"loadEventEnd\";\n PerformanceTimingNames[\"LOAD_EVENT_START\"] = \"loadEventStart\";\n PerformanceTimingNames[\"NAVIGATION_START\"] = \"navigationStart\";\n PerformanceTimingNames[\"REDIRECT_END\"] = \"redirectEnd\";\n PerformanceTimingNames[\"REDIRECT_START\"] = \"redirectStart\";\n PerformanceTimingNames[\"REQUEST_START\"] = \"requestStart\";\n PerformanceTimingNames[\"RESPONSE_END\"] = \"responseEnd\";\n PerformanceTimingNames[\"RESPONSE_START\"] = \"responseStart\";\n PerformanceTimingNames[\"SECURE_CONNECTION_START\"] = \"secureConnectionStart\";\n PerformanceTimingNames[\"UNLOAD_EVENT_END\"] = \"unloadEventEnd\";\n PerformanceTimingNames[\"UNLOAD_EVENT_START\"] = \"unloadEventStart\";\n})(PerformanceTimingNames || (PerformanceTimingNames = {}));\n//# sourceMappingURL=PerformanceTimingNames.js.map","/*\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 { PerformanceTimingNames as PTN } from './enums/PerformanceTimingNames';\nimport { hrTimeToNanoseconds, timeInputToHrTime, urlMatches, } from '@opentelemetry/core';\nimport { SemanticAttributes } from '@opentelemetry/semantic-conventions';\n// Used to normalize relative URLs\nvar urlNormalizingAnchor;\nfunction getUrlNormalizingAnchor() {\n if (!urlNormalizingAnchor) {\n urlNormalizingAnchor = document.createElement('a');\n }\n return urlNormalizingAnchor;\n}\n/**\n * Helper function to be able to use enum as typed key in type and in interface when using forEach\n * @param obj\n * @param key\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function hasKey(obj, key) {\n return key in obj;\n}\n/**\n * Helper function for starting an event on span based on {@link PerformanceEntries}\n * @param span\n * @param performanceName name of performance entry for time start\n * @param entries\n */\nexport function addSpanNetworkEvent(span, performanceName, entries) {\n if (hasKey(entries, performanceName) &&\n typeof entries[performanceName] === 'number') {\n span.addEvent(performanceName, entries[performanceName]);\n return span;\n }\n return undefined;\n}\n/**\n * Helper function for adding network events\n * @param span\n * @param resource\n */\nexport function addSpanNetworkEvents(span, resource) {\n addSpanNetworkEvent(span, PTN.FETCH_START, resource);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_START, resource);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_END, resource);\n addSpanNetworkEvent(span, PTN.CONNECT_START, resource);\n if (hasKey(resource, 'name') &&\n resource['name'].startsWith('https:')) {\n addSpanNetworkEvent(span, PTN.SECURE_CONNECTION_START, resource);\n }\n addSpanNetworkEvent(span, PTN.CONNECT_END, resource);\n addSpanNetworkEvent(span, PTN.REQUEST_START, resource);\n addSpanNetworkEvent(span, PTN.RESPONSE_START, resource);\n addSpanNetworkEvent(span, PTN.RESPONSE_END, resource);\n var encodedLength = resource[PTN.ENCODED_BODY_SIZE];\n if (encodedLength !== undefined) {\n span.setAttribute(SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH, encodedLength);\n }\n var decodedLength = resource[PTN.DECODED_BODY_SIZE];\n // Spec: Not set if transport encoding not used (in which case encoded and decoded sizes match)\n if (decodedLength !== undefined && encodedLength !== decodedLength) {\n span.setAttribute(SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, decodedLength);\n }\n}\n/**\n * sort resources by startTime\n * @param filteredResources\n */\nexport function sortResources(filteredResources) {\n return filteredResources.slice().sort(function (a, b) {\n var valueA = a[PTN.FETCH_START];\n var valueB = b[PTN.FETCH_START];\n if (valueA > valueB) {\n return 1;\n }\n else if (valueA < valueB) {\n return -1;\n }\n return 0;\n });\n}\n/** Returns the origin if present (if in browser context). */\nfunction getOrigin() {\n return typeof location !== 'undefined' ? location.origin : undefined;\n}\n/**\n * Get closest performance resource ignoring the resources that have been\n * already used.\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n * @param initiatorType\n */\nexport function getResource(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType) {\n if (ignoredResources === void 0) { ignoredResources = new WeakSet(); }\n // de-relativize the URL before usage (does no harm to absolute URLs)\n var parsedSpanUrl = parseUrl(spanUrl);\n spanUrl = parsedSpanUrl.toString();\n var filteredResources = filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType);\n if (filteredResources.length === 0) {\n return {\n mainRequest: undefined,\n };\n }\n if (filteredResources.length === 1) {\n return {\n mainRequest: filteredResources[0],\n };\n }\n var sorted = sortResources(filteredResources);\n if (parsedSpanUrl.origin !== getOrigin() && sorted.length > 1) {\n var corsPreFlightRequest = sorted[0];\n var mainRequest = findMainRequest(sorted, corsPreFlightRequest[PTN.RESPONSE_END], endTimeHR);\n var responseEnd = corsPreFlightRequest[PTN.RESPONSE_END];\n var fetchStart = mainRequest[PTN.FETCH_START];\n // no corsPreFlightRequest\n if (fetchStart < responseEnd) {\n mainRequest = corsPreFlightRequest;\n corsPreFlightRequest = undefined;\n }\n return {\n corsPreFlightRequest: corsPreFlightRequest,\n mainRequest: mainRequest,\n };\n }\n else {\n return {\n mainRequest: filteredResources[0],\n };\n }\n}\n/**\n * Will find the main request skipping the cors pre flight requests\n * @param resources\n * @param corsPreFlightRequestEndTime\n * @param spanEndTimeHR\n */\nfunction findMainRequest(resources, corsPreFlightRequestEndTime, spanEndTimeHR) {\n var spanEndTime = hrTimeToNanoseconds(spanEndTimeHR);\n var minTime = hrTimeToNanoseconds(timeInputToHrTime(corsPreFlightRequestEndTime));\n var mainRequest = resources[1];\n var bestGap;\n var length = resources.length;\n for (var i = 1; i < length; i++) {\n var resource = resources[i];\n var resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n var resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n var currentGap = spanEndTime - resourceEndTime;\n if (resourceStartTime >= minTime && (!bestGap || currentGap < bestGap)) {\n bestGap = currentGap;\n mainRequest = resource;\n }\n }\n return mainRequest;\n}\n/**\n * Filter all resources that has started and finished according to span start time and end time.\n * It will return the closest resource to a start time\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n */\nfunction filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType) {\n var startTime = hrTimeToNanoseconds(startTimeHR);\n var endTime = hrTimeToNanoseconds(endTimeHR);\n var filteredResources = resources.filter(function (resource) {\n var resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n var resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n return (resource.initiatorType.toLowerCase() ===\n (initiatorType || 'xmlhttprequest') &&\n resource.name === spanUrl &&\n resourceStartTime >= startTime &&\n resourceEndTime <= endTime);\n });\n if (filteredResources.length > 0) {\n filteredResources = filteredResources.filter(function (resource) {\n return !ignoredResources.has(resource);\n });\n }\n return filteredResources;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element.\n * @param url\n */\nexport function parseUrl(url) {\n if (typeof URL === 'function') {\n return new URL(url, typeof document !== 'undefined'\n ? document.baseURI\n : typeof location !== 'undefined' // Some JS runtimes (e.g. Deno) don't define this\n ? location.href\n : undefined);\n }\n var element = getUrlNormalizingAnchor();\n element.href = url;\n return element;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element and serialize\n * it to a string.\n *\n * Performs the steps described in https://html.spec.whatwg.org/multipage/urls-and-fetching.html#parse-a-url\n *\n * @param url\n */\nexport function normalizeUrl(url) {\n var urlLike = parseUrl(url);\n return urlLike.href;\n}\n/**\n * Get element XPath\n * @param target - target element\n * @param optimised - when id attribute of element is present the xpath can be\n * simplified to contain id\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function getElementXPath(target, optimised) {\n if (target.nodeType === Node.DOCUMENT_NODE) {\n return '/';\n }\n var targetValue = getNodeValue(target, optimised);\n if (optimised && targetValue.indexOf('@id') > 0) {\n return targetValue;\n }\n var xpath = '';\n if (target.parentNode) {\n xpath += getElementXPath(target.parentNode, false);\n }\n xpath += targetValue;\n return xpath;\n}\n/**\n * get node index within the siblings\n * @param target\n */\nfunction getNodeIndex(target) {\n if (!target.parentNode) {\n return 0;\n }\n var allowedTypes = [target.nodeType];\n if (target.nodeType === Node.CDATA_SECTION_NODE) {\n allowedTypes.push(Node.TEXT_NODE);\n }\n var elements = Array.from(target.parentNode.childNodes);\n elements = elements.filter(function (element) {\n var localName = element.localName;\n return (allowedTypes.indexOf(element.nodeType) >= 0 &&\n localName === target.localName);\n });\n if (elements.length >= 1) {\n return elements.indexOf(target) + 1; // xpath starts from 1\n }\n // if there are no other similar child xpath doesn't need index\n return 0;\n}\n/**\n * get node value for xpath\n * @param target\n * @param optimised\n */\nfunction getNodeValue(target, optimised) {\n var nodeType = target.nodeType;\n var index = getNodeIndex(target);\n var nodeValue = '';\n if (nodeType === Node.ELEMENT_NODE) {\n var id = target.getAttribute('id');\n if (optimised && id) {\n return \"//*[@id=\\\"\" + id + \"\\\"]\";\n }\n nodeValue = target.localName;\n }\n else if (nodeType === Node.TEXT_NODE ||\n nodeType === Node.CDATA_SECTION_NODE) {\n nodeValue = 'text()';\n }\n else if (nodeType === Node.COMMENT_NODE) {\n nodeValue = 'comment()';\n }\n else {\n return '';\n }\n // if index is 1 it can be omitted in xpath\n if (nodeValue && index > 1) {\n return \"/\" + nodeValue + \"[\" + index + \"]\";\n }\n return \"/\" + nodeValue;\n}\n/**\n * Checks if trace headers should be propagated\n * @param spanUrl\n * @private\n */\nexport function shouldPropagateTraceHeaders(spanUrl, propagateTraceHeaderCorsUrls) {\n var propagateTraceHeaderUrls = propagateTraceHeaderCorsUrls || [];\n if (typeof propagateTraceHeaderUrls === 'string' ||\n propagateTraceHeaderUrls instanceof RegExp) {\n propagateTraceHeaderUrls = [propagateTraceHeaderUrls];\n }\n var parsedSpanUrl = parseUrl(spanUrl);\n if (parsedSpanUrl.origin === getOrigin()) {\n return true;\n }\n else {\n return propagateTraceHeaderUrls.some(function (propagateTraceHeaderUrl) {\n return urlMatches(spanUrl, propagateTraceHeaderUrl);\n });\n }\n}\n//# sourceMappingURL=utils.js.map","/*\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 var EventNames;\n(function (EventNames) {\n EventNames[\"METHOD_OPEN\"] = \"open\";\n EventNames[\"METHOD_SEND\"] = \"send\";\n EventNames[\"EVENT_ABORT\"] = \"abort\";\n EventNames[\"EVENT_ERROR\"] = \"error\";\n EventNames[\"EVENT_LOAD\"] = \"loaded\";\n EventNames[\"EVENT_TIMEOUT\"] = \"timeout\";\n})(EventNames || (EventNames = {}));\n//# sourceMappingURL=EventNames.js.map","/*\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// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '0.49.1';\n//# sourceMappingURL=version.js.map","/*\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 * https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/http.md\n */\nexport var AttributeNames;\n(function (AttributeNames) {\n AttributeNames[\"HTTP_STATUS_TEXT\"] = \"http.status_text\";\n})(AttributeNames || (AttributeNames = {}));\n//# sourceMappingURL=AttributeNames.js.map","/*\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 */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as api from '@opentelemetry/api';\nimport { isWrapped, InstrumentationBase, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation';\nimport { hrTime, isUrlIgnored, otperformance } from '@opentelemetry/core';\nimport { SemanticAttributes } from '@opentelemetry/semantic-conventions';\nimport { addSpanNetworkEvents, getResource, PerformanceTimingNames as PTN, shouldPropagateTraceHeaders, parseUrl, } from '@opentelemetry/sdk-trace-web';\nimport { EventNames } from './enums/EventNames';\nimport { VERSION } from './version';\nimport { AttributeNames } from './enums/AttributeNames';\n// how long to wait for observer to collect information about resources\n// this is needed as event \"load\" is called before observer\n// hard to say how long it should really wait, seems like 300ms is\n// safe enough\nvar OBSERVER_WAIT_TIME_MS = 300;\n/**\n * This class represents a XMLHttpRequest plugin for auto instrumentation\n */\nvar XMLHttpRequestInstrumentation = /** @class */ (function (_super) {\n __extends(XMLHttpRequestInstrumentation, _super);\n function XMLHttpRequestInstrumentation(config) {\n var _this = _super.call(this, '@opentelemetry/instrumentation-xml-http-request', VERSION, config) || this;\n _this.component = 'xml-http-request';\n _this.version = VERSION;\n _this.moduleName = _this.component;\n _this._tasksCount = 0;\n _this._xhrMem = new WeakMap();\n _this._usedResources = new WeakSet();\n return _this;\n }\n XMLHttpRequestInstrumentation.prototype.init = function () { };\n XMLHttpRequestInstrumentation.prototype._getConfig = function () {\n return this._config;\n };\n /**\n * Adds custom headers to XMLHttpRequest\n * @param xhr\n * @param spanUrl\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._addHeaders = function (xhr, spanUrl) {\n var url = parseUrl(spanUrl).href;\n if (!shouldPropagateTraceHeaders(url, this._getConfig().propagateTraceHeaderCorsUrls)) {\n var headers_1 = {};\n api.propagation.inject(api.context.active(), headers_1);\n if (Object.keys(headers_1).length > 0) {\n this._diag.debug('headers inject skipped due to CORS policy');\n }\n return;\n }\n var headers = {};\n api.propagation.inject(api.context.active(), headers);\n Object.keys(headers).forEach(function (key) {\n xhr.setRequestHeader(key, String(headers[key]));\n });\n };\n /**\n * Add cors pre flight child span\n * @param span\n * @param corsPreFlightRequest\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._addChildSpan = function (span, corsPreFlightRequest) {\n var _this = this;\n api.context.with(api.trace.setSpan(api.context.active(), span), function () {\n var childSpan = _this.tracer.startSpan('CORS Preflight', {\n startTime: corsPreFlightRequest[PTN.FETCH_START],\n });\n addSpanNetworkEvents(childSpan, corsPreFlightRequest);\n childSpan.end(corsPreFlightRequest[PTN.RESPONSE_END]);\n });\n };\n /**\n * Add attributes when span is going to end\n * @param span\n * @param xhr\n * @param spanUrl\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._addFinalSpanAttributes = function (span, xhrMem, spanUrl) {\n if (typeof spanUrl === 'string') {\n var parsedUrl = parseUrl(spanUrl);\n if (xhrMem.status !== undefined) {\n span.setAttribute(SemanticAttributes.HTTP_STATUS_CODE, xhrMem.status);\n }\n if (xhrMem.statusText !== undefined) {\n span.setAttribute(AttributeNames.HTTP_STATUS_TEXT, xhrMem.statusText);\n }\n span.setAttribute(SemanticAttributes.HTTP_HOST, parsedUrl.host);\n span.setAttribute(SemanticAttributes.HTTP_SCHEME, parsedUrl.protocol.replace(':', ''));\n // @TODO do we want to collect this or it will be collected earlier once only or\n // maybe when parent span is not available ?\n span.setAttribute(SemanticAttributes.HTTP_USER_AGENT, navigator.userAgent);\n }\n };\n XMLHttpRequestInstrumentation.prototype._applyAttributesAfterXHR = function (span, xhr) {\n var _this = this;\n var applyCustomAttributesOnSpan = this._getConfig().applyCustomAttributesOnSpan;\n if (typeof applyCustomAttributesOnSpan === 'function') {\n safeExecuteInTheMiddle(function () { return applyCustomAttributesOnSpan(span, xhr); }, function (error) {\n if (!error) {\n return;\n }\n _this._diag.error('applyCustomAttributesOnSpan', error);\n }, true);\n }\n };\n /**\n * will collect information about all resources created\n * between \"send\" and \"end\" with additional waiting for main resource\n * @param xhr\n * @param spanUrl\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._addResourceObserver = function (xhr, spanUrl) {\n var xhrMem = this._xhrMem.get(xhr);\n if (!xhrMem ||\n typeof PerformanceObserver !== 'function' ||\n typeof PerformanceResourceTiming !== 'function') {\n return;\n }\n xhrMem.createdResources = {\n observer: new PerformanceObserver(function (list) {\n var entries = list.getEntries();\n var parsedUrl = parseUrl(spanUrl);\n entries.forEach(function (entry) {\n if (entry.initiatorType === 'xmlhttprequest' &&\n entry.name === parsedUrl.href) {\n if (xhrMem.createdResources) {\n xhrMem.createdResources.entries.push(entry);\n }\n }\n });\n }),\n entries: [],\n };\n xhrMem.createdResources.observer.observe({\n entryTypes: ['resource'],\n });\n };\n /**\n * Clears the resource timings and all resources assigned with spans\n * when {@link XMLHttpRequestInstrumentationConfig.clearTimingResources} is\n * set to true (default false)\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._clearResources = function () {\n if (this._tasksCount === 0 && this._getConfig().clearTimingResources) {\n otperformance.clearResourceTimings();\n this._xhrMem = new WeakMap();\n this._usedResources = new WeakSet();\n }\n };\n /**\n * Finds appropriate resource and add network events to the span\n * @param span\n */\n XMLHttpRequestInstrumentation.prototype._findResourceAndAddNetworkEvents = function (xhrMem, span, spanUrl, startTime, endTime) {\n if (!spanUrl || !startTime || !endTime || !xhrMem.createdResources) {\n return;\n }\n var resources = xhrMem.createdResources.entries;\n if (!resources || !resources.length) {\n // fallback - either Observer is not available or it took longer\n // then OBSERVER_WAIT_TIME_MS and observer didn't collect enough\n // information\n // ts thinks this is the perf_hooks module, but it is the browser performance api\n resources = otperformance.getEntriesByType('resource');\n }\n var resource = getResource(parseUrl(spanUrl).href, startTime, endTime, resources, this._usedResources);\n if (resource.mainRequest) {\n var mainRequest = resource.mainRequest;\n this._markResourceAsUsed(mainRequest);\n var corsPreFlightRequest = resource.corsPreFlightRequest;\n if (corsPreFlightRequest) {\n this._addChildSpan(span, corsPreFlightRequest);\n this._markResourceAsUsed(corsPreFlightRequest);\n }\n addSpanNetworkEvents(span, mainRequest);\n }\n };\n /**\n * Removes the previous information about span.\n * This might happened when the same xhr is used again.\n * @param xhr\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._cleanPreviousSpanInformation = function (xhr) {\n var xhrMem = this._xhrMem.get(xhr);\n if (xhrMem) {\n var callbackToRemoveEvents = xhrMem.callbackToRemoveEvents;\n if (callbackToRemoveEvents) {\n callbackToRemoveEvents();\n }\n this._xhrMem.delete(xhr);\n }\n };\n /**\n * Creates a new span when method \"open\" is called\n * @param xhr\n * @param url\n * @param method\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._createSpan = function (xhr, url, method) {\n var _a;\n if (isUrlIgnored(url, this._getConfig().ignoreUrls)) {\n this._diag.debug('ignoring span as url matches ignored url');\n return;\n }\n var spanName = method.toUpperCase();\n var currentSpan = this.tracer.startSpan(spanName, {\n kind: api.SpanKind.CLIENT,\n attributes: (_a = {},\n _a[SemanticAttributes.HTTP_METHOD] = method,\n _a[SemanticAttributes.HTTP_URL] = parseUrl(url).toString(),\n _a),\n });\n currentSpan.addEvent(EventNames.METHOD_OPEN);\n this._cleanPreviousSpanInformation(xhr);\n this._xhrMem.set(xhr, {\n span: currentSpan,\n spanUrl: url,\n });\n return currentSpan;\n };\n /**\n * Marks certain [resource]{@link PerformanceResourceTiming} when information\n * from this is used to add events to span.\n * This is done to avoid reusing the same resource again for next span\n * @param resource\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._markResourceAsUsed = function (resource) {\n this._usedResources.add(resource);\n };\n /**\n * Patches the method open\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._patchOpen = function () {\n var _this = this;\n return function (original) {\n var plugin = _this;\n return function patchOpen() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var method = args[0];\n var url = args[1];\n plugin._createSpan(this, url, method);\n return original.apply(this, args);\n };\n };\n };\n /**\n * Patches the method send\n * @private\n */\n XMLHttpRequestInstrumentation.prototype._patchSend = function () {\n var plugin = this;\n function endSpanTimeout(eventName, xhrMem, performanceEndTime, endTime) {\n var callbackToRemoveEvents = xhrMem.callbackToRemoveEvents;\n if (typeof callbackToRemoveEvents === 'function') {\n callbackToRemoveEvents();\n }\n var span = xhrMem.span, spanUrl = xhrMem.spanUrl, sendStartTime = xhrMem.sendStartTime;\n if (span) {\n plugin._findResourceAndAddNetworkEvents(xhrMem, span, spanUrl, sendStartTime, performanceEndTime);\n span.addEvent(eventName, endTime);\n plugin._addFinalSpanAttributes(span, xhrMem, spanUrl);\n span.end(endTime);\n plugin._tasksCount--;\n }\n plugin._clearResources();\n }\n function endSpan(eventName, xhr) {\n var xhrMem = plugin._xhrMem.get(xhr);\n if (!xhrMem) {\n return;\n }\n xhrMem.status = xhr.status;\n xhrMem.statusText = xhr.statusText;\n plugin._xhrMem.delete(xhr);\n if (xhrMem.span) {\n plugin._applyAttributesAfterXHR(xhrMem.span, xhr);\n }\n var performanceEndTime = hrTime();\n var endTime = Date.now();\n // the timeout is needed as observer doesn't have yet information\n // when event \"load\" is called. Also the time may differ depends on\n // browser and speed of computer\n setTimeout(function () {\n endSpanTimeout(eventName, xhrMem, performanceEndTime, endTime);\n }, OBSERVER_WAIT_TIME_MS);\n }\n function onError() {\n endSpan(EventNames.EVENT_ERROR, this);\n }\n function onAbort() {\n endSpan(EventNames.EVENT_ABORT, this);\n }\n function onTimeout() {\n endSpan(EventNames.EVENT_TIMEOUT, this);\n }\n function onLoad() {\n if (this.status < 299) {\n endSpan(EventNames.EVENT_LOAD, this);\n }\n else {\n endSpan(EventNames.EVENT_ERROR, this);\n }\n }\n function unregister(xhr) {\n xhr.removeEventListener('abort', onAbort);\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('load', onLoad);\n xhr.removeEventListener('timeout', onTimeout);\n var xhrMem = plugin._xhrMem.get(xhr);\n if (xhrMem) {\n xhrMem.callbackToRemoveEvents = undefined;\n }\n }\n return function (original) {\n return function patchSend() {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var xhrMem = plugin._xhrMem.get(this);\n if (!xhrMem) {\n return original.apply(this, args);\n }\n var currentSpan = xhrMem.span;\n var spanUrl = xhrMem.spanUrl;\n if (currentSpan && spanUrl) {\n api.context.with(api.trace.setSpan(api.context.active(), currentSpan), function () {\n plugin._tasksCount++;\n xhrMem.sendStartTime = hrTime();\n currentSpan.addEvent(EventNames.METHOD_SEND);\n _this.addEventListener('abort', onAbort);\n _this.addEventListener('error', onError);\n _this.addEventListener('load', onLoad);\n _this.addEventListener('timeout', onTimeout);\n xhrMem.callbackToRemoveEvents = function () {\n unregister(_this);\n if (xhrMem.createdResources) {\n xhrMem.createdResources.observer.disconnect();\n }\n };\n plugin._addHeaders(_this, spanUrl);\n plugin._addResourceObserver(_this, spanUrl);\n });\n }\n return original.apply(this, args);\n };\n };\n };\n /**\n * implements enable function\n */\n XMLHttpRequestInstrumentation.prototype.enable = function () {\n this._diag.debug('applying patch to', this.moduleName, this.version);\n if (isWrapped(XMLHttpRequest.prototype.open)) {\n this._unwrap(XMLHttpRequest.prototype, 'open');\n this._diag.debug('removing previous patch from method open');\n }\n if (isWrapped(XMLHttpRequest.prototype.send)) {\n this._unwrap(XMLHttpRequest.prototype, 'send');\n this._diag.debug('removing previous patch from method send');\n }\n this._wrap(XMLHttpRequest.prototype, 'open', this._patchOpen());\n this._wrap(XMLHttpRequest.prototype, 'send', this._patchSend());\n };\n /**\n * implements disable function\n */\n XMLHttpRequestInstrumentation.prototype.disable = function () {\n this._diag.debug('removing patch from', this.moduleName, this.version);\n this._unwrap(XMLHttpRequest.prototype, 'open');\n this._unwrap(XMLHttpRequest.prototype, 'send');\n this._tasksCount = 0;\n this._xhrMem = new WeakMap();\n this._usedResources = new WeakSet();\n };\n return XMLHttpRequestInstrumentation;\n}(InstrumentationBase));\nexport { XMLHttpRequestInstrumentation };\n//# sourceMappingURL=xhr.js.map","/*\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 { DocumentLoadInstrumentation } from '@opentelemetry/instrumentation-document-load';\nimport { FetchInstrumentation } from '@opentelemetry/instrumentation-fetch';\nimport { UserInteractionInstrumentation } from '@opentelemetry/instrumentation-user-interaction';\nimport { XMLHttpRequestInstrumentation } from '@opentelemetry/instrumentation-xml-http-request';\nvar InstrumentationMap = {\n '@opentelemetry/instrumentation-document-load': DocumentLoadInstrumentation,\n '@opentelemetry/instrumentation-fetch': FetchInstrumentation,\n '@opentelemetry/instrumentation-user-interaction': UserInteractionInstrumentation,\n '@opentelemetry/instrumentation-xml-http-request': XMLHttpRequestInstrumentation,\n};\nexport function getWebAutoInstrumentations(inputConfigs) {\n var _a;\n if (inputConfigs === void 0) { inputConfigs = {}; }\n for (var _i = 0, _b = Object.keys(inputConfigs); _i < _b.length; _i++) {\n var name_1 = _b[_i];\n if (!Object.prototype.hasOwnProperty.call(InstrumentationMap, name_1)) {\n diag.error(\"Provided instrumentation name \\\"\" + name_1 + \"\\\" not found\");\n continue;\n }\n }\n var instrumentations = [];\n for (var _c = 0, _d = Object.keys(InstrumentationMap); _c < _d.length; _c++) {\n var name_2 = _d[_c];\n var Instance = InstrumentationMap[name_2];\n // Defaults are defined by the instrumentation itself\n var userConfig = (_a = inputConfigs[name_2]) !== null && _a !== void 0 ? _a : {};\n if (userConfig.enabled === false) {\n diag.debug(\"Disabling instrumentation for \" + name_2);\n continue;\n }\n try {\n diag.debug(\"Loading instrumentation for \" + name_2);\n instrumentations.push(new Instance(userConfig));\n }\n catch (e) {\n diag.error(e);\n }\n }\n return instrumentations;\n}\n//# sourceMappingURL=utils.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { ExportResultCode } from \"@opentelemetry/core\";\nimport { createExportLogsServiceRequest } from \"@opentelemetry/otlp-transformer\";\n// We currently use this class to export logs with open-telemetry as the default log exporter use XHR which is blocked\n// By worker service (mv3), with this class we use fetch to report the logs specifically\n// There is PR open to fix the issue in open-telemetry, we definitely should move when it merged :\n// https://github.com/open-telemetry/opentelemetry-js/pull/3542\nvar CustomFetchLogExporter = /** @class */ (function () {\n function CustomFetchLogExporter(url) {\n this.url = url;\n }\n CustomFetchLogExporter.prototype.export = function (logs, resultCallback) {\n return __awaiter(this, void 0, void 0, function () {\n var exportRequest, body, response, error_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n exportRequest = createExportLogsServiceRequest(logs, {\n useLongBits: false,\n });\n body = JSON.stringify(exportRequest);\n return [4 /*yield*/, fetch(this.url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: body,\n })];\n case 1:\n response = _a.sent();\n if (response.ok) {\n resultCallback({ code: ExportResultCode.SUCCESS });\n }\n else {\n resultCallback({ code: ExportResultCode.FAILED });\n }\n return [3 /*break*/, 3];\n case 2:\n error_1 = _a.sent();\n resultCallback({ code: ExportResultCode.FAILED });\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n CustomFetchLogExporter.prototype.shutdown = function () {\n // None any specific clean up, if we need any we can add it here before Promise.resolve\n return Promise.resolve();\n };\n return CustomFetchLogExporter;\n}());\nexport { CustomFetchLogExporter };\n","import opentelemetry from \"@opentelemetry/api\";\nimport { MeterProvider, PeriodicExportingMetricReader, } from \"@opentelemetry/sdk-metrics\";\nimport { OTLPMetricExporter } from \"@opentelemetry/exporter-metrics-otlp-http\";\nimport { BatchSpanProcessor } from \"@opentelemetry/sdk-trace-base\";\nimport { TraceIdRatioBasedSampler, WebTracerProvider, } from \"@opentelemetry/sdk-trace-web\";\nimport { OTLPTraceExporter } from \"@opentelemetry/exporter-trace-otlp-http\";\nimport { Resource } from \"@opentelemetry/resources\";\nimport { SemanticResourceAttributes } from \"@opentelemetry/semantic-conventions\";\nimport { OTLPLogExporter } from \"@opentelemetry/exporter-logs-otlp-http\";\nimport { BatchLogRecordProcessor, LoggerProvider, } from \"@opentelemetry/sdk-logs\";\nimport AI21Logger from \"./ai21-logger\";\nimport { getWebAutoInstrumentations } from \"@opentelemetry/auto-instrumentations-web\";\nimport { registerInstrumentations } from \"@opentelemetry/instrumentation\";\nimport { CustomFetchLogExporter } from \"./custom-fetch-log-exporter\";\nvar AI21OpenTelemetry = /** @class */ (function () {\n function AI21OpenTelemetry(_a) {\n var _b, _c, _d;\n var _e = _a === void 0 ? {\n samplingRatio: 1,\n } : _a, samplingRatio = _e.samplingRatio, serviceName = _e.serviceName, serviceVersion = _e.serviceVersion, tracingConfig = _e.tracingConfig, loggingConfig = _e.loggingConfig, meterConfig = _e.meterConfig, shouldUseFetchCustomLogExporter = _e.shouldUseFetchCustomLogExporter;\n this.serviceName = serviceName || \"\";\n this.serviceVersion = serviceVersion || \"0.0.0\";\n this.loggingUrl = (loggingConfig === null || loggingConfig === void 0 ? void 0 : loggingConfig.url) || \"\";\n this.tracingUrl = (tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.url) || \"\";\n this.meterUrl = (meterConfig === null || meterConfig === void 0 ? void 0 : meterConfig.url) || \"\";\n this.shouldUseFetchCustomLogExporter =\n shouldUseFetchCustomLogExporter || false;\n registerInstrumentations({\n instrumentations: [\n getWebAutoInstrumentations({\n // load custom configuration for xml-http-request instrumentation\n \"@opentelemetry/instrumentation-xml-http-request\": {\n propagateTraceHeaderCorsUrls: (tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.propagateUrls) || [\n new RegExp(\"api.wordtune\"),\n ],\n ignoreUrls: (tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.ignoreUrls) || [\n new RegExp(\"api.wordtune[^/]*/identity\"),\n ],\n },\n }),\n ],\n });\n var tracerProvider = new WebTracerProvider({\n sampler: new TraceIdRatioBasedSampler(samplingRatio),\n resource: new Resource((_b = {},\n _b[SemanticResourceAttributes.SERVICE_NAME] = this.serviceName,\n _b[SemanticResourceAttributes.SERVICE_VERSION] = this.serviceVersion,\n _b)),\n });\n var exporter = new OTLPTraceExporter({\n url: this.tracingUrl,\n headers: {},\n concurrencyLimit: 10, // an optional limit on pending requests\n });\n var processor = new BatchSpanProcessor(exporter);\n // FIXME: this is just a workaround for a bug in the opentelemetry sdk\n //@ts-ignore\n tracerProvider.addSpanProcessor(processor);\n tracerProvider.register();\n this.tracerProvider = tracerProvider;\n var metricExporter = new OTLPMetricExporter({\n url: this.meterUrl,\n headers: {},\n concurrencyLimit: 1,\n });\n this.meterProvider = new MeterProvider({\n resource: new Resource((_c = {},\n _c[SemanticResourceAttributes.SERVICE_NAME] = this.serviceName,\n _c[SemanticResourceAttributes.SERVICE_VERSION] = this.serviceVersion,\n _c)),\n });\n this.meterProvider.addMetricReader(new PeriodicExportingMetricReader({\n exporter: metricExporter,\n exportIntervalMillis: (meterConfig === null || meterConfig === void 0 ? void 0 : meterConfig.interval) || 10000,\n }));\n // exporter options. see all options in OTLPExporterConfigBase\n var collectorOptions = {\n url: this.loggingUrl,\n headers: {},\n concurrencyLimit: 1, // an optional limit on pending requests\n };\n var logExporter = this.shouldUseFetchCustomLogExporter\n ? new CustomFetchLogExporter(this.loggingUrl)\n : new OTLPLogExporter(collectorOptions);\n var loggerProvider = new LoggerProvider({\n resource: new Resource((_d = {},\n _d[SemanticResourceAttributes.SERVICE_NAME] = this.serviceName,\n _d[SemanticResourceAttributes.SERVICE_VERSION] = this.serviceVersion,\n _d)),\n });\n loggerProvider.addLogRecordProcessor(new BatchLogRecordProcessor(logExporter));\n this.loggerProvider = loggerProvider;\n }\n AI21OpenTelemetry.prototype.getTracer = function (name) {\n return opentelemetry.trace.getTracer(name);\n };\n AI21OpenTelemetry.prototype.getLogger = function (name) {\n var otelLogger = this.loggerProvider.getLogger(name);\n return new AI21Logger({ otelLogger: otelLogger });\n };\n AI21OpenTelemetry.prototype.getMeter = function (name) {\n return this.meterProvider.getMeter(name);\n };\n AI21OpenTelemetry.prototype.forceFlush = function () {\n return Promise.allSettled([\n this.loggerProvider.forceFlush(),\n this.meterProvider.forceFlush(),\n ]);\n };\n return AI21OpenTelemetry;\n}());\nexport default AI21OpenTelemetry;\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { SeverityNumber } from \"@ai21/telemetry\";\nimport { ValueType } from \"@opentelemetry/api\";\nvar TelemetryClient = /** @class */ (function () {\n function TelemetryClient() {\n }\n TelemetryClient.init = function (instance, options) {\n TelemetryClient.instance = instance;\n TelemetryClient.clientIdentifier = options.clientIdentifier;\n TelemetryClient.allowDebug = !!options.debug;\n };\n TelemetryClient.log = function (logParams) {\n var _a;\n var attributes = __assign({ source: \"Experiment SDK\" }, logParams.attributes);\n var body = \"[Experiment SDK] \".concat(logParams.body);\n (_a = TelemetryClient.instance) === null || _a === void 0 ? void 0 : _a.getLogger(TelemetryClient.clientIdentifier).emit(__assign(__assign({}, logParams), { attributes: attributes, body: body }));\n };\n TelemetryClient.info = function (body, attributes) {\n if (attributes === void 0) { attributes = {}; }\n TelemetryClient.log({ attributes: attributes, body: body, severityNumber: SeverityNumber.INFO });\n };\n TelemetryClient.debug = function (body, attributes) {\n if (attributes === void 0) { attributes = {}; }\n if (!TelemetryClient.allowDebug) {\n return;\n }\n TelemetryClient.log({ attributes: attributes, body: body, severityNumber: SeverityNumber.DEBUG });\n console.debug(\"[Experiment SDK] \".concat(body), attributes);\n };\n TelemetryClient.warning = function (body, error, attributes) {\n if (attributes === void 0) { attributes = {}; }\n TelemetryClient.log({ attributes: attributes, error: error, body: body, severityNumber: SeverityNumber.WARN });\n };\n TelemetryClient.error = function (body, error, attributes) {\n if (attributes === void 0) { attributes = {}; }\n TelemetryClient.log({ attributes: attributes, error: error, body: body, severityNumber: SeverityNumber.ERROR });\n };\n TelemetryClient.getIntCounter = function (counterName) {\n var _a;\n return (_a = TelemetryClient.instance) === null || _a === void 0 ? void 0 : _a.getMeter(TelemetryClient.clientIdentifier).createCounter(counterName, { valueType: ValueType.INT });\n };\n return TelemetryClient;\n}());\nexport default TelemetryClient;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { Experiment as AmplitudeExperiment, } from \"@amplitude/experiment-js-client\";\nimport TelemetryClient from \"./TelemetryClient\";\nvar ExposureTracker = /** @class */ (function () {\n function ExposureTracker(trackEvent) {\n this.trackEvent = trackEvent;\n }\n ExposureTracker.prototype.track = function (exposure) {\n if (!exposure)\n return;\n this.trackEvent(\"$exposure\", {\n flag_key: exposure.flag_key,\n variant: exposure.variant,\n experiment_key: exposure.experiment_key,\n });\n };\n return ExposureTracker;\n}());\nexport { ExposureTracker };\nvar AmplitudeExperimentProvider = /** @class */ (function () {\n function AmplitudeExperimentProvider(config) {\n AmplitudeExperimentProvider._instance = AmplitudeExperiment.initializeWithAmplitudeAnalytics(config.amplitudeExperimentApiKey, {\n automaticExposureTracking: true,\n automaticFetchOnAmplitudeIdentityChange: true,\n debug: config.debug,\n exposureTrackingProvider: new ExposureTracker(config.trackEvent),\n fetchOnStart: false,\n fetchTimeoutMillis: 10000,\n pollOnStart: false,\n serverUrl: \"\".concat(config.amplitudeServerUrl),\n flagsServerUrl: \"\".concat(config.amplitudeFlagsServerUrl),\n });\n }\n /**\n * @see {@link ExperimentProvider.init}\n */\n AmplitudeExperimentProvider.prototype.init = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n TelemetryClient.debug(\"amplitude init called\");\n return [4 /*yield*/, AmplitudeExperimentProvider._instance.start()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n *\n * In charge of setting Assignment user properties on Amplitude.\n *\n * @see {@link ExperimentProvider.fetch}\n */\n AmplitudeExperimentProvider.prototype.fetch = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n TelemetryClient.debug(\"amplitude fetch called\");\n return [4 /*yield*/, AmplitudeExperimentProvider._instance.fetch()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n /**\n * In charge of tracking required `$exposure` event for Amplitude.\n *\n * @see {@link ExperimentProvider.getVariant}\n */\n AmplitudeExperimentProvider.prototype.getVariant = function (flagKey) {\n TelemetryClient.debug(\"amplitude getVariant called\");\n var variant = AmplitudeExperimentProvider._instance.variant(flagKey);\n // in amplitude, in case the user isn't allocated for an experiment,\n // their SDK returns an empty object.\n if (!variant.value) {\n return;\n }\n return {\n value: variant.value,\n payload: variant.payload,\n };\n };\n /**\n * WARNING: this method is NOT in charge of tracking required `$exposure` event for Amplitude.\n * When calling this method, you will need to handle exposure event tracking on the client side.\n *\n * @see {@link ExperimentProvider.allVariants}\n */\n AmplitudeExperimentProvider.prototype.allVariants = function () {\n TelemetryClient.debug(\"amplitude allVariants called\");\n var allVariants = AmplitudeExperimentProvider._instance.all();\n // We filter out variants returned from Amplitude SDK with undefined value.\n return Object.fromEntries(Object.entries(allVariants)\n .filter(function (_a) {\n var _ = _a[0], variant = _a[1];\n return !!variant.value;\n })\n .map(function (_a) {\n var key = _a[0], variant = _a[1];\n return [\n key,\n {\n value: variant.value,\n payload: variant.payload,\n },\n ];\n }));\n };\n return AmplitudeExperimentProvider;\n}());\nexport default AmplitudeExperimentProvider;\n","import TelemetryClient from \"../TelemetryClient\";\nexport var initSdkCounter;\nexport var initExperimentProviderInvokedCounter;\nexport var initExperimentProviderFailedCounter;\nexport var fetchVariantsInvokedCounter;\nexport var fetchVariantsFailedCounter;\nexport var getVariantInvokedCounter;\nexport var getVariantReturnedFallbackCounter;\nexport var allVariantsInvokedCounter;\nexport var initCounters = function () {\n initSdkCounter = TelemetryClient.getIntCounter(\"initExperimentSDK\");\n initExperimentProviderInvokedCounter = TelemetryClient.getIntCounter(\"initExperimentProvider\");\n initExperimentProviderFailedCounter = TelemetryClient.getIntCounter(\"initExperimentProviderFailed\");\n fetchVariantsInvokedCounter = TelemetryClient.getIntCounter(\"fetchExperimentVariants\");\n fetchVariantsFailedCounter = TelemetryClient.getIntCounter(\"fetchExperimentVariantsFailed\");\n getVariantInvokedCounter = TelemetryClient.getIntCounter(\"getVariant\");\n getVariantReturnedFallbackCounter = TelemetryClient.getIntCounter(\"getVariantReturnedFallback\");\n allVariantsInvokedCounter = TelemetryClient.getIntCounter(\"allVariants\");\n};\n","import TelemetryClient from \"./TelemetryClient\";\nimport { allVariantsInvokedCounter, getVariantInvokedCounter, getVariantReturnedFallbackCounter, } from \"./utils/counters\";\n/**\n * A client for getting `Variant`s.\n */\nvar VariantsClient = /** @class */ (function () {\n function VariantsClient(experimentProvider) {\n this.experimentProvider = experimentProvider;\n }\n /**\n * Returns a Variant for the relevant flag key.\n *\n * Access the variant from the {@link ExperimentProvider},\n * falling back on the given fallbackVariant.\n *\n * Manages analytics report (if needed) and telemetry.\n *\n * @param {string} flagKey The key to get the variant for.\n * @param {Variant} fallbackVariant The highest priority fallback\n * @return {Variant | undefined} The relevant variant, if exists.\n */\n VariantsClient.prototype.get = function (flagKey, fallbackVariant) {\n TelemetryClient.debug(\"Variants get called\", { flagKey: flagKey });\n getVariantInvokedCounter === null || getVariantInvokedCounter === void 0 ? void 0 : getVariantInvokedCounter.add(1);\n var variant = this.experimentProvider.getVariant(flagKey);\n if (!variant) {\n getVariantReturnedFallbackCounter === null || getVariantReturnedFallbackCounter === void 0 ? void 0 : getVariantReturnedFallbackCounter.add(1);\n TelemetryClient.debug(\"Got fallback variant\", {\n variant: fallbackVariant === null || fallbackVariant === void 0 ? void 0 : fallbackVariant.value,\n });\n TelemetryClient.debug(\"No variant was found for `flagKey`, returning fallback variant\", {\n flagKey: flagKey,\n fallbackHasValue: !!fallbackVariant,\n });\n return fallbackVariant;\n }\n TelemetryClient.debug(\"Got variant\", { variant: variant.value });\n return variant;\n };\n /**\n * Returns all Variants.\n *\n * Access the variants from the {@link ExperimentProvider}.\n *\n * Manages telemetry.\n *\n * @return {Variants} The relevant variant, if exists.\n */\n VariantsClient.prototype.all = function () {\n TelemetryClient.debug(\"Variants all called\");\n allVariantsInvokedCounter === null || allVariantsInvokedCounter === void 0 ? void 0 : allVariantsInvokedCounter.add(1);\n var allVariants = this.experimentProvider.allVariants();\n TelemetryClient.debug(\"Got all variants\");\n return allVariants;\n };\n return VariantsClient;\n}());\nexport default VariantsClient;\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport AmplitudeExperimentProvider from \"./AmplitudeExperimentProvider\";\nimport VariantsClient from \"./VariantsClient\";\nimport TelemetryClient from \"./TelemetryClient\";\nimport { fetchVariantsInvokedCounter, fetchVariantsFailedCounter, initCounters, initExperimentProviderInvokedCounter, initExperimentProviderFailedCounter, initSdkCounter, } from \"./utils/counters\";\n/**\n * A client used to fetch Experiments / Feature flags variations.\n */\nvar ExperimentClient = /** @class */ (function () {\n function ExperimentClient(config) {\n this.didInitExperimentProvider = false;\n this.clientIdentifier = config.clientIdentifier;\n this.experimentProvider = this.getExperimentProvider(config);\n }\n ExperimentClient.getInstance = function (config) {\n if (!ExperimentClient._instance) {\n ExperimentClient._instance = new ExperimentClient(config);\n }\n return ExperimentClient._instance;\n };\n ExperimentClient.prototype.getExperimentProvider = function (config) {\n var experimentProvider = config.experimentProvider, amplitudeExperimentApiKey = config.amplitudeExperimentApiKey, trackEvent = config.trackEvent, debug = config.debug, amplitudeServerUrl = config.amplitudeServerUrl, amplitudeFlagsServerUrl = config.amplitudeFlagsServerUrl;\n if (experimentProvider) {\n return experimentProvider;\n }\n return new AmplitudeExperimentProvider({\n amplitudeExperimentApiKey: amplitudeExperimentApiKey,\n debug: !!debug,\n trackEvent: trackEvent,\n amplitudeServerUrl: amplitudeServerUrl,\n amplitudeFlagsServerUrl: amplitudeFlagsServerUrl,\n });\n };\n ExperimentClient.prototype.initExperimentProvider = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n TelemetryClient.debug(\"initExperimentProvider called\");\n initExperimentProviderInvokedCounter === null || initExperimentProviderInvokedCounter === void 0 ? void 0 : initExperimentProviderInvokedCounter.add(1);\n return [4 /*yield*/, this.experimentProvider.init()];\n case 1:\n _a.sent();\n this.didInitExperimentProvider = true;\n return [3 /*break*/, 3];\n case 2:\n e_1 = _a.sent();\n TelemetryClient.error(\"Failed initializing experiment provider\", e_1);\n initExperimentProviderFailedCounter === null || initExperimentProviderFailedCounter === void 0 ? void 0 : initExperimentProviderFailedCounter.add(1);\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Returns a Variants client.\n *\n * On the first call, initializes relevant experiment provider.\n *\n * @return {VariantsClient} Variants client\n * @see VariantsClient\n */\n ExperimentClient.prototype.fetchVariants = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e_2;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 4, , 5]);\n TelemetryClient.debug(\"fetchVariants called\");\n if (!!this.didInitExperimentProvider) return [3 /*break*/, 2];\n return [4 /*yield*/, this.initExperimentProvider()];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2:\n fetchVariantsInvokedCounter === null || fetchVariantsInvokedCounter === void 0 ? void 0 : fetchVariantsInvokedCounter.add(1);\n return [4 /*yield*/, this.experimentProvider.fetch()];\n case 3:\n _a.sent();\n return [3 /*break*/, 5];\n case 4:\n e_2 = _a.sent();\n TelemetryClient.error(\"Failed fetching experiment provider variants\", e_2);\n fetchVariantsFailedCounter === null || fetchVariantsFailedCounter === void 0 ? void 0 : fetchVariantsFailedCounter.add(1);\n return [3 /*break*/, 5];\n case 5: return [2 /*return*/, new VariantsClient(this.experimentProvider)];\n }\n });\n });\n };\n return ExperimentClient;\n}());\nexport { ExperimentClient };\nexport var createExperimentClient = function (config) {\n var clientIdentifier = config.clientIdentifier, telemetryInstance = config.telemetryInstance, debug = config.debug;\n if (telemetryInstance) {\n TelemetryClient.init(telemetryInstance, { clientIdentifier: clientIdentifier, debug: debug });\n initCounters();\n }\n initSdkCounter === null || initSdkCounter === void 0 ? void 0 : initSdkCounter.add(1);\n return ExperimentClient.getInstance(config);\n};\n"],"names":["extendStatics","d","b","p","__extends","__","__assign","s","i","n","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","t","f","y","g","verb","v","op","__values","o","m","__read","r","ar","error","__spreadArray","to","from","pack","l","EvaluationOperator","stringToUtf8ByteArray","str","out","c","C1_32","C2_32","R1_32","R2_32","M_32","N_32","hash32x86","input","seed","data","length","nBlocks","hash","index_1","k","readIntLe","mix32","index","k1","rotateLeft","fmix32","kResult","hashResult","x","width","mask","reverseBytes","select","selectable","selector","e_1","_a","selector_1","selector_1_1","selectorElement","e_1_1","MAJOR_MINOR_REGEX","PATCH_REGEX","PRERELEASE_REGEX","VERSION_PATTERN","SemanticVersion","major","minor","patch","preRelease","version","matchGroup","other","EvaluationEngine","context","flags","results","target","flags_1","flags_1_1","flag","variant","e_2","_b","_c","segment","metadata","e_2_1","variantKey","match","conditions","e_3","e_4","conditions_1","conditions_1_1","innerConditions","innerConditions_1","innerConditions_1_1","condition","e_4_1","e_3_1","propValue","propValueStringList","propValueString","key","e_5","e_6","bucketingValue","keyToHash","allocationValue","distributionValue","_d","allocation","allocationStart","allocationEnd","_e","_f","distribution","distributionStart","distributionEnd","e_6_1","e_5_1","filterValues","containsNone","propValues","_this","lower_1","e_7","filterValues_1","filterValues_1_1","filterValue","e_7_1","typeTransformer","typeComparator","propValueTransformed","filterValuesTransformed","filterValueTransformed","compareTo","anyArray","stringValue","parsedValue","xa","ya","xs","ys","e_8","filterValues_2","filterValues_2_1","e_8_1","e_9","filterValues_3","filterValues_3_1","e_9_1","topologicalSort","flagKeys","available","startingKeys","startingKeys_1","startingKeys_1_1","flagKey","traversal","parentTraversal","path","_loop_1","parentKey","VERSION","_hasatob","_hasbtoa","_hasBuffer","_TD","_TE","b64ch","b64chs","b64tab","a","tab","b64re","_fromCC","_U8Afrom","it","_mkUriSafe","src","m0","_tidyB64","btoaPolyfill","bin","u32","c0","c1","c2","asc","pad","_btoa","_fromUint8Array","u8a","strs","fromUint8Array","urlsafe","cb_utob","cc","re_utob","utob","u","_encode","encode","encodeURI","re_btou","cb_btou","cccc","cp","offset","btou","atobPolyfill","u24","r1","r2","_atob","_toUint8Array","toUint8Array","_unURI","_decode","decode","isValid","_noEnum","extendString","_add","name","extendUint8Array","extendBuiltins","gBase64","FetchError","_super","statusCode","message","TimeoutError","SdkEvaluationApi","deploymentKey","serverUrl","httpClient","user","options","userJsonBase64","headers","url","response","SdkFlagApi","flagsArray","map","safeGlobal","getGlobalScope","isLocalStorageAvailable","globalScope","testKey","Poller","action","ms","window","undefined","LIBVERSION","EMPTY","UNKNOWN","FUNC_TYPE","UNDEF_TYPE","OBJ_TYPE","STR_TYPE","MAJOR","MODEL","NAME","TYPE","VENDOR","ARCHITECTURE","CONSOLE","MOBILE","TABLET","SMARTTV","WEARABLE","EMBEDDED","UA_MAX_LENGTH","AMAZON","APPLE","ASUS","BLACKBERRY","BROWSER","CHROME","EDGE","FIREFOX","GOOGLE","HUAWEI","LG","MICROSOFT","MOTOROLA","OPERA","SAMSUNG","SHARP","SONY","XIAOMI","ZEBRA","FACEBOOK","extend","regexes","extensions","mergedRegexes","enumerize","arr","enums","has","str1","str2","lowerize","majorize","trim","len","rgxMapper","ua","arrays","j","q","matches","regex","props","strMapper","oldSafariMap","windowsVersionMap","UAParser","_ua","_rgxmap","_browser","_cpu","_device","_engine","_os","module","exports","$","parser","prop","this","parseAmplitudeCookie","apiKey","newFormat","generateKey","cookies","cookies_1","cookies_1_1","cookie","cookieKey","cookieValue","decoding","values","userId","parseAmplitudeLocalStorage","state","parseAmplitudeSessionStorage","AmplitudeIntegrationPlugin","connector","timeoutMillis","config","client","identity","event","editor","listener","unfetch","fetch","timeout","promise","_request","requestUrl","method","call","simpleResponse","WrapperClient","request","FetchHttpClient","Source","VariantSource","isFallback","source","Defaults","MAX_QUEUE_SIZE","IntegrationManager","instanceName","PersistentTrackingQueue","SessionDedupeCache","integration","exposure","event_1","isSessionStorageAvailable","shouldTrack","storedCache","maxQueueSize","tracker","event_2","storedQueue","LocalStorage","getVariantStorage","storage","truncatedDeployment","namespace","LoadStoreCache","transformVariantFromStorage","getFlagStorage","transformer","rawValues","jsonValues","storageValue","payload","experimentKey","exposureEvent","userProperty","isNullOrUndefined","isNullUndefinedOrEmpty","isLocalEvaluationMode","Backoff","attempts","min","max","scalar","fn","attempt","delay","nextAttempt","nextDelay","convertUserToContext","groups","groupType","groupNames","groupName","groupNameMap","groupProperties","convertVariant","convertEvaluationVariantToVariant","evaluationVariant","SessionAnalyticsProvider","analyticsProvider","SessionExposureTrackingProvider","exposureTrackingProvider","trackedExposure","fetchBackoffTimeout","fetchBackoffAttempts","fetchBackoffMinMillis","fetchBackoffMaxMillis","fetchBackoffScalar","flagPollerIntervalMillis","euServerUrl","euFlagsServerUrl","ExperimentClient","flagsReadyPromise","fetchOnStart","fallback","sourceVariant","evaluatedVariants","userPropertiesCopy","userProvider","initialFlags","evaluationVariants","variants","defaultSourceVariant","isLocalEvaluationDefault","initialVariant","fallbackVariant","fallbackSourceVariant","localStorageVariant","isLocalStorageDefault","initialVariantsVariant","retry","cleanedUser","failedFlagKeys","this_1","providedUser","integrationUser","mergedUserProperties","_g","_h","_j","trackExposure","optionalParams","_i","plugin","SessionStorage","DefaultUserProvider","browser","sessionUser","localUser","params","name_1","acc","instances","getInstanceName","initialize","internalInstanceNameSuffix","instanceKey","initializeWithAmplitudeAnalytics","AnalyticsConnector","Experiment","_globalThis","re","_makeCompatibilityCheck","ownVersion","acceptedVersions","rejectedVersions","myVersionMatch","ownVersionParsed","globalVersion","_reject","_accept","globalVersionMatch","globalVersionParsed","isCompatible","GLOBAL_OPENTELEMETRY_API_KEY","_global","registerGlobal","type","instance","diag","allowOverride","api","err","getGlobal","unregisterGlobal","DiagComponentLogger","args","logProxy","funcName","logger","DiagLogLevel","createLogLevelDiagLogger","maxLevel","_filterFunc","theLevel","theFunc","API_NAME","DiagAPI","_logProxy","self","setLogger","optionsOrLogLevel","oldLogger","newLogger","stack","BaggageImpl","entries","entry","newBaggage","keys","keys_1","keys_1_1","baggageEntryMetadataSymbol","createBaggage","baggageEntryMetadataFromString","createContextKey","description","BaseContext","parentContext","ROOT_CONTEXT","NoopMeter","_name","_options","NOOP_HISTOGRAM_METRIC","NOOP_COUNTER_METRIC","NOOP_UP_DOWN_COUNTER_METRIC","NOOP_OBSERVABLE_GAUGE_METRIC","NOOP_OBSERVABLE_COUNTER_METRIC","NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC","_callback","_observables","NoopMetric","NoopCounterMetric","_value","_attributes","NoopUpDownCounterMetric","NoopHistogramMetric","NoopObservableMetric","NoopObservableCounterMetric","NoopObservableGaugeMetric","NoopObservableUpDownCounterMetric","NOOP_METER","createNoopMeter","ValueType","defaultTextMapGetter","carrier","defaultTextMapSetter","NoopContextManager","_context","NOOP_CONTEXT_MANAGER","ContextAPI","contextManager","TraceFlags","INVALID_SPANID","INVALID_TRACEID","INVALID_SPAN_CONTEXT","NonRecordingSpan","_spanContext","_key","_status","_endTime","_exception","_time","SPAN_KEY","getSpan","getActiveSpan","setSpan","span","deleteSpan","setSpanContext","spanContext","getSpanContext","VALID_TRACEID_REGEX","VALID_SPANID_REGEX","isValidTraceId","traceId","isValidSpanId","spanId","isSpanContextValid","wrapSpanContext","contextApi","NoopTracer","root","parentFromContext","isSpanContext","arg2","arg3","arg4","opts","ctx","contextWithSpanSet","NOOP_TRACER","ProxyTracer","_provider","_fn","tracer","NoopTracerProvider","_version","NOOP_TRACER_PROVIDER","ProxyTracerProvider","delegate","SamplingDecision","SpanKind","SpanStatusCode","NoopMeterProvider","NOOP_METER_PROVIDER","MetricsAPI","provider","metrics","NoopTextMapPropagator","_carrier","BAGGAGE_KEY","getBaggage","getActiveBaggage","setBaggage","baggage","deleteBaggage","NOOP_TEXT_MAP_PROPAGATOR","PropagationAPI","propagator","setter","getter","propagation","TraceAPI","success","trace","opentelemetry","AggregationTemporality","DataPointType","isNotNullish","item","hashAttributes","attributes","instrumentationScopeId","instrumentationScope","callWithTimeout","timeoutHandle","timeoutPromise","_resolve","reason","PromiseAllSettled","promises","ret","isPromiseAllSettledRejectionResult","FlatMap","setEquals","lhs","rhs","lhs_1","lhs_1_1","binarySearchUB","lo","hi","mid","equalsCaseInsensitive","AggregatorKind","DropAggregator","_previous","_delta","_current","_descriptor","_aggregationTemporality","_accumulationByAttributes","InstrumentType","createInstrumentDescriptor","isValidName","createInstrumentDescriptorWithView","view","instrument","isDescriptorCompatibleWith","descriptor","otherDescriptor","NAME_REGEXP","createNewEmptyCheckpoint","boundaries","counts","HistogramAccumulation","startTime","_boundaries","_recordMinMax","idx","HistogramAggregator","previous","delta","previousValue","deltaValue","previousCounts","deltaCounts","mergedCounts","current","currentValue","currentCounts","diffedCounts","aggregationTemporality","accumulationByAttributes","endTime","accumulation","pointValue","allowsNegativeValues","Buckets","backing","indexBase","indexStart","indexEnd","BucketsBacking","position","bias","bucketIndex","increment","decrement","by","size","each","inpos","outpos","pos","mod","dest","_counts","newSize","oldPositiveLimit","newPositiveLimit","tmp","limit","num","SIGNIFICAND_WIDTH","EXPONENT_MASK","SIGNIFICAND_MASK","EXPONENT_BIAS","MIN_NORMAL_EXPONENT","MAX_NORMAL_EXPONENT","MIN_VALUE","getNormalBase2","dv","hiBits","expBits","getSignificand","loBits","significandHiBits","ldexp","frac","exp","nextGreaterSquare","MappingError","ExponentMapping","scale","ieee754.MIN_VALUE","ieee754.getNormalBase2","correction","ieee754.getSignificand","ieee754.SIGNIFICAND_WIDTH","minIndex","maxIndex","util.ldexp","ieee754.MIN_NORMAL_EXPONENT","ieee754.MAX_NORMAL_EXPONENT","shift","LogarithmMapping","MIN_SCALE","MAX_SCALE","PREBUILT_MAPPINGS","getMapping","HighLow","low","high","h1","h2","DEFAULT_MAX_SIZE","MIN_MAX_SIZE","ExponentialHistogramAccumulation","_maxSize","_sum","_count","_zeroCount","_min","_max","_positive","_negative","_mapping","minScale","buckets","rescalingNeeded","change","needed","newScale","highLowPos","highLowNeg","currentScale","ours","theirs","theirOffset","theirChange","ourIndex","ExponentialHistogramAggregator","SUPPRESS_TRACING_KEY","suppressTracing","loggingErrorHandler","ex","stringifyException","flattenException","propertyName","delegateHandler","globalErrorHandler","TMP_PROCESS_RUNTIME_NAME","TMP_SERVICE_NAME","TMP_TELEMETRY_SDK_NAME","TMP_TELEMETRY_SDK_LANGUAGE","TMP_TELEMETRY_SDK_VERSION","SEMRESATTRS_PROCESS_RUNTIME_NAME","SEMRESATTRS_SERVICE_NAME","SEMRESATTRS_TELEMETRY_SDK_NAME","SEMRESATTRS_TELEMETRY_SDK_LANGUAGE","SEMRESATTRS_TELEMETRY_SDK_VERSION","TMP_TELEMETRYSDKLANGUAGEVALUES_WEBJS","TELEMETRYSDKLANGUAGEVALUES_WEBJS","SDK_INFO","NANOSECOND_DIGITS_IN_MILLIS","MILLISECONDS_TO_NANOSECONDS","millisToHrTime","epochMillis","epochSeconds","seconds","nanos","hrTimeToMicroseconds","time","ExportResultCode","_export","exporter","arg","internal","LastValueAccumulation","sampleTime","LastValueAggregator","latestAccumulation","SumAccumulation","monotonic","reset","SumAggregator","prevPv","deltaPv","currPv","Aggregation","DROP_AGGREGATION","SUM_AGGREGATION","LAST_VALUE_AGGREGATION","HISTOGRAM_AGGREGATION","EXPONENTIAL_HISTOGRAM_AGGREGATION","DEFAULT_AGGREGATION","DropAggregation","_instrument","SumAggregation","LastValueAggregation","HistogramAggregation","ExplicitBucketHistogramAggregation","minusInfinityIndex","infinityIndex","ExponentialHistogramAggregation","DefaultAggregation","api.diag","DEFAULT_AGGREGATION_SELECTOR","_instrumentType","DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR","MetricReader","metricProducer","instrumentType","sdkCollectionResults","additionalCollectionResults","errors","resource","scopeMetrics","producer","PeriodicExportingMetricReader","err_1","resourceMetrics","defaultServiceName","Resource","asyncAttributesPromise","asyncAttributes","mergedSyncAttributes","mergedAttributesPromise","thisAsyncAttributes","otherAsyncAttributes","ViewRegistry","meter","views","registeredView","SyncInstrument","_writableMetricStorage","UpDownCounterInstrument","CounterInstrument","GaugeInstrument","HistogramInstrument","ObservableInstrument","metricStorages","_observableRegistry","callback","ObservableCounterInstrument","ObservableGaugeInstrument","ObservableUpDownCounterInstrument","isObservableInstrument","Meter","_meterSharedState","storages","observables","MetricStorage","_instrumentDescriptor","HashMap","_hash","hashCode","defaultFactory","val","keyIterator","next","valueIterator","AttributeHashMap","DeltaMetricProcessor","_aggregator","collectionTime","measurements","active","unreportedDelta","TemporalMetricProcessor","collectorHandles","handle","collector","instrumentDescriptor","currentAccumulations","unreportedAccumulations","last","lastCollectionTime","accumulationRecords","AttributesMapToAccumulationRecords","currentAccumulation","registeredCollectors","registeredCollectors_1","registeredCollectors_1_1","stash","unreportedList","unreportedList_1","unreportedList_1_1","it_1","aggregator","iterator","record","lastAccumulation","AsyncMetricStorage","_attributesProcessor","observationTime","processed","accumulations","getIncompatibilityDetails","existing","incompatibility","getValueTypeConflictResolutionRecipe","getUnitConflictResolutionRecipe","getTypeConflictResolutionRecipe","selectorString","getDescriptionResolutionRecipe","getConflictResolutionRecipe","MetricStorageRegistry","perCollectorStorages","storageMap","expectedDescriptor","existingStorages","compatibleStorage","existingStorages_1","existingStorages_1_1","existingStorage","existingDescriptor","MultiMetricStorage","_backingStorages","recordTime","ObservableResultImpl","_instrumentName","_valueType","BatchObservableResultImpl","metric","ObservableRegistry","instruments","observableInstruments","callbackFutures","batchCallbackFutures","rejections","observableResult","callPromise","metricStorage","buffer","SyncMetricStorage","AttributesProcessor","NOOP","NoopAttributesProcessor","incoming","FilteringAttributesProcessor","_allowedAttributeNames","filteredAttributes","attributeName","MeterSharedState","_meterProviderSharedState","_instrumentationScope","metricDataList","MetricStorageType","viewDescriptor","viewStorage","perCollectorAggregations","collectorStorages","aggregation","MeterProviderSharedState","id","meterSharedState","MetricCollector","_sharedState","_metricReader","meterCollectionPromises","prepareResource","mergeWithDefaults","providedResource","MeterProvider","metricReader","BAGGAGE_KEY_PAIR_SEPARATOR","BAGGAGE_PROPERTIES_SEPARATOR","BAGGAGE_ITEMS_SEPARATOR","parsePairKeyValue","valueProps","keyPairPart","separatorIndex","parseKeyPairsIntoRecord","keyPair","isAttributeValue","isHomogeneousAttributeValueArray","isValidPrimitiveAttributeValue","arr_1","arr_1_1","element","TracesSamplerValues","DEFAULT_LIST_SEPARATOR","ENVIRONMENT_BOOLEAN_KEYS","isEnvVarABoolean","ENVIRONMENT_NUMBERS_KEYS","isEnvVarANumber","ENVIRONMENT_LISTS_KEYS","isEnvVarAList","DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT","DEFAULT_ATTRIBUTE_COUNT_LIMIT","DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","DEFAULT_ENVIRONMENT","parseBoolean","environment","parseNumber","parseStringList","output","separator","givenValue","logLevelMap","setLogLevelFromEnv","parseEnvironment","env","getEnvWithoutDefaults","define_process_env_default","getEnv","globalEnv","intValue","charCode","hexToBinary","hexStr","buf","otperformance","createConstMap","res","lp","TMP_AWS_LAMBDA_INVOKED_ARN","TMP_DB_SYSTEM","TMP_DB_CONNECTION_STRING","TMP_DB_USER","TMP_DB_JDBC_DRIVER_CLASSNAME","TMP_DB_NAME","TMP_DB_STATEMENT","TMP_DB_OPERATION","TMP_DB_MSSQL_INSTANCE_NAME","TMP_DB_CASSANDRA_KEYSPACE","TMP_DB_CASSANDRA_PAGE_SIZE","TMP_DB_CASSANDRA_CONSISTENCY_LEVEL","TMP_DB_CASSANDRA_TABLE","TMP_DB_CASSANDRA_IDEMPOTENCE","TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT","TMP_DB_CASSANDRA_COORDINATOR_ID","TMP_DB_CASSANDRA_COORDINATOR_DC","TMP_DB_HBASE_NAMESPACE","TMP_DB_REDIS_DATABASE_INDEX","TMP_DB_MONGODB_COLLECTION","TMP_DB_SQL_TABLE","TMP_EXCEPTION_TYPE","TMP_EXCEPTION_MESSAGE","TMP_EXCEPTION_STACKTRACE","TMP_EXCEPTION_ESCAPED","TMP_FAAS_TRIGGER","TMP_FAAS_EXECUTION","TMP_FAAS_DOCUMENT_COLLECTION","TMP_FAAS_DOCUMENT_OPERATION","TMP_FAAS_DOCUMENT_TIME","TMP_FAAS_DOCUMENT_NAME","TMP_FAAS_TIME","TMP_FAAS_CRON","TMP_FAAS_COLDSTART","TMP_FAAS_INVOKED_NAME","TMP_FAAS_INVOKED_PROVIDER","TMP_FAAS_INVOKED_REGION","TMP_NET_TRANSPORT","TMP_NET_PEER_IP","TMP_NET_PEER_PORT","TMP_NET_PEER_NAME","TMP_NET_HOST_IP","TMP_NET_HOST_PORT","TMP_NET_HOST_NAME","TMP_NET_HOST_CONNECTION_TYPE","TMP_NET_HOST_CONNECTION_SUBTYPE","TMP_NET_HOST_CARRIER_NAME","TMP_NET_HOST_CARRIER_MCC","TMP_NET_HOST_CARRIER_MNC","TMP_NET_HOST_CARRIER_ICC","TMP_PEER_SERVICE","TMP_ENDUSER_ID","TMP_ENDUSER_ROLE","TMP_ENDUSER_SCOPE","TMP_THREAD_ID","TMP_THREAD_NAME","TMP_CODE_FUNCTION","TMP_CODE_NAMESPACE","TMP_CODE_FILEPATH","TMP_CODE_LINENO","TMP_HTTP_METHOD","TMP_HTTP_URL","TMP_HTTP_TARGET","TMP_HTTP_HOST","TMP_HTTP_SCHEME","TMP_HTTP_STATUS_CODE","TMP_HTTP_FLAVOR","TMP_HTTP_USER_AGENT","TMP_HTTP_REQUEST_CONTENT_LENGTH","TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED","TMP_HTTP_RESPONSE_CONTENT_LENGTH","TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED","TMP_HTTP_SERVER_NAME","TMP_HTTP_ROUTE","TMP_HTTP_CLIENT_IP","TMP_AWS_DYNAMODB_TABLE_NAMES","TMP_AWS_DYNAMODB_CONSUMED_CAPACITY","TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS","TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY","TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY","TMP_AWS_DYNAMODB_CONSISTENT_READ","TMP_AWS_DYNAMODB_PROJECTION","TMP_AWS_DYNAMODB_LIMIT","TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET","TMP_AWS_DYNAMODB_INDEX_NAME","TMP_AWS_DYNAMODB_SELECT","TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES","TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES","TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE","TMP_AWS_DYNAMODB_TABLE_COUNT","TMP_AWS_DYNAMODB_SCAN_FORWARD","TMP_AWS_DYNAMODB_SEGMENT","TMP_AWS_DYNAMODB_TOTAL_SEGMENTS","TMP_AWS_DYNAMODB_COUNT","TMP_AWS_DYNAMODB_SCANNED_COUNT","TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS","TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES","TMP_MESSAGING_SYSTEM","TMP_MESSAGING_DESTINATION","TMP_MESSAGING_DESTINATION_KIND","TMP_MESSAGING_TEMP_DESTINATION","TMP_MESSAGING_PROTOCOL","TMP_MESSAGING_PROTOCOL_VERSION","TMP_MESSAGING_URL","TMP_MESSAGING_MESSAGE_ID","TMP_MESSAGING_CONVERSATION_ID","TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES","TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES","TMP_MESSAGING_OPERATION","TMP_MESSAGING_CONSUMER_ID","TMP_MESSAGING_RABBITMQ_ROUTING_KEY","TMP_MESSAGING_KAFKA_MESSAGE_KEY","TMP_MESSAGING_KAFKA_CONSUMER_GROUP","TMP_MESSAGING_KAFKA_CLIENT_ID","TMP_MESSAGING_KAFKA_PARTITION","TMP_MESSAGING_KAFKA_TOMBSTONE","TMP_RPC_SYSTEM","TMP_RPC_SERVICE","TMP_RPC_METHOD","TMP_RPC_GRPC_STATUS_CODE","TMP_RPC_JSONRPC_VERSION","TMP_RPC_JSONRPC_REQUEST_ID","TMP_RPC_JSONRPC_ERROR_CODE","TMP_RPC_JSONRPC_ERROR_MESSAGE","TMP_MESSAGE_TYPE","TMP_MESSAGE_ID","TMP_MESSAGE_COMPRESSED_SIZE","TMP_MESSAGE_UNCOMPRESSED_SIZE","SemanticAttributes","TMP_CLOUD_PROVIDER","TMP_CLOUD_ACCOUNT_ID","TMP_CLOUD_REGION","TMP_CLOUD_AVAILABILITY_ZONE","TMP_CLOUD_PLATFORM","TMP_AWS_ECS_CONTAINER_ARN","TMP_AWS_ECS_CLUSTER_ARN","TMP_AWS_ECS_LAUNCHTYPE","TMP_AWS_ECS_TASK_ARN","TMP_AWS_ECS_TASK_FAMILY","TMP_AWS_ECS_TASK_REVISION","TMP_AWS_EKS_CLUSTER_ARN","TMP_AWS_LOG_GROUP_NAMES","TMP_AWS_LOG_GROUP_ARNS","TMP_AWS_LOG_STREAM_NAMES","TMP_AWS_LOG_STREAM_ARNS","TMP_CONTAINER_NAME","TMP_CONTAINER_ID","TMP_CONTAINER_RUNTIME","TMP_CONTAINER_IMAGE_NAME","TMP_CONTAINER_IMAGE_TAG","TMP_DEPLOYMENT_ENVIRONMENT","TMP_DEVICE_ID","TMP_DEVICE_MODEL_IDENTIFIER","TMP_DEVICE_MODEL_NAME","TMP_FAAS_NAME","TMP_FAAS_ID","TMP_FAAS_VERSION","TMP_FAAS_INSTANCE","TMP_FAAS_MAX_MEMORY","TMP_HOST_ID","TMP_HOST_NAME","TMP_HOST_TYPE","TMP_HOST_ARCH","TMP_HOST_IMAGE_NAME","TMP_HOST_IMAGE_ID","TMP_HOST_IMAGE_VERSION","TMP_K8S_CLUSTER_NAME","TMP_K8S_NODE_NAME","TMP_K8S_NODE_UID","TMP_K8S_NAMESPACE_NAME","TMP_K8S_POD_UID","TMP_K8S_POD_NAME","TMP_K8S_CONTAINER_NAME","TMP_K8S_REPLICASET_UID","TMP_K8S_REPLICASET_NAME","TMP_K8S_DEPLOYMENT_UID","TMP_K8S_DEPLOYMENT_NAME","TMP_K8S_STATEFULSET_UID","TMP_K8S_STATEFULSET_NAME","TMP_K8S_DAEMONSET_UID","TMP_K8S_DAEMONSET_NAME","TMP_K8S_JOB_UID","TMP_K8S_JOB_NAME","TMP_K8S_CRONJOB_UID","TMP_K8S_CRONJOB_NAME","TMP_OS_TYPE","TMP_OS_DESCRIPTION","TMP_OS_NAME","TMP_OS_VERSION","TMP_PROCESS_PID","TMP_PROCESS_EXECUTABLE_NAME","TMP_PROCESS_EXECUTABLE_PATH","TMP_PROCESS_COMMAND","TMP_PROCESS_COMMAND_LINE","TMP_PROCESS_COMMAND_ARGS","TMP_PROCESS_OWNER","TMP_PROCESS_RUNTIME_VERSION","TMP_PROCESS_RUNTIME_DESCRIPTION","TMP_SERVICE_NAMESPACE","TMP_SERVICE_INSTANCE_ID","TMP_SERVICE_VERSION","TMP_TELEMETRY_AUTO_VERSION","TMP_WEBENGINE_NAME","TMP_WEBENGINE_VERSION","TMP_WEBENGINE_DESCRIPTION","SemanticResourceAttributes","TMP_TELEMETRYSDKLANGUAGEVALUES_CPP","TMP_TELEMETRYSDKLANGUAGEVALUES_DOTNET","TMP_TELEMETRYSDKLANGUAGEVALUES_ERLANG","TMP_TELEMETRYSDKLANGUAGEVALUES_GO","TMP_TELEMETRYSDKLANGUAGEVALUES_JAVA","TMP_TELEMETRYSDKLANGUAGEVALUES_NODEJS","TMP_TELEMETRYSDKLANGUAGEVALUES_PHP","TMP_TELEMETRYSDKLANGUAGEVALUES_PYTHON","TMP_TELEMETRYSDKLANGUAGEVALUES_RUBY","TelemetrySdkLanguageValues","NANOSECOND_DIGITS","SECOND_TO_NANOSECONDS","getTimeOrigin","timeOrigin","performance","perf","hrTime","performanceNow","now","addHrTimes","timeInputToHrTime","isTimeInputHrTime","hrTimeToNanoseconds","time1","time2","TRACE_PARENT_HEADER","objectTag","nullTag","undefinedTag","funcProto","funcToString","objectCtorString","getPrototype","overArg","objectProto","hasOwnProperty","symToStringTag","nativeObjectToString","func","transform","isPlainObject","isObjectLike","baseGetTag","proto","Ctor","getRawTag","objectToString","isOwn","tag","unmasked","MAX_LEVEL","merge","objects","mergeTwoObjects","takeValue","isArray","one","two","level","isPrimitive","isFunction","isObject","shouldMerge","twoValue","obj1","obj2","wasObjectReferenced","arr1","arr2","obj","info","urlMatches","urlToMatch","isUrlIgnored","ignoredUrls","ignoredUrls_1","ignoredUrls_1_1","ignoreUrl","Deferred","BindOnceFuture","_that","binarySearchLB","AggregationTemporalityPreference","CumulativeTemporalitySelector","DeltaTemporalitySelector","LowMemoryTemporalitySelector","chooseTemporalitySelectorFromEnvironment","configuredTemporality","chooseTemporalitySelector","temporalityPreference","chooseAggregationSelector","OTLPMetricExporterBase","resultCallback","DEFAULT_TRACE_TIMEOUT","DEFAULT_EXPORT_MAX_ATTEMPTS","DEFAULT_EXPORT_INITIAL_BACKOFF","DEFAULT_EXPORT_MAX_BACKOFF","DEFAULT_EXPORT_BACKOFF_MULTIPLIER","parseHeaders","partialHeaders","appendResourcePathToUrl","appendRootPathToUrlIfNeeded","parsedUrl","configureExporterTimeout","invalidTimeout","getExporterTimeoutFromEnv","definedTimeout","defaultTimeout","isExportRetryable","retryCodes","parseRetryAfterToMills","retryAfter","OTLPExporterBase","items","OTLPExporterError","code","sendWithBeacon","blobPropertyBag","onSuccess","onError","sendWithXhr","exporterTimeout","retryTimer","xhr","reqIsDestroyed","exporterTimer","sendWithRetry","retries","minDelay","defaultHeaders","retryTime","OTLPExporterBrowserBase","baggageUtils.parseKeyPairsIntoRecord","serviceRequest","popPromise","hrTimeToNanos","NANOSECONDS","toLongBits","encodeAsLongBits","encodeAsString","encodeTimestamp","optionalHexToBinary","DEFAULT_ENCODER","getOtlpEncoder","useLongBits","useHex","toAttributes","toKeyValue","toAnyValue","sdkSpanToOtlpSpan","encoder","status","toOtlpSpanEvent","link","toOtlpLink","timedEvent","createExportTraceServiceRequest","spans","spanRecordsToResourceSpans","createResourceMap","readableSpans","resourceMap","readableSpans_1","readableSpans_1_1","ilmMap","instrumentationLibraryKey","records","entryIterator","scopeResourceSpans","ilmIterator","ilmEntry","scopeSpans","schemaUrl","readableSpan","transformedSpans","toResourceMetrics","toScopeMetrics","metricData","toMetric","toAggregationTemporality","toSingularDataPoints","toHistogramDataPoints","toExponentialHistogramDataPoints","toSingularDataPoint","dataPoint","valueType","histogram","temporality","createExportMetricsServiceRequest","createExportLogsServiceRequest","logRecords","logRecordsToResourceLogs","logRecords_1","logRecords_1_1","ismMap","ismKey","scopeLogs","log","toLogRecord","toLogAttributes","DEFAULT_COLLECTOR_RESOURCE_PATH","DEFAULT_COLLECTOR_URL","OTLPExporterBrowserProxy","OTLPMetricExporter","BatchSpanProcessorBase","_exporter","_span","_parentContext","count","timer","doExport","pendingResources","flush","unrefTimer","BatchSpanProcessor","isTracingSuppressed","BAGGAGE_HEADER","BAGGAGE_MAX_NAME_VALUE_PAIRS","BAGGAGE_MAX_PER_NAME_VALUE_PAIRS","BAGGAGE_MAX_TOTAL_LENGTH","serializeKeyPairs","keyPairs","hValue","getKeyPairs","W3CBaggagePropagator","pair","headerValue","baggageString","pairs","baggageEntry","sanitizeAttributes","isAttributeKey","SEMATTRS_EXCEPTION_TYPE","SEMATTRS_EXCEPTION_MESSAGE","SEMATTRS_EXCEPTION_STACKTRACE","SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH","SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED","hrTimeDuration","isTimeInput","CompositePropagator","VALID_KEY_CHAR_RANGE","VALID_KEY","VALID_VENDOR_KEY","VALID_KEY_REGEX","VALID_VALUE_BASE_REGEX","INVALID_VALUE_COMMA_EQUAL_REGEX","validateKey","validateValue","MAX_TRACE_STATE_ITEMS","MAX_TRACE_STATE_LEN","LIST_MEMBERS_SEPARATOR","LIST_MEMBER_KEY_VALUE_SPLITTER","TraceState","rawTraceState","traceState","agg","part","listMember","TRACE_STATE_HEADER","VERSION_PART","TRACE_ID_PART","PARENT_ID_PART","FLAGS_PART","TRACE_PARENT_REGEX","parseTraceParent","traceParent","W3CTraceContextPropagator","traceParentHeader","traceStateHeader","ExceptionEventName","Span","parentTracer","spanName","kind","parentSpanId","links","_deprecatedClock","attributesOrStartTime","timeStamp","inp","msDuration","exception","AlwaysOffSampler","AlwaysOnSampler","ParentBasedSampler","spanKind","TraceIdRatioBasedSampler","_ratio","ratio","FALLBACK_OTEL_TRACES_SAMPLER","DEFAULT_RATIO","loadDefaultConfig","_env","buildSamplerFromEnv","getSamplerProbabilityFromEnv","probability","mergeConfig","userConfig","perInstanceDefaults","DEFAULT_CONFIG","reconfigureLimits","_k","_l","_m","spanLimits","parsedEnvConfig","SPAN_ID_BYTES","TRACE_ID_BYTES","RandomIdGenerator","getIdGenerator","SHARED_CHAR_CODES_ARRAY","bytes","Tracer","instrumentationLibrary","_tracerProvider","localConfig","api.context","api.trace","parentSpan","nonRecordingSpan","api.INVALID_SPAN_CONTEXT","parentSpanContext","api.SpanKind","samplingResult","traceFlags","api.SamplingDecision","api.TraceFlags","initAttributes","MultiSpanProcessor","_spanProcessors","spanProcessor","NoopSpanProcessor","ForceFlushState","BasicTracerProvider","mergedConfig","defaultExporter","batchProcessor","timeoutInterval","uniquePropagatorNames","propagators","validPropagators","list","exporterName","StackContextManager","manager","contextWrapper","previousContext","WebTracerProvider","PerformanceTimingNames","hasKey","addSpanNetworkEvent","performanceName","refPerfName","perfTime","refTime","refName","PTN","addSpanNetworkEvents","encodedLength","decodedLength","getElementXPath","optimised","targetValue","getNodeValue","xpath","getNodeIndex","allowedTypes","elements","localName","nodeType","nodeValue","OTLPTraceExporter","getDefaultUrl","OTLPLogExporter","SeverityNumber","NoopLogger","_logRecord","NOOP_LOGGER","LogRecord","logRecord","timestamp","observedTimestamp","severityNumber","severityText","api.isSpanContextValid","Logger","currentContext","logRecordInstance","logRecordLimits","MultiLogRecordProcessor","processors","forceFlushTimeoutMillis","processor","NoopLogRecordProcessor","LoggerProviderSharedState","DEFAULT_LOGGER_NAME","LoggerProvider","loggerName","BatchLogRecordProcessorBase","batchCount","BatchLogRecordProcessor","AI21Logger","otelLogger","featureFlag","customAttributes","attribute","NoopLoggerProvider","NOOP_LOGGER_PROVIDER","GLOBAL_LOGS_API_KEY","makeGetter","requiredVersion","API_BACKWARDS_COMPATIBILITY_VERSION","LogsAPI","logs","parseInstrumentationOptions","instrumentations","option","enableInstrumentations","tracerProvider","meterProvider","loggerProvider","instrumentation","disableInstrumentations","registerInstrumentations","funktion","defineProperty","enumerable","shimmer","wrap","nodule","wrapper","original","wrapped","massWrap","nodules","names","unwrap","massUnwrap","shimmer_1","InstrumentationAbstract","instrumentationName","instrumentationVersion","shimmer.wrap","shimmer.unwrap","shimmer.massWrap","shimmer.massUnwrap","initResult","InstrumentationBase","safeExecuteInTheMiddle","execute","onFinish","preventThrowingError","isWrapped","AttributeNames","EventNames","getPerformanceNavigationEntries","performanceNavigationTiming","performanceTiming_1","performancePaintNames","addSpanPerformancePaintEvents","performancePaintTiming","DocumentLoadInstrumentation","rootSpan","resources","metaElement","traceparent","fetchSpan","applyCustomAttributesOnSpan","urlNormalizingAnchor","getUrlNormalizingAnchor","sortResources","filteredResources","valueA","valueB","getOrigin","getResource","spanUrl","startTimeHR","endTimeHR","ignoredResources","initiatorType","parsedSpanUrl","parseUrl","filterResourcesForSpan","sorted","corsPreFlightRequest","mainRequest","findMainRequest","responseEnd","fetchStart","corsPreFlightRequestEndTime","spanEndTimeHR","spanEndTime","minTime","bestGap","resourceStartTime","resourceEndTime","currentGap","shouldPropagateTraceHeaders","propagateTraceHeaderCorsUrls","propagateTraceHeaderUrls","propagateTraceHeaderUrl","OBSERVER_WAIT_TIME_MS","isNode","FetchInstrumentation","childSpan","web.PerformanceTimingNames","web.addSpanNetworkEvents","web.parseUrl","web.shouldPropagateTraceHeaders","api.propagation","h","core.isUrlIgnored","resourcesObserver","web.getResource","spanData","core.millisToHrTime","performanceEndTime","core.hrTime","createdSpan","endSpanOnError","endSpanOnSuccess","resClone","resClone4Hook_1","reader_1","read_1","done","observer","perfObsEntries","ZONE_CONTEXT_KEY","EVENT_NAVIGATION_NAME","DEFAULT_EVENT_NAMES","defaultShouldPreventSpanCreation","UserInteractionInstrumentation","task","eventName","zone","on","wrappedListener","listener2Type","element2patched","patched","useCapture","once","patchedListener","urlAfter","currentZone","currentSpan","applyThis","applyArgs","activeZone","ZoneWithPrototype","targets","_window","XMLHttpRequestInstrumentation","headers_1","xhrMem","callbackToRemoveEvents","endSpanTimeout","sendStartTime","endSpan","onAbort","onTimeout","onLoad","unregister","InstrumentationMap","getWebAutoInstrumentations","inputConfigs","name_2","Instance","CustomFetchLogExporter","exportRequest","AI21OpenTelemetry","samplingRatio","serviceName","serviceVersion","tracingConfig","loggingConfig","meterConfig","shouldUseFetchCustomLogExporter","metricExporter","collectorOptions","logExporter","TelemetryClient","logParams","counterName","ExposureTracker","trackEvent","AmplitudeExperimentProvider","AmplitudeExperiment","allVariants","initSdkCounter","initExperimentProviderInvokedCounter","initExperimentProviderFailedCounter","fetchVariantsInvokedCounter","fetchVariantsFailedCounter","getVariantInvokedCounter","getVariantReturnedFallbackCounter","allVariantsInvokedCounter","initCounters","VariantsClient","experimentProvider","amplitudeExperimentApiKey","debug","amplitudeServerUrl","amplitudeFlagsServerUrl","createExperimentClient","clientIdentifier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DACD,EACD,CAACA,EAAS,CAACsG,EAAM,WAAae,EAAO,CAAC,EACtC,CACE,6DACD,EACD,CAACf,EAAMtG,CAAO,EACd,CACE,8CACD,EACD,CAACA,EAAS,CAACsG,EAAM,eAAe,CAAC,EACjC,CACE,oDACD,EACD,CAACtG,EAASsG,CAAI,EACd,CACE,8CACD,EACD,CAACA,EAAM,CAACtG,EAAS2J,GAAWC,EAAY,CAAC,EACzC,CAAC,4BAA4B,EAC7B,CAACtD,EAAMtG,CAAO,EACd,CAEE,sCACD,EACD,CAAC,CAACsG,EAAM,UAAU,EAAGtG,CAAO,EAC5B,CACE,qCACD,EACD,CAACA,EAAS,CAACsG,EAAMkB,GAAU,UAAU,CAAC,EACtC,CACE,6BACA,cACA,mGAEA,+FAEA,wBACA,2CAGA,wHAEA,sBACD,EACD,CAAClB,EAAMtG,CAAO,EACd,CACE,sBACD,EACD,CAACsG,EAAM,CAACtG,EAAS,eAAgB,EAAE,CAAC,CACrC,EAED,IAAK,CACH,CACE,+CACD,EACD,CAAC,CAACyG,EAAc,OAAO,CAAC,EACxB,CACE,cACD,EACD,CAAC,CAACA,EAAcsC,EAAQ,CAAC,EACzB,CACE,wBACD,EACD,CAAC,CAACtC,EAAc,MAAM,CAAC,EACvB,CACE,kCACD,EACD,CAAC,CAACA,EAAc,OAAO,CAAC,EACxB,CACE,iCACD,EACD,CAAC,CAACA,EAAc,OAAO,CAAC,EACxB,CAEE,4BACD,EACD,CAAC,CAACA,EAAc,KAAK,CAAC,EACtB,CACE,wCACD,EACD,CAAC,CAACA,EAAc,OAAQX,EAAOiD,EAAQ,CAAC,EACxC,CACE,gBACD,EACD,CAAC,CAACtC,EAAc,OAAO,CAAC,EACxB,CACE,yHAED,EACD,CAAC,CAACA,EAAcsC,EAAQ,CAAC,CAC1B,EAED,OAAQ,CACN,CAOE,iFACD,EACD,CAAC1C,EAAO,CAACG,EAAQuB,EAAO,EAAG,CAACxB,EAAMK,CAAM,CAAC,EACzC,CACE,0CACA,u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AAC5B,EAAMO,CAAQ,CAAC,EACzC,CACE,eACD,EACD,CAACT,EAAO,CAACG,EAAQ4B,EAAQ,EAAG,CAAC7B,EAAMO,CAAQ,CAAC,EAC5C,CAKE,sCACD,EACD,CAACN,EAAQ,CAACD,EAAMQ,EAAQ,CAAC,EACzB,CAKE,yDACD,EACD,CAACV,EAAO,CAACE,EAAMI,CAAM,CAAC,EACtB,CACE,6DACD,EACD,CAACN,EAAO,CAACE,EAAMK,CAAM,CAAC,EACtB,CACE,8CACD,EACD,CAAC,CAACL,EAAMK,CAAM,CAAC,EACf,CACE,gEACD,EACD,CAAC,CAACL,EAAMI,CAAM,CAAC,EACf,CACE,gCACD,EACD,CAACN,EAAO,CAACG,EAAQ,SAAS,CAAC,CAC5B,EAED,OAAQ,CACN,CACE,4BACD,EACD,CAACxG,EAAS,CAACsG,EAAMiB,GAAO,MAAM,CAAC,EAC/B,CACE,2CACD,EACD,CAACvH,EAAS,CAACsG,EAAM,OAAO,CAAC,EACzB,CACE,uBACA,sEACA,0BACA,yCACA,6BACD,EACD,CAACA,EAAMtG,CAAO,EACd,CACE,+BACD,EACD,CAACA,EAASsG,CAAI,CACf,EAED,GAAI,CACF,CAEE,iCACD,EACD,CAACA,EAAMtG,CAAO,EACd,CACE,4BACA,wDACA,4CACD,EACD,CAACsG,EAAM,CAACtG,EAAS2J,GAAWE,EAAiB,CAAC,EAC9C,CAAC,oCAAoC,EACrC,CACE,CAACvD,EAAM,SAAS,EAChB,CAACtG,EAAS2J,GAAWE,EAAiB,CACvC,EACD,CAEE,sDACA,sBACD,EACD,CACE,CAAC7J,EAAS,KAAM,GAAG,EACnB,CAACsG,EAAM,KAAK,CACb,EACD,CACE,0BACA,uCACD,EACD,CACE,CAACA,EAAM,QAAQ,EACf,CAACtG,EAAS,KAAM,GAAG,CACpB,EACD,CAEE,gDACD,EACD,CAACA,EAASsG,CAAI,EACd,CAEE,+EACA,8BACA,+BACA,gBACD,EACD,CAACA,EAAMtG,CAAO,EACd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AC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,EACJ,CAAC,ECv0BGE,GAAqB,iBACrBC,GAAuB,mBACvBC,GAAmB,eACnBC,GAA8B,0BAC9BC,GAAqB,iBACrBC,GAA4B,wBAC5BC,GAA0B,sBAC1BC,GAAyB,qBACzBC,GAAuB,mBACvBC,GAA0B,sBAC1BC,GAA4B,wBAC5BC,GAA0B,sBAC1BC,GAA0B,sBAC1BC,GAAyB,qBACzBC,GAA2B,uBAC3BC,GAA0B,sBAC1BC,GAAqB,iBACrBC,GAAmB,eACnBC,GAAwB,oBACxBC,GAA2B,uBAC3BC,GAA0B,sBAC1BC,GAA6B,yBAC7BC,GAAgB,YAChBC,GAA8B,0BAC9BC,GAAwB,oBACxBC,GAAgB,YAChBC,GAAc,UACdC,GAAmB,eACnBC,GAAoB,gBACpBC,GAAsB,kBACtBC,GAAc,UACdC,GAAgB,YAChBC,GAAgB,YAChBC,GAAgB,YAChBC,GAAsB,kBACtBC,GAAoB,gBACpBC,GAAyB,qBACzBC,GAAuB,mBACvBC,GAAoB,gBACpBC,GAAmB,eACnBC,GAAyB,qBACzBC,GAAkB,cAClBC,GAAmB,eACnBC,GAAyB,qBACzBC,GAAyB,qBACzBC,GAA0B,sBAC1BC,GAAyB,qBACzBC,GAA0B,sBAC1BC,GAA0B,sBAC1BC,GAA2B,uBAC3BC,GAAwB,oBACxBC,GAAyB,qBACzBC,GAAkB,cAClBC,GAAmB,eACnBC,GAAsB,kBACtBC,GAAuB,mBACvBC,GAAc,UACdC,GAAqB,iBACrBC,GAAc,UACdC,GAAiB,aACjBC,GAAkB,cAClBC,GAA8B,0BAC9BC,GAA8B,0BAC9BC,GAAsB,kBACtBC,GAA2B,uBAC3BC,GAA2B,uBAC3BC,GAAoB,gBACpB9c,GAA2B,uBAC3B+c,GAA8B,0BAC9BC,GAAkC,8BAClC/c,GAAmB,eACnBgd,GAAwB,oBACxBC,GAA0B,sBAC1BC,GAAsB,kBACtBjd,GAAyB,qBACzBC,GAA6B,yBAC7BC,GAA4B,wBAC5Bgd,GAA6B,yBAC7BC,GAAqB,iBACrBC,GAAwB,oBACxBC,GAA4B,wBA8XrBC,EACGhN,GAAe,CACzBoI,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACA9c,GACA+c,GACAC,GACA/c,GACAgd,GACAC,GACAC,GACAjd,GACAC,GACAC,GACAgd,GACAC,GACAC,GACAC,EACJ,CAAC,EAwWGE,GAAqC,MACrCC,GAAwC,SACxCC,GAAwC,SACxCC,GAAoC,KACpCC,GAAsC,OACtCC,GAAwC,SACxCC,GAAqC,MACrCC,GAAwC,SACxCC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33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264]}