@robota-sdk/agent-telemetry-otel 0.0.0-stage → 3.0.0-beta.94

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/CHANGELOG.md ADDED
@@ -0,0 +1,45 @@
1
+ # @robota-sdk/agent-telemetry-otel
2
+
3
+ ## 3.0.0-beta.94
4
+ ### Minor Changes
5
+
6
+ - ccf4194: `createOtelTracing({ tracer, mode, idGenerator })` records an agent run's provider calls and tool bodies
7
+ as OpenTelemetry spans on the host's tracer, under the host's span, named as `projectLivePromptTrace`
8
+ names them. Register its `plugin` once on the agent, and pass each run the `traceContext` and
9
+ `onExecutionEvent` from `startRun(parentSpanContext, { allowedOrigins, subprocessClasses })`.
10
+ `createStructuralIdGenerator()` is an `IdGenerator` for the host's `TracerProvider` so each span is
11
+ recorded under the span ID Robota sent in `traceparent`. `@opentelemetry/api` is a peer dependency.
12
+ - fef3a50: New package `@robota-sdk/agent-telemetry-otel`. `projectLivePromptTrace(batch, { mode, agentName })`
13
+ maps one live prompt trace batch onto content-free OpenTelemetry span shapes without depending on an
14
+ OpenTelemetry SDK. `mode: 'agent'` keeps Robota's `agent.*` span and attribute names; `mode: 'gen_ai'`
15
+ uses the OpenTelemetry GenAI semantic conventions (`invoke_agent`, `chat`, `execute_tool`, `gen_ai.*`
16
+ attributes, `GEN_AI_SCHEMA_URL`) and keeps Robota-only facts such as timing and outcome as `agent.*`;
17
+ `mode: 'gen_ai/dup'` emits both attribute sets under GenAI span names for a gradual migration.
18
+
19
+ `IToolBodyTraceEntry` gains an optional live-only `toolName`, which the GenAI projection uses for the
20
+ `execute_tool` span name and `gen_ai.tool.name`.
21
+ - ccff111: Live telemetry can name its metrics with the OpenTelemetry GenAI semantic conventions. With
22
+ `PRODUCT_TELEMETRY_SEMCONV` set to `gen_ai`, the metrics export the `gen_ai.client.inference.*`
23
+ duration, token-usage and per-call token histograms, `gen_ai.execute_tool.duration` and
24
+ `gen_ai.invoke_agent.*` duration and call counts, and drop only `agent.provider.input_tokens` and
25
+ `agent.provider.output_tokens`, which the GenAI usage counters replace exactly. `gen_ai/dup` exports
26
+ every `agent.*` metric and the GenAI ones. The default, `agent`, exports exactly the metrics it did
27
+ before. Provider- and tool-derived GenAI metrics are exported only when no such child was omitted, and
28
+ usage that was not received is recorded as 0 under the `unknown` modality, as the conventions specify.
29
+ The GenAI metrics carry the requested model as those conventions require, and their inference points
30
+ also take the `agent.provider.id` and `agent.model.id` labels under the same
31
+ `PRODUCT_TELEMETRY_METRIC_ATTRIBUTES` opt-ins as the `agent.*` metrics (the model only in `gen_ai/dup`),
32
+ so a provider split of token totals survives the dropped counters. `PRODUCT_TELEMETRY_SEMCONV` now applies to
33
+ traces and metrics, and is refused only when neither is exported over otlp or console. Console metrics
34
+ print the same projection.
35
+
36
+ `@robota-sdk/agent-telemetry-otel` adds `projectLivePromptMetricSamples`, which maps a live prompt trace
37
+ batch onto those GenAI metrics as plain, SDK-free samples with the recommended bucket boundaries, so
38
+ every host names and measures the same facts the same way. Its inference samples keep the label-safe
39
+ `agent.provider.id`, and `agent.model.id` in `gen_ai/dup`, as the provider span does.
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [fef3a50]
44
+ - @robota-sdk/agent-interface-analytics@3.0.0-beta.94
45
+ - @robota-sdk/agent-core@3.0.0-beta.94