-
Notifications
You must be signed in to change notification settings - Fork 46
APMSVLS-65 Extract Trace Context For AppSync Events #657
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
dd-mergequeue
merged 30 commits into
main
from
rithika.narayan/APMSVLS-65/extract-context-from-appsync
Oct 8, 2025
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
870ed87
APMSVLS-65 first draft of extractor helper function and inclusion in …
rithikanarayan 8a2c8b5
Second draft of implementation for extracting trace context from even…
rithikanarayan 4954749
Merge branch 'main' into rithika.narayan/APMSVLS-65/extract-context-f…
rithikanarayan ed0b485
Removing unnecessary allocations from header extraction
rithikanarayan d513e9e
Added unit tests for extracting context from event['request']['headers']
rithikanarayan 8b5ed4e
Refactoring change to use extract_context_from_http_event_or_context
rithikanarayan d86688b
Removing extra testing file
rithikanarayan a7aeef1
linting
rithikanarayan 58b3b09
Merge branch 'main' into rithika.narayan/APMSVLS-65/extract-context-f…
rithikanarayan 07ead6d
Cleaned up repeated get calls
rithikanarayan 5d04656
Checking for request header field without raising exception
rithikanarayan 0b6523a
Removing extraneous file
rithikanarayan 804c406
Refactored code, added more unit tests
rithikanarayan 3a08efd
More comprehensive unit testing for coverage
rithikanarayan 794791a
Removing imported files
rithikanarayan e7c56a4
Removing more unnecessary files
rithikanarayan 09d67d4
WIP testing whether decode_authorizer_context is set
rithikanarayan cefcd5f
Cleanup
rithikanarayan 76c8bb2
More cleanup
rithikanarayan b46efbb
Testing refactoring for size
rithikanarayan 4c48de7
Removed comments
rithikanarayan 6bd15cb
removing changes in tracer
rithikanarayan 83f97df
Restoring implementation
rithikanarayan 5a3ad86
Bump zipped layer size
rithikanarayan 937b371
Integer layer size
rithikanarayan 1eec519
Merge branch 'main' into rithika.narayan/APMSVLS-65/extract-context-f…
rithikanarayan 006caee
Fixing layer size calculation
rithikanarayan 7ad64c5
Adding unit test for using extract_context_from_lambda_context
rithikanarayan c532190
linting
rithikanarayan fab3c92
Merge branch 'main' into rithika.narayan/APMSVLS-65/extract-context-f…
rithikanarayan 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "identity": "None", | ||
| "info": { | ||
| "fieldName": "getItems", | ||
| "parentTypeName": "Query", | ||
| "selectionSetGraphQL": "{\n id\n}", | ||
| "selectionSetList":["id"] | ||
| }, | ||
| "prev": "None", | ||
| "request": { | ||
| "domainName": "None" | ||
| }, | ||
| "source": "None" | ||
| } |
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,12 @@ | ||
| { | ||
| "identity": "None", | ||
| "info": { | ||
| "fieldName": "getItems", | ||
| "parentTypeName": "Query", | ||
| "selectionSetGraphQL": "{\n id\n}", | ||
| "selectionSetList":["id"] | ||
| }, | ||
| "prev": "None", | ||
| "request": "hello", | ||
| "source": "None" | ||
| } |
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,53 @@ | ||
| { | ||
| "identity": "None", | ||
| "info": { | ||
| "fieldName": "getItems", | ||
| "parentTypeName": "Query", | ||
| "selectionSetGraphQL": "{\n id\n}", | ||
| "selectionSetList":["id"] | ||
| }, | ||
| "prev": "None", | ||
| "request": { | ||
| "domainName": "None", | ||
| "headers": { | ||
| "accept": "*/*", | ||
| "accept-encoding": "gzip, deflate, br, zstd", | ||
| "accept-language": "en-US,en;q=0.9", | ||
| "cloudfront-forwarded-proto": "https", | ||
| "cloudfront-is-desktop-viewer": "True", | ||
| "cloudfront-is-mobile-viewer": "False", | ||
| "cloudfront-is-smarttv-viewer":"False", | ||
| "cloudfront-is-tablet-viewer":" False", | ||
| "cloudfront-viewer-asn": "6461", | ||
| "cloudfront-viewer-country": "US", | ||
| "content-length": "47", | ||
| "content-type": "application/graphql", | ||
| "host": "4aowrg2uhvbw5mn7osu6searqi.appsync-api.us-east-1.amazonaws.com", | ||
| "origin": "http://localhost:5173", | ||
| "priority": "u=1, i", | ||
| "referer": "http://localhost:5173/", | ||
| "sec-ch-ua": "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Google Chrome\";v=\"140\"", | ||
| "sec-ch-ua-mobile": "?0", | ||
| "sec-ch-ua-platform": "macOS", | ||
| "sec-fetch-dest": "empty", | ||
| "sec-fetch-mode": "cors", | ||
| "sec-fetch-site": "cross-site", | ||
| "traceparent": "00-0000000000000000d9f454c80b9a529a-73ac6ca3427073a3-01", | ||
| "tracestate": "dd=s:1;o:rum", | ||
| "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","via":"2.0 62f9f3967e93a923f21c8acb20cf10b6.cloudfront.net (CloudFront)", | ||
| "x-amz-cf-id": "Femhicb_Vbva-J8qWjdI4hKMmqusCeQSp207UGyY3u8VOUrdE8BBvg==", | ||
| "x-amzn-appsync-is-vpce-request": "False", | ||
| "x-amzn-remote-ip": "64.124.12.19", | ||
| "x-amzn-requestid": "1ee1669a-eda3-4d4f-911c-35f74ebef31d", | ||
| "x-amzn-trace-id": "Root=1-68cdb7e9-438bf88259d7ce3535723bdd", | ||
| "x-datadog-origin": "rum", | ||
| "x-datadog-parent-id": "67890", | ||
| "x-datadog-sampling-priority": "1", | ||
| "x-datadog-trace-id": "12345", | ||
| "x-forwarded-for": "64.124.12.19,15.158.225.229", | ||
| "x-forwarded-port": "443", | ||
| "x-forwarded-proto": "https" | ||
| } | ||
| }, | ||
| "source": "None" | ||
| } |
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,49 @@ | ||
| { | ||
| "identity": "None", | ||
| "info": { | ||
| "fieldName": "getItems", | ||
| "parentTypeName": "Query", | ||
| "selectionSetGraphQL": "{\n id\n}", | ||
| "selectionSetList":["id"] | ||
| }, | ||
| "prev": "None", | ||
| "request": { | ||
| "domainName": "None", | ||
| "headers": { | ||
| "accept": "*/*", | ||
| "accept-encoding": "gzip, deflate, br, zstd", | ||
| "accept-language": "en-US,en;q=0.9", | ||
| "cloudfront-forwarded-proto": "https", | ||
| "cloudfront-is-desktop-viewer": "True", | ||
| "cloudfront-is-mobile-viewer": "False", | ||
| "cloudfront-is-smarttv-viewer":"False", | ||
| "cloudfront-is-tablet-viewer":" False", | ||
| "cloudfront-viewer-asn": "6461", | ||
| "cloudfront-viewer-country": "US", | ||
| "content-length": "47", | ||
| "content-type": "application/graphql", | ||
| "host": "4aowrg2uhvbw5mn7osu6searqi.appsync-api.us-east-1.amazonaws.com", | ||
| "origin": "http://localhost:5173", | ||
| "priority": "u=1, i", | ||
| "referer": "http://localhost:5173/", | ||
| "sec-ch-ua": "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Google Chrome\";v=\"140\"", | ||
| "sec-ch-ua-mobile": "?0", | ||
| "sec-ch-ua-platform": "macOS", | ||
| "sec-fetch-dest": "empty", | ||
| "sec-fetch-mode": "cors", | ||
| "sec-fetch-site": "cross-site", | ||
| "traceparent": "00-0000000000000000d9f454c80b9a529a-73ac6ca3427073a3-01", | ||
| "tracestate": "dd=s:1;o:rum", | ||
| "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36","via":"2.0 62f9f3967e93a923f21c8acb20cf10b6.cloudfront.net (CloudFront)", | ||
| "x-amz-cf-id": "Femhicb_Vbva-J8qWjdI4hKMmqusCeQSp207UGyY3u8VOUrdE8BBvg==", | ||
| "x-amzn-appsync-is-vpce-request": "False", | ||
| "x-amzn-remote-ip": "64.124.12.19", | ||
| "x-amzn-requestid": "1ee1669a-eda3-4d4f-911c-35f74ebef31d", | ||
| "x-amzn-trace-id": "Root=1-68cdb7e9-438bf88259d7ce3535723bdd", | ||
| "x-forwarded-for": "64.124.12.19,15.158.225.229", | ||
| "x-forwarded-port": "443", | ||
| "x-forwarded-proto": "https" | ||
| } | ||
| }, | ||
| "source": "None" | ||
| } |
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.
Looks like we still need a test to cover this portion of the logic. We know that the function does not error when the request is not a dict or that there are no headers in it. But we have not confirmed that we'll instead attempt to extract from the lambda context.