Skip to content

otel: Follow-up Evaluation #2141

@schloerke

Description

@schloerke

Goal: Evaluate whether optional dependency group approach is better than required dependency.

Tasks

  • Assess current approach after Phases 1-9:
    • User friction (need to install OTel SDK separately)
    • Documentation complexity
    • Feedback from early adopters
  • Document pros and cons of each approach:
    • Required dependency: Simpler for users, larger install size
    • Optional dependency: More complex imports, user must explicitly opt-in
  • If optional approach is chosen, prototype implementation:
    • Move opentelemetry-api to optional dependencies in pyproject.toml
    • Add import guards to shiny/otel/_core.py
    • Gracefully handle missing OTel imports
    • Update tests to skip when OTel not installed
  • Make final decision and implement chosen approach

Acceptance Criteria

  • Comparison of approaches documented with pros/cons
  • If switching to optional: All code handles missing imports gracefully
  • If switching to optional: Tests skip when OTel not installed
  • If staying with required: Document rationale
  • No breaking changes for users

Files to Modify (if switching to optional)

  • pyproject.toml
  • shiny/otel/_core.py
  • All test files to add skip conditions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions