Skip to content

Commit

Permalink
fix import, super
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Nov 15, 2024
1 parent 9a32f09 commit da4db42
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A

import fastapi
from starlette.applications import Starlette
from starlette.middleware.error import ServerErrorMiddleware
from starlette.middleware.errors import ServerErrorMiddleware
from starlette.routing import Match
from starlette.types import ASGIApp

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

def build_middleware_stack(self: Starlette) -> ASGIApp:
stack = super().build_middleware_stack()
stack = type(self).build_middleware_stack(self)
stack = OpenTelemetryMiddleware(
stack,
excluded_urls=excluded_urls,
Expand Down

0 comments on commit da4db42

Please sign in to comment.