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(inputs.kafka_consumer): Add message headers as metric tags. #13924

Merged

Conversation

BelousovAntonV
Copy link
Contributor

Required for all PRs

resolves #13822

Added 2 options to kafka_consumer:

  • kafka_version - used to specify version in the Sarama config to enable different features. For example message headers won't be received if Kafka version lower 0.11.
  • msg_headers_to_tags - string array of header names that should be added as tags to metric.

@BelousovAntonV BelousovAntonV changed the title feat(inputs.kafka_consumer) Add message headers as metric tags. feat(inputs.kafka_consumer): Add message headers as metric tags. Sep 14, 2023
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Couple small comments

plugins/inputs/kafka_consumer/kafka_consumer.go Outdated Show resolved Hide resolved
plugins/inputs/kafka_consumer/sample.conf Outdated Show resolved Hide resolved
plugins/inputs/kafka_consumer/README.md Outdated Show resolved Hide resolved
BelousovAntonV and others added 3 commits September 15, 2023 20:27
fix: set default value for option in readme

Co-authored-by: Joshua Powers <[email protected]>
@srebhan srebhan added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/kafka plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Sep 18, 2023
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@powersj powersj assigned srebhan and unassigned powersj Sep 18, 2023
@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Sep 18, 2023
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the nice PR @BelousovAntonV! Just two small comments from my side...

plugins/inputs/kafka_consumer/kafka_consumer.go Outdated Show resolved Hide resolved
plugins/inputs/kafka_consumer/kafka_consumer.go Outdated Show resolved Hide resolved
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this nice feature @BelousovAntonV!

@srebhan srebhan merged commit 5ab2468 into influxdata:master Sep 20, 2023
4 checks passed
@github-actions github-actions bot added this to the v1.29.0 milestone Sep 20, 2023
@BelousovAntonV BelousovAntonV deleted the kafka_input_message_headers_to_tags branch November 8, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kafka feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kafka_consumer: Add message headers as metric tags.
3 participants