Commit 3e501d8
committed
Emit ActivityTaskFailedCounter for canceled activities
Problem:
Customer reported cadence-activity-task-failed metric not emitted when
activities fail due to heartbeat timeout. Root cause is context.Canceled
errors convert to RespondActivityTaskCanceledRequest, which only emits
ActivityTaskCanceledCounter.
Solution:
Modified reportActivityComplete() and reportActivityCompleteByID() to emit
both ActivityTaskCanceledCounter and ActivityTaskFailedCounter when
activities are canceled. Cancellations from timeouts are failures from a
monitoring perspective.
Changes:
- internal/internal_task_pollers.go: Added ActivityTaskFailedCounter.Inc(1)
in canceled case for both functions
Testing:
- go build ./internal/... - compiles successfully
- go test ./internal - all existing tests pass
- go test ./internal/common/metrics - metrics infrastructure verified
- Verified ActivityTaskFailedCounter already defined and used for explicit
failures (line 71 constants.go, line 1296 internal_task_pollers.go)
Backward compatible. No breaking changes to server communication.
Signed-off-by: Diana Zawadzki <[email protected]>
Signed-off-by: Diana Zawadzki <[email protected]>1 parent 7ce86d7 commit 3e501d8
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1289 | 1289 | | |
1290 | 1290 | | |
1291 | 1291 | | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1292 | 1295 | | |
1293 | 1296 | | |
1294 | 1297 | | |
| |||
1342 | 1345 | | |
1343 | 1346 | | |
1344 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
1345 | 1351 | | |
1346 | 1352 | | |
1347 | 1353 | | |
| |||
0 commit comments