getsentry / getsentry/sentry-python

Instrument `pydantic_ai.embeddings.Embedder` with `gen_ai.embeddings` spans

Đang mở
#5,836 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
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

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.