influxdata / influxdata/telegraf
feat(inputs.kafka_consumer): Add message key as metric tags
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
Kafka headers and timestamp can be metric tag
Why not Kafka key?
https://github.com/influxdata/telegraf/pull/13924
https://github.com/influxdata/telegraf/pull/15790
### Expected behavior
I would like to copy Kafka message key as metric tag
### Actual behavior
By default copy Kafka message key as metric tag is not supported
### Additional info
_No response_
Contributor guide
Research direction
Start at the inputs.kafka_consumer entry point and inspect how Kafka headers and timestamps are copied into metric tags. Compare the linked pull requests for existing tag behavior, then determine the expected handling for the Kafka message key and verify that the key appears as a metric tag when configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kafka
- Domain
- stream-processing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100