-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
allow for kafka-emitter to have extra dimensions be set for each event it emits #15845
allow for kafka-emitter to have extra dimensions be set for each event it emits #15845
Conversation
running this locally to verify it works as expected |
...s-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/KafkaEmitterConfig.java
Outdated
Show resolved
Hide resolved
...s-contrib/kafka-emitter/src/main/java/org/apache/druid/emitter/kafka/KafkaEmitterConfig.java
Show resolved
Hide resolved
@@ -117,7 +120,7 @@ public void testSerDeNotRequiredKafkaProducerConfigOrKafkaSecretProducer() | |||
{ | |||
KafkaEmitterConfig kafkaEmitterConfig = new KafkaEmitterConfig("localhost:9092", null, "metricTest", | |||
"alertTest", null, "metadataTest", | |||
"clusterNameTest", null, null | |||
"clusterNameTest", null, null, null |
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.
For code coverage, maybe make this non-null or add a new test with a non-null extra dimension map?
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. +1 after CI (checkstyle is failing), thanks @TSFenwick!
Ignoring the unrelated IT failure: |
Description
Allow for extra dimensions to be set in the kafka emitter. This functionality will allow the clusterName config for kafka-emitter to not need to necessarily be used as this new config allows for more flexibility to add n different dimensions.
Also made various nullable/nonnull annotation fixes
Release note
User configurable dimensions can be set via
druid.emitter.kafka.extra.dimensions
for events emitted by KafkaEmitter. For example,druid.emitter.kafka.extra.dimensions={"region":"us-east-1","environment":"preProd"}
.Key changed/added classes in this PR
KafkaEmitter
KafkaEmitterConfig
This PR has: