Skip to content

Conversation

@TerryTaoYY
Copy link
Contributor

When SslMeterBinder is constructed, it only registers update handlers for the bundles
returned by sslBundles.getBundleNames() at that time. Bundles that are registered later
only trigger the register handler once and never get an update handler, so subsequent
SslBundleRegistry.updateBundle(...) calls do not refresh the ssl.chain.expiry gauges.

This change updates the register handler to also register an update handler for the
newly registered bundle and adds a regression test:

  • SslMeterBinderTests.shouldWatchUpdatesForBundlesRegisteredAfterConstruction

The test fails with the original implementation and passes with this change.

Fixes #48144 (gh-48144)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 17, 2025
@mhalbritter mhalbritter added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 17, 2025
@mhalbritter mhalbritter added this to the 3.5.x milestone Nov 17, 2025
@mhalbritter mhalbritter changed the title Fix SSL metrics for dynamically registered bundles ssl.chain.expiry metrics doesn't update for dynamically registered SSL bundles Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ssl.chain.expiry metrics do not update for dynamically registered SSL bundles

4 participants