Skip to content
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

Observability #11906

Merged
merged 7 commits into from
Oct 13, 2022
Merged

Observability #11906

merged 7 commits into from
Oct 13, 2022

Conversation

jzheaux
Copy link
Contributor

@jzheaux jzheaux commented Sep 27, 2022

No description provided.

@jzheaux jzheaux self-assigned this Sep 27, 2022
@jzheaux jzheaux added in: core An issue in spring-security-core type: enhancement A general enhancement labels Sep 27, 2022
@jzheaux jzheaux added this to the 6.0.0-RC1 milestone Sep 27, 2022
@jzheaux jzheaux force-pushed the observability branch 3 times, most recently from c0f75d7 to 20d9480 Compare September 30, 2022 22:51
@@ -147,6 +154,12 @@ public class FilterChainProxy extends GenericFilterBean {

private static final String FILTER_APPLIED = FilterChainProxy.class.getName().concat(".APPLIED");

static final String REQUEST_OBSERVATION_NAME = "http.requests";

static final String UNSECURED_OBSERVATION_NAME = "http.unsecured.requests";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we match these to what MVC uses, like http.server.requests.secured and http.server.requests.unsecured?

Copy link
Contributor Author

@jzheaux jzheaux Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have a simple way to turn all Spring Security observations off. Not that it can't be done another way, but right now I've just updated the PR so that all start with spring.security.. In this way, an application can create a very simple predicate to turn off Spring Security observations.

I see the value of aligning, too... it would be nice if there were a way to get both. One way may be to introduce a class like SpringSecurityObservationPredicates#noObservations() or similar. Is there another potential route?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the SpringSecurityObservationPredicates#noObservations() approach.

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My biggest comment is, I'd like to see if it makes sense / is possible to make observability an optional dependency. This might not happen in this release, but may just be possible with the current codebase to do passively. This means that core components can only use the observability APIs privately.

It is possible this does not make sense, but I'd like to pose that for consideration.

There are also a number of classes / interfaces missing class level Javadoc that would benefit from it.

@jzheaux jzheaux merged commit fe96a62 into spring-projects:main Oct 13, 2022
@jzheaux jzheaux deleted the observability branch October 13, 2022 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants