You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
Use example apps provided in #14031 and use latest 6.1.6 snapshot for spring security
Use Jmeter or similar with 20 treads, making 500 requests on each thread using connection pool (connection reused)
After test checks the metrics from mx/prometheus endpoint. Most metrics should show count 0, 1 or 10000 (or 10001 as one Prometheus query). In my test the following results were seen. Test was done with TLS but wo TLS similar should be seen on corresponding counters like "spring_security_http_unsecured_requests_seconds_count
This metrics should be 10001 as 10000 requests plus 1 Prometheus requests
If you query Prometheus metrics during the test you can see "spring_security_filterchains_active_seconds_active_count" "after" is normally 0 but might go to 1.
After test querying Prometheus "spring_security_filterchains_active_seconds_active_count" "after" is now back to zero. Also after external cancel active goes back to zero. This confirm #14031 fixed.
** Versions **
Windows, Linux
SpringBoot 3.14 and security web snap from 6.1.6
The text was updated successfully, but these errors were encountered:
I don't see this one as a problem. The after observation is only started if it is reached. In the event of a preceding cancellation, the after observation is not started, making the number less than the total number of requests.
Does that sound reasonable?
As for the overage in the other observation, I will take a look and report back.
jzheaux
added a commit
to jzheaux/spring-security
that referenced
this issue
Nov 15, 2023
Observation itself does not protect against start and stop being called
multiple times. This commit aligns all observation instances to instead
use an implementation that does have these guards in place.
Closesspring-projectsgh-14082
Describe the bug
Some spring.security counters contain still wrong value after active counter were fixed#14031
At least the following counters contains too high or too low values.
To Reproduce
Use example apps provided in #14031 and use latest 6.1.6 snapshot for spring security
Use Jmeter or similar with 20 treads, making 500 requests on each thread using connection pool (connection reused)
After test checks the metrics from mx/prometheus endpoint. Most metrics should show count 0, 1 or 10000 (or 10001 as one Prometheus query). In my test the following results were seen. Test was done with TLS but wo TLS similar should be seen on corresponding counters like "spring_security_http_unsecured_requests_seconds_count
This metrics should be 10001 as 10000 requests plus 1 Prometheus requests
And this should be also 10001
Full results (max and sum removed)
If you query Prometheus metrics during the test you can see "spring_security_filterchains_active_seconds_active_count" "after" is normally 0 but might go to 1.
After test querying Prometheus "spring_security_filterchains_active_seconds_active_count" "after" is now back to zero. Also after external cancel active goes back to zero. This confirm #14031 fixed.
** Versions **
The text was updated successfully, but these errors were encountered: