forked from elastic/apm-agent-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for @aws-sdk/client-eventbridge context propagation
<!-- Replace this comment with a description of what's being changed by this PR. If this PR should close an issue, please add one of the magic keywords (e.g. Fixes) followed by the issue number. For more info see: https://help.github.com/articles/closing-issues-using-keywords/ --> Resolves elastic#4166. Extends the aws lambda handled triggers with eventbridge specific events. The minimum event structure is based on https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html and it contains: ```json { "detail-type": "event name", "source": "event source", "detail": { JSON object } } ``` The full event that can be handled is the following: ```json { "version": "0", "id": "UUID", "detail-type": "event name", "source": "event source", "account": "ARN", "time": "timestamp", "region": "region", "resources": [ "ARN" ], "detail": { "traceparent": "00-traceId-spanId", ... } } ``` ### Checklist - [x] Implement code - [x] Add tests - [ ] Update TypeScript typings - [ ] Update documentation - [x] Add CHANGELOG.asciidoc entry - [x] Commit message follows [commit guidelines](https://github.com/elastic/apm-agent-nodejs/blob/main/CONTRIBUTING.md#commit-message-guidelines)
- Loading branch information
1 parent
069f9f5
commit 32fa3d2
Showing
5 changed files
with
176 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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 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,17 @@ | ||
{ | ||
"version": "0", | ||
"id": "6a7e8feb-b491-4cf7-a9f1-bf3703467718", | ||
"detail-type": "EC2 Instance State-change Notification", | ||
"source": "aws.ec2", | ||
"account": "111122223333", | ||
"time": "2017-12-22T18:43:48Z", | ||
"region": "us-east-1", | ||
"resources": [ | ||
"arn:aws:ec2:us-west-1:123456789012:instance/i-1234567890abcdef0" | ||
], | ||
"detail": { | ||
"instance-id": " i-1234567890abcdef0", | ||
"state": "terminated", | ||
"traceparent": "00-80e1afed08e019fc1110464cfa66635c-7a085853722dc6d2-01" | ||
} | ||
} |
This file contains 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,8 @@ | ||
{ | ||
"detail-type": "EC2 Instance State-change Notification", | ||
"source": "aws.ec2", | ||
"detail": { | ||
"instance-id": " i-1234567890abcdef0", | ||
"state": "terminated" | ||
} | ||
} |
This file contains 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