Skip to content

feat: Add bundled otel Agent Skill - #2356

Merged
schloerke merged 2 commits into
mainfrom
schloerke/otel-agent-skill-v1
Jul 9, 2026
Merged

feat: Add bundled otel Agent Skill#2356
schloerke merged 2 commits into
mainfrom
schloerke/otel-agent-skill-v1

Conversation

@schloerke

Copy link
Copy Markdown
Collaborator

Follow-up to #2274 / #2349.

Summary

Adds an otel Agent Skill under shiny/.agents/skills/ — bundled, user-facing docs that teach coding agents how to observe Shiny apps with OpenTelemetry, matching the post-#2349 story where zero-code auto-instrumentation is the standard path:

  • Setup and run: uv pip install "shiny[otel]" then opentelemetry-instrument shiny run app.py, console exporter for development, OTLP backends via standard OTEL_* env vars, and the span hierarchy to expect.
  • Collection levels: quick-reference table for SHINY_OTEL_COLLECT plus shiny.otel.get_level().
  • Per-object control: otel.suppress / otel.collect as decorators and context managers, including initialization-time capture semantics and precedence over the global level.
  • Custom spans via the standard OpenTelemetry API (Shiny resolves the provider lazily, so no Shiny-specific setup).
  • Common mistakes, led by the shiny[otel] should include opentelemetry-distro for auto-instrumentation support #2274 gotcha: in-code trace.set_tracer_provider() is silently ignored under opentelemetry-instrument.

The skill's description also triggers when an agent is about to configure providers in app code, steering it to the wrapper instead. While here, install commands in bundled skills now use uv (testing skill updated to match).

Validated with pytest tests/pytest/test_packaging.py (frontmatter contract + wheel package-data globs), the agentskills spec validator, and shiny skills list|get|path otel.

Verification

shiny skills list          # shows the otel skill and its description
shiny skills get otel      # prints the SKILL.md

Adds shiny/.agents/skills/otel/ teaching coding agents to observe Shiny
apps with OpenTelemetry: zero-code auto-instrumentation via
opentelemetry-instrument (the standard path established in #2349),
SHINY_OTEL_COLLECT collection levels, per-object otel.suppress /
otel.collect control, custom spans, and common mistakes. Also switches
install commands in bundled skills to uv.
@schloerke
schloerke marked this pull request as ready for review July 9, 2026 19:32
@schloerke
schloerke enabled auto-merge (squash) July 9, 2026 19:35
@schloerke
schloerke merged commit 0ef502b into main Jul 9, 2026
174 checks passed
@schloerke
schloerke deleted the schloerke/otel-agent-skill-v1 branch July 9, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant