Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If I'm missing a package, I should be told what to install #528

Open
samuelcolvin opened this issue Oct 22, 2024 · 0 comments
Open

If I'm missing a package, I should be told what to install #528

samuelcolvin opened this issue Oct 22, 2024 · 0 comments
Assignees
Labels
Bug Bug related to the Logfire Python SDK P2 A bit less than P1.

Comments

@samuelcolvin
Copy link
Member

Description

if I run

logfire.instrument_httpx()

Without the httpx otel package installed, I get

...
  File "/Users/samuel/code/.../.venv/lib/python3.12/site-packages/logfire/_internal/integrations/httpx.py", line 5, in <module>
    from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor
ModuleNotFoundError: No module named 'opentelemetry.instrumentation.httpx'

I should get an exception that tells me what to install.

Something like

install the httpx instrumentation package with logfire[httpx] or directly with opentelemetry-instrumentation-httpx

Python, Logfire & OS Versions, related packages (not required)

logfire="1.2.0"
platform="macOS-14.6.1-arm64-arm-64bit"
python="3.12.6 (main, Sep 20 2024, 17:42:55) [Clang 15.0.0 (clang-1500.0.40.1)]"
[related_packages]
requests="2.32.3"
pydantic="2.9.2"
openai="1.51.2"
protobuf="4.25.5"
rich="13.9.2"
executing="2.1.0"
opentelemetry-api="1.27.0"
opentelemetry-exporter-otlp-proto-common="1.27.0"
opentelemetry-exporter-otlp-proto-http="1.27.0"
opentelemetry-instrumentation="0.48b0"
opentelemetry-proto="1.27.0"
opentelemetry-sdk="1.27.0"
opentelemetry-semantic-conventions="0.48b0"
@samuelcolvin samuelcolvin added the Bug Bug related to the Logfire Python SDK label Oct 22, 2024
@samuelcolvin samuelcolvin added the P2 A bit less than P1. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug related to the Logfire Python SDK P2 A bit less than P1.
Projects
None yet
Development

No branches or pull requests

2 participants