Files
Alan WuandGitHub 3589b4e1e3 Fix activity start-to-close metric timestamps (#9586)
## What changed?
wrap timestamp calls with `timestamp.TimeValue` to avoid incorrectly set
Epoch Timestamps.

## Why?
AsTime() converts timestamp to Unix time, and if that value is nil, that
defaults to the Epoch timestamp. If the Epoch Timestamp is used, (non
Zero value), [metrics are
recorded](https://github.com/temporalio/temporal/blob/activity-start-to-close-fix/service/history/workflow/metrics.go#L161).


https://github.com/temporalio/temporal/blob/activity-start-to-close-fix/common/primitives/timestamp/time.go#L13
provides helper functions to correctly format nil Time values,
converting to a 0 value correctly.

## How did you test it?
- [X] built
- [X] run locally and tested manually
- [X] covered by existing tests
- [X] added new unit test(s)
- [ ] added new functional test(s)
2026-03-20 13:05:14 -04:00
..