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
Signed-off-by: TerryTaoYY <yueyang.tao@gmail.com>
@TerryTaoYY TerryTaoYY force-pushed the fix-ssl-bundle-metrics branch from 029d495 to 70c4801 Compare November 17, 2025 19:48
@snicoll snicoll self-assigned this Nov 18, 2025
snicoll pushed a commit that referenced this pull request Nov 18, 2025
See gh-48153

Signed-off-by: TerryTaoYY <yueyang.tao@gmail.com>
@snicoll snicoll closed this in bb247e8 Nov 18, 2025
@snicoll snicoll modified the milestones: 3.5.x, 3.5.8 Nov 18, 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