getsentry / getsentry/sentry-python
Set `gen_ai.response.id` on `gen_ai.chat` spans
Ouverte
Improvement
Python
Spans
- Langage dominant
- Python
- Étoiles
- 2.2k
- Forks
- 669
- Merge moyen
- 1 j 1 h
- PR mergées (30 j)
- 213
Description
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`.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.