Skip to content

Commit 0460021

Browse files
Feat/heartbeat count (#769)
<!-- Describe what has changed in this PR --> **What changed?** This adds a field for counting the total number of heartbeats given to an activity, as received by the server (as an aside, this may be less than the client activity.RecordHeartbeat() calls due to the client's throttling of this call. For this change, I'm just commandeering the work already done by @fretz12. <!-- Tell your future self why have you made these changes --> **Why?** This is to provide this information about the total number of heartbeats in the DescribeActivity API call / CLi invocation. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** Should be backwards compatible. <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> **Server PR** Should be backwards compatible. Co-authored-by: Fred Tzeng <fred.tzeng@temporal.io>
1 parent 1515646 commit 0460021

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

openapi/openapiv2.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11443,6 +11443,11 @@
1144311443
"$ref": "#/definitions/v1Link"
1144411444
},
1144511445
"description": "Links to related entities, such as the entity that started this activity."
11446+
},
11447+
"totalHeartbeatCount": {
11448+
"type": "string",
11449+
"format": "int64",
11450+
"description": "Total number of heartbeats recorded across all attempts of this activity, including retries."
1144611451
}
1144711452
},
1144811453
"description": "Information about a standalone activity."

openapi/openapiv3.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8243,6 +8243,9 @@ components:
82438243
items:
82448244
$ref: '#/components/schemas/Link'
82458245
description: Links to related entities, such as the entity that started this activity.
8246+
totalHeartbeatCount:
8247+
type: string
8248+
description: Total number of heartbeats recorded across all attempts of this activity, including retries.
82468249
description: Information about a standalone activity.
82478250
ActivityExecutionListInfo:
82488251
type: object

temporal/api/activity/v1/message.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ message ActivityExecutionInfo {
165165

166166
// Links to related entities, such as the entity that started this activity.
167167
repeated temporal.api.common.v1.Link links = 33;
168+
169+
// Total number of heartbeats recorded across all attempts of this activity, including retries.
170+
int64 total_heartbeat_count = 34;
168171
}
169172

170173
// Limited activity information returned in the list response.

0 commit comments

Comments
 (0)