Skip to content

Use uv-native approach in python instrumentation docs #8253

@JulianDroste

Description

@JulianDroste

What needs to be changed?

I would love for the docs to convey the uv-native way of installing packages:

  • replace uv pip install --requirement - with uv add --requirement -
    • would also enable users to put otel stuff into dependency groups more easily
  • replace uv pip install opentelemetry-distro opentelemetry-exporter-otlp with the appropriate uvx / uv tool run tool call
    • I already did some digging (see additional context) but still the uvx approach is missing 4 package dependencies - I just cannot figure out why:
opentelemetry-instrumentation-system-metrics==0.59b0
opentelemetry-instrumentation-tortoiseorm==0.59b0
opentelemetry-instrumentation-jinja2==0.59b0
opentelemetry-instrumentation-click==0.59b0

What is the name + path of the page that needs changed? Bootstrap using uv

Additional context:

When running the following as per the docs I get 14 required dependencies as of today:

$ uv run opentelemetry-bootstrap -a requirements

opentelemetry-instrumentation-asyncio==0.59b0
opentelemetry-instrumentation-dbapi==0.59b0
opentelemetry-instrumentation-logging==0.59b0
opentelemetry-instrumentation-sqlite3==0.59b0
opentelemetry-instrumentation-threading==0.59b0
opentelemetry-instrumentation-urllib==0.59b0
opentelemetry-instrumentation-wsgi==0.59b0
opentelemetry-instrumentation-click==0.59b0
opentelemetry-instrumentation-grpc==0.59b0
opentelemetry-instrumentation-jinja2==0.59b0
opentelemetry-instrumentation-requests==0.59b0
opentelemetry-instrumentation-system-metrics==0.59b0
opentelemetry-instrumentation-tortoiseorm==0.59b0
opentelemetry-instrumentation-urllib3==0.59b0

as compared to the more uv-native way:

uvx --from="opentelemetry-instrumentation" opentelemetry-bootstrap -a requirements | uv add --requirement -

where I due to the output of the pre-pipe part of the command, only obtain 7 packages:

opentelemetry-instrumentation-asyncio==0.59b0
opentelemetry-instrumentation-dbapi==0.59b0
opentelemetry-instrumentation-logging==0.59b0
opentelemetry-instrumentation-sqlite3==0.59b0
opentelemetry-instrumentation-threading==0.59b0
opentelemetry-instrumentation-urllib==0.59b0
opentelemetry-instrumentation-wsgi==0.59b0

Adding --with="opentelemetry-exporter-otlp" and --with="opentelemetry-distro" I gain the following packages

opentelemetry-instrumentation-grpc==0.59b0
opentelemetry-instrumentation-requests==0.59b0
opentelemetry-instrumentation-urllib3==0.59b0

Tip:
React
with 👍 to help prioritize this issue. Please use comments to provide useful
context, avoiding +1 or me too, to help us triage it. Learn more
here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions