-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Goal: Log reactive value updates as OTel log events.
Tasks
- Add logging helper to
shiny/otel/_core.py:emit_otel_log(body, severity, attributes)- Emit OTel log record
- Modify
Value._set()to log value updates - Store value name at creation time for logging
- Include session ID in log attributes
- Add comprehensive tests
- Create example application
Acceptance Criteria
- Value updates logged when
SHINY_OTEL_COLLECT >= reactivity - Logs include value name (e.g.,
"Set reactiveVal myValue") - Logs include
session.idattribute - No logs when collection level insufficient
- No-op when OTel SDK not configured
Implementation
Completed in PR #2169:
- Added
emit_otel_log()helper function (renamed fromemit_logfor clarity) - Value updates log with DEBUG severity
- Namespace support for module-scoped values
- Standalone values log as
<unnamed> - 12 comprehensive tests
- Example application demonstrating functionality
Files Modified
shiny/otel/_core.py- Addedemit_otel_log()helpershiny/otel/__init__.py- Exportemit_otel_logshiny/reactive/_reactives.py- Log inValue._set()methodshiny/session/_session.py- Set value names in Inputstests/pytest/test_otel_value_logging.py- 12 testsexamples/otel-value-logging/- Demo application
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request