How to check if all shards are loaded for history service and those shards' metadata is updated after temporal upgrade

The temporal upgrade page (Upgrade the Temporal Server | Temporal Documentation) mentions that “Also, be aware that each upgrade requires the History Service to load all Shards and update the Shard metadata, so allow approximately 10 minutes on each version for these processes to complete before upgrading to the next version.”

Is there a way to verify that all shards are loaded for history service and those shards’ metadata is updated after the temporal upgrade instead of waiting for 10 minutes?

Thanks in advance for your help.

Service metrics emit service_errors_shard_ownership_lost that you could monitor.
Otherwise could look at logs, messages like

"Encounter shard ownership lost, request range ID: %v, actual range ID: %v"

Hi @tihomir ,
How can I monitor Service metrics and check for service_errors_shard_ownership_lost?

Thanks for your help in advance.