Skip to content

Spring Security metric names should not contain dashes #13660

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

Closed
Ducius6 opened this issue Aug 17, 2023 · 3 comments
Closed

Spring Security metric names should not contain dashes #13660

Ducius6 opened this issue Aug 17, 2023 · 3 comments
Assignees
Labels
in: web An issue in web modules (web, webmvc) type: bug A general bug
Milestone

Comments

@Ducius6
Copy link
Contributor

Ducius6 commented Aug 17, 2023

When upgrading to Spring Boot 3 we had issue in new spring security metrics exposed with Micrometer. Issue seems to be that these metrics end up having "-" in it's name.
And since we are using prometheus, scraping/parsing of metrics did not work since prometheus can't have dash in it's metric name.

Exact metric that was causing the issue is "spring_security_filterchains_session_url-encoding_before_total" which is located in ObservationFilterChainDecorator.class.

Should naming of these metrics change so it can be used with prometheus?

@Ducius6 Ducius6 added status: waiting-for-triage An issue we've not yet triaged type: bug A general bug labels Aug 17, 2023
@jzheaux
Copy link
Contributor

jzheaux commented Oct 16, 2023

Hi, @Ducius6. Yes, let's make the change and remove the - in url-encoding and eager-create.

Are you able to provide a PR?

@jzheaux jzheaux self-assigned this Oct 16, 2023
@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 16, 2023
@jzheaux jzheaux changed the title Spring security metrics with dash in it's label (in Spring Boot 3) Spring Security metric names should not contain dashes Oct 16, 2023
@Ducius6
Copy link
Contributor Author

Ducius6 commented Oct 17, 2023

Yes, sure. Will do!

@Ducius6
Copy link
Contributor Author

Ducius6 commented Oct 17, 2023

Hi, created PR here

jzheaux pushed a commit to Ducius6/spring-security that referenced this issue Oct 30, 2023
jzheaux added a commit to Ducius6/spring-security that referenced this issue Oct 30, 2023
jzheaux added a commit that referenced this issue Oct 30, 2023
@jzheaux jzheaux added this to the 6.0.9 milestone Oct 30, 2023
@sjohnr sjohnr modified the milestones: 6.0.9, 6.0.x Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants