diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index a6d468c0c4..b12227821f 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -42,6 +42,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh Span ops are now a smaller, framework-neutral set. - The Cohere integration now emits `gen_ai.chat` instead of `ai.chat_completions.create.cohere`, and `gen_ai.embeddings` instead of `ai.embeddings.create.cohere`. +- The Django integration now emits `view.render` instead of `view.response.render`, and `view` instead of `view.authenticate`. #### Django diff --git a/sentry_sdk/integrations/django/views.py b/sentry_sdk/integrations/django/views.py index 54833d0ccd..a658325160 100644 --- a/sentry_sdk/integrations/django/views.py +++ b/sentry_sdk/integrations/django/views.py @@ -27,7 +27,7 @@ def sentry_patched_render(self: "SimpleTemplateResponse") -> "Any": with sentry_sdk.start_span( name="serialize response", attributes={ - "sentry.op": OP.VIEW_RESPONSE_RENDER, + "sentry.op": OP.VIEW_RENDER, "sentry.origin": DjangoIntegration.origin, }, ): diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index 3d2fb19424..210fad1e77 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -557,9 +557,8 @@ def test_response_trace( sentry_sdk.flush() spans = [item.payload for item in items] - assert ( - '- sentry.op="view.response.render": name="serialize response"' - in render_span_tree(spans) + assert '- sentry.op="view.render": name="serialize response"' in render_span_tree( + spans )