@microsoft/agents-a365-observability 0.1.0-preview.103
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/LICENSE.md +21 -0
- package/README.md +33 -0
- package/dist/cjs/ObservabilityBuilder.d.ts +101 -0
- package/dist/cjs/ObservabilityBuilder.d.ts.map +1 -0
- package/dist/cjs/ObservabilityBuilder.js +246 -0
- package/dist/cjs/ObservabilityBuilder.js.map +1 -0
- package/dist/cjs/ObservabilityManager.d.ts +29 -0
- package/dist/cjs/ObservabilityManager.d.ts.map +1 -0
- package/dist/cjs/ObservabilityManager.js +61 -0
- package/dist/cjs/ObservabilityManager.js.map +1 -0
- package/dist/cjs/configuration/ObservabilityConfiguration.d.ts +20 -0
- package/dist/cjs/configuration/ObservabilityConfiguration.d.ts.map +1 -0
- package/dist/cjs/configuration/ObservabilityConfiguration.js +66 -0
- package/dist/cjs/configuration/ObservabilityConfiguration.js.map +1 -0
- package/dist/cjs/configuration/ObservabilityConfigurationOptions.d.ts +68 -0
- package/dist/cjs/configuration/ObservabilityConfigurationOptions.d.ts.map +1 -0
- package/dist/cjs/configuration/ObservabilityConfigurationOptions.js +5 -0
- package/dist/cjs/configuration/ObservabilityConfigurationOptions.js.map +1 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.d.ts +19 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.d.ts.map +1 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.js +53 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfiguration.js.map +1 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts +55 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts.map +1 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.js +5 -0
- package/dist/cjs/configuration/PerRequestSpanProcessorConfigurationOptions.js.map +1 -0
- package/dist/cjs/configuration/index.d.ts +16 -0
- package/dist/cjs/configuration/index.d.ts.map +1 -0
- package/dist/cjs/configuration/index.js +35 -0
- package/dist/cjs/configuration/index.js.map +1 -0
- package/dist/cjs/index.d.ts +17 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +67 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/tracing/PerRequestSpanProcessor.d.ts +41 -0
- package/dist/cjs/tracing/PerRequestSpanProcessor.d.ts.map +1 -0
- package/dist/cjs/tracing/PerRequestSpanProcessor.js +252 -0
- package/dist/cjs/tracing/PerRequestSpanProcessor.js.map +1 -0
- package/dist/cjs/tracing/constants.d.ts +108 -0
- package/dist/cjs/tracing/constants.d.ts.map +1 -0
- package/dist/cjs/tracing/constants.js +127 -0
- package/dist/cjs/tracing/constants.js.map +1 -0
- package/dist/cjs/tracing/context/parent-span-context.d.ts +37 -0
- package/dist/cjs/tracing/context/parent-span-context.d.ts.map +1 -0
- package/dist/cjs/tracing/context/parent-span-context.js +63 -0
- package/dist/cjs/tracing/context/parent-span-context.js.map +1 -0
- package/dist/cjs/tracing/context/token-context.d.ts +11 -0
- package/dist/cjs/tracing/context/token-context.d.ts.map +1 -0
- package/dist/cjs/tracing/context/token-context.js +29 -0
- package/dist/cjs/tracing/context/token-context.js.map +1 -0
- package/dist/cjs/tracing/contracts.d.ts +190 -0
- package/dist/cjs/tracing/contracts.d.ts.map +1 -0
- package/dist/cjs/tracing/contracts.js +44 -0
- package/dist/cjs/tracing/contracts.js.map +1 -0
- package/dist/cjs/tracing/exporter/Agent365Exporter.d.ts +53 -0
- package/dist/cjs/tracing/exporter/Agent365Exporter.d.ts.map +1 -0
- package/dist/cjs/tracing/exporter/Agent365Exporter.js +385 -0
- package/dist/cjs/tracing/exporter/Agent365Exporter.js.map +1 -0
- package/dist/cjs/tracing/exporter/Agent365ExporterOptions.d.ts +39 -0
- package/dist/cjs/tracing/exporter/Agent365ExporterOptions.d.ts.map +1 -0
- package/dist/cjs/tracing/exporter/Agent365ExporterOptions.js +41 -0
- package/dist/cjs/tracing/exporter/Agent365ExporterOptions.js.map +1 -0
- package/dist/cjs/tracing/exporter/ExporterEventNames.d.ts +19 -0
- package/dist/cjs/tracing/exporter/ExporterEventNames.d.ts.map +1 -0
- package/dist/cjs/tracing/exporter/ExporterEventNames.js +24 -0
- package/dist/cjs/tracing/exporter/ExporterEventNames.js.map +1 -0
- package/dist/cjs/tracing/exporter/utils.d.ts +68 -0
- package/dist/cjs/tracing/exporter/utils.d.ts.map +1 -0
- package/dist/cjs/tracing/exporter/utils.js +180 -0
- package/dist/cjs/tracing/exporter/utils.js.map +1 -0
- package/dist/cjs/tracing/middleware/BaggageBuilder.d.ts +220 -0
- package/dist/cjs/tracing/middleware/BaggageBuilder.d.ts.map +1 -0
- package/dist/cjs/tracing/middleware/BaggageBuilder.js +356 -0
- package/dist/cjs/tracing/middleware/BaggageBuilder.js.map +1 -0
- package/dist/cjs/tracing/processors/SpanProcessor.d.ts +30 -0
- package/dist/cjs/tracing/processors/SpanProcessor.d.ts.map +1 -0
- package/dist/cjs/tracing/processors/SpanProcessor.js +107 -0
- package/dist/cjs/tracing/processors/SpanProcessor.js.map +1 -0
- package/dist/cjs/tracing/processors/util.d.ts +9 -0
- package/dist/cjs/tracing/processors/util.d.ts.map +1 -0
- package/dist/cjs/tracing/processors/util.js +57 -0
- package/dist/cjs/tracing/processors/util.js.map +1 -0
- package/dist/cjs/tracing/scopes/ExecuteToolScope.d.ts +26 -0
- package/dist/cjs/tracing/scopes/ExecuteToolScope.d.ts.map +1 -0
- package/dist/cjs/tracing/scopes/ExecuteToolScope.js +57 -0
- package/dist/cjs/tracing/scopes/ExecuteToolScope.js.map +1 -0
- package/dist/cjs/tracing/scopes/InferenceScope.d.ts +51 -0
- package/dist/cjs/tracing/scopes/InferenceScope.d.ts.map +1 -0
- package/dist/cjs/tracing/scopes/InferenceScope.js +89 -0
- package/dist/cjs/tracing/scopes/InferenceScope.js.map +1 -0
- package/dist/cjs/tracing/scopes/InvokeAgentScope.d.ts +35 -0
- package/dist/cjs/tracing/scopes/InvokeAgentScope.d.ts.map +1 -0
- package/dist/cjs/tracing/scopes/InvokeAgentScope.js +96 -0
- package/dist/cjs/tracing/scopes/InvokeAgentScope.js.map +1 -0
- package/dist/cjs/tracing/scopes/OpenTelemetryScope.d.ts +69 -0
- package/dist/cjs/tracing/scopes/OpenTelemetryScope.d.ts.map +1 -0
- package/dist/cjs/tracing/scopes/OpenTelemetryScope.js +190 -0
- package/dist/cjs/tracing/scopes/OpenTelemetryScope.js.map +1 -0
- package/dist/cjs/tracing/util.d.ts +13 -0
- package/dist/cjs/tracing/util.d.ts.map +1 -0
- package/dist/cjs/tracing/util.js +23 -0
- package/dist/cjs/tracing/util.js.map +1 -0
- package/dist/cjs/utils/logging.d.ts +111 -0
- package/dist/cjs/utils/logging.d.ts.map +1 -0
- package/dist/cjs/utils/logging.js +163 -0
- package/dist/cjs/utils/logging.js.map +1 -0
- package/dist/esm/ObservabilityBuilder.d.ts +101 -0
- package/dist/esm/ObservabilityBuilder.d.ts.map +1 -0
- package/dist/esm/ObservabilityBuilder.js +209 -0
- package/dist/esm/ObservabilityBuilder.js.map +1 -0
- package/dist/esm/ObservabilityManager.d.ts +29 -0
- package/dist/esm/ObservabilityManager.d.ts.map +1 -0
- package/dist/esm/ObservabilityManager.js +57 -0
- package/dist/esm/ObservabilityManager.js.map +1 -0
- package/dist/esm/configuration/ObservabilityConfiguration.d.ts +20 -0
- package/dist/esm/configuration/ObservabilityConfiguration.d.ts.map +1 -0
- package/dist/esm/configuration/ObservabilityConfiguration.js +62 -0
- package/dist/esm/configuration/ObservabilityConfiguration.js.map +1 -0
- package/dist/esm/configuration/ObservabilityConfigurationOptions.d.ts +68 -0
- package/dist/esm/configuration/ObservabilityConfigurationOptions.d.ts.map +1 -0
- package/dist/esm/configuration/ObservabilityConfigurationOptions.js +4 -0
- package/dist/esm/configuration/ObservabilityConfigurationOptions.js.map +1 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.d.ts +19 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.d.ts.map +1 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.js +49 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfiguration.js.map +1 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts +55 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.d.ts.map +1 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.js +4 -0
- package/dist/esm/configuration/PerRequestSpanProcessorConfigurationOptions.js.map +1 -0
- package/dist/esm/configuration/index.d.ts +16 -0
- package/dist/esm/configuration/index.d.ts.map +1 -0
- package/dist/esm/configuration/index.js +18 -0
- package/dist/esm/configuration/index.js.map +1 -0
- package/dist/esm/index.d.ts +17 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/tracing/PerRequestSpanProcessor.d.ts +41 -0
- package/dist/esm/tracing/PerRequestSpanProcessor.d.ts.map +1 -0
- package/dist/esm/tracing/PerRequestSpanProcessor.js +245 -0
- package/dist/esm/tracing/PerRequestSpanProcessor.js.map +1 -0
- package/dist/esm/tracing/constants.d.ts +108 -0
- package/dist/esm/tracing/constants.d.ts.map +1 -0
- package/dist/esm/tracing/constants.js +123 -0
- package/dist/esm/tracing/constants.js.map +1 -0
- package/dist/esm/tracing/context/parent-span-context.d.ts +37 -0
- package/dist/esm/tracing/context/parent-span-context.d.ts.map +1 -0
- package/dist/esm/tracing/context/parent-span-context.js +56 -0
- package/dist/esm/tracing/context/parent-span-context.js.map +1 -0
- package/dist/esm/tracing/context/token-context.d.ts +11 -0
- package/dist/esm/tracing/context/token-context.d.ts.map +1 -0
- package/dist/esm/tracing/context/token-context.js +22 -0
- package/dist/esm/tracing/context/token-context.js.map +1 -0
- package/dist/esm/tracing/contracts.d.ts +190 -0
- package/dist/esm/tracing/contracts.d.ts.map +1 -0
- package/dist/esm/tracing/contracts.js +41 -0
- package/dist/esm/tracing/contracts.js.map +1 -0
- package/dist/esm/tracing/exporter/Agent365Exporter.d.ts +53 -0
- package/dist/esm/tracing/exporter/Agent365Exporter.d.ts.map +1 -0
- package/dist/esm/tracing/exporter/Agent365Exporter.js +348 -0
- package/dist/esm/tracing/exporter/Agent365Exporter.js.map +1 -0
- package/dist/esm/tracing/exporter/Agent365ExporterOptions.d.ts +39 -0
- package/dist/esm/tracing/exporter/Agent365ExporterOptions.d.ts.map +1 -0
- package/dist/esm/tracing/exporter/Agent365ExporterOptions.js +37 -0
- package/dist/esm/tracing/exporter/Agent365ExporterOptions.js.map +1 -0
- package/dist/esm/tracing/exporter/ExporterEventNames.d.ts +19 -0
- package/dist/esm/tracing/exporter/ExporterEventNames.d.ts.map +1 -0
- package/dist/esm/tracing/exporter/ExporterEventNames.js +21 -0
- package/dist/esm/tracing/exporter/ExporterEventNames.js.map +1 -0
- package/dist/esm/tracing/exporter/utils.d.ts +68 -0
- package/dist/esm/tracing/exporter/utils.d.ts.map +1 -0
- package/dist/esm/tracing/exporter/utils.js +163 -0
- package/dist/esm/tracing/exporter/utils.js.map +1 -0
- package/dist/esm/tracing/middleware/BaggageBuilder.d.ts +220 -0
- package/dist/esm/tracing/middleware/BaggageBuilder.d.ts.map +1 -0
- package/dist/esm/tracing/middleware/BaggageBuilder.js +351 -0
- package/dist/esm/tracing/middleware/BaggageBuilder.js.map +1 -0
- package/dist/esm/tracing/processors/SpanProcessor.d.ts +30 -0
- package/dist/esm/tracing/processors/SpanProcessor.d.ts.map +1 -0
- package/dist/esm/tracing/processors/SpanProcessor.js +103 -0
- package/dist/esm/tracing/processors/SpanProcessor.js.map +1 -0
- package/dist/esm/tracing/processors/util.d.ts +9 -0
- package/dist/esm/tracing/processors/util.d.ts.map +1 -0
- package/dist/esm/tracing/processors/util.js +54 -0
- package/dist/esm/tracing/processors/util.js.map +1 -0
- package/dist/esm/tracing/scopes/ExecuteToolScope.d.ts +26 -0
- package/dist/esm/tracing/scopes/ExecuteToolScope.d.ts.map +1 -0
- package/dist/esm/tracing/scopes/ExecuteToolScope.js +53 -0
- package/dist/esm/tracing/scopes/ExecuteToolScope.js.map +1 -0
- package/dist/esm/tracing/scopes/InferenceScope.d.ts +51 -0
- package/dist/esm/tracing/scopes/InferenceScope.d.ts.map +1 -0
- package/dist/esm/tracing/scopes/InferenceScope.js +85 -0
- package/dist/esm/tracing/scopes/InferenceScope.js.map +1 -0
- package/dist/esm/tracing/scopes/InvokeAgentScope.d.ts +35 -0
- package/dist/esm/tracing/scopes/InvokeAgentScope.d.ts.map +1 -0
- package/dist/esm/tracing/scopes/InvokeAgentScope.js +92 -0
- package/dist/esm/tracing/scopes/InvokeAgentScope.js.map +1 -0
- package/dist/esm/tracing/scopes/OpenTelemetryScope.d.ts +69 -0
- package/dist/esm/tracing/scopes/OpenTelemetryScope.d.ts.map +1 -0
- package/dist/esm/tracing/scopes/OpenTelemetryScope.js +183 -0
- package/dist/esm/tracing/scopes/OpenTelemetryScope.js.map +1 -0
- package/dist/esm/tracing/util.d.ts +13 -0
- package/dist/esm/tracing/util.d.ts.map +1 -0
- package/dist/esm/tracing/util.js +19 -0
- package/dist/esm/tracing/util.js.map +1 -0
- package/dist/esm/utils/logging.d.ts +111 -0
- package/dist/esm/utils/logging.d.ts.map +1 -0
- package/dist/esm/utils/logging.js +155 -0
- package/dist/esm/utils/logging.js.map +1 -0
- package/package.json +71 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Microsoft
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @microsoft/agents-a365-observability
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@microsoft/agents-a365-observability)
|
|
4
|
+
[](https://www.npmjs.com/package/@microsoft/agents-a365-observability)
|
|
5
|
+
|
|
6
|
+
OpenTelemetry-based observability and tracing for Microsoft Agents A365 applications. This package provides comprehensive monitoring capabilities for agent invocations, tool executions, and AI model inference calls with seamless Azure Monitor integration.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @microsoft/agents-a365-observability
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
For detailed usage examples and implementation guidance, see the [Microsoft Agent 365 Observability Documentation](https://learn.microsoft.com/microsoft-agent-365/developer/observability?tabs=nodejs).
|
|
17
|
+
|
|
18
|
+
## Support
|
|
19
|
+
|
|
20
|
+
For issues, questions, or feedback:
|
|
21
|
+
|
|
22
|
+
- File issues in the [GitHub Issues](https://github.com/microsoft/Agent365-nodejs/issues) section
|
|
23
|
+
- See the [main documentation](../../README.md) for more information
|
|
24
|
+
|
|
25
|
+
## Trademarks
|
|
26
|
+
|
|
27
|
+
*Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.*
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
32
|
+
|
|
33
|
+
Licensed under the MIT License - see the [LICENSE](../../LICENSE.md) file for details
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { TokenResolver } from './tracing/exporter/Agent365ExporterOptions';
|
|
2
|
+
import { Agent365ExporterOptions } from './tracing/exporter/Agent365ExporterOptions';
|
|
3
|
+
import { ClusterCategory } from '@microsoft/agents-a365-runtime';
|
|
4
|
+
import { type ILogger } from './utils/logging';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for Agent 365 Observability Builder
|
|
7
|
+
*/
|
|
8
|
+
export interface BuilderOptions {
|
|
9
|
+
/** Custom service name for telemetry */
|
|
10
|
+
serviceName?: string;
|
|
11
|
+
/** Custom service version for telemetry */
|
|
12
|
+
serviceVersion?: string;
|
|
13
|
+
tokenResolver?: TokenResolver;
|
|
14
|
+
/** Environment / cluster category (e.g., "preprod", "prod"). */
|
|
15
|
+
clusterCategory?: ClusterCategory;
|
|
16
|
+
/**
|
|
17
|
+
* Optional partial set of exporter options allowing agent developers to customize.
|
|
18
|
+
* Any values omitted will fall back to the defaults defined in Agent365ExporterOptions.
|
|
19
|
+
* Values provided here will be overridden by explicitly configured tokenResolver or clusterCategory
|
|
20
|
+
* from dedicated builder methods.
|
|
21
|
+
*/
|
|
22
|
+
exporterOptions?: Partial<Agent365ExporterOptions>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional custom logger implementation for the observability SDK.
|
|
25
|
+
* If not provided, the SDK uses the default console logger.
|
|
26
|
+
* Implement ILogger to integrate with other logging services
|
|
27
|
+
*/
|
|
28
|
+
customLogger?: ILogger;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Builder for configuring Agent 365 with OpenTelemetry tracing
|
|
32
|
+
*/
|
|
33
|
+
export declare class ObservabilityBuilder {
|
|
34
|
+
private options;
|
|
35
|
+
private isBuilt;
|
|
36
|
+
private sdk?;
|
|
37
|
+
/**
|
|
38
|
+
* Configures the service name and version for telemetry
|
|
39
|
+
* @param serviceName The service name
|
|
40
|
+
* @param serviceVersion The service version
|
|
41
|
+
* @returns The builder instance for method chaining
|
|
42
|
+
*/
|
|
43
|
+
withService(serviceName: string, serviceVersion?: string): ObservabilityBuilder;
|
|
44
|
+
/**
|
|
45
|
+
* Configures the token resolver for Agent 365 exporter
|
|
46
|
+
* @param tokenResolver Function to resolve authentication tokens
|
|
47
|
+
* @returns The builder instance for method chaining
|
|
48
|
+
*/
|
|
49
|
+
withTokenResolver(tokenResolver: TokenResolver): ObservabilityBuilder;
|
|
50
|
+
/**
|
|
51
|
+
* Configures the cluster category for Agent 365 exporter
|
|
52
|
+
* @param clusterCategory The cluster category (e.g., "preprod", "prod")
|
|
53
|
+
* @returns The builder instance for method chaining
|
|
54
|
+
*/
|
|
55
|
+
withClusterCategory(clusterCategory: ClusterCategory): ObservabilityBuilder;
|
|
56
|
+
/**
|
|
57
|
+
* Provide a partial set of Agent365ExporterOptions. These will be merged with
|
|
58
|
+
* defaults and any explicitly configured clusterCategory/tokenResolver.
|
|
59
|
+
* @param exporterOptions Partial exporter options
|
|
60
|
+
* @returns The builder instance for chaining
|
|
61
|
+
*/
|
|
62
|
+
withExporterOptions(exporterOptions: Partial<Agent365ExporterOptions>): ObservabilityBuilder;
|
|
63
|
+
/**
|
|
64
|
+
* Sets a custom logger implementation for the observability SDK
|
|
65
|
+
* @param customLogger The custom logger implementation (must implement ILogger interface)
|
|
66
|
+
* @returns The builder instance for method chaining
|
|
67
|
+
*
|
|
68
|
+
* Example with Winston:
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const winstonLogger = winston.createLogger({...});
|
|
71
|
+
* builder.withCustomLogger({
|
|
72
|
+
* info: (msg, ...args) => winstonLogger.info(msg, ...args),
|
|
73
|
+
* warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
|
|
74
|
+
* error: (msg, ...args) => winstonLogger.error(msg, ...args)
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
withCustomLogger(customLogger: ILogger): ObservabilityBuilder;
|
|
79
|
+
private createBatchProcessor;
|
|
80
|
+
private createPerRequestProcessor;
|
|
81
|
+
private createExportProcessor;
|
|
82
|
+
private createResource;
|
|
83
|
+
/**
|
|
84
|
+
* Builds and initializes the Agent 365 configuration
|
|
85
|
+
* @returns The configured NodeSDK instance
|
|
86
|
+
*/
|
|
87
|
+
build(): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Starts the OpenTelemetry SDK
|
|
90
|
+
*/
|
|
91
|
+
start(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Shuts down the OpenTelemetry SDK
|
|
94
|
+
*/
|
|
95
|
+
shutdown(): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Helper to avoid double-registering same processor type.
|
|
98
|
+
*/
|
|
99
|
+
private attachProcessorIfMissing;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=ObservabilityBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservabilityBuilder.d.ts","sourceRoot":"","sources":["../../src/ObservabilityBuilder.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAKrF,OAAO,EA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AMtC;;OAEG;IAEH,OAAO,CAAC,wBAAwB;CAUjC"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ------------------------------------------------------------------------------
|
|
3
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
// ------------------------------------------------------------------------------
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ObservabilityBuilder = void 0;
|
|
40
|
+
const sdk_node_1 = require("@opentelemetry/sdk-node");
|
|
41
|
+
const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
|
|
42
|
+
const SpanProcessor_1 = require("./tracing/processors/SpanProcessor");
|
|
43
|
+
const utils_1 = require("./tracing/exporter/utils");
|
|
44
|
+
const Agent365Exporter_1 = require("./tracing/exporter/Agent365Exporter");
|
|
45
|
+
const Agent365ExporterOptions_1 = require("./tracing/exporter/Agent365ExporterOptions");
|
|
46
|
+
const PerRequestSpanProcessor_1 = require("./tracing/PerRequestSpanProcessor");
|
|
47
|
+
const resources_1 = require("@opentelemetry/resources");
|
|
48
|
+
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
49
|
+
const api_1 = require("@opentelemetry/api");
|
|
50
|
+
const agents_a365_runtime_1 = require("@microsoft/agents-a365-runtime");
|
|
51
|
+
const logging_1 = __importStar(require("./utils/logging"));
|
|
52
|
+
/**
|
|
53
|
+
* Builder for configuring Agent 365 with OpenTelemetry tracing
|
|
54
|
+
*/
|
|
55
|
+
class ObservabilityBuilder {
|
|
56
|
+
constructor() {
|
|
57
|
+
this.options = {};
|
|
58
|
+
this.isBuilt = false;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Configures the service name and version for telemetry
|
|
62
|
+
* @param serviceName The service name
|
|
63
|
+
* @param serviceVersion The service version
|
|
64
|
+
* @returns The builder instance for method chaining
|
|
65
|
+
*/
|
|
66
|
+
withService(serviceName, serviceVersion) {
|
|
67
|
+
this.options.serviceName = serviceName;
|
|
68
|
+
this.options.serviceVersion = serviceVersion;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Configures the token resolver for Agent 365 exporter
|
|
73
|
+
* @param tokenResolver Function to resolve authentication tokens
|
|
74
|
+
* @returns The builder instance for method chaining
|
|
75
|
+
*/
|
|
76
|
+
withTokenResolver(tokenResolver) {
|
|
77
|
+
this.options.tokenResolver = tokenResolver;
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Configures the cluster category for Agent 365 exporter
|
|
82
|
+
* @param clusterCategory The cluster category (e.g., "preprod", "prod")
|
|
83
|
+
* @returns The builder instance for method chaining
|
|
84
|
+
*/
|
|
85
|
+
withClusterCategory(clusterCategory) {
|
|
86
|
+
this.options.clusterCategory = clusterCategory;
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Provide a partial set of Agent365ExporterOptions. These will be merged with
|
|
91
|
+
* defaults and any explicitly configured clusterCategory/tokenResolver.
|
|
92
|
+
* @param exporterOptions Partial exporter options
|
|
93
|
+
* @returns The builder instance for chaining
|
|
94
|
+
*/
|
|
95
|
+
withExporterOptions(exporterOptions) {
|
|
96
|
+
this.options.exporterOptions = {
|
|
97
|
+
...(this.options.exporterOptions || {}),
|
|
98
|
+
...exporterOptions
|
|
99
|
+
};
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Sets a custom logger implementation for the observability SDK
|
|
104
|
+
* @param customLogger The custom logger implementation (must implement ILogger interface)
|
|
105
|
+
* @returns The builder instance for method chaining
|
|
106
|
+
*
|
|
107
|
+
* Example with Winston:
|
|
108
|
+
* ```typescript
|
|
109
|
+
* const winstonLogger = winston.createLogger({...});
|
|
110
|
+
* builder.withCustomLogger({
|
|
111
|
+
* info: (msg, ...args) => winstonLogger.info(msg, ...args),
|
|
112
|
+
* warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
|
|
113
|
+
* error: (msg, ...args) => winstonLogger.error(msg, ...args)
|
|
114
|
+
* });
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
withCustomLogger(customLogger) {
|
|
118
|
+
this.options.customLogger = customLogger;
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
createBatchProcessor() {
|
|
122
|
+
if (!(0, utils_1.isAgent365ExporterEnabled)()) {
|
|
123
|
+
logging_1.default.info('[ObservabilityBuilder] Agent 365 exporter not enabled. Using ConsoleSpanExporter for BatchSpanProcessor.');
|
|
124
|
+
return new sdk_trace_base_1.BatchSpanProcessor(new sdk_trace_base_1.ConsoleSpanExporter());
|
|
125
|
+
}
|
|
126
|
+
const opts = new Agent365ExporterOptions_1.Agent365ExporterOptions();
|
|
127
|
+
if (this.options.exporterOptions) {
|
|
128
|
+
Object.assign(opts, this.options.exporterOptions);
|
|
129
|
+
}
|
|
130
|
+
opts.clusterCategory = this.options.clusterCategory || opts.clusterCategory || agents_a365_runtime_1.ClusterCategory.prod;
|
|
131
|
+
if (this.options.tokenResolver) {
|
|
132
|
+
opts.tokenResolver = this.options.tokenResolver;
|
|
133
|
+
}
|
|
134
|
+
return new sdk_trace_base_1.BatchSpanProcessor(new Agent365Exporter_1.Agent365Exporter(opts), {
|
|
135
|
+
maxQueueSize: opts.maxQueueSize,
|
|
136
|
+
scheduledDelayMillis: opts.scheduledDelayMilliseconds,
|
|
137
|
+
exportTimeoutMillis: opts.exporterTimeoutMilliseconds,
|
|
138
|
+
maxExportBatchSize: opts.maxExportBatchSize
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
createPerRequestProcessor() {
|
|
142
|
+
if (!(0, utils_1.isAgent365ExporterEnabled)()) {
|
|
143
|
+
logging_1.default.info('[Agent365Exporter] Per-request export enabled but Agent 365 exporter is disabled. Using ConsoleSpanExporter.');
|
|
144
|
+
return new PerRequestSpanProcessor_1.PerRequestSpanProcessor(new sdk_trace_base_1.ConsoleSpanExporter());
|
|
145
|
+
}
|
|
146
|
+
const opts = new Agent365ExporterOptions_1.Agent365ExporterOptions();
|
|
147
|
+
if (this.options.exporterOptions) {
|
|
148
|
+
Object.assign(opts, this.options.exporterOptions);
|
|
149
|
+
}
|
|
150
|
+
opts.clusterCategory = this.options.clusterCategory || opts.clusterCategory || agents_a365_runtime_1.ClusterCategory.prod;
|
|
151
|
+
// For per-request export, token is retrieved from OTel Context by Agent365Exporter
|
|
152
|
+
// using getExportToken(), so no tokenResolver is needed here
|
|
153
|
+
return new PerRequestSpanProcessor_1.PerRequestSpanProcessor(new Agent365Exporter_1.Agent365Exporter(opts));
|
|
154
|
+
}
|
|
155
|
+
createExportProcessor() {
|
|
156
|
+
if ((0, utils_1.isPerRequestExportEnabled)()) {
|
|
157
|
+
return this.createPerRequestProcessor();
|
|
158
|
+
}
|
|
159
|
+
return this.createBatchProcessor();
|
|
160
|
+
}
|
|
161
|
+
createResource() {
|
|
162
|
+
const serviceName = this.options.serviceVersion
|
|
163
|
+
? `${this.options.serviceName}-${this.options.serviceVersion}`
|
|
164
|
+
: this.options.serviceName ?? 'Agent365-TypeScript';
|
|
165
|
+
return (0, resources_1.resourceFromAttributes)({
|
|
166
|
+
[semantic_conventions_1.ATTR_SERVICE_NAME]: serviceName,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Builds and initializes the Agent 365 configuration
|
|
171
|
+
* @returns The configured NodeSDK instance
|
|
172
|
+
*/
|
|
173
|
+
build() {
|
|
174
|
+
if (this.isBuilt) {
|
|
175
|
+
return this.isBuilt;
|
|
176
|
+
}
|
|
177
|
+
// Apply custom logger if provided
|
|
178
|
+
if (this.options.customLogger) {
|
|
179
|
+
(0, logging_1.setLogger)(this.options.customLogger);
|
|
180
|
+
}
|
|
181
|
+
// Create processors in the desired order:
|
|
182
|
+
// 1. baggage enricher (copies baggage -> span attributes)
|
|
183
|
+
const spanProcessor = new SpanProcessor_1.SpanProcessor();
|
|
184
|
+
// 2. export processor (batch or per-request based on environment variable)
|
|
185
|
+
const exportProcessor = this.createExportProcessor();
|
|
186
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
187
|
+
const globalProvider = api_1.trace.getTracerProvider();
|
|
188
|
+
const canAddProcessors = typeof globalProvider?.addSpanProcessor === 'function' &&
|
|
189
|
+
typeof globalProvider?.resource !== 'undefined';
|
|
190
|
+
if (canAddProcessors) {
|
|
191
|
+
// Someone else already created a provider (maybe their own NodeSDK).
|
|
192
|
+
// We DO NOT create a new NodeSDK.
|
|
193
|
+
// We just add our baggage enricher + export processor to their provider,
|
|
194
|
+
// but only if they aren't already there.
|
|
195
|
+
this.attachProcessorIfMissing(globalProvider, spanProcessor);
|
|
196
|
+
this.attachProcessorIfMissing(globalProvider, exportProcessor);
|
|
197
|
+
this.isBuilt = true;
|
|
198
|
+
this.sdk = undefined; // we didn't create/own one
|
|
199
|
+
return this.isBuilt;
|
|
200
|
+
}
|
|
201
|
+
// Create & configure the NodeSDK manually so we can inject processors + resource.
|
|
202
|
+
this.sdk = new sdk_node_1.NodeSDK({
|
|
203
|
+
resource: this.createResource(),
|
|
204
|
+
spanProcessors: [
|
|
205
|
+
spanProcessor,
|
|
206
|
+
exportProcessor,
|
|
207
|
+
],
|
|
208
|
+
});
|
|
209
|
+
this.isBuilt = true;
|
|
210
|
+
return this.isBuilt;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Starts the OpenTelemetry SDK
|
|
214
|
+
*/
|
|
215
|
+
start() {
|
|
216
|
+
if (!this.isBuilt) {
|
|
217
|
+
this.build();
|
|
218
|
+
}
|
|
219
|
+
if (this.sdk) {
|
|
220
|
+
this.sdk.start();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Shuts down the OpenTelemetry SDK
|
|
225
|
+
*/
|
|
226
|
+
async shutdown() {
|
|
227
|
+
if (this.sdk) {
|
|
228
|
+
await this.sdk.shutdown();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Helper to avoid double-registering same processor type.
|
|
233
|
+
*/
|
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
235
|
+
attachProcessorIfMissing(provider, processor) {
|
|
236
|
+
const active = provider._activeSpanProcessor?._spanProcessors;
|
|
237
|
+
const alreadyAdded = Array.isArray(active) &&
|
|
238
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
239
|
+
active.some((p) => p?.constructor?.name === processor.constructor.name);
|
|
240
|
+
if (!alreadyAdded) {
|
|
241
|
+
provider.addSpanProcessor(processor);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
exports.ObservabilityBuilder = ObservabilityBuilder;
|
|
246
|
+
//# sourceMappingURL=ObservabilityBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservabilityBuilder.js","sourceRoot":"","sources":["../../src/ObservabilityBuilder.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,4DAA4D;AAC5D,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,sDAAkD;AAClD,kEAAwF;AACxF,sEAAmE;AACnE,oDAAgG;AAChG,0EAAuE;AAEvE,wFAAqF;AACrF,+EAA4E;AAC5E,wDAAkE;AAClE,8EAAwE;AACxE,4CAA2C;AAC3C,wEAAiE;AACjE,2DAAkE;AA8BlE;;GAEG;AACH,MAAa,oBAAoB;IAAjC;QACU,YAAO,GAAmB,EAAE,CAAC;QAC7B,YAAO,GAAG,KAAK,CAAC;IAyN1B,CAAC;IAtNC;;;;;OAKG;IACI,WAAW,CAAC,WAAmB,EAAE,cAAuB;QAC7D,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,cAAc,GAAG,cAAc,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,aAA4B;QACnD,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CAAC,eAAgC;QACzD,IAA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AO,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,KAAK;QACV,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC;QACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,QAAQ;QACnB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;IAED;;OAEG;IACH,8DAA8D;IACtD,wBAAwB,CAAC,QAAa,EAAE,SAAc;QAC5D,MAAM,MAAM,GAAG,QAAQ,CAAC,oBAAoB,EAAE,eAAe,CAAC;QAC9D,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YACxC,8DAA8D;YAC9D,MAAM,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,KAAK,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAE/E,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,QAAQ,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;CACF;AA3ND,oDA2NC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ObservabilityBuilder, BuilderOptions } from './ObservabilityBuilder';
|
|
2
|
+
/**
|
|
3
|
+
* Main entry point for Agent 365 providing OpenTelemetry tracing for AI agents and tools
|
|
4
|
+
*/
|
|
5
|
+
export declare class ObservabilityManager {
|
|
6
|
+
private static instance?;
|
|
7
|
+
/**
|
|
8
|
+
* Configures Agent 365 with OpenTelemetry tracing for AI agents and tools
|
|
9
|
+
* @param configure Optional configuration callback for the Builder
|
|
10
|
+
* @returns The configured Builder instance
|
|
11
|
+
*/
|
|
12
|
+
static configure(configure?: (builder: ObservabilityBuilder) => void): ObservabilityBuilder;
|
|
13
|
+
/**
|
|
14
|
+
* Configures and starts Agent 365 with simplified options
|
|
15
|
+
* @param options Configuration options
|
|
16
|
+
* @returns The configured and started Builder instance
|
|
17
|
+
*/
|
|
18
|
+
static start(options?: BuilderOptions): ObservabilityBuilder;
|
|
19
|
+
/**
|
|
20
|
+
* Gets the current Agent 365 instance
|
|
21
|
+
* @returns The current instance or null if not configured
|
|
22
|
+
*/
|
|
23
|
+
static getInstance(): ObservabilityBuilder | null;
|
|
24
|
+
/**
|
|
25
|
+
* Shuts down Agent 365
|
|
26
|
+
*/
|
|
27
|
+
static shutdown(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ObservabilityManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservabilityManager.d.ts","sourceRoot":"","sources":["../../src/ObservabilityManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE9E;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAuB;IAG/C;;;;OAIG;WACW,SAAS,CACrB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,GAClD,oBAAoB;IASvB;;;;OAIG;WACW,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,oBAAoB;IAqBnE;;;OAGG;WACW,WAAW,IAAI,oBAAoB,GAAG,IAAI;IAIxD;;OAEG;WACiB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAM9C"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ------------------------------------------------------------------------------
|
|
3
|
+
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
// ------------------------------------------------------------------------------
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ObservabilityManager = void 0;
|
|
7
|
+
const ObservabilityBuilder_1 = require("./ObservabilityBuilder");
|
|
8
|
+
/**
|
|
9
|
+
* Main entry point for Agent 365 providing OpenTelemetry tracing for AI agents and tools
|
|
10
|
+
*/
|
|
11
|
+
class ObservabilityManager {
|
|
12
|
+
/**
|
|
13
|
+
* Configures Agent 365 with OpenTelemetry tracing for AI agents and tools
|
|
14
|
+
* @param configure Optional configuration callback for the Builder
|
|
15
|
+
* @returns The configured Builder instance
|
|
16
|
+
*/
|
|
17
|
+
static configure(configure) {
|
|
18
|
+
const builder = new ObservabilityBuilder_1.ObservabilityBuilder();
|
|
19
|
+
configure?.(builder);
|
|
20
|
+
ObservabilityManager.instance = builder;
|
|
21
|
+
return builder;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Configures and starts Agent 365 with simplified options
|
|
25
|
+
* @param options Configuration options
|
|
26
|
+
* @returns The configured and started Builder instance
|
|
27
|
+
*/
|
|
28
|
+
static start(options) {
|
|
29
|
+
const builder = new ObservabilityBuilder_1.ObservabilityBuilder();
|
|
30
|
+
if (options?.serviceName) {
|
|
31
|
+
builder.withService(options.serviceName, options.serviceVersion);
|
|
32
|
+
}
|
|
33
|
+
if (options?.tokenResolver) {
|
|
34
|
+
builder.withTokenResolver(options.tokenResolver);
|
|
35
|
+
}
|
|
36
|
+
if (options?.clusterCategory) {
|
|
37
|
+
builder.withClusterCategory(options.clusterCategory);
|
|
38
|
+
}
|
|
39
|
+
builder.start();
|
|
40
|
+
ObservabilityManager.instance = builder;
|
|
41
|
+
return builder;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Gets the current Agent 365 instance
|
|
45
|
+
* @returns The current instance or null if not configured
|
|
46
|
+
*/
|
|
47
|
+
static getInstance() {
|
|
48
|
+
return ObservabilityManager.instance || null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Shuts down Agent 365
|
|
52
|
+
*/
|
|
53
|
+
static async shutdown() {
|
|
54
|
+
if (ObservabilityManager.instance) {
|
|
55
|
+
await ObservabilityManager.instance.shutdown();
|
|
56
|
+
ObservabilityManager.instance = undefined;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ObservabilityManager = ObservabilityManager;
|
|
61
|
+
//# sourceMappingURL=ObservabilityManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservabilityManager.js","sourceRoot":"","sources":["../../src/ObservabilityManager.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,4DAA4D;AAC5D,iFAAiF;;;AAEjF,iEAA8E;AAE9E;;GAEG;AACH,MAAa,oBAAoB;IAI/B;;;;OAIG;IACI,MAAM,CAAC,SAAS,CACrB,SAAmD;QAEnD,MAAM,OAAO,GAAG,IAAI,2CAAoB,EAAE,CAAC;QAE3C,SAAS,EAAE,CAAC,OAAO,CAAC,CAAC;QAErB,oBAAoB,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,KAAK,CAAC,OAAwB;QAC1C,MAAM,OAAO,GAAG,IAAI,2CAAoB,EAAE,CAAC;QAE3C,IAAI,OAAO,EAAE,WAAW,EAAE,CAAC;YACzB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;QACnE,CAAC;QAED,IAAI,OAAO,EAAE,aAAa,EAAE,CAAC;YAC3B,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,OAAO,EAAE,eAAe,EAAE,CAAC;YAC7B,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,CAAC,KAAK,EAAE,CAAC;QAEhB,oBAAoB,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,WAAW;QACvB,OAAO,oBAAoB,CAAC,QAAQ,IAAI,IAAI,CAAC;IAC/C,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK,CAAC,QAAQ;QAC1B,IAAI,oBAAoB,CAAC,QAAQ,EAAE,CAAC;YAClC,MAAM,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAC/C,oBAAoB,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC5C,CAAC;IACH,CAAC;CACF;AA/DD,oDA+DC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RuntimeConfiguration } from '@microsoft/agents-a365-runtime';
|
|
2
|
+
import { ObservabilityConfigurationOptions } from './ObservabilityConfigurationOptions';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for observability package.
|
|
5
|
+
* Inherits runtime settings and adds observability-specific settings.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ObservabilityConfiguration extends RuntimeConfiguration {
|
|
8
|
+
protected get observabilityOverrides(): ObservabilityConfigurationOptions;
|
|
9
|
+
constructor(overrides?: ObservabilityConfigurationOptions);
|
|
10
|
+
/**
|
|
11
|
+
* Gets the observability authentication scopes.
|
|
12
|
+
* Used by AgenticTokenCache for observability service authentication.
|
|
13
|
+
*/
|
|
14
|
+
get observabilityAuthenticationScopes(): readonly string[];
|
|
15
|
+
get isObservabilityExporterEnabled(): boolean;
|
|
16
|
+
get useCustomDomainForObservability(): boolean;
|
|
17
|
+
get observabilityDomainOverride(): string | null;
|
|
18
|
+
get observabilityLogLevel(): string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ObservabilityConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservabilityConfiguration.d.ts","sourceRoot":"","sources":["../../../src/configuration/ObservabilityConfiguration.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAKxF;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,oBAAoB;IAClE,SAAS,KAAK,sBAAsB,IAAI,iCAAiC,CAExE;gBAEW,SAAS,CAAC,EAAE,iCAAiC;IAMzD;;;OAGG;IACH,IAAI,iCAAiC,IAAI,SAAS,MAAM,EAAE,CAUzD;IAED,IAAI,8BAA8B,IAAI,OAAO,CAI5C;IAED,IAAI,+BAA+B,IAAI,OAAO,CAI7C;IAED,IAAI,2BAA2B,IAAI,MAAM,GAAG,IAAI,CAU/C;IAED,IAAI,qBAAqB,IAAI,MAAM,CAIlC;CACF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ObservabilityConfiguration = void 0;
|
|
6
|
+
const agents_a365_runtime_1 = require("@microsoft/agents-a365-runtime");
|
|
7
|
+
// Default constants
|
|
8
|
+
const PROD_OBSERVABILITY_SCOPE = 'https://api.powerplatform.com/.default';
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for observability package.
|
|
11
|
+
* Inherits runtime settings and adds observability-specific settings.
|
|
12
|
+
*/
|
|
13
|
+
class ObservabilityConfiguration extends agents_a365_runtime_1.RuntimeConfiguration {
|
|
14
|
+
get observabilityOverrides() {
|
|
15
|
+
return this.overrides;
|
|
16
|
+
}
|
|
17
|
+
constructor(overrides) {
|
|
18
|
+
super(overrides);
|
|
19
|
+
}
|
|
20
|
+
// Inherited: clusterCategory, isDevelopmentEnvironment, isNodeEnvDevelopment
|
|
21
|
+
/**
|
|
22
|
+
* Gets the observability authentication scopes.
|
|
23
|
+
* Used by AgenticTokenCache for observability service authentication.
|
|
24
|
+
*/
|
|
25
|
+
get observabilityAuthenticationScopes() {
|
|
26
|
+
const result = this.observabilityOverrides.observabilityAuthenticationScopes?.();
|
|
27
|
+
if (result !== undefined) {
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
const override = process.env.A365_OBSERVABILITY_SCOPES_OVERRIDE;
|
|
31
|
+
if (override?.trim()) {
|
|
32
|
+
return override.trim().split(/\s+/);
|
|
33
|
+
}
|
|
34
|
+
return [PROD_OBSERVABILITY_SCOPE];
|
|
35
|
+
}
|
|
36
|
+
get isObservabilityExporterEnabled() {
|
|
37
|
+
const result = this.observabilityOverrides.isObservabilityExporterEnabled?.();
|
|
38
|
+
if (result !== undefined)
|
|
39
|
+
return result;
|
|
40
|
+
return agents_a365_runtime_1.RuntimeConfiguration.parseEnvBoolean(process.env.ENABLE_A365_OBSERVABILITY_EXPORTER);
|
|
41
|
+
}
|
|
42
|
+
get useCustomDomainForObservability() {
|
|
43
|
+
const result = this.observabilityOverrides.useCustomDomainForObservability?.();
|
|
44
|
+
if (result !== undefined)
|
|
45
|
+
return result;
|
|
46
|
+
return agents_a365_runtime_1.RuntimeConfiguration.parseEnvBoolean(process.env.A365_OBSERVABILITY_USE_CUSTOM_DOMAIN);
|
|
47
|
+
}
|
|
48
|
+
get observabilityDomainOverride() {
|
|
49
|
+
const result = this.observabilityOverrides.observabilityDomainOverride?.();
|
|
50
|
+
if (result !== undefined) {
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
const override = process.env.A365_OBSERVABILITY_DOMAIN_OVERRIDE;
|
|
54
|
+
if (override?.trim()) {
|
|
55
|
+
return override.trim().replace(/\/+$/, '');
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
get observabilityLogLevel() {
|
|
60
|
+
return this.observabilityOverrides.observabilityLogLevel?.()
|
|
61
|
+
?? process.env.A365_OBSERVABILITY_LOG_LEVEL
|
|
62
|
+
?? 'none';
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.ObservabilityConfiguration = ObservabilityConfiguration;
|
|
66
|
+
//# sourceMappingURL=ObservabilityConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObservabilityConfiguration.js","sourceRoot":"","sources":["../../../src/configuration/ObservabilityConfiguration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wEAAsE;AAGtE,oBAAoB;AACpB,MAAM,wBAAwB,GAAG,wCAAwC,CAAC;AAE1E;;;GAGG;AACH,MAAa,0BAA2B,SAAQ,0CAAoB;IAClE,IAAc,sBAAsB;QAClC,OAAO,IAAI,CAAC,SAA8C,CAAC;IAC7D,CAAC;IAED,YAAY,SAA6C;QACvD,KAAK,CAAC,SAAS,CAAC,CAAC;IACnB,CAAC;IAED,6EAA6E;IAE7E;;;OAGG;IACH,IAAI,iCAAiC;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,iCAAiC,EAAE,EAAE,CAAC;QACjF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;QAChE,IAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC;YACrB,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACpC,CAAC;IAED,IAAI,8BAA8B;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,sBAAsB,CAAC,8BAA8B,EAAE,EAAE,CAAC;QAC9E,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACxC,OAAO,0CAAoB,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,+BAA+B;QACjC,MAAM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