Skip to content

ref(attributes): Enforce sentry-conventions in web integrations - #8408

Draft
srothh wants to merge 2 commits into
srothh/add-conventions-dependencyfrom
srothh/conventions-web-integrations
Draft

srothh wants to merge 2 commits into
srothh/add-conventions-dependencyfrom
srothh/conventions-web-integrations

Conversation

@srothh

@srothh srothh commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Description

Enforce sentry-conventions attribute names in web integrations (aiohttp, asgi, bottle, django, falcon, fastapi, flask, graphene, litestar, pyramid, quart, sanic, starlette, starlite, strawberry, tornado, wsgi).

Issues

#8323
PY-3090

Enforce sentry-conventions attribute names in web integrations (aiohttp, asgi, bottle, django, falcon, fastapi, flask, graphene, litestar, pyramid, quart, sanic, starlette, starlite, strawberry, tornado, wsgi).

#8323
PY-3090
@linear-code

linear-code Bot commented Nov 26, 2026

Copy link
Copy Markdown

PY-3090

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 59240 passed | ❌ 1 failed | ⏭️ 3047 skipped | Total: 62288 | Pass Rate: 95.11% | Execution Time: 165m 51s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -288
Passed Tests 📉 -217
Failed Tests 📈 +1
Skipped Tests 📉 -72

➕ New Tests (1)

View new tests
  • test_execution_outcome[start_sync_execution-TIMED_OUT-stepfunctions_execution_timed_out]
    • File: tests.integrations.boto3.test_stepfunctions
    • Status: ❌ Failing

❌ Failed Tests

test_execution_outcome[start_sync_execution-TIMED_OUT-stepfunctions_execution_timed_out]

File: tests.integrations.boto3.test_stepfunctions
Suite: py3.11-boto3-v1.24.96
Error: assert '4242' not in "{'trace_id': 'd5f34859a2924acdaffeddabb06fb852', 'span_id': 'aca95cf5129e30da', 'name': 'SFN.StartSyncExecution', 'status': 'error', 'is_segment': False, 'start_timestamp': 1795692664.524242, 'end_timestamp': 1795692664.52472, 'parent_span_id': '80c88e6393b59907', 'attributes': {'sentry.origin': 'auto.aws.boto3', 'sentry.trace_lifecycle': 'stream', 'cloud.provider': 'aws', 'rpc.method': 'StartSyncExecution', 'rpc.system.name': 'aws-api', 'sentry.kind': 'client', 'rpc.servic... [+5 more lines; full report in element text]

Stack Trace
tests/integrations/boto3/test_stepfunctions.py:152: in test_execution_outcome
    assert "4242" not in str(span)
E   assert '4242' not in "{'trace_id': 'd5f34859a2924acdaffeddabb06fb852', 'span_id': 'aca95cf5129e30da', 'name': 'SFN.StartSyncExecution', 'status': 'error', 'is_segment': False, 'start_timestamp': 1795692664.524242, 'end_timestamp': 1795692664.52472, 'parent_span_id': '80c88e6393b59907', 'attributes': {'sentry.origin': 'auto.aws.boto3', 'sentry.trace_lifecycle': 'stream', 'cloud.provider': 'aws', 'rpc.method': 'StartSyncExecution', 'rpc.system.name': 'aws-api', 'sentry.kind': 'client', 'rpc.service': 'SFN', 'cloud.region': 'eu-north-1', 'server.address': 'states.eu-north-1.amazonaws.com', 'server.port': 443, 'aws.step_functions.state_machine.arn': 'arn:aws:states:eu-north-1:123456789012:stateMachine:orders', 'cloud.resource_id': 'arn:aws:states:eu-north-1:123456789012:stateMachine:orders', 'cloud.account.id': '123456789012', 'aws.step_functions.state_machine.name': 'orders', 'sentry.op': 'rpc', 'thread.id': '140666689546048', 'thread.name': 'MainThread', 'aws.step_functions.execution.arn': 'arn:aws:states:eu-north-1:123456789012:execution:orders:order-1234', 'error.type': 'stepfunctions_execution_timed_out', 'sentry.segment.id': '80c88e6393b59907', 'sentry.segment.name': 'parent', 'sentry.sdk.name': 'sentry.python', 'sentry.sdk.version': '3.0.0', 'process.runtime.name': 'CPython', 'process.runtime.version': '3.11.18', 'sentry.environment': 'production', 'sentry.release': '37823a740eb9eac854b3f03cda7f1db5b6e5709e'}}"
E     
E     '4242' is contained here:
E     ?                                                                                                                                                                                           ^^^^^^^^^^^^^^^^^^
E       {'trace_id': 'd5f34859a2924acdaffeddabb06fb852', 'span_id': 'aca95cf5129e30da', 'name': 'SFN.StartSyncExecution', 'status': 'error', 'is_segment': False, 'start_timestamp': 1795692664.524242, 'end_timestamp': 1795692664.52472, 'parent_span_id': '80c88e6393b59907', 'attributes': {'sentry.origin': 'auto.aws.boto3', 'sentry.trace_lifecycle': 'stream', 'cloud.provider': 'aws', 'rpc.method': 'StartSyncExecution', 'rpc.system.name': 'aws-api', 'sentry.kind': 'client', 'rpc.service': 'SFN', 'cloud.region': 'eu-north-1', 'server.address': 'states.eu-north-1.amazonaws.com', 'server.port': 443, 'aws.step_functions.state_machine.arn': 'arn:aws:states:eu-north-1:123456789012:stateMachine:orders', 'cloud.resource_id': 'arn:aws:states:eu-north-1:123456789012:stateMachine:orders', 'cloud.account.id': '123456789012', 'aws.step_functions.state_machine.name': 'orders', 'sentry.op': 'rpc', 'thread.id': '140666689546048', 'thread.name': 'MainThread', 'aws.step_functions.execution.arn': 'arn:aws:states:eu-north-1:123456789012:execution:orders:order-1234', 'error.type': 'stepfunctions_execution_timed_out', 'sentry.segment.id': '80c88e6393b59907', 'sentry.segment.name': 'parent', 'sentry.sdk.name': 'sentry.python', 'sentry.sdk.version': '3.0.0', 'process.runtime.name': 'CPython', 'process.runtime.version': '3.11.18', 'sentry.environment': 'production', 'sentry.release': '37823a740eb9eac854b3f03cda7f1db5b6e5709e'}}
E     ?                                                                                                                                                                                           ^^^^^^^^^^^^^^^^^^^^^^

✅ Patch coverage is 98.26% (113 of 115 changed executable lines covered; target 80%).
Project statement coverage is 90.13%.

Changed files with executable lines (25)
File Patch coverage Changed executable lines
sentry_sdk/integrations/aiohttp.py 92.31% 12/13 covered; missed: 342
sentry_sdk/integrations/asgi.py 80.00% 4/5 covered; missed: 252
sentry_sdk/integrations/_asgi_common.py 100.00% 6/6 covered
sentry_sdk/integrations/bottle.py 100.00% 2/2 covered
sentry_sdk/integrations/django/init.py 100.00% 9/9 covered
sentry_sdk/integrations/django/asgi.py 100.00% 1/1 covered
sentry_sdk/integrations/django/caching.py 100.00% 10/10 covered
sentry_sdk/integrations/django/middleware.py 100.00% 2/2 covered
sentry_sdk/integrations/django/signals_handlers.py 100.00% 2/2 covered
sentry_sdk/integrations/django/tasks.py 100.00% 1/1 covered
sentry_sdk/integrations/django/templates.py 100.00% 1/1 covered
sentry_sdk/integrations/django/views.py 100.00% 1/1 covered
sentry_sdk/integrations/falcon.py 100.00% 2/2 covered
sentry_sdk/integrations/fastapi.py 100.00% 2/2 covered
sentry_sdk/integrations/flask.py 100.00% 2/2 covered
sentry_sdk/integrations/graphene.py 100.00% 2/2 covered
sentry_sdk/integrations/litestar.py 100.00% 5/5 covered
sentry_sdk/integrations/pyramid.py 100.00% 1/1 covered
sentry_sdk/integrations/quart.py 100.00% 4/4 covered
sentry_sdk/integrations/sanic.py 100.00% 10/10 covered
sentry_sdk/integrations/starlette.py 100.00% 5/5 covered
sentry_sdk/integrations/starlite.py 100.00% 2/2 covered
sentry_sdk/integrations/strawberry.py 100.00% 4/4 covered
sentry_sdk/integrations/tornado.py 100.00% 11/11 covered
sentry_sdk/integrations/wsgi.py 100.00% 12/12 covered

Generated by Coverage Action

Enforce sentry-conventions attribute names in web integration tests (aiohttp, asgi,
bottle, django, falcon, fastapi, flask, graphene, litestar, pyramid, quart, sanic,
starlette, starlite, strawberry, tornado, wsgi).

#8323
PY-3090

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant