getsentry / getsentry/sentry-javascript
Replace deprecated `gen_ai.response.text` with `gen_ai.output.messages`
- Lingua principale
- TypeScript
- Stelle
- 8.7k
- Fork
- 1.8k
- Merge medio
- 1g 17h
- PR unite (30g)
- 515
Descrizione
`@sentry/conventions` deprecates `gen_ai.response.text` in favor of `gen_ai.output.messages`. `gen_ai.response.text` holds a stringified array of text strings; `gen_ai.output.messages` expects a stringified array of structured message objects (`[{role, parts: [...], finish_reason}]`), which unifies response text and tool calls into a single message.
Entails building the structured message format from the response text and emitting it under the new attribute. Affects all AI integrations (OpenAI, Anthropic, Google GenAI, LangChain, LangGraph, Workers AI, and the shared streaming path). Should be done together with the `gen_ai.response.tool_calls` replacement, since both merge into the same `gen_ai.output.messages` attribute.
We can likely postpone this until after the major, if we do it at all, since there are still discussions about handling this in Relay.
References:
* [`gen_ai.response.text`]()
* [`gen_ai.output.messages`]()
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Review the OpenAI, Anthropic, Google GenAI, LangChain, LangGraph, Workers AI, and shared streaming integrations, along with the related gen_ai conventions. Determine how response text and tool calls should merge into gen_ai.output.messages, accounting for the unresolved Relay discussion. Done means all affected integrations emit the structured attribute without the deprecated response attributes.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- observability-sre
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100