Skip to content

Commit eaf5fb7

Browse files
committed
Download Stats
1 parent 7acda96 commit eaf5fb7

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

temporal/api/common/v1/message.proto

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,19 @@ message WorkerSelector {
347347
}
348348
}
349349

350+
// Stats about external payloads downloaded by SDK during workflow task processing.
351+
message ExternalPayloadDownloadStats {
352+
// Number of external payloads downloaded.
353+
int64 payload_count = 1;
354+
355+
// Total size in bytes of downloaded payloads.
356+
int64 total_size_bytes = 2;
357+
358+
// Wall time spent downloading (milliseconds).
359+
int64 download_duration_ms = 3;
360+
361+
// True if any portion of this workflow task processed history in replay mode
362+
// (i.e., SDK had to rebuild state) and downloaded payloads during that period.
363+
bool replay_involved = 4;
364+
}
365+

temporal/api/history/v1/message.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ message WorkflowTaskCompletedEventAttributes {
330330
// is set. This value updates workflow execution's `versioning_info.deployment_version`.
331331
// Experimental. Worker Deployments are experimental and might significantly change in the future.
332332
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 11;
333+
// Stats about external payloads downloaded by SDK.
334+
temporal.api.common.v1.ExternalPayloadDownloadStats external_payload_stats = 12;
333335
}
334336

335337
message WorkflowTaskTimedOutEventAttributes {
@@ -366,6 +368,8 @@ message WorkflowTaskFailedEventAttributes {
366368
// populated to preserve compatibility).
367369
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
368370
temporal.api.common.v1.WorkerVersionStamp worker_version = 10 [deprecated = true];
371+
// Stats about external payloads downloaded by SDK.
372+
temporal.api.common.v1.ExternalPayloadDownloadStats external_payload_stats = 11;
369373
}
370374

371375
message ActivityTaskScheduledEventAttributes {

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ message RespondWorkflowTaskCompletedRequest {
372372
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 16;
373373
// Worker deployment options that user has set in the worker.
374374
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 17;
375+
// Stats about external payloads downloaded by SDK.
376+
temporal.api.common.v1.ExternalPayloadDownloadStats external_payload_stats = 18;
375377

376378
// SDK capability details.
377379
message Capabilities {
@@ -423,6 +425,8 @@ message RespondWorkflowTaskFailedRequest {
423425
temporal.api.deployment.v1.Deployment deployment = 9 [deprecated = true];
424426
// Worker deployment options that user has set in the worker.
425427
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 10;
428+
// Stats about external payloads downloaded by SDK.
429+
temporal.api.common.v1.ExternalPayloadDownloadStats external_payload_stats = 11;
426430
}
427431

428432
message RespondWorkflowTaskFailedResponse {

0 commit comments

Comments
 (0)