Skip to content

Fix SSL metrics for dynamically registered bundles#48143

Closed
Colorfulnia wants to merge 1 commit intospring-projects:mainfrom
Colorfulnia:fix-ssl-bundle-metrics
Closed

Fix SSL metrics for dynamically registered bundles#48143
Colorfulnia wants to merge 1 commit intospring-projects:mainfrom
Colorfulnia:fix-ssl-bundle-metrics

Conversation

@Colorfulnia
Copy link

@Colorfulnia Colorfulnia commented Nov 16, 2025

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)

Signed-off-by: TerryTaoYY <yueyang.tao@gmail.com>
@wilkinsona
Copy link
Member

Thanks for the PR, @Colorfulnia. It contains a commit authored by @TerryTaoYY. Judging by the user profiles, I think this may be two different accounts owned by the same person but, AFAIK, we can't accept a PR from one user that contains commits from another user.

@wilkinsona wilkinsona added the status: waiting-for-feedback We need additional information before we can continue label Nov 17, 2025
@Colorfulnia
Copy link
Author

Colorfulnia commented Nov 17, 2025

@wilkinsona Thank you for let me know, I will re-pull request with a single account.

@wilkinsona wilkinsona removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Nov 17, 2025
@TerryTaoYY
Copy link
Contributor

Thanks for the PR, @Colorfulnia. It contains a commit authored by @TerryTaoYY. Judging by the user profiles, I think this may be two different accounts owned by the same person but, AFAIK, we can't accept a PR from one user that contains commits from another user.

Thanks for the clarification. I've submitted a new pull request from a single account: #48153.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

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