influxdata / influxdata/telegraf

feat(inputs.kafka_consumer): Add message key as metric tags

Open
#19,579 0 comments 0 reactions 0 assignees View on GitHub
feature request
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.