Skip to content

Commit

Permalink
fix: Use SDK-internal copy of functools.wraps
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Aug 14, 2020
1 parent 8fba151 commit d4b3394
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sentry_sdk/integrations/django/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from sentry_sdk.hub import Hub
from sentry_sdk._types import MYPY
from sentry_sdk._functools import wraps

if MYPY:
from typing import Any
Expand Down Expand Up @@ -44,7 +45,7 @@ def _wrap_resolver_match(hub, resolver_match):

old_callback = resolver_match.func

@functools.wraps(old_callback)
@wraps(old_callback)
def callback(*args, **kwargs):
# type: (*Any, **Any) -> Any
with hub.start_span(op="django.view", description=resolver_match.view_name):
Expand Down

0 comments on commit d4b3394

Please sign in to comment.