getsentry / getsentry/sentry-python
Set `gen_ai.response.id` on `gen_ai.chat` spans
Abierto
Improvement
Python
Spans
- Lenguaje dominante
- Python
- Estrellas
- 2.2k
- Forks
- 669
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 213
Descripción
Extract `response_id` from pydantic-ai's `ModelResponse` and set it as `gen_ai.response.id` in `update_ai_client_span()` in `sentry_sdk/integrations/pydantic_ai/spans/ai_client.py`.
This is a recommended OTel attribute, useful for correlating spans with provider dashboards/logs. We already have `SPANDATA.GEN_AI_RESPONSE_ID` defined in `consts.py`.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.