Repository navigation
feat(aws): Apply data_collection filtering to URL query strings #6839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
7541460
ref(integrations): route HTTP header filtering through data collectio…
ericapisani 5e9f610
Merge branch 'master' into py-2584-update-wsgi-filter-headers
ericapisani a590c8e
Make changes to adjust to the data collection option being within the…
ericapisani 16ed0c8
fix test
ericapisani 486f0bc
make sure host header is not filtered when being added to the url
ericapisani 7d14a81
add test coverage for edge case around host header being dropped but …
ericapisani bb98334
add aws lambda test coverage
ericapisani 61d1618
fix(aws-lambda): Remove vendored deps from new embedded-sdk test fixt…
ericapisani 951c408
add test coverage within the wsgi test file
ericapisani a19be39
feat(integrations): apply data_collection cookie filtering to wsgi, s…
ericapisani 620e222
fix(integrations): omit cookies field when data_collection cookies mo…
ericapisani ec6f520
update tornado test
ericapisani 4dd3ba6
ref(integrations): route HTTP header filtering through data collectio…
ericapisani d0bae90
Make changes to adjust to the data collection option being within the…
ericapisani a6c4688
fix test
ericapisani d7b378b
make sure host header is not filtered when being added to the url
ericapisani 52c2da1
add test coverage for edge case around host header being dropped but …
ericapisani aa645d7
add aws lambda test coverage
ericapisani 8b6e3ad
fix(aws-lambda): Remove vendored deps from new embedded-sdk test fixt…
ericapisani d717172
add test coverage within the wsgi test file
ericapisani c7f590f
Merge branch 'py-2584-update-wsgi-filter-headers' of github.com:getse…
ericapisani 293a291
feat(integrations): apply data_collection cookie filtering to wsgi, s…
ericapisani 530e83c
fix(integrations): omit cookies field when data_collection cookies mo…
ericapisani 326d796
update tornado test
ericapisani e9f0e20
Merge branch 'master' into py-2584-update-wsgi-filter-headers
ericapisani 48f7c7b
Merge branch 'py-2581-cookies' of github.com:getsentry/sentry-python …
ericapisani 621d79b
Merge branch 'py-2584-update-wsgi-filter-headers' into py-2581-cookies
ericapisani 3d7bddb
test(aiohttp): Expect single span in streaming passthrough test
ericapisani fad2292
Merge branch 'py-2584-update-wsgi-filter-headers' into py-2581-cookies
ericapisani 40d9f38
feat(wsgi): Apply data_collection filtering to URL query strings
ericapisani e6e7148
Merge branch 'py-2581-cookies' into py-2583-query-parameters
ericapisani 1f9bce7
lint
ericapisani fad0c9a
Do not encode what is added to event/span attributes in order to conf…
ericapisani 21cf40b
feat(asgi): Apply data_collection filtering to URL query strings
ericapisani 3f0bc2a
lint
ericapisani eee4ea2
feat(aiohttp): Apply data_collection filtering to URL query strings
ericapisani 3b17dd3
feat(tornado): Apply data_collection filtering to URL query strings
ericapisani 96e0ac0
test(tornado): Use literal [Filtered] in query param expectations
ericapisani c3baf08
feat(sanic): Apply data_collection filtering to URL query strings
ericapisani ea22fc5
feat(quart): Apply data_collection filtering to URL query strings
ericapisani 14652a9
feat(gcp): Apply data_collection filtering to URL query strings
ericapisani 57ef596
feat(aws): Apply data_collection filtering to URL query strings
ericapisani 6918529
lint
ericapisani 066b45c
Merge branch 'master' into py-2583-query-params-sanic
ericapisani b4f5f65
.
ericapisani 443b013
Merge branch 'py-2583-query-params-sanic' into py-2583-query-params-q…
ericapisani d0f22c5
.
ericapisani 80e92f7
Merge branch 'py-2583-query-params-quart' into py-2583-gcp-query-params
ericapisani cf3ce53
.
ericapisani be03268
.
ericapisani c1c6ed6
Merge branch 'master' into py-2583-query-params-quart
ericapisani 9e3d227
Merge branch 'py-2583-query-params-quart' into py-2583-gcp-query-params
ericapisani ed13f35
Merge branch 'py-2583-gcp-query-params' into py-2583-query-params-aws
ericapisani 88784b0
.
ericapisani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...mbda/lambda_functions_with_embedded_sdk/BasicOkDataCollectionUrlQueryAllowlist/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Need to add some ignore rules in this directory, because the unit tests will add the Sentry SDK and its dependencies | ||
| # into this directory to create a Lambda function package that contains everything needed to instrument a Lambda function using Sentry. | ||
|
|
||
| # Ignore everything | ||
| * | ||
|
|
||
| # But not index.py | ||
| !index.py | ||
|
|
||
| # And not .gitignore itself | ||
| !.gitignore |
24 changes: 24 additions & 0 deletions
24
...lambda/lambda_functions_with_embedded_sdk/BasicOkDataCollectionUrlQueryAllowlist/index.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import os | ||
|
|
||
| import sentry_sdk | ||
| from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration | ||
|
|
||
| sentry_sdk.init( | ||
| dsn=os.environ.get("SENTRY_DSN"), | ||
| traces_sample_rate=1.0, | ||
| integrations=[AwsLambdaIntegration()], | ||
| _experiments={ | ||
| "data_collection": { | ||
| "url_query_params": { | ||
| "mode": "allowlist", | ||
| # "token" is allowlisted on purpose to show that an allowlist | ||
| # entry cannot override the built-in sensitive denylist. | ||
| "terms": ["page", "token"], | ||
| } | ||
| } | ||
| }, | ||
| ) | ||
|
|
||
|
|
||
| def handler(event, context): | ||
| return {"event": event} |
11 changes: 11 additions & 0 deletions
11
...ambda/lambda_functions_with_embedded_sdk/BasicOkDataCollectionUrlQueryDenylist/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Need to add some ignore rules in this directory, because the unit tests will add the Sentry SDK and its dependencies | ||
| # into this directory to create a Lambda function package that contains everything needed to instrument a Lambda function using Sentry. | ||
|
|
||
| # Ignore everything | ||
| * | ||
|
|
||
| # But not index.py | ||
| !index.py | ||
|
|
||
| # And not .gitignore itself | ||
| !.gitignore |
24 changes: 24 additions & 0 deletions
24
..._lambda/lambda_functions_with_embedded_sdk/BasicOkDataCollectionUrlQueryDenylist/index.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import os | ||
|
|
||
| import sentry_sdk | ||
| from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration | ||
|
|
||
| sentry_sdk.init( | ||
| dsn=os.environ.get("SENTRY_DSN"), | ||
| traces_sample_rate=1.0, | ||
| integrations=[AwsLambdaIntegration()], | ||
| _experiments={ | ||
| "data_collection": { | ||
| "url_query_params": { | ||
| "mode": "denylist", | ||
| # Custom terms deny otherwise non-sensitive query params on top | ||
| # of the built-in sensitive denylist. | ||
| "terms": ["tracking"], | ||
| } | ||
| } | ||
| }, | ||
| ) | ||
|
|
||
|
|
||
| def handler(event, context): | ||
| return {"event": event} |
11 changes: 11 additions & 0 deletions
11
...aws_lambda/lambda_functions_with_embedded_sdk/BasicOkDataCollectionUrlQueryOff/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Need to add some ignore rules in this directory, because the unit tests will add the Sentry SDK and its dependencies | ||
| # into this directory to create a Lambda function package that contains everything needed to instrument a Lambda function using Sentry. | ||
|
|
||
| # Ignore everything | ||
| * | ||
|
|
||
| # But not index.py | ||
| !index.py | ||
|
|
||
| # And not .gitignore itself | ||
| !.gitignore |
19 changes: 19 additions & 0 deletions
19
...s/aws_lambda/lambda_functions_with_embedded_sdk/BasicOkDataCollectionUrlQueryOff/index.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import os | ||
|
|
||
| import sentry_sdk | ||
| from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration | ||
|
|
||
| sentry_sdk.init( | ||
| dsn=os.environ.get("SENTRY_DSN"), | ||
| traces_sample_rate=1.0, | ||
| integrations=[AwsLambdaIntegration()], | ||
| _experiments={ | ||
| "data_collection": { | ||
| "url_query_params": {"mode": "off"}, | ||
| } | ||
| }, | ||
| ) | ||
|
|
||
|
|
||
| def handler(event, context): | ||
| return {"event": event} |
11 changes: 11 additions & 0 deletions
11
...s_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreamingDataCollection/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Need to add some ignore rules in this directory, because the unit tests will add the Sentry SDK and its dependencies | ||
| # into this directory to create a Lambda function package that contains everything needed to instrument a Lambda function using Sentry. | ||
|
|
||
| # Ignore everything | ||
| * | ||
|
|
||
| # But not index.py | ||
| !index.py | ||
|
|
||
| # And not .gitignore itself | ||
| !.gitignore |
23 changes: 23 additions & 0 deletions
23
...aws_lambda/lambda_functions_with_embedded_sdk/BasicOkSpanStreamingDataCollection/index.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import os | ||
|
|
||
| import sentry_sdk | ||
| from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration | ||
|
|
||
| sentry_sdk.init( | ||
| dsn=os.environ.get("SENTRY_DSN"), | ||
| traces_sample_rate=1.0, | ||
| integrations=[AwsLambdaIntegration()], | ||
| trace_lifecycle="stream", | ||
| _experiments={ | ||
| "data_collection": { | ||
| "url_query_params": { | ||
| "mode": "denylist", | ||
| "terms": ["tracking"], | ||
| } | ||
| }, | ||
| }, | ||
| ) | ||
|
|
||
|
|
||
| def handler(event, context): | ||
| return {"event": event} | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.