-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Goal: Record exceptions in spans with proper sanitization for sensitive information.
Tasks
- Create
shiny/otel/_errors.pywith:should_sanitize_errors()- Checkapp.sanitize_errorssettingsanitize_error(exception)- Replace sensitive info with generic messageis_silent_error(exception)- Check forSilentException,SilentCancelOutputException, etc.should_record_error(exception)- Combine checksmaybe_sanitize_error(exception)- Apply sanitization if needed
- Update
with_span_async()inshiny/otel/_span_wrappers.py:- Record exceptions using
span.record_exception() - Set span status to ERROR
- Skip silent exceptions
- Sanitize errors when appropriate
- Record exceptions using
- Ensure
SafeExceptionbypasses sanitization
Acceptance Criteria
- Exceptions recorded in spans with status code ERROR
- Silent exceptions (SilentException, etc.) not recorded
- Error messages sanitized when
app.sanitize_errors=True - SafeException messages preserved even when sanitization enabled
- Session ID included in error span attributes
Files to Create
shiny/otel/_errors.py
Files to Modify
shiny/otel/_span_wrappers.py
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request