Closed mstruk closed 1 year ago
Where will this new option
strimzi.metrics.reporter
be used? If I got it rght and it is in the general configuration of Kafka, should it rather be astrimzi.oauth.metrics.reporter
?
This option is global configuration for the Kafka broker yes, so it should not be passed as part of a specific listener configuration, rather as part of client.properties on the client, or server.properties
on the broker (except as I describe in the README it should really be set as env var or a system property rather than in server.properties
.
Generally I use 'oauth.' properties for JAAS config options, and 'strimzi.authorization.' as globals that are specific to KeycloakAuthorizer
. This option works across the board for the whole Kafka instance thus I opted for 'strimzi.*' prefix.
But it is true that it's the OAuth library that uses this option exclusively so your suggestion makes sense.
I do not think the strimzi.
itself is an issue. Its more without the .oauth
behind it, it possibly collides with other Strimzi options. So if it is something only Oauth reads as far as I understood, I think strimzi.oauth...
would be better if we stick with the strimzi.
part. Not sure if @tombentley for example has some thoughts about it.
strimzi.oauth...
seems better to me.
@tombentley @mimaison Any more unaddressed issues here?
This PR removes the use of
metric.reporters
in OAuth metrics to configure the reporters to instantiate. The reason is that OAuth metrics integrates with the reporters by creating new instances of them, resulting in one instance being created by Kafka broker, and another instance created by OAuth metrics. Not all reporters work properly when multiple instances are instantiated.With this PR OAuth metrics, when enabled, will use
strimzi.oauth.metric.reporters
as a list of reporters to instantiate.If
strimzi.oauth.metric.reporters
is not set,org.apache.kafka.common.metrics.JmxReporter
will automatically be instantiated, otherwise only the specified reporters will be instantiated. The config optionmetric.reporters
will be ignored by OAuth metrics.In order to migrate existing broker configurations use
strimzi.oauth.metric.reporters
as the configuration option rather thanmetric.reporters
.See README.md for more information.