Skip to content

Commit da4db42

Browse files
committed
fix import, super
1 parent 9a32f09 commit da4db42

File tree

1 file changed

+2
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi

1 file changed

+2
-2
lines changed

instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A
184184

185185
import fastapi
186186
from starlette.applications import Starlette
187-
from starlette.middleware.error import ServerErrorMiddleware
187+
from starlette.middleware.errors import ServerErrorMiddleware
188188
from starlette.routing import Match
189189
from starlette.types import ASGIApp
190190

@@ -290,7 +290,7 @@ def instrument_app(
290290
# to faithfully record what is returned to the client since it technically cannot know what `ServerErrorMiddleware` is going to do.
291291

292292
def build_middleware_stack(self: Starlette) -> ASGIApp:
293-
stack = super().build_middleware_stack()
293+
stack = type(self).build_middleware_stack(self)
294294
stack = OpenTelemetryMiddleware(
295295
stack,
296296
excluded_urls=excluded_urls,

0 commit comments

Comments
 (0)