@cuylabs/agent-microsoft-opentelemetry 6.2.1 → 7.0.0

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.
Files changed (2) hide show
  1. package/README.md +33 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -133,6 +133,39 @@ telemetry such as HTTP, Azure SDK, database, Redis, Bunyan, or Winston spans.
133
133
  Use `microsoft-default` only when you intentionally want the official distro's
134
134
  native instrumentation defaults without adapter opinions.
135
135
 
136
+ ## Adding Secondary Span Processors
137
+
138
+ When Microsoft OpenTelemetry is enabled, this package owns the process
139
+ OpenTelemetry provider. Additional exporters or processors should be attached
140
+ through `initMicrosoftOpenTelemetry({ spanProcessors })`, not by passing
141
+ `tracing.spanProcessor` to `agent-core`.
142
+
143
+ This is the right shape for combined destinations such as Agent 365 plus
144
+ Phoenix:
145
+
146
+ ```ts
147
+ const observability = await initMicrosoftOpenTelemetry({
148
+ resource: { serviceName: "cdo-ai-companion" },
149
+ a365: { enabled: true, enableObservabilityExporter: true, tokenResolver },
150
+ spanProcessors: [phoenixOpenInferenceSpanProcessor],
151
+ agent: {
152
+ agentId: "cdo-companion-agent",
153
+ agentName: "CDO Companion Agent",
154
+ useA365Scopes: true,
155
+ },
156
+ });
157
+
158
+ const agent = createAgent({
159
+ name: "cdo-companion-agent",
160
+ model,
161
+ tracing: observability.tracing,
162
+ });
163
+ ```
164
+
165
+ For Phoenix-only local development, let `agent-core` own the provider instead by
166
+ passing the Phoenix processor directly as `createAgent({ tracing:
167
+ { spanProcessor } })`.
168
+
136
169
  ## Microsoft Hosting Middleware
137
170
 
138
171
  Apps built on Microsoft Agent Hosting compatible adapters can register the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuylabs/agent-microsoft-opentelemetry",
3
- "version": "6.2.1",
3
+ "version": "7.0.0",
4
4
  "description": "Microsoft OpenTelemetry distro adapter for @cuylabs/agent-core",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -39,10 +39,10 @@
39
39
  "typescript": "^5.7.0",
40
40
  "vitest": "^4.0.18",
41
41
  "zod": "^3.25.76 || ^4.1.8",
42
- "@cuylabs/agent-core": "^6.2.1"
42
+ "@cuylabs/agent-core": "^7.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@cuylabs/agent-core": "^6.0.0",
45
+ "@cuylabs/agent-core": "^7.0.0",
46
46
  "@microsoft/opentelemetry": ">=1.0.2 <2.0.0",
47
47
  "@opentelemetry/api": "^1.9.0",
48
48
  "ai": "7.0.0-beta.111"