feat(otel): Include opentelemetry-distro[otlp] in the otel extra - #2348
Closed
schloerke wants to merge 1 commit into
Closed
feat(otel): Include opentelemetry-distro[otlp] in the otel extra#2348schloerke wants to merge 1 commit into
schloerke wants to merge 1 commit into
Conversation
Installing shiny[otel] now provides the opentelemetry-instrument wrapper and the OTLP exporter, so zero-code auto-instrumentation (opentelemetry-instrument shiny run app.py) works without additional installs. Fixes #2274
schloerke
force-pushed
the
schloerke/otel-distro-2274
branch
from
July 8, 2026 21:16
5200fd4 to
feb08b9
Compare
Collaborator
Author
|
Superseded by #2349 (merged), which includes the identical |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2274.
What
Adds
opentelemetry-distro[otlp]>=0.45b0to theshiny[otel]extra, so the standard OpenTelemetry zero-code auto-instrumentation workflow works out of the box:pip install "shiny[otel]" opentelemetry-instrument shiny run app.pyopentelemetry-distroprovides theopentelemetry-instrumentwrapper and the distro configuration logic that initializes the SDK before app code runs.[otlp]extra supplies the default (OTLP) exporter, and also makes it easy to switch between gRPC and HTTP transports.0.45b0is the instrumentation release paired withopentelemetry-sdk1.24.0 (the existing floor), so the lowest-supported-versions CI job resolves cleanly (verified withuv pip compile --python-version 3.10 --resolution lowest-direct --extra theme --extra otel).Verification
Fresh venv with only this checkout's
shiny[otel]installed:opentelemetry-instrument --versionworks,opentelemetry.distroand the OTLP gRPC span exporter import cleanly.OTEL_SERVICE_NAME=smoke-test opentelemetry-instrument --traces_exporter console shiny run app.py, then connecting a session, exportssession_start,reactive_update, andsession_endspans to the console withservice.name: smoke-test— no code changes in the app.Companion
posit-dev/py-shiny-site#380 documents this workflow in the OpenTelemetry Quick Start; it targets the site's
rc-shiny-v1.7.0staging branch, which merges tomainwhen this change is released.