Skip to content
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

authorizer trace context #256

Merged
merged 28 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a1e98e5
authorizer spans checkin
joeyzhao2018 Sep 16, 2022
992369b
authorizer spans checkin
joeyzhao2018 Sep 16, 2022
9b56453
fix integration tests
joeyzhao2018 Sep 20, 2022
59df10b
reformatting
joeyzhao2018 Sep 20, 2022
4793536
tests reformat
joeyzhao2018 Sep 20, 2022
ae237c7
add httpapi case
joeyzhao2018 Sep 21, 2022
5313cc6
formatting fixes
joeyzhao2018 Sep 21, 2022
4a91552
fixing http api caching cases
joeyzhao2018 Sep 27, 2022
eeaadb3
support websocket cases
joeyzhao2018 Oct 3, 2022
1d6d58b
reformat tests
joeyzhao2018 Oct 3, 2022
a65787a
encode authorizer injected data and other fixes
joeyzhao2018 Oct 26, 2022
7b672e0
format fixes
joeyzhao2018 Oct 26, 2022
8c130f2
fix token-type authorizer span's startTime
joeyzhao2018 Oct 26, 2022
63d1777
more precise on the parent span finish time
joeyzhao2018 Oct 26, 2022
efce8eb
fix the authorizer span's start time
joeyzhao2018 Oct 26, 2022
cddc194
fix httpapi finish time case
joeyzhao2018 Oct 26, 2022
3991943
fix .vscode/settings.json
joeyzhao2018 Oct 27, 2022
6120317
finish_time accuracey update to nanosecond
joeyzhao2018 Nov 7, 2022
85ecfdd
Merge branch 'main' into joey/authorizer-trace-context
joeyzhao2018 Nov 7, 2022
11de76d
test_no_error_with_nonetype_headers fix
joeyzhao2018 Nov 7, 2022
75fc327
fix test_no_error_with_nonetype_headers
joeyzhao2018 Nov 7, 2022
11ea772
add decode_authorizer_context option and no zero-length span for http…
joeyzhao2018 Nov 9, 2022
0976510
format and unittest fix
joeyzhao2018 Nov 9, 2022
079f594
lint tests
joeyzhao2018 Nov 9, 2022
bfddf6e
small refactor and reformat
joeyzhao2018 Nov 9, 2022
7108dfc
add an unittest case for the encoding part and fix some bugs
joeyzhao2018 Nov 11, 2022
3a2e178
Merge remote-tracking branch 'origin/main' into joey/authorizer-trace…
joeyzhao2018 Nov 15, 2022
af5d190
Addressing comments.
joeyzhao2018 Nov 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions datadog_lambda/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,15 @@ class XrayDaemon(object):
XRAY_TRACE_ID_HEADER_NAME = "_X_AMZN_TRACE_ID"
XRAY_DAEMON_ADDRESS = "AWS_XRAY_DAEMON_ADDRESS"
FUNCTION_NAME_HEADER_NAME = "AWS_LAMBDA_FUNCTION_NAME"


class Headers(object):
Parent_Span_Finish_Time = "x-datadog-parent-span-finish-time"
joeyzhao2018 marked this conversation as resolved.
Show resolved Hide resolved

# For one request from the client, the event.requestContext.requestIds in the authorizer lambda
# invocation and the main function invocation are IDENTICAL. Therefore we can use it to tell
# whether current invocation is the actual original authorizing request or a cached request.
Authorizing_Request_Id = "x-datadog-authorizing-requestid"

# injected by the HTTPPropagator.inject but no use
TAGS_HEADER_TO_DELETE = "x-datadog-tags"
Loading