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

feat: add support for @aws-sdk/client-eventbridge context propagation #4208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

calindurnea
Copy link

feat: add support for @aws-sdk/client-eventbridge context propagation

The minimum event structure is based on https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html and it contains:

{
  "detail-type": "event name",
  "source": "event source",
  "detail": {
    JSON object
  }
}

The full event that can be handled is the following:

{
  "version": "0",
  "id": "UUID",
  "detail-type": "event name",
  "source": "event source",
  "account": "ARN",
  "time": "timestamp",
  "region": "region",
  "resources": [
    "ARN"
  ],
  "detail": {
    "traceparent": "00-traceId-spanId",
    ...
  }
}

Closes: #4166.

<!--

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support aws EventBridge instrumentation
1 participant