getsentry / getsentry/sentry-python

Add instrumentation for `Moderations.create()`

Đang mở
#5,805 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ả

The OpenAI integration does not instrument the Moderations API endpoint.

**Endpoint to instrument:**

* `openai.resources.Moderations.create()` (sync + async)

**Attributes to capture:**

* Model name
* Input text (if `send_default_pii` and `include_prompts` are enabled)
* Flagged status and categories from the response
* Category scores (if useful for telemetry)
* Follow OTel GenAI semantic conventions for span naming and attributes

**Reference:** [OpenAI integration compliance review](<../openai-integration-compliance-review.md>), Section 6

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.