Skip to content

Commit 319156e

Browse files
committed
Download Stats
1 parent 7acda96 commit 319156e

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

temporal/api/history/v1/message.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import "temporal/api/failure/v1/message.proto";
2222
import "temporal/api/taskqueue/v1/message.proto";
2323
import "temporal/api/update/v1/message.proto";
2424
import "temporal/api/workflow/v1/message.proto";
25+
import "temporal/api/sdk/v1/external_payload_download_stats.proto";
2526
import "temporal/api/sdk/v1/task_complete_metadata.proto";
2627
import "temporal/api/sdk/v1/user_metadata.proto";
2728

@@ -330,6 +331,8 @@ message WorkflowTaskCompletedEventAttributes {
330331
// is set. This value updates workflow execution's `versioning_info.deployment_version`.
331332
// Experimental. Worker Deployments are experimental and might significantly change in the future.
332333
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 11;
334+
// Stats about external payloads downloaded by SDK.
335+
temporal.api.sdk.v1.ExternalPayloadDownloadStats external_payload_stats = 12;
333336
}
334337

335338
message WorkflowTaskTimedOutEventAttributes {
@@ -366,6 +369,8 @@ message WorkflowTaskFailedEventAttributes {
366369
// populated to preserve compatibility).
367370
// Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
368371
temporal.api.common.v1.WorkerVersionStamp worker_version = 10 [deprecated = true];
372+
// Stats about external payloads downloaded by SDK.
373+
temporal.api.sdk.v1.ExternalPayloadDownloadStats external_payload_stats = 11;
369374
}
370375

371376
message ActivityTaskScheduledEventAttributes {
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
syntax = "proto3";
2+
3+
package temporal.api.sdk.v1;
4+
5+
option go_package = "go.temporal.io/api/sdk/v1;sdk";
6+
option java_package = "io.temporal.api.sdk.v1";
7+
option java_multiple_files = true;
8+
option java_outer_classname = "ExternalPayloadDownloadStatsProto";
9+
option ruby_package = "Temporalio::Api::Sdk::V1";
10+
option csharp_namespace = "Temporalio.Api.Sdk.V1";
11+
12+
import "google/protobuf/timestamp.proto";
13+
14+
// Stats about external payloads downloaded by SDK during workflow task processing.
15+
message ExternalPayloadDownloadStats {
16+
// Number of external payloads downloaded.
17+
int64 payload_count = 1;
18+
19+
// Total size in bytes of downloaded payloads.
20+
int64 total_size_bytes = 2;
21+
22+
// Wall time spent downloading.
23+
google.protobuf.Timestamp download_time = 3;
24+
25+
// True if any portion of this workflow task processed history in replay mode
26+
// (i.e., SDK had to rebuild state) and downloaded payloads during that period.
27+
bool replay_involved = 4;
28+
}

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import "temporal/api/taskqueue/v1/message.proto";
3838
import "temporal/api/update/v1/message.proto";
3939
import "temporal/api/version/v1/message.proto";
4040
import "temporal/api/batch/v1/message.proto";
41+
import "temporal/api/sdk/v1/external_payload_download_stats.proto";
4142
import "temporal/api/sdk/v1/task_complete_metadata.proto";
4243
import "temporal/api/sdk/v1/user_metadata.proto";
4344
import "temporal/api/nexus/v1/message.proto";
@@ -372,6 +373,8 @@ message RespondWorkflowTaskCompletedRequest {
372373
temporal.api.enums.v1.VersioningBehavior versioning_behavior = 16;
373374
// Worker deployment options that user has set in the worker.
374375
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 17;
376+
// Stats about external payloads downloaded by SDK.
377+
temporal.api.sdk.v1.ExternalPayloadDownloadStats external_payload_stats = 18;
375378

376379
// SDK capability details.
377380
message Capabilities {
@@ -423,6 +426,8 @@ message RespondWorkflowTaskFailedRequest {
423426
temporal.api.deployment.v1.Deployment deployment = 9 [deprecated = true];
424427
// Worker deployment options that user has set in the worker.
425428
temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 10;
429+
// Stats about external payloads downloaded by SDK.
430+
temporal.api.sdk.v1.ExternalPayloadDownloadStats external_payload_stats = 11;
426431
}
427432

428433
message RespondWorkflowTaskFailedResponse {

0 commit comments

Comments
 (0)