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

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