https://github.com/temporalio/temporal/blob/4e27fc62f75c1a19c06ed968f57867c12b008bbf/service/history/handler.go#L1971 It seems `metrics.CapturePanic()` should be called with `defer`?