@microsoft/opentelemetry 0.1.0-alpha.2 → 0.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -4
- package/dist/commonjs/a365/configuration/A365Configuration.d.ts +42 -0
- package/dist/commonjs/a365/configuration/A365Configuration.d.ts.map +1 -0
- package/dist/commonjs/a365/configuration/A365Configuration.js +162 -0
- package/dist/commonjs/a365/configuration/A365Configuration.js.map +1 -0
- package/dist/commonjs/a365/configuration/A365ConfigurationOptions.d.ts +53 -0
- package/dist/commonjs/a365/configuration/A365ConfigurationOptions.d.ts.map +1 -0
- package/dist/commonjs/a365/configuration/A365ConfigurationOptions.js +5 -0
- package/dist/commonjs/a365/configuration/A365ConfigurationOptions.js.map +1 -0
- package/dist/commonjs/a365/configuration/index.d.ts +3 -0
- package/dist/commonjs/a365/configuration/index.d.ts.map +1 -0
- package/dist/commonjs/a365/configuration/index.js +9 -0
- package/dist/commonjs/a365/configuration/index.js.map +1 -0
- package/dist/commonjs/a365/constants.d.ts +93 -0
- package/dist/commonjs/a365/constants.d.ts.map +1 -0
- package/dist/commonjs/a365/constants.js +120 -0
- package/dist/commonjs/a365/constants.js.map +1 -0
- package/dist/commonjs/a365/context/tokenContext.d.ts +25 -0
- package/dist/commonjs/a365/context/tokenContext.d.ts.map +1 -0
- package/dist/commonjs/a365/context/tokenContext.js +67 -0
- package/dist/commonjs/a365/context/tokenContext.js.map +1 -0
- package/dist/commonjs/a365/context.d.ts +31 -0
- package/dist/commonjs/a365/context.d.ts.map +1 -0
- package/dist/commonjs/a365/context.js +109 -0
- package/dist/commonjs/a365/context.js.map +1 -0
- package/dist/commonjs/a365/contracts.d.ts +250 -0
- package/dist/commonjs/a365/contracts.d.ts.map +1 -0
- package/dist/commonjs/a365/contracts.js +52 -0
- package/dist/commonjs/a365/contracts.js.map +1 -0
- package/dist/commonjs/a365/exporter/Agent365Exporter.d.ts +25 -0
- package/dist/commonjs/a365/exporter/Agent365Exporter.d.ts.map +1 -0
- package/dist/commonjs/a365/exporter/Agent365Exporter.js +219 -0
- package/dist/commonjs/a365/exporter/Agent365Exporter.js.map +1 -0
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.d.ts +43 -0
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.d.ts.map +1 -0
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.js +30 -0
- package/dist/commonjs/a365/exporter/Agent365ExporterOptions.js.map +1 -0
- package/dist/commonjs/a365/exporter/ExporterEventNames.d.ts +9 -0
- package/dist/commonjs/a365/exporter/ExporterEventNames.d.ts.map +1 -0
- package/dist/commonjs/a365/exporter/ExporterEventNames.js +15 -0
- package/dist/commonjs/a365/exporter/ExporterEventNames.js.map +1 -0
- package/dist/commonjs/a365/exporter/index.d.ts +6 -0
- package/dist/commonjs/a365/exporter/index.d.ts.map +1 -0
- package/dist/commonjs/a365/exporter/index.js +15 -0
- package/dist/commonjs/a365/exporter/index.js.map +1 -0
- package/dist/commonjs/a365/exporter/utils.d.ts +41 -0
- package/dist/commonjs/a365/exporter/utils.d.ts.map +1 -0
- package/dist/commonjs/a365/exporter/utils.js +410 -0
- package/dist/commonjs/a365/exporter/utils.js.map +1 -0
- package/dist/commonjs/a365/hosting/baggageBuilderUtils.d.ts +22 -0
- package/dist/commonjs/a365/hosting/baggageBuilderUtils.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/baggageBuilderUtils.js +47 -0
- package/dist/commonjs/a365/hosting/baggageBuilderUtils.js.map +1 -0
- package/dist/commonjs/a365/hosting/baggageMiddleware.d.ts +9 -0
- package/dist/commonjs/a365/hosting/baggageMiddleware.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/baggageMiddleware.js +38 -0
- package/dist/commonjs/a365/hosting/baggageMiddleware.js.map +1 -0
- package/dist/commonjs/a365/hosting/index.d.ts +9 -0
- package/dist/commonjs/a365/hosting/index.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/index.js +25 -0
- package/dist/commonjs/a365/hosting/index.js.map +1 -0
- package/dist/commonjs/a365/hosting/observabilityHostingManager.d.ts +30 -0
- package/dist/commonjs/a365/hosting/observabilityHostingManager.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/observabilityHostingManager.js +49 -0
- package/dist/commonjs/a365/hosting/observabilityHostingManager.js.map +1 -0
- package/dist/commonjs/a365/hosting/outputLoggingMiddleware.d.ts +24 -0
- package/dist/commonjs/a365/hosting/outputLoggingMiddleware.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/outputLoggingMiddleware.js +82 -0
- package/dist/commonjs/a365/hosting/outputLoggingMiddleware.js.map +1 -0
- package/dist/commonjs/a365/hosting/scopeUtils.d.ts +56 -0
- package/dist/commonjs/a365/hosting/scopeUtils.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/scopeUtils.js +161 -0
- package/dist/commonjs/a365/hosting/scopeUtils.js.map +1 -0
- package/dist/commonjs/a365/hosting/turnContextUtils.d.ts +32 -0
- package/dist/commonjs/a365/hosting/turnContextUtils.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/turnContextUtils.js +141 -0
- package/dist/commonjs/a365/hosting/turnContextUtils.js.map +1 -0
- package/dist/commonjs/a365/hosting/types.d.ts +52 -0
- package/dist/commonjs/a365/hosting/types.d.ts.map +1 -0
- package/dist/commonjs/a365/hosting/types.js +5 -0
- package/dist/commonjs/a365/hosting/types.js.map +1 -0
- package/dist/commonjs/a365/index.d.ts +18 -0
- package/dist/commonjs/a365/index.d.ts.map +1 -0
- package/dist/commonjs/a365/index.js +69 -0
- package/dist/commonjs/a365/index.js.map +1 -0
- package/dist/commonjs/a365/message-utils.d.ts +42 -0
- package/dist/commonjs/a365/message-utils.d.ts.map +1 -0
- package/dist/commonjs/a365/message-utils.js +116 -0
- package/dist/commonjs/a365/message-utils.js.map +1 -0
- package/dist/commonjs/a365/middleware/BaggageBuilder.d.ts +112 -0
- package/dist/commonjs/a365/middleware/BaggageBuilder.d.ts.map +1 -0
- package/dist/commonjs/a365/middleware/BaggageBuilder.js +248 -0
- package/dist/commonjs/a365/middleware/BaggageBuilder.js.map +1 -0
- package/dist/commonjs/a365/middleware/index.d.ts +2 -0
- package/dist/commonjs/a365/middleware/index.d.ts.map +1 -0
- package/dist/commonjs/a365/middleware/index.js +9 -0
- package/dist/commonjs/a365/middleware/index.js.map +1 -0
- package/dist/commonjs/a365/processors/A365SpanProcessor.d.ts +32 -0
- package/dist/commonjs/a365/processors/A365SpanProcessor.d.ts.map +1 -0
- package/dist/commonjs/a365/processors/A365SpanProcessor.js +104 -0
- package/dist/commonjs/a365/processors/A365SpanProcessor.js.map +1 -0
- package/dist/commonjs/a365/processors/PerRequestSpanProcessor.d.ts +44 -0
- package/dist/commonjs/a365/processors/PerRequestSpanProcessor.d.ts.map +1 -0
- package/dist/commonjs/a365/processors/PerRequestSpanProcessor.js +260 -0
- package/dist/commonjs/a365/processors/PerRequestSpanProcessor.js.map +1 -0
- package/dist/commonjs/a365/processors/index.d.ts +5 -0
- package/dist/commonjs/a365/processors/index.d.ts.map +1 -0
- package/dist/commonjs/a365/processors/index.js +13 -0
- package/dist/commonjs/a365/processors/index.js.map +1 -0
- package/dist/commonjs/a365/processors/util.d.ts +10 -0
- package/dist/commonjs/a365/processors/util.d.ts.map +1 -0
- package/dist/commonjs/a365/processors/util.js +56 -0
- package/dist/commonjs/a365/processors/util.js.map +1 -0
- package/dist/commonjs/a365/scopes/ExecuteToolScope.d.ts +24 -0
- package/dist/commonjs/a365/scopes/ExecuteToolScope.d.ts.map +1 -0
- package/dist/commonjs/a365/scopes/ExecuteToolScope.js +60 -0
- package/dist/commonjs/a365/scopes/ExecuteToolScope.js.map +1 -0
- package/dist/commonjs/a365/scopes/InferenceScope.d.ts +29 -0
- package/dist/commonjs/a365/scopes/InferenceScope.d.ts.map +1 -0
- package/dist/commonjs/a365/scopes/InferenceScope.js +75 -0
- package/dist/commonjs/a365/scopes/InferenceScope.js.map +1 -0
- package/dist/commonjs/a365/scopes/InvokeAgentScope.d.ts +25 -0
- package/dist/commonjs/a365/scopes/InvokeAgentScope.d.ts.map +1 -0
- package/dist/commonjs/a365/scopes/InvokeAgentScope.js +84 -0
- package/dist/commonjs/a365/scopes/InvokeAgentScope.js.map +1 -0
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.d.ts +69 -0
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.d.ts.map +1 -0
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.js +211 -0
- package/dist/commonjs/a365/scopes/OpenTelemetryScope.js.map +1 -0
- package/dist/commonjs/a365/scopes/OutputScope.d.ts +26 -0
- package/dist/commonjs/a365/scopes/OutputScope.d.ts.map +1 -0
- package/dist/commonjs/a365/scopes/OutputScope.js +73 -0
- package/dist/commonjs/a365/scopes/OutputScope.js.map +1 -0
- package/dist/commonjs/a365/scopes/index.d.ts +6 -0
- package/dist/commonjs/a365/scopes/index.d.ts.map +1 -0
- package/dist/commonjs/a365/scopes/index.js +16 -0
- package/dist/commonjs/a365/scopes/index.js.map +1 -0
- package/dist/commonjs/a365/utils/utils.d.ts +6 -0
- package/dist/commonjs/a365/utils/utils.d.ts.map +1 -0
- package/dist/commonjs/a365/utils/utils.js +14 -0
- package/dist/commonjs/a365/utils/utils.js.map +1 -0
- package/dist/commonjs/azureMonitor/index.d.ts +14 -0
- package/dist/commonjs/azureMonitor/index.d.ts.map +1 -1
- package/dist/commonjs/azureMonitor/index.js +29 -0
- package/dist/commonjs/azureMonitor/index.js.map +1 -1
- package/dist/commonjs/azureMonitor/metrics/handler.js +2 -2
- package/dist/commonjs/azureMonitor/metrics/handler.js.map +1 -1
- package/dist/commonjs/azureMonitor/metrics/quickpulse/types.d.ts +1 -1
- package/dist/commonjs/azureMonitor/traces/handler.d.ts +0 -3
- package/dist/commonjs/azureMonitor/traces/handler.d.ts.map +1 -1
- package/dist/commonjs/azureMonitor/traces/handler.js +8 -19
- package/dist/commonjs/azureMonitor/traces/handler.js.map +1 -1
- package/dist/commonjs/distro/distro.d.ts +3 -1
- package/dist/commonjs/distro/distro.d.ts.map +1 -1
- package/dist/commonjs/distro/distro.js +88 -92
- package/dist/commonjs/distro/distro.js.map +1 -1
- package/dist/commonjs/distro/instrumentations.d.ts +31 -0
- package/dist/commonjs/distro/instrumentations.d.ts.map +1 -0
- package/dist/commonjs/distro/instrumentations.js +131 -0
- package/dist/commonjs/distro/instrumentations.js.map +1 -0
- package/dist/commonjs/distro/types.d.ts +2 -1
- package/dist/commonjs/distro/types.d.ts.map +1 -1
- package/dist/commonjs/index.d.ts +8 -12
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +48 -20
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/shared/jsonConfig.d.ts +2 -1
- package/dist/commonjs/shared/jsonConfig.d.ts.map +1 -1
- package/dist/commonjs/shared/module.js +15 -11
- package/dist/commonjs/shared/module.js.map +1 -1
- package/dist/commonjs/types.d.ts +8 -32
- package/dist/commonjs/types.d.ts.map +1 -1
- package/dist/commonjs/types.js +1 -1
- package/dist/commonjs/types.js.map +1 -1
- package/dist/esm/a365/configuration/A365Configuration.d.ts +42 -0
- package/dist/esm/a365/configuration/A365Configuration.d.ts.map +1 -0
- package/dist/esm/a365/configuration/A365Configuration.js +158 -0
- package/dist/esm/a365/configuration/A365Configuration.js.map +1 -0
- package/dist/esm/a365/configuration/A365ConfigurationOptions.d.ts +53 -0
- package/dist/esm/a365/configuration/A365ConfigurationOptions.d.ts.map +1 -0
- package/dist/esm/a365/configuration/A365ConfigurationOptions.js +4 -0
- package/dist/esm/a365/configuration/A365ConfigurationOptions.js.map +1 -0
- package/dist/esm/a365/configuration/index.d.ts +3 -0
- package/dist/esm/a365/configuration/index.d.ts.map +1 -0
- package/dist/esm/a365/configuration/index.js +4 -0
- package/dist/esm/a365/configuration/index.js.map +1 -0
- package/dist/esm/a365/constants.d.ts +93 -0
- package/dist/esm/a365/constants.d.ts.map +1 -0
- package/dist/esm/a365/constants.js +116 -0
- package/dist/esm/a365/constants.js.map +1 -0
- package/dist/esm/a365/context/tokenContext.d.ts +25 -0
- package/dist/esm/a365/context/tokenContext.d.ts.map +1 -0
- package/dist/esm/a365/context/tokenContext.js +62 -0
- package/dist/esm/a365/context/tokenContext.js.map +1 -0
- package/dist/esm/a365/context.d.ts +31 -0
- package/dist/esm/a365/context.d.ts.map +1 -0
- package/dist/esm/a365/context.js +101 -0
- package/dist/esm/a365/context.js.map +1 -0
- package/dist/esm/a365/contracts.d.ts +250 -0
- package/dist/esm/a365/contracts.d.ts.map +1 -0
- package/dist/esm/a365/contracts.js +49 -0
- package/dist/esm/a365/contracts.js.map +1 -0
- package/dist/esm/a365/exporter/Agent365Exporter.d.ts +25 -0
- package/dist/esm/a365/exporter/Agent365Exporter.d.ts.map +1 -0
- package/dist/esm/a365/exporter/Agent365Exporter.js +215 -0
- package/dist/esm/a365/exporter/Agent365Exporter.js.map +1 -0
- package/dist/esm/a365/exporter/Agent365ExporterOptions.d.ts +43 -0
- package/dist/esm/a365/exporter/Agent365ExporterOptions.d.ts.map +1 -0
- package/dist/esm/a365/exporter/Agent365ExporterOptions.js +26 -0
- package/dist/esm/a365/exporter/Agent365ExporterOptions.js.map +1 -0
- package/dist/esm/a365/exporter/ExporterEventNames.d.ts +9 -0
- package/dist/esm/a365/exporter/ExporterEventNames.d.ts.map +1 -0
- package/dist/esm/a365/exporter/ExporterEventNames.js +12 -0
- package/dist/esm/a365/exporter/ExporterEventNames.js.map +1 -0
- package/dist/esm/a365/exporter/index.d.ts +6 -0
- package/dist/esm/a365/exporter/index.d.ts.map +1 -0
- package/dist/esm/a365/exporter/index.js +7 -0
- package/dist/esm/a365/exporter/index.js.map +1 -0
- package/dist/esm/a365/exporter/utils.d.ts +41 -0
- package/dist/esm/a365/exporter/utils.d.ts.map +1 -0
- package/dist/esm/a365/exporter/utils.js +398 -0
- package/dist/esm/a365/exporter/utils.js.map +1 -0
- package/dist/esm/a365/hosting/baggageBuilderUtils.d.ts +22 -0
- package/dist/esm/a365/hosting/baggageBuilderUtils.d.ts.map +1 -0
- package/dist/esm/a365/hosting/baggageBuilderUtils.js +43 -0
- package/dist/esm/a365/hosting/baggageBuilderUtils.js.map +1 -0
- package/dist/esm/a365/hosting/baggageMiddleware.d.ts +9 -0
- package/dist/esm/a365/hosting/baggageMiddleware.d.ts.map +1 -0
- package/dist/esm/a365/hosting/baggageMiddleware.js +34 -0
- package/dist/esm/a365/hosting/baggageMiddleware.js.map +1 -0
- package/dist/esm/a365/hosting/index.d.ts +9 -0
- package/dist/esm/a365/hosting/index.d.ts.map +1 -0
- package/dist/esm/a365/hosting/index.js +9 -0
- package/dist/esm/a365/hosting/index.js.map +1 -0
- package/dist/esm/a365/hosting/observabilityHostingManager.d.ts +30 -0
- package/dist/esm/a365/hosting/observabilityHostingManager.d.ts.map +1 -0
- package/dist/esm/a365/hosting/observabilityHostingManager.js +45 -0
- package/dist/esm/a365/hosting/observabilityHostingManager.js.map +1 -0
- package/dist/esm/a365/hosting/outputLoggingMiddleware.d.ts +24 -0
- package/dist/esm/a365/hosting/outputLoggingMiddleware.d.ts.map +1 -0
- package/dist/esm/a365/hosting/outputLoggingMiddleware.js +78 -0
- package/dist/esm/a365/hosting/outputLoggingMiddleware.js.map +1 -0
- package/dist/esm/a365/hosting/scopeUtils.d.ts +56 -0
- package/dist/esm/a365/hosting/scopeUtils.d.ts.map +1 -0
- package/dist/esm/a365/hosting/scopeUtils.js +157 -0
- package/dist/esm/a365/hosting/scopeUtils.js.map +1 -0
- package/dist/esm/a365/hosting/turnContextUtils.d.ts +32 -0
- package/dist/esm/a365/hosting/turnContextUtils.d.ts.map +1 -0
- package/dist/esm/a365/hosting/turnContextUtils.js +133 -0
- package/dist/esm/a365/hosting/turnContextUtils.js.map +1 -0
- package/dist/esm/a365/hosting/types.d.ts +52 -0
- package/dist/esm/a365/hosting/types.d.ts.map +1 -0
- package/dist/esm/a365/hosting/types.js +4 -0
- package/dist/esm/a365/hosting/types.js.map +1 -0
- package/dist/esm/a365/index.d.ts +18 -0
- package/dist/esm/a365/index.d.ts.map +1 -0
- package/dist/esm/a365/index.js +22 -0
- package/dist/esm/a365/index.js.map +1 -0
- package/dist/esm/a365/message-utils.d.ts +42 -0
- package/dist/esm/a365/message-utils.d.ts.map +1 -0
- package/dist/esm/a365/message-utils.js +107 -0
- package/dist/esm/a365/message-utils.js.map +1 -0
- package/dist/esm/a365/middleware/BaggageBuilder.d.ts +112 -0
- package/dist/esm/a365/middleware/BaggageBuilder.d.ts.map +1 -0
- package/dist/esm/a365/middleware/BaggageBuilder.js +243 -0
- package/dist/esm/a365/middleware/BaggageBuilder.js.map +1 -0
- package/dist/esm/a365/middleware/index.d.ts +2 -0
- package/dist/esm/a365/middleware/index.d.ts.map +1 -0
- package/dist/esm/a365/middleware/index.js +4 -0
- package/dist/esm/a365/middleware/index.js.map +1 -0
- package/dist/esm/a365/processors/A365SpanProcessor.d.ts +32 -0
- package/dist/esm/a365/processors/A365SpanProcessor.d.ts.map +1 -0
- package/dist/esm/a365/processors/A365SpanProcessor.js +100 -0
- package/dist/esm/a365/processors/A365SpanProcessor.js.map +1 -0
- package/dist/esm/a365/processors/PerRequestSpanProcessor.d.ts +44 -0
- package/dist/esm/a365/processors/PerRequestSpanProcessor.d.ts.map +1 -0
- package/dist/esm/a365/processors/PerRequestSpanProcessor.js +256 -0
- package/dist/esm/a365/processors/PerRequestSpanProcessor.js.map +1 -0
- package/dist/esm/a365/processors/index.d.ts +5 -0
- package/dist/esm/a365/processors/index.d.ts.map +1 -0
- package/dist/esm/a365/processors/index.js +6 -0
- package/dist/esm/a365/processors/index.js.map +1 -0
- package/dist/esm/a365/processors/util.d.ts +10 -0
- package/dist/esm/a365/processors/util.d.ts.map +1 -0
- package/dist/esm/a365/processors/util.js +53 -0
- package/dist/esm/a365/processors/util.js.map +1 -0
- package/dist/esm/a365/scopes/ExecuteToolScope.d.ts +24 -0
- package/dist/esm/a365/scopes/ExecuteToolScope.d.ts.map +1 -0
- package/dist/esm/a365/scopes/ExecuteToolScope.js +56 -0
- package/dist/esm/a365/scopes/ExecuteToolScope.js.map +1 -0
- package/dist/esm/a365/scopes/InferenceScope.d.ts +29 -0
- package/dist/esm/a365/scopes/InferenceScope.d.ts.map +1 -0
- package/dist/esm/a365/scopes/InferenceScope.js +71 -0
- package/dist/esm/a365/scopes/InferenceScope.js.map +1 -0
- package/dist/esm/a365/scopes/InvokeAgentScope.d.ts +25 -0
- package/dist/esm/a365/scopes/InvokeAgentScope.d.ts.map +1 -0
- package/dist/esm/a365/scopes/InvokeAgentScope.js +80 -0
- package/dist/esm/a365/scopes/InvokeAgentScope.js.map +1 -0
- package/dist/esm/a365/scopes/OpenTelemetryScope.d.ts +69 -0
- package/dist/esm/a365/scopes/OpenTelemetryScope.d.ts.map +1 -0
- package/dist/esm/a365/scopes/OpenTelemetryScope.js +207 -0
- package/dist/esm/a365/scopes/OpenTelemetryScope.js.map +1 -0
- package/dist/esm/a365/scopes/OutputScope.d.ts +26 -0
- package/dist/esm/a365/scopes/OutputScope.d.ts.map +1 -0
- package/dist/esm/a365/scopes/OutputScope.js +69 -0
- package/dist/esm/a365/scopes/OutputScope.js.map +1 -0
- package/dist/esm/a365/scopes/index.d.ts +6 -0
- package/dist/esm/a365/scopes/index.d.ts.map +1 -0
- package/dist/esm/a365/scopes/index.js +8 -0
- package/dist/esm/a365/scopes/index.js.map +1 -0
- package/dist/esm/a365/utils/utils.d.ts +6 -0
- package/dist/esm/a365/utils/utils.d.ts.map +1 -0
- package/dist/esm/a365/utils/utils.js +11 -0
- package/dist/esm/a365/utils/utils.js.map +1 -0
- package/dist/esm/azureMonitor/index.d.ts +14 -0
- package/dist/esm/azureMonitor/index.d.ts.map +1 -1
- package/dist/esm/azureMonitor/index.js +27 -0
- package/dist/esm/azureMonitor/index.js.map +1 -1
- package/dist/esm/azureMonitor/metrics/handler.js +2 -2
- package/dist/esm/azureMonitor/metrics/handler.js.map +1 -1
- package/dist/esm/azureMonitor/metrics/quickpulse/types.d.ts +1 -1
- package/dist/esm/azureMonitor/traces/handler.d.ts +0 -3
- package/dist/esm/azureMonitor/traces/handler.d.ts.map +1 -1
- package/dist/esm/azureMonitor/traces/handler.js +6 -19
- package/dist/esm/azureMonitor/traces/handler.js.map +1 -1
- package/dist/esm/distro/distro.d.ts +3 -1
- package/dist/esm/distro/distro.d.ts.map +1 -1
- package/dist/esm/distro/distro.js +89 -93
- package/dist/esm/distro/distro.js.map +1 -1
- package/dist/esm/distro/instrumentations.d.ts +31 -0
- package/dist/esm/distro/instrumentations.d.ts.map +1 -0
- package/dist/esm/distro/instrumentations.js +126 -0
- package/dist/esm/distro/instrumentations.js.map +1 -0
- package/dist/esm/distro/types.d.ts +2 -1
- package/dist/esm/distro/types.d.ts.map +1 -1
- package/dist/esm/index.d.ts +8 -12
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/shared/jsonConfig.d.ts +2 -1
- package/dist/esm/shared/jsonConfig.d.ts.map +1 -1
- package/dist/esm/types.d.ts +8 -32
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js +1 -1
- package/dist/esm/types.js.map +1 -1
- package/package.json +7 -8
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.MAX_SPAN_SIZE_BYTES = void 0;
|
|
6
|
+
exports.partitionByIdentity = partitionByIdentity;
|
|
7
|
+
exports.parseIdentityKey = parseIdentityKey;
|
|
8
|
+
exports.hexTraceId = hexTraceId;
|
|
9
|
+
exports.hexSpanId = hexSpanId;
|
|
10
|
+
exports.asStr = asStr;
|
|
11
|
+
exports.kindName = kindName;
|
|
12
|
+
exports.statusName = statusName;
|
|
13
|
+
exports.resolveAgent365Endpoint = resolveAgent365Endpoint;
|
|
14
|
+
exports.truncateSpan = truncateSpan;
|
|
15
|
+
const api_1 = require("@opentelemetry/api");
|
|
16
|
+
const index_js_1 = require("../../shared/logging/index.js");
|
|
17
|
+
const ExporterEventNames_js_1 = require("./ExporterEventNames.js");
|
|
18
|
+
const semconv_js_1 = require("../../genai/semconv.js");
|
|
19
|
+
const contracts_js_1 = require("../contracts.js");
|
|
20
|
+
// Message attribute keys that receive special truncation handling
|
|
21
|
+
const MESSAGE_ATTR_KEYS = new Set([
|
|
22
|
+
semconv_js_1.ATTR_GEN_AI_INPUT_MESSAGES,
|
|
23
|
+
semconv_js_1.ATTR_GEN_AI_OUTPUT_MESSAGES,
|
|
24
|
+
]);
|
|
25
|
+
const MESSAGE_ROLE_SYSTEM = "system";
|
|
26
|
+
/**
|
|
27
|
+
* Partition spans by (tenantId, agentId) identity pairs.
|
|
28
|
+
* Spans missing either attribute are skipped.
|
|
29
|
+
*/
|
|
30
|
+
function partitionByIdentity(spans) {
|
|
31
|
+
const groups = new Map();
|
|
32
|
+
let skippedCount = 0;
|
|
33
|
+
for (const span of spans) {
|
|
34
|
+
const attrs = span.attributes || {};
|
|
35
|
+
const tenant = asStr(attrs[semconv_js_1.ATTR_MICROSOFT_TENANT_ID]);
|
|
36
|
+
const agent = asStr(attrs[semconv_js_1.ATTR_GEN_AI_AGENT_ID]);
|
|
37
|
+
if (!tenant || !agent) {
|
|
38
|
+
skippedCount++;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const key = `${tenant}:${agent}`;
|
|
42
|
+
let existing = groups.get(key);
|
|
43
|
+
if (!existing) {
|
|
44
|
+
existing = [];
|
|
45
|
+
groups.set(key, existing);
|
|
46
|
+
}
|
|
47
|
+
existing.push(span);
|
|
48
|
+
}
|
|
49
|
+
if (skippedCount > 0) {
|
|
50
|
+
index_js_1.Logger.getInstance().info(`[${ExporterEventNames_js_1.ExporterEventNames.EXPORT_PARTITION_SPAN_MISSING_IDENTITY}] ${skippedCount} spans skipped (missing tenant or agent ID)`);
|
|
51
|
+
}
|
|
52
|
+
return groups;
|
|
53
|
+
}
|
|
54
|
+
/** Parse identity key back to tenant and agent IDs. */
|
|
55
|
+
function parseIdentityKey(key) {
|
|
56
|
+
const idx = key.indexOf(":");
|
|
57
|
+
return { tenantId: key.slice(0, idx), agentId: key.slice(idx + 1) };
|
|
58
|
+
}
|
|
59
|
+
/** Convert trace ID to hex string (32 hex chars). */
|
|
60
|
+
function hexTraceId(value) {
|
|
61
|
+
if (typeof value === "number") {
|
|
62
|
+
return value.toString(16).padStart(32, "0");
|
|
63
|
+
}
|
|
64
|
+
return value.replace(/^0x/, "").padStart(32, "0");
|
|
65
|
+
}
|
|
66
|
+
/** Convert span ID to hex string (16 hex chars). */
|
|
67
|
+
function hexSpanId(value) {
|
|
68
|
+
if (typeof value === "number") {
|
|
69
|
+
return value.toString(16).padStart(16, "0");
|
|
70
|
+
}
|
|
71
|
+
return value.replace(/^0x/, "").padStart(16, "0");
|
|
72
|
+
}
|
|
73
|
+
/** Convert any value to a trimmed string, or undefined if empty/null. */
|
|
74
|
+
function asStr(v) {
|
|
75
|
+
if (v === null || v === undefined)
|
|
76
|
+
return undefined;
|
|
77
|
+
const s = String(v);
|
|
78
|
+
return s.trim() ? s : undefined;
|
|
79
|
+
}
|
|
80
|
+
/** Get span kind name. */
|
|
81
|
+
function kindName(kind) {
|
|
82
|
+
switch (kind) {
|
|
83
|
+
case api_1.SpanKind.INTERNAL:
|
|
84
|
+
return "INTERNAL";
|
|
85
|
+
case api_1.SpanKind.SERVER:
|
|
86
|
+
return "SERVER";
|
|
87
|
+
case api_1.SpanKind.CLIENT:
|
|
88
|
+
return "CLIENT";
|
|
89
|
+
case api_1.SpanKind.PRODUCER:
|
|
90
|
+
return "PRODUCER";
|
|
91
|
+
case api_1.SpanKind.CONSUMER:
|
|
92
|
+
return "CONSUMER";
|
|
93
|
+
default:
|
|
94
|
+
return "UNSPECIFIED";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/** Get status name. */
|
|
98
|
+
function statusName(code) {
|
|
99
|
+
switch (code) {
|
|
100
|
+
case api_1.SpanStatusCode.UNSET:
|
|
101
|
+
return "UNSET";
|
|
102
|
+
case api_1.SpanStatusCode.OK:
|
|
103
|
+
return "OK";
|
|
104
|
+
case api_1.SpanStatusCode.ERROR:
|
|
105
|
+
return "ERROR";
|
|
106
|
+
default:
|
|
107
|
+
return "UNSET";
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Resolve the Agent365 service endpoint base URI for a given cluster category.
|
|
112
|
+
*/
|
|
113
|
+
function resolveAgent365Endpoint(clusterCategory) {
|
|
114
|
+
switch (clusterCategory) {
|
|
115
|
+
case "prod":
|
|
116
|
+
return "https://agent365.svc.cloud.microsoft";
|
|
117
|
+
default:
|
|
118
|
+
throw new Error(`Unsupported Agent365 cluster category "${clusterCategory}". ` +
|
|
119
|
+
"Configure an explicit domain override or add a mapped endpoint for this cluster category.");
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// ── Span truncation ─────────────────────────────────────────────────────────
|
|
123
|
+
/** Maximum allowed span size in bytes (250KB). */
|
|
124
|
+
exports.MAX_SPAN_SIZE_BYTES = 250 * 1024;
|
|
125
|
+
const BLOB_SENTINEL = "[blob truncated]";
|
|
126
|
+
const JSON_SENTINEL = "[truncated]";
|
|
127
|
+
const TRUNCATED_SUFFIX = "… [truncated]";
|
|
128
|
+
const TRUNCATED_SUFFIX_BYTES = Buffer.byteLength(TRUNCATED_SUFFIX, "utf8");
|
|
129
|
+
const OVERLIMIT_SENTINEL = "[overlimit]";
|
|
130
|
+
const MIN_SHRINKABLE_STRING_BYTES = 50;
|
|
131
|
+
function getSerializedSize(value) {
|
|
132
|
+
return Buffer.byteLength(JSON.stringify(value), "utf8");
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Build a versioned message wrapper indicating original messages were dropped.
|
|
136
|
+
*/
|
|
137
|
+
function serializeOverflowSentinel(totalMessages) {
|
|
138
|
+
return JSON.stringify({
|
|
139
|
+
version: contracts_js_1.A365_MESSAGE_SCHEMA_VERSION,
|
|
140
|
+
messages: [
|
|
141
|
+
{
|
|
142
|
+
role: MESSAGE_ROLE_SYSTEM,
|
|
143
|
+
parts: [
|
|
144
|
+
{
|
|
145
|
+
type: "text",
|
|
146
|
+
content: `[truncated: ${totalMessages} ${totalMessages === 1 ? "message" : "messages"} exceeded limit]`,
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Trim a string by a target UTF-8 byte budget while preserving whole code points.
|
|
155
|
+
*/
|
|
156
|
+
function trimString(value, bytesToShed) {
|
|
157
|
+
const currentBytes = Buffer.byteLength(value, "utf8");
|
|
158
|
+
const targetContentBytes = Math.max(0, currentBytes - Math.max(1, bytesToShed) - TRUNCATED_SUFFIX_BYTES);
|
|
159
|
+
if (targetContentBytes <= 0)
|
|
160
|
+
return TRUNCATED_SUFFIX;
|
|
161
|
+
let consumedBytes = 0;
|
|
162
|
+
let endIndex = 0;
|
|
163
|
+
for (const codePoint of value) {
|
|
164
|
+
const cpBytes = Buffer.byteLength(codePoint, "utf8");
|
|
165
|
+
if (consumedBytes + cpBytes > targetContentBytes)
|
|
166
|
+
break;
|
|
167
|
+
consumedBytes += cpBytes;
|
|
168
|
+
endIndex += codePoint.length;
|
|
169
|
+
}
|
|
170
|
+
return value.slice(0, endIndex) + TRUNCATED_SUFFIX;
|
|
171
|
+
}
|
|
172
|
+
function createBlobShrinkAction(part, sourceKey) {
|
|
173
|
+
if (part.type === "blob" && typeof part.content === "string" && part.content !== BLOB_SENTINEL) {
|
|
174
|
+
const contentSize = Buffer.byteLength(part.content, "utf8");
|
|
175
|
+
if (contentSize <= 0)
|
|
176
|
+
return undefined;
|
|
177
|
+
const action = {
|
|
178
|
+
contentBytes: contentSize,
|
|
179
|
+
sourceKey,
|
|
180
|
+
apply() {
|
|
181
|
+
part.content = BLOB_SENTINEL;
|
|
182
|
+
action.contentBytes = 0;
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
return action;
|
|
186
|
+
}
|
|
187
|
+
return undefined;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Collect all shrink candidates from message parts and direct string attributes.
|
|
191
|
+
*/
|
|
192
|
+
function collectShrinkActions(attributes, parsedMessages) {
|
|
193
|
+
const actions = [];
|
|
194
|
+
for (const key of Object.keys(attributes)) {
|
|
195
|
+
let handledAsMessage = false;
|
|
196
|
+
if (MESSAGE_ATTR_KEYS.has(key)) {
|
|
197
|
+
if (!parsedMessages.has(key) && typeof attributes[key] === "string") {
|
|
198
|
+
try {
|
|
199
|
+
const parsed = JSON.parse(attributes[key]);
|
|
200
|
+
if (parsed && typeof parsed === "object" && Array.isArray(parsed.messages)) {
|
|
201
|
+
parsedMessages.set(key, parsed);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch {
|
|
205
|
+
// Not valid JSON — will fall through to string trim
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (parsedMessages.has(key)) {
|
|
209
|
+
handledAsMessage = true;
|
|
210
|
+
const wrapper = parsedMessages.get(key);
|
|
211
|
+
for (const message of wrapper.messages) {
|
|
212
|
+
if (!Array.isArray(message.parts))
|
|
213
|
+
continue;
|
|
214
|
+
for (const part of message.parts) {
|
|
215
|
+
const partType = part.type;
|
|
216
|
+
// Blob → sentinel
|
|
217
|
+
const blobAction = createBlobShrinkAction(part, key);
|
|
218
|
+
if (blobAction) {
|
|
219
|
+
actions.push(blobAction);
|
|
220
|
+
}
|
|
221
|
+
// Tool/server JSON payload fields → sentinel
|
|
222
|
+
const jsonField = partType === "tool_call"
|
|
223
|
+
? "arguments"
|
|
224
|
+
: partType === "tool_call_response"
|
|
225
|
+
? "response"
|
|
226
|
+
: partType === "server_tool_call"
|
|
227
|
+
? "server_tool_call"
|
|
228
|
+
: partType === "server_tool_call_response"
|
|
229
|
+
? "server_tool_call_response"
|
|
230
|
+
: undefined;
|
|
231
|
+
if (jsonField && part[jsonField] !== undefined && part[jsonField] !== JSON_SENTINEL) {
|
|
232
|
+
let fieldSize;
|
|
233
|
+
try {
|
|
234
|
+
fieldSize = Buffer.byteLength(JSON.stringify(part[jsonField]), "utf8");
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
fieldSize = 0;
|
|
238
|
+
}
|
|
239
|
+
if (fieldSize > 0) {
|
|
240
|
+
const action = {
|
|
241
|
+
contentBytes: fieldSize,
|
|
242
|
+
sourceKey: key,
|
|
243
|
+
apply() {
|
|
244
|
+
part[jsonField] = JSON_SENTINEL;
|
|
245
|
+
action.contentBytes = 0;
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
actions.push(action);
|
|
249
|
+
}
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
// Text/reasoning → trim
|
|
253
|
+
if ((partType === "text" || partType === "reasoning") &&
|
|
254
|
+
typeof part.content === "string") {
|
|
255
|
+
const contentSize = Buffer.byteLength(part.content, "utf8");
|
|
256
|
+
if (contentSize > MIN_SHRINKABLE_STRING_BYTES) {
|
|
257
|
+
const action = {
|
|
258
|
+
contentBytes: contentSize,
|
|
259
|
+
sourceKey: key,
|
|
260
|
+
apply(bytesToShed) {
|
|
261
|
+
const cur = Buffer.byteLength(part.content, "utf8");
|
|
262
|
+
if (cur > TRUNCATED_SUFFIX_BYTES) {
|
|
263
|
+
part.content = trimString(part.content, bytesToShed);
|
|
264
|
+
action.contentBytes = Buffer.byteLength(part.content, "utf8");
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
actions.push(action);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// Non-message string attribute → trim
|
|
276
|
+
if (!handledAsMessage && typeof attributes[key] === "string") {
|
|
277
|
+
const value = attributes[key];
|
|
278
|
+
const valueSize = Buffer.byteLength(value, "utf8");
|
|
279
|
+
if (valueSize > MIN_SHRINKABLE_STRING_BYTES) {
|
|
280
|
+
const action = {
|
|
281
|
+
contentBytes: valueSize,
|
|
282
|
+
apply(bytesToShed) {
|
|
283
|
+
const cur = Buffer.byteLength(attributes[key], "utf8");
|
|
284
|
+
if (cur > TRUNCATED_SUFFIX_BYTES) {
|
|
285
|
+
attributes[key] = trimString(attributes[key], bytesToShed);
|
|
286
|
+
action.contentBytes = Buffer.byteLength(attributes[key], "utf8");
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
};
|
|
290
|
+
actions.push(action);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return actions;
|
|
295
|
+
}
|
|
296
|
+
function flushParsedMessages(attributes, parsedMessages) {
|
|
297
|
+
for (const [key, wrapper] of parsedMessages) {
|
|
298
|
+
try {
|
|
299
|
+
attributes[key] = JSON.stringify(wrapper);
|
|
300
|
+
}
|
|
301
|
+
catch {
|
|
302
|
+
// Leave the previous value intact
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
function flushParsedMessage(attributes, parsedMessages, key) {
|
|
307
|
+
const wrapper = parsedMessages.get(key);
|
|
308
|
+
if (wrapper) {
|
|
309
|
+
try {
|
|
310
|
+
attributes[key] = JSON.stringify(wrapper);
|
|
311
|
+
}
|
|
312
|
+
catch {
|
|
313
|
+
// Leave the previous value intact
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function runShrinkPhase(span, attributes, parsedMessages, currentSize) {
|
|
318
|
+
let nextSize = currentSize;
|
|
319
|
+
const actions = collectShrinkActions(attributes, parsedMessages);
|
|
320
|
+
while (actions.length > 0 && nextSize > exports.MAX_SPAN_SIZE_BYTES) {
|
|
321
|
+
let maxIdx = 0;
|
|
322
|
+
for (let j = 1; j < actions.length; j++) {
|
|
323
|
+
if (actions[j].contentBytes > actions[maxIdx].contentBytes)
|
|
324
|
+
maxIdx = j;
|
|
325
|
+
}
|
|
326
|
+
const excess = nextSize - exports.MAX_SPAN_SIZE_BYTES;
|
|
327
|
+
const previousSize = nextSize;
|
|
328
|
+
const action = actions[maxIdx];
|
|
329
|
+
action.apply(excess);
|
|
330
|
+
if (action.sourceKey) {
|
|
331
|
+
flushParsedMessage(attributes, parsedMessages, action.sourceKey);
|
|
332
|
+
}
|
|
333
|
+
nextSize = getSerializedSize(span);
|
|
334
|
+
if (nextSize >= previousSize) {
|
|
335
|
+
actions.splice(maxIdx, 1);
|
|
336
|
+
}
|
|
337
|
+
else if (action.contentBytes <= MIN_SHRINKABLE_STRING_BYTES) {
|
|
338
|
+
actions.splice(maxIdx, 1);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
flushParsedMessages(attributes, parsedMessages);
|
|
342
|
+
return nextSize;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Truncate span attributes if the serialized span exceeds MAX_SPAN_SIZE_BYTES.
|
|
346
|
+
*
|
|
347
|
+
* Phase 1: iteratively shrink fields (blobs, text, json, strings) by size priority.
|
|
348
|
+
* Phase 2 (fallback): replace remaining string attributes with overlimit sentinel.
|
|
349
|
+
*/
|
|
350
|
+
function truncateSpan(spanDict) {
|
|
351
|
+
try {
|
|
352
|
+
let currentSize = getSerializedSize(spanDict);
|
|
353
|
+
if (currentSize <= exports.MAX_SPAN_SIZE_BYTES)
|
|
354
|
+
return spanDict;
|
|
355
|
+
index_js_1.Logger.getInstance().warn(`[Agent365Exporter] Span size (${currentSize} bytes) exceeds limit (${exports.MAX_SPAN_SIZE_BYTES} bytes). Shrinking.`);
|
|
356
|
+
const truncated = { ...spanDict };
|
|
357
|
+
if (truncated.attributes)
|
|
358
|
+
truncated.attributes = { ...truncated.attributes };
|
|
359
|
+
const attributes = truncated.attributes;
|
|
360
|
+
if (!attributes)
|
|
361
|
+
return truncated;
|
|
362
|
+
const parsedMessages = new Map();
|
|
363
|
+
// Phase 1: iteratively shrink fields by size priority
|
|
364
|
+
currentSize = runShrinkPhase(truncated, attributes, parsedMessages, currentSize);
|
|
365
|
+
if (currentSize > exports.MAX_SPAN_SIZE_BYTES) {
|
|
366
|
+
// Phase 2: replace all string attributes with sentinels, largest first
|
|
367
|
+
const stringKeys = Object.keys(attributes)
|
|
368
|
+
.filter((k) => typeof attributes[k] === "string" && attributes[k] !== OVERLIMIT_SENTINEL)
|
|
369
|
+
.sort((a, b) => Buffer.byteLength(attributes[b], "utf8") -
|
|
370
|
+
Buffer.byteLength(attributes[a], "utf8"));
|
|
371
|
+
for (const key of stringKeys) {
|
|
372
|
+
if (currentSize <= exports.MAX_SPAN_SIZE_BYTES)
|
|
373
|
+
break;
|
|
374
|
+
if (MESSAGE_ATTR_KEYS.has(key)) {
|
|
375
|
+
let messageCount = 0;
|
|
376
|
+
const cached = parsedMessages.get(key);
|
|
377
|
+
if (cached) {
|
|
378
|
+
messageCount = cached.messages.length;
|
|
379
|
+
}
|
|
380
|
+
else if (typeof attributes[key] === "string") {
|
|
381
|
+
try {
|
|
382
|
+
const parsed = JSON.parse(attributes[key]);
|
|
383
|
+
if (parsed && Array.isArray(parsed.messages)) {
|
|
384
|
+
messageCount = parsed.messages.length;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
catch {
|
|
388
|
+
/* not valid JSON */
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
attributes[key] = serializeOverflowSentinel(messageCount);
|
|
392
|
+
parsedMessages.delete(key);
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
attributes[key] = OVERLIMIT_SENTINEL;
|
|
396
|
+
}
|
|
397
|
+
currentSize = getSerializedSize(truncated);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
if (currentSize > exports.MAX_SPAN_SIZE_BYTES) {
|
|
401
|
+
index_js_1.Logger.getInstance().warn(`[Agent365Exporter] Span still ${currentSize} bytes after truncation (limit: ${exports.MAX_SPAN_SIZE_BYTES}).`);
|
|
402
|
+
}
|
|
403
|
+
return truncated;
|
|
404
|
+
}
|
|
405
|
+
catch (e) {
|
|
406
|
+
index_js_1.Logger.getInstance().error(`[Agent365Exporter] Error during span truncation: ${e}`);
|
|
407
|
+
return spanDict;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/a365/exporter/utils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA2BlC,kDA8BC;AAGD,4CAGC;AAGD,gCAKC;AAGD,8BAKC;AAGD,sBAIC;AAGD,4BAeC;AAGD,gCAWC;AAKD,0DAUC;AAqSD,oCAqEC;AA5eD,4CAA8D;AAE9D,4DAAuD;AACvD,mEAA6D;AAC7D,uDAKgC;AAChC,kDAA8D;AAE9D,kEAAkE;AAClE,MAAM,iBAAiB,GAAgB,IAAI,GAAG,CAAC;IAC7C,uCAA0B;IAC1B,wCAA2B;CAC5B,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAErC;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,KAAqB;IACvD,MAAM,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;IACjD,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC;QACpC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,qCAAwB,CAAC,CAAC,CAAC;QACtD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,iCAAoB,CAAC,CAAC,CAAC;QAEjD,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE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to populate BaggageBuilder from a TurnContext.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from microsoft/Agent365-nodejs agents-a365-observability-hosting/src/utils/BaggageBuilderUtils.ts
|
|
5
|
+
*/
|
|
6
|
+
import { BaggageBuilder } from "../middleware/BaggageBuilder.js";
|
|
7
|
+
import type { TurnContextLike } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Utilities to populate BaggageBuilder from a TurnContext.
|
|
10
|
+
*/
|
|
11
|
+
export declare class BaggageBuilderUtils {
|
|
12
|
+
/**
|
|
13
|
+
* Populate all supported baggage pairs from the provided TurnContext.
|
|
14
|
+
*/
|
|
15
|
+
static fromTurnContext(builder: BaggageBuilder, turnContext: TurnContextLike): BaggageBuilder;
|
|
16
|
+
static setCallerBaggage(builder: BaggageBuilder, turnContext: TurnContextLike): BaggageBuilder;
|
|
17
|
+
static setTargetAgentBaggage(builder: BaggageBuilder, turnContext: TurnContextLike): BaggageBuilder;
|
|
18
|
+
static setTenantIdBaggage(builder: BaggageBuilder, turnContext: TurnContextLike): BaggageBuilder;
|
|
19
|
+
static setChannelBaggage(builder: BaggageBuilder, turnContext: TurnContextLike): BaggageBuilder;
|
|
20
|
+
static setConversationIdBaggage(builder: BaggageBuilder, turnContext: TurnContextLike): BaggageBuilder;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=baggageBuilderUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baggageBuilderUtils.d.ts","sourceRoot":"","sources":["../../../../src/a365/hosting/baggageBuilderUtils.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AASlD;;GAEG;AACH,qBAAa,mBAAmB;IAC9B;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,GAAG,cAAc;IAY7F,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,GAAG,cAAc;IAK9F,MAAM,CAAC,qBAAqB,CAC1B,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,eAAe,GAC3B,cAAc;IAKjB,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,GAAG,cAAc;IAKhG,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,GAAG,cAAc;IAK/F,MAAM,CAAC,wBAAwB,CAC7B,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,eAAe,GAC3B,cAAc;CAIlB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.BaggageBuilderUtils = void 0;
|
|
6
|
+
const turnContextUtils_js_1 = require("./turnContextUtils.js");
|
|
7
|
+
/**
|
|
8
|
+
* Utilities to populate BaggageBuilder from a TurnContext.
|
|
9
|
+
*/
|
|
10
|
+
class BaggageBuilderUtils {
|
|
11
|
+
/**
|
|
12
|
+
* Populate all supported baggage pairs from the provided TurnContext.
|
|
13
|
+
*/
|
|
14
|
+
static fromTurnContext(builder, turnContext) {
|
|
15
|
+
if (!turnContext) {
|
|
16
|
+
throw new Error("turnContext is required");
|
|
17
|
+
}
|
|
18
|
+
this.setCallerBaggage(builder, turnContext);
|
|
19
|
+
this.setTargetAgentBaggage(builder, turnContext);
|
|
20
|
+
this.setTenantIdBaggage(builder, turnContext);
|
|
21
|
+
this.setChannelBaggage(builder, turnContext);
|
|
22
|
+
this.setConversationIdBaggage(builder, turnContext);
|
|
23
|
+
return builder;
|
|
24
|
+
}
|
|
25
|
+
static setCallerBaggage(builder, turnContext) {
|
|
26
|
+
builder.setPairs((0, turnContextUtils_js_1.getCallerBaggagePairs)(turnContext));
|
|
27
|
+
return builder;
|
|
28
|
+
}
|
|
29
|
+
static setTargetAgentBaggage(builder, turnContext) {
|
|
30
|
+
builder.setPairs((0, turnContextUtils_js_1.getTargetAgentBaggagePairs)(turnContext));
|
|
31
|
+
return builder;
|
|
32
|
+
}
|
|
33
|
+
static setTenantIdBaggage(builder, turnContext) {
|
|
34
|
+
builder.setPairs((0, turnContextUtils_js_1.getTenantIdPair)(turnContext));
|
|
35
|
+
return builder;
|
|
36
|
+
}
|
|
37
|
+
static setChannelBaggage(builder, turnContext) {
|
|
38
|
+
builder.setPairs((0, turnContextUtils_js_1.getChannelBaggagePairs)(turnContext));
|
|
39
|
+
return builder;
|
|
40
|
+
}
|
|
41
|
+
static setConversationIdBaggage(builder, turnContext) {
|
|
42
|
+
builder.setPairs((0, turnContextUtils_js_1.getConversationIdAndItemLinkPairs)(turnContext));
|
|
43
|
+
return builder;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.BaggageBuilderUtils = BaggageBuilderUtils;
|
|
47
|
+
//# sourceMappingURL=baggageBuilderUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baggageBuilderUtils.js","sourceRoot":"","sources":["../../../../src/a365/hosting/baggageBuilderUtils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAUlC,+DAM+B;AAE/B;;GAEG;AACH,MAAa,mBAAmB;IAC9B;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,OAAuB,EAAE,WAA4B;QAC1E,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;QACD,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,qBAAqB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACjD,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC9C,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QAC7C,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACpD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,OAAuB,EAAE,WAA4B;QAC3E,OAAO,CAAC,QAAQ,CAAC,IAAA,2CAAqB,EAAC,WAAW,CAAC,CAAC,CAAC;QACrD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,qBAAqB,CAC1B,OAAuB,EACvB,WAA4B;QAE5B,OAAO,CAAC,QAAQ,CAAC,IAAA,gDAA0B,EAAC,WAAW,CAAC,CAAC,CAAC;QAC1D,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC,OAAuB,EAAE,WAA4B;QAC7E,OAAO,CAAC,QAAQ,CAAC,IAAA,qCAAe,EAAC,WAAW,CAAC,CAAC,CAAC;QAC/C,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,OAAuB,EAAE,WAA4B;QAC5E,OAAO,CAAC,QAAQ,CAAC,IAAA,4CAAsB,EAAC,WAAW,CAAC,CAAC,CAAC;QACtD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,wBAAwB,CAC7B,OAAuB,EACvB,WAA4B;QAE5B,OAAO,CAAC,QAAQ,CAAC,IAAA,uDAAiC,EAAC,WAAW,CAAC,CAAC,CAAC;QACjE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA9CD,kDA8CC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TurnContextLike, MiddlewareLike } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Middleware that propagates OpenTelemetry baggage context derived from TurnContext.
|
|
4
|
+
* Async replies (ContinueConversation) are passed through without baggage setup.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BaggageMiddleware implements MiddlewareLike {
|
|
7
|
+
onTurn(context: TurnContextLike, next: () => Promise<void>): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=baggageMiddleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baggageMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/a365/hosting/baggageMiddleware.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AASlE;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,cAAc;IAChD,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBjF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.BaggageMiddleware = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Middleware that propagates OpenTelemetry baggage context derived from TurnContext.
|
|
8
|
+
* Async replies (ContinueConversation events) are passed through without baggage setup.
|
|
9
|
+
*
|
|
10
|
+
* Adapted from microsoft/Agent365-nodejs agents-a365-observability-hosting/src/middleware/BaggageMiddleware.ts
|
|
11
|
+
*/
|
|
12
|
+
const BaggageBuilder_js_1 = require("../middleware/BaggageBuilder.js");
|
|
13
|
+
const turnContextUtils_js_1 = require("./turnContextUtils.js");
|
|
14
|
+
/**
|
|
15
|
+
* Middleware that propagates OpenTelemetry baggage context derived from TurnContext.
|
|
16
|
+
* Async replies (ContinueConversation) are passed through without baggage setup.
|
|
17
|
+
*/
|
|
18
|
+
class BaggageMiddleware {
|
|
19
|
+
async onTurn(context, next) {
|
|
20
|
+
const isAsyncReply = context.activity?.type === "event" && context.activity?.name === "ContinueConversation";
|
|
21
|
+
if (isAsyncReply) {
|
|
22
|
+
await next();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const baggageScope = new BaggageBuilder_js_1.BaggageBuilder()
|
|
26
|
+
.setPairs((0, turnContextUtils_js_1.getCallerBaggagePairs)(context))
|
|
27
|
+
.setPairs((0, turnContextUtils_js_1.getTargetAgentBaggagePairs)(context))
|
|
28
|
+
.setPairs((0, turnContextUtils_js_1.getTenantIdPair)(context))
|
|
29
|
+
.setPairs((0, turnContextUtils_js_1.getChannelBaggagePairs)(context))
|
|
30
|
+
.setPairs((0, turnContextUtils_js_1.getConversationIdAndItemLinkPairs)(context))
|
|
31
|
+
.build();
|
|
32
|
+
await baggageScope.run(async () => {
|
|
33
|
+
await next();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.BaggageMiddleware = BaggageMiddleware;
|
|
38
|
+
//# sourceMappingURL=baggageMiddleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baggageMiddleware.js","sourceRoot":"","sources":["../../../../src/a365/hosting/baggageMiddleware.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;;;GAKG;AAEH,uEAAiE;AAEjE,+DAM+B;AAE/B;;;GAGG;AACH,MAAa,iBAAiB;IAC5B,KAAK,CAAC,MAAM,CAAC,OAAwB,EAAE,IAAyB;QAC9D,MAAM,YAAY,GAChB,OAAO,CAAC,QAAQ,EAAE,IAAI,KAAK,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,IAAI,KAAK,sBAAsB,CAAC;QAE1F,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,IAAI,EAAE,CAAC;YACb,OAAO;QACT,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,kCAAc,EAAE;aACtC,QAAQ,CAAC,IAAA,2CAAqB,EAAC,OAAO,CAAC,CAAC;aACxC,QAAQ,CAAC,IAAA,gDAA0B,EAAC,OAAO,CAAC,CAAC;aAC7C,QAAQ,CAAC,IAAA,qCAAe,EAAC,OAAO,CAAC,CAAC;aAClC,QAAQ,CAAC,IAAA,4CAAsB,EAAC,OAAO,CAAC,CAAC;aACzC,QAAQ,CAAC,IAAA,uDAAiC,EAAC,OAAO,CAAC,CAAC;aACpD,KAAK,EAAE,CAAC;QAEX,MAAM,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE;YAChC,MAAM,IAAI,EAAE,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,8CAsBC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { BaggageBuilderUtils } from "./baggageBuilderUtils.js";
|
|
2
|
+
export { ScopeUtils } from "./scopeUtils.js";
|
|
3
|
+
export { getCallerBaggagePairs, getTargetAgentBaggagePairs, getTenantIdPair, getChannelBaggagePairs, getConversationIdAndItemLinkPairs, resolveEmbodiedAgentIds, } from "./turnContextUtils.js";
|
|
4
|
+
export { BaggageMiddleware } from "./baggageMiddleware.js";
|
|
5
|
+
export { OutputLoggingMiddleware, A365_PARENT_SPAN_KEY, A365_AUTH_TOKEN_KEY, } from "./outputLoggingMiddleware.js";
|
|
6
|
+
export { ObservabilityHostingManager } from "./observabilityHostingManager.js";
|
|
7
|
+
export type { ObservabilityHostingOptions } from "./observabilityHostingManager.js";
|
|
8
|
+
export type { TurnContextLike, ActivityLike, MiddlewareLike, SendActivitiesHandler, } from "./types.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/a365/hosting/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,iCAAiC,EACjC,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,YAAY,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AACpF,YAAY,EACV,eAAe,EACf,YAAY,EACZ,cAAc,EACd,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ObservabilityHostingManager = exports.A365_AUTH_TOKEN_KEY = exports.A365_PARENT_SPAN_KEY = exports.OutputLoggingMiddleware = exports.BaggageMiddleware = exports.resolveEmbodiedAgentIds = exports.getConversationIdAndItemLinkPairs = exports.getChannelBaggagePairs = exports.getTenantIdPair = exports.getTargetAgentBaggagePairs = exports.getCallerBaggagePairs = exports.ScopeUtils = exports.BaggageBuilderUtils = void 0;
|
|
6
|
+
var baggageBuilderUtils_js_1 = require("./baggageBuilderUtils.js");
|
|
7
|
+
Object.defineProperty(exports, "BaggageBuilderUtils", { enumerable: true, get: function () { return baggageBuilderUtils_js_1.BaggageBuilderUtils; } });
|
|
8
|
+
var scopeUtils_js_1 = require("./scopeUtils.js");
|
|
9
|
+
Object.defineProperty(exports, "ScopeUtils", { enumerable: true, get: function () { return scopeUtils_js_1.ScopeUtils; } });
|
|
10
|
+
var turnContextUtils_js_1 = require("./turnContextUtils.js");
|
|
11
|
+
Object.defineProperty(exports, "getCallerBaggagePairs", { enumerable: true, get: function () { return turnContextUtils_js_1.getCallerBaggagePairs; } });
|
|
12
|
+
Object.defineProperty(exports, "getTargetAgentBaggagePairs", { enumerable: true, get: function () { return turnContextUtils_js_1.getTargetAgentBaggagePairs; } });
|
|
13
|
+
Object.defineProperty(exports, "getTenantIdPair", { enumerable: true, get: function () { return turnContextUtils_js_1.getTenantIdPair; } });
|
|
14
|
+
Object.defineProperty(exports, "getChannelBaggagePairs", { enumerable: true, get: function () { return turnContextUtils_js_1.getChannelBaggagePairs; } });
|
|
15
|
+
Object.defineProperty(exports, "getConversationIdAndItemLinkPairs", { enumerable: true, get: function () { return turnContextUtils_js_1.getConversationIdAndItemLinkPairs; } });
|
|
16
|
+
Object.defineProperty(exports, "resolveEmbodiedAgentIds", { enumerable: true, get: function () { return turnContextUtils_js_1.resolveEmbodiedAgentIds; } });
|
|
17
|
+
var baggageMiddleware_js_1 = require("./baggageMiddleware.js");
|
|
18
|
+
Object.defineProperty(exports, "BaggageMiddleware", { enumerable: true, get: function () { return baggageMiddleware_js_1.BaggageMiddleware; } });
|
|
19
|
+
var outputLoggingMiddleware_js_1 = require("./outputLoggingMiddleware.js");
|
|
20
|
+
Object.defineProperty(exports, "OutputLoggingMiddleware", { enumerable: true, get: function () { return outputLoggingMiddleware_js_1.OutputLoggingMiddleware; } });
|
|
21
|
+
Object.defineProperty(exports, "A365_PARENT_SPAN_KEY", { enumerable: true, get: function () { return outputLoggingMiddleware_js_1.A365_PARENT_SPAN_KEY; } });
|
|
22
|
+
Object.defineProperty(exports, "A365_AUTH_TOKEN_KEY", { enumerable: true, get: function () { return outputLoggingMiddleware_js_1.A365_AUTH_TOKEN_KEY; } });
|
|
23
|
+
var observabilityHostingManager_js_1 = require("./observabilityHostingManager.js");
|
|
24
|
+
Object.defineProperty(exports, "ObservabilityHostingManager", { enumerable: true, get: function () { return observabilityHostingManager_js_1.ObservabilityHostingManager; } });
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/a365/hosting/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAC5B,iDAA6C;AAApC,2GAAA,UAAU,OAAA;AACnB,6DAO+B;AAN7B,4HAAA,qBAAqB,OAAA;AACrB,iIAAA,0BAA0B,OAAA;AAC1B,sHAAA,eAAe,OAAA;AACf,6HAAA,sBAAsB,OAAA;AACtB,wIAAA,iCAAiC,OAAA;AACjC,8HAAA,uBAAuB,OAAA;AAEzB,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA;AAC1B,2EAIsC;AAHpC,qIAAA,uBAAuB,OAAA;AACvB,kIAAA,oBAAoB,OAAA;AACpB,iIAAA,mBAAmB,OAAA;AAErB,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MiddlewareLike } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the hosting observability layer.
|
|
4
|
+
*/
|
|
5
|
+
export interface ObservabilityHostingOptions {
|
|
6
|
+
/** Enable baggage propagation middleware. Defaults to false. */
|
|
7
|
+
enableBaggage?: boolean;
|
|
8
|
+
/** Enable output logging middleware for tracing outgoing messages. Defaults to false. */
|
|
9
|
+
enableOutputLogging?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Manager for configuring hosting-layer observability middleware.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const manager = new ObservabilityHostingManager();
|
|
17
|
+
* manager.configure(adapter, { enableOutputLogging: true });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class ObservabilityHostingManager {
|
|
21
|
+
private _configured;
|
|
22
|
+
/**
|
|
23
|
+
* Registers observability middleware on the adapter.
|
|
24
|
+
* Subsequent calls are ignored.
|
|
25
|
+
*/
|
|
26
|
+
configure(adapter: {
|
|
27
|
+
use(...middlewares: Array<MiddlewareLike>): void;
|
|
28
|
+
}, options: ObservabilityHostingOptions): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=observabilityHostingManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observabilityHostingManager.d.ts","sourceRoot":"","sources":["../../../../src/a365/hosting/observabilityHostingManager.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,gEAAgE;IAChE,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,yFAAyF;IACzF,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,WAAW,CAAS;IAE5B;;;OAGG;IACH,SAAS,CACP,OAAO,EAAE;QAAE,GAAG,CAAC,GAAG,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;KAAE,EAC7D,OAAO,EAAE,2BAA2B,GACnC,IAAI;CA2BR"}
|