pydantic/logfire

logfire run suggests adding `opentelemetry-instrumentation-` packages instead of dependency groups

Open

#1297 aperta il 5 ago 2025

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Python (244 fork)github user discovery
Feature Requestgood first issue

Metriche repository

Star
 (4282 star)
Metriche merge PR
 (Merge medio 7g 8h) (35 PR mergiate in 30 g)

Descrizione

Instead of this:


╭──────────────────────────────────────────────────────────────── Logfire Summary ────────────────────────────────────────────────────────────────╮
│                                                                                                                                                 │
│  Your instrumentation checklist:                                                                                                                │
│                                                                                                                                                 │
│  ☐ requests (need to install opentelemetry-instrumentation-requests)                                                                            │
│  ☐ sqlite3 (need to install opentelemetry-instrumentation-sqlite3)                                                                              │
│  ☐ urllib (need to install opentelemetry-instrumentation-urllib)                                                                                │
│                                                                                                                                                 │
│                                                                                                                                                 │
│  To install all recommended packages at once, run:                                                                                              │
│                                                                                                                                                 │
│  uv add opentelemetry-instrumentation-requests opentelemetry-instrumentation-sqlite3 opentelemetry-instrumentation-urllib                       │
│                                                                                                                                                 │
│  ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────  │
│                                                                                                                                                 │
│  To hide this summary box, use: logfire run --no-summary.                                                                                       │
│                                                                                                                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

I'd like to see uv add logfire[requests,sqlite3,urllib] for those packages we have dependency groups for. I think we should have dependency groups for all instrumentation packages we recommend.

If we detect we were run using uvx logfire run (can we?), it would be good to suggest re-running with uvx --from 'logfire[requests,sqlite3,urllib]' logfire run.

If we detect we're run with uv run --with logfire logfire run (can we?), we should suggest uv run --with 'logfire[requests,sqlite3,urllib]' logfire run.

If we can't detect exactly how we're run, as is likely, it may be worth listing that they should install the logfire[requests,sqlite3,urllib] package and then suggest all three methods.

Guida contributor