Skip to content

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