- Notifications
You must be signed in to change notification settings - Fork 46
Explicit trace ID propagation for SFN w/o Hashing #537
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 1 commit
Commits
Show all changes
26 commits Select commit Hold shift + click to select a range
7c127a3 add logic to extract traceID from _datadog header
avedmala 8658dea rename test
avedmala 3eccb20 fix type
avedmala 97b189a added root arn case
avedmala eaa09f3 trigger ci
avedmala 2baec69 Add `http.route` tags for API Gateway (#524)
nhulston 3c4014b feat: [SVLS-5677] DynamoDB Stream event span pointers (#522)
apiarian-datadog 6f54a00 trigger ci
avedmala 4e0afdb Merge remote-tracking branch 'origin/main' into avedmala/sfn-span-link
avedmala 25780a8 use default propagator.extract
avedmala 85a157f lint
avedmala aad3cd8 lint
avedmala c3681de updated to use trace/parent hash from _datadog
avedmala 7d1d475 lint
avedmala e9a7d46 skip is context complete check
avedmala a6464b4 remove unused import
avedmala 068c2fc fix legacy lambda parsing with new header
avedmala 00850d8 using context object instead of pre-hashed values
avedmala c23911d Merge branch 'main' into avedmala/sfn-span-link-no-hash
avedmala 832ae1b fixed trigger tags and tests
avedmala e2e732b pull sfn trace id generation out into a helper
avedmala 3bfc1e7 added unit tests
avedmala 6abb3f3 update test data
avedmala cae62b1 rename stepfunctions to states
avedmala 49dbaf2 update current serverless version to v1
avedmala c47fc62 Update trigger comment
avedmala 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
fixed trigger tags and tests
- Loading branch information
commit 832ae1bf0babd753cfe129fa7bff1192f2e44cf9
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 |
|---|---|---|
| | @@ -256,6 +256,14 @@ def parse_event_source_arn(source: _EventSource, event: dict, context: Any) -> s | |
| if source.event_type == EventTypes.CLOUDWATCH_EVENTS and event.get("resources"): | ||
| return event.get("resources")[0] | ||
| | ||
| # todo: testme | ||
| # e.g. arn:aws:states:us-east-1:123456789012:stateMachine:stateMachineName | ||
avedmala marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| if source.event_type == EventTypes.STEPFUNCTIONS: | ||
| Contributor Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. | ||
| context = event | ||
| if "_datadog" in event: | ||
| context = event.get("_datadog") | ||
| return context.get("StateMachine").get("Id") | ||
| | ||
| | ||
| def get_event_source_arn(source: _EventSource, event: dict, context: Any) -> str: | ||
| event_source_arn = event.get("eventSourceARN") or event.get("eventSourceArn") | ||
| | ||
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.
What is the difference between v1 and v2? Should we start from version v2 or v1?
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.
There's no v1, I think we can start from v1 instead if we want
I think @kimi-p suggested v2, maybe because the "legacy" context is implied to be v1
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.
In my opinion, "V2" may be somewhat confusing to customers because there is no explicit reference to "V1" at all.
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.
sgtm!