-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Use consistent list of micrometer tags in web observation handler #13179
Conversation
@dfrommi Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
068845d
to
0f11589
Compare
@dfrommi Thank you for signing the Contributor License Agreement! |
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.
Thanks, @dfrommi, for the PR! I've left some feedback inline.
web/src/main/java/org/springframework/security/web/ObservationFilterChainDecorator.java
Show resolved
Hide resolved
web/src/main/java/org/springframework/security/web/ObservationFilterChainDecorator.java
Show resolved
Hide resolved
749c8ed
to
dce4e1c
Compare
@jzheaux Thanks for the test-example. As requested, I've added the same change to the reactive class as well. |
dce4e1c
to
fc0e68b
Compare
fc0e68b
to
ed9d41c
Compare
The tag `spring.security.reached.filter.name` is only set if a filter-name is available, otherwise the tag is omitted entirely. This leads to issues with metric-exporters that don't support dynamic tags, but rather expect tag-names of a metric to be always the same. The most prominent example is the Prometheus-exporter. Instead of omitting the tag if no filer-name is set, a none-value is applied instead, making the tag-list consistent in all cases Closes spring-projectsgh-13179
Use StringUtils#hasText PR spring-projectsgh-13179
ed9d41c
to
9583b06
Compare
The tag `spring.security.reached.filter.name` is only set if a filter-name is available, otherwise the tag is omitted entirely. This leads to issues with metric-exporters that don't support dynamic tags, but rather expect tag-names of a metric to be always the same. The most prominent example is the Prometheus-exporter. Instead of omitting the tag if no filer-name is set, a none-value is applied instead, making the tag-list consistent in all cases Closes gh-13179
Thanks, @dfrommi, for the PR! This is merged into |
The tag
spring.security.reached.filter.name
is only set if a filter-name is available, otherwise the tag is omitted entirely. This leads to issues with metric-exporters that don't support dynamic tags, but rather expect tag-names of a metric to be always the same. The most prominent example is the Prometheus-exporter.Instead of omitting the tag if no filer-name is set, a none-value is applied instead, making the tag-list consistent in all cases