getsentry / getsentry/sentry-python
Add instrumentation for `Moderations.create()`
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
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
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.