Skip to content

Commit 319815f

Browse files
authored
Use our custom error message on FastAPI (#1064)
1 parent 0035276 commit 319815f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

logfire/_internal/integrations/fastapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
from ..main import Logfire, set_user_attributes_on_raw_span
2121
from ..stack_info import StackInfo, get_code_object_info
2222
from ..utils import handle_internal_errors, maybe_capture_server_headers
23-
from .asgi import tweak_asgi_spans_tracer_provider
2423

2524
try:
2625
from opentelemetry.instrumentation.asgi import ServerRequestHook
2726
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
27+
28+
from .asgi import tweak_asgi_spans_tracer_provider
2829
except ImportError:
2930
raise RuntimeError(
3031
'The `logfire.instrument_fastapi()` requires the `opentelemetry-instrumentation-fastapi` package.\n'

0 commit comments

Comments
 (0)