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
Introduce request attribute to enable global metrics use runtime request tags #398
Introduce request attribute to enable global metrics use runtime request tags #398
Conversation
…uest tags in the metrics
1d97936
to
b157898
Compare
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.
Will wait for the PR where this is used, to better understand its usage.
core/src/main/java/io/confluent/rest/metrics/MetricsResourceMethodApplicationListener.java
Outdated
Show resolved
Hide resolved
.../java/io/confluent/rest/metrics/MetricsResourceMethodApplicationListenerIntegrationTest.java
Outdated
Show resolved
Hide resolved
@msn-tldr the other PR is here https://github.com/confluentinc/ce-kafka-rest/pull/464/ please have a look 👍 , thanks |
core/src/main/java/io/confluent/rest/metrics/MetricsResourceMethodApplicationListener.java
Outdated
Show resolved
Hide resolved
…FIG instead of evaluating from request
.../java/io/confluent/rest/metrics/MetricsResourceMethodApplicationListenerIntegrationTest.java
Show resolved
Hide resolved
.../java/io/confluent/rest/metrics/MetricsResourceMethodApplicationListenerIntegrationTest.java
Show resolved
Hide resolved
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, minor comments, to improve comments on test to make it obvious the intention.
This PR introduces a request attribute
GLOBAL_STATS_REQUEST_TAGS_ENABLED_PROP_KEY
to enable global stats (metrics for all resource methods) to include runtime tags from the requests.This will enable us to have tenant metrics whenever tenant tag is set in application resources (from ce-kafka-rest) for example.
This attributes is also used to keep the compatibility with all downstream apps that use
rest-utils
.PR for
ce-kafka-rest
will be followup after this.