getsentry / getsentry/sentry-python
Instrument `pydantic_ai.embeddings.Embedder` with `gen_ai.embeddings` spans
Đang mở
Improvement
Python
Spans
- Ngôn ngữ chính
- Python
- Star
- 2.2k
- Fork
- 669
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 213
Mô tả
`Embedder.embed()`, `embed_query()`, and `embed_documents()` (and their sync variants) make model calls with no spans today.
OTel defines `gen_ai.embeddings` as a valid `gen_ai.operation.name` and we already have `OP.GEN_AI_EMBEDDINGS` defined in `sentry_sdk/consts.py`. Should create `gen_ai.embeddings` spans with model name, system, and token usage attributes.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.