Repository navigation
Description
Summary
Three telemetry workstreams affect cross-language dashboard compatibility. They are not all straight Python-parity fixes and must be resolved independently.
1. gen_ai.response.finish_reasons
TypeScript emits a native OTel string array and normalizes tool_calls to tool_call. Pinned Python emits a JSON-encoded string containing raw values. Go does not emit the attribute, and the relevant .NET/Microsoft.Extensions.AI value must be measured before choosing a cross-language representation.
Decision: align with a measured reference representation or retain the semconv-oriented TypeScript shape and document the difference. Apply one choice consistently to chat and invoke_agent spans.
2. gen_ai.input.messages / gen_ai.output.messages
TypeScript reduces non-text parts to { type } and does not stamp the final output part with its finish reason. Python emits richer tool-call, tool-result, reasoning, URI, blob, and generic part shapes. Decide whether to align or retain the compact representation for privacy/size reasons.
3. Endpoint attributes
Pinned Python generates server.address from service_url (falling back to "unknown"). It does not generate server.port; that key appears only in its metric allowlist. TypeScript currently generates neither, although both keys are listed in its metric allowlist.
- Implement
server.addressconsistently for chat spans and chat-token/duration metrics. - Treat
server.portas a separate .NET/semconv decision. Do not cite Python parity as its implementation reason.
Acceptance criteria
- The exact type/value decision for
finish_reasons, rich/compact message parts, andserver.portis recorded separately with measured/reference evidence. -
finish_reasonshas exact-value tests for awaited/streamed chat andinvoke_agentspans. - If rich message parts are adopted, tests cover text, function call, function result, reasoning, URI, blob, generic content, and final finish reason.
- If compact parts are retained, privacy/size rationale and lost fields are documented for dashboard users.
- Sensitive-message capture disabled continues to omit message attributes.
-
server.addresscarries the same value on chat spans and both relevant histogram dimension sets, with a known service URL and the"unknown"fallback covered. -
server.portpresence/absence and type are pinned on spans and metrics according to the recorded decision. - Any change to an existing attribute's type or shape ships with a dashboard migration note; additive attributes are listed in CHANGELOG.
Activity
[-]Align chat and agent span attributes with the Python implementation's shapes[/-][+]Decide and align chat and agent telemetry attribute shapes[/+]Name message parts with the convention vocabulary and stamp the chat …