-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Expose Kafka message key in labels #4745
Conversation
5efab84
to
da986b7
Compare
labelKeyKafkaMessageKey = "__meta_kafka_message_key" | ||
) | ||
|
||
func (t *Target) messageKeyLabel() (useLabel bool, labelName model.LabelName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should pass the actual value to the format and not a default since relabeling can match regexes to apply change or not.
In fact all discovered labels should be there since you can compute multiple label values using source_labels
but that sounds even trickier.
Let's start with passing the value and we'll see how we can handle the rest later. (Possibly relabel everything twice, once for the target labels, once for the message)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you're right.
Let's start with passing the value
Anyway, let me do that
d864821
to
6a50f6c
Compare
I've fixed to pass actual value in message key and left a TODO comment for #4745 (comment). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it:
Expose Kafka message key in label set and add description into the documents.
Which issue(s) this PR fixes:
Fixes #4728
Special notes for your reviewer:
Checklist
CHANGELOG.md
about the changes.