Skip to content

feat(integrations): Gate user info behind data_collection config - #6876

Merged
ericapisani merged 23 commits into
masterfrom
py-2583-misc
Jul 28, 2026
Merged

feat(integrations): Gate user info behind data_collection config#6876
ericapisani merged 23 commits into
masterfrom
py-2583-misc

test(aws_lambda): Place identity at top level of test event payloads

d28ee71
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Jul 23, 2026 in 0s

2 issues

code-review: Found 2 issues (2 medium)

Medium

AWS Lambda body handling skipped when data_collection is enabled - `sentry_sdk/integrations/aws_lambda.py:441-456`

When has_data_collection_enabled is true, the elif should_send_default_pii() branch is skipped, so request body is neither collected nor redacted.

AWS Lambda user-info tests use non-standard event structure - `tests/integrations/aws_lambda/test_aws_lambda.py:430-432`

The test payload changed from standard requestContext.identity to a top-level identity field that doesn't match real AWS API Gateway events, causing tests to verify behavior with a fictional event structure instead of production reality.


⏱ 15m 17s · 3.9M in / 128.4k out · $1.35

Annotations

Check warning on line 456 in sentry_sdk/integrations/aws_lambda.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: code-review

AWS Lambda body handling skipped when data_collection is enabled

When `has_data_collection_enabled` is true, the `elif should_send_default_pii()` branch is skipped, so request body is neither collected nor redacted.

Check warning on line 432 in tests/integrations/aws_lambda/test_aws_lambda.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: code-review

AWS Lambda user-info tests use non-standard event structure

The test payload changed from standard `requestContext.identity` to a top-level `identity` field that doesn't match real AWS API Gateway events, causing tests to verify behavior with a fictional event structure instead of production reality.