-
Notifications
You must be signed in to change notification settings - Fork 301
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
Metric names are mutated/sanitized for Kafka Micrometer non-universally #865
Comments
@sobychacko Looks like you added this method. Do you have context for these questions? |
@ctoestreich Thanks for reporting this. I will take a closer look soon and get back to you. |
@ctoestreich What kind of issues that you are running into with this sanitization done in the binder? The code that you are referring to is specific to the Kafka Streams binder. I believe that sanitization was introduced to avoid some clashing with the regular Kafka binder. Kafka Streams binder metrics are published as the |
@ctoestreich Eventually, I would like to integrate with the native Kafka Streams metrics support in micrometer when micrometer 1.4.0 is available through Boot dependency. See this issue. When it was added to the binder, this was not available. Until we can do that, in the meantime we should address your issue. Please chime in with more details on what kind of issues you are running into and any potential suggestions for fixing them. Thank you. |
Metrics work fine of course, but the names that are produced out of that class above use a different naming standard than the micrometer names. There is not parity with names present in micrometer library for Kafka for ease of use in metrics aggregation and time series reporting systems. Is the intent to use the micrometer names for Kafka post micrometer 1.4.0 integration? This will change the names, which I think is correct, but all current dashboards using this metrics will break. |
@ctoestreich Thanks for the response. As I alluded to above, when we added these metrics feature to Kafka Streams binder, micrometer did not have native Kafka Streams metrics capabilities. They only added that as an incubating feature in In any case, unless you are using the Kafka Streams binder, then it should not be an issue. You will see the metrics that you are referring to only if you are using the Kafka Streams binder in the application. When implementing this solution in the binder, we used the same sanitizing approach that Micrometer uses internally (i.e. changing dashes to dots), but now I understand that approach may have consequences when sanitizing synthetic tags that we provide by combining the metrics key and tag. Can you accommodate with the existing tags until we integrate natively with Micrometer for Kafka Streams? |
@ctoestreich, first I will try to answer your questions and clarify how the Micrometer metrics naming works. Then we will look into the issue about inconsistent naming.
The Micrometer naming meters You can see that the Micrometer's own Metrics Binder implementations use the same sanitization rules:
Not sure what
While internally the Micrometer expects all meter names to follow the dotted convention, externally it allows to convert the internal names to formats expected by the target Monitoring system (e.g Influxdb, Prometheus, Atlas ..). @ctoestreich please let me know if this answer your questions so we can move to the potential issue of inconsistent naming you have observed? |
@ctoestreich Any feedback that you want to provide based on what @tzolov commented above? |
Closing due to no activity. |
TLDR;
Details
For some reason Kafka metrics in Boot names are
sanitzed
replacing-
with.
via this function. Why is this done and why is this not done universally? Should these names be coordinated with the Micrometer team to change these if the names using-
are not adequate. The replacement of these characters mutates the names in Micrometer. Micrometer providesNameConversion
strategies that will then mutate these even further. Here is one example of the core metrics library usage of dash names.Micrometer Kafka Names
Boot Mixed Name Conventions
Kafka metrics from boot are mixed usage of
-
and.
which doesn't even align with the above intention.The text was updated successfully, but these errors were encountered: