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

chore(inputs.kinesis_consumer): Replace consumer library by own implementation #16332

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Dec 19, 2024

Summary

The current implementation of the kinesis consumer relies on the github.com/harlow/kinesis-consumer library. This library seems not to be maintained anymore. Furthermore, the mentioned library does not harmonize well with Telegraf when it comes to storing shard iterators in a DynamoDB as Telegraf wants the iterators to represent the latest metric delivered and the library wants to store the last record consumed.

To overcome these issues and to reduce the number of reads from the DynamoDB in case it is configured this PR implements the consumer itself and now only relies on the AWS Golang SDK v2.

This PR has been tested in a toy scenario including

  • consuming a stream without checkpointing iterators in DynamoDB
  • consuming a stream with checkpointing iterators in DynamoDB
  • resuming a not-fully consumed stream with iterators from DynamoDB
  • resharding in Kinesis with both removing and adding shards
  • consuming with blocked outputs to run into metrics exceed max_undelivered_messages.

When enabling the tracing log-level for this plugin, details on the consumption process are logged.

Checklist

  • No AI generated code was used in this PR

Related issues

@telegraf-tiger telegraf-tiger bot added chore plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Dec 19, 2024
@telegraf-tiger
Copy link
Contributor

@srebhan srebhan self-assigned this Dec 19, 2024
@srebhan srebhan added the area/aws AWS plugins including cloudwatch, ecs, kinesis label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aws AWS plugins including cloudwatch, ecs, kinesis chore plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant