vectordotdev / vectordotdev/vector
New `aws_cloudwatch_logs` source
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 22.6k
- Forks
- 2.3k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 146
Description
The goal of this source is to be a simple way to start consuming logs from AWS in low volume environments by pulling logs from exposed AWS CloudWatch APIs (FilterLogEvents and GetLogEvents).
There will be a relatively low volume limit to this source (< 5 MBps / 50k events in the case of FilterLogEvents) which we should document and take extra care around surfacing when we are hitting AWS rate limits.
We've also observed that FilterLogEvents does not perform well for groups with a large number of streams. If we go with this API, we should document this restriction (and provide knobs for specificity specific streams or stream prefix).
I'd probably recommend an RFC just for this source to suss out any decision points and to provide the answers to open questions, including:
- Do we want to allow users to scrape to scrape multiple log groups with a single source? Do we want to allow wildcards for the group name if so?
- Decide on
FilterLogEventsvs.GetLogEvents(or do we want to support both?) - Do we want to allow consuming a log group from its beginning? Or just newly published events?
- Do we want to persist checkpoints on disk to allow for restarts? Or just always start from "now"?
- If we go with
FilterLogEventsdo we want to allow users to specify a filter? - Should we rely on the AWS pagination token (
nextToken) for checkpoints or store our own serialized cursor that we can use to pick back up.nextTokenis only valid for 24 hours and, I think, is tied to the filter pattern forFilterLogEvents(though we can verify)
Examples of other implementations:
- https://github.com/fluent-plugins-nursery/fluent-plugin-cloudwatch-logs
- https://github.com/lukewaite/logstash-input-cloudwatch-logs
External refs:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the AWS CloudWatch Logs APIs for FilterLogEvents and GetLogEvents, then compare the linked Fluentd and Logstash implementations. Resolve the listed RFC questions around log groups, API choice, starting position, checkpoints, filtering, pagination, and rate limits. Done means an agreed source design and documented restrictions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, rust
- Domain
- cloud, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100