Skip to content

Commit

Permalink
feat(tasks): add support for stackdriver logging config; update retry…
Browse files Browse the repository at this point in the history
… config (via synth) (#8)
  • Loading branch information
yoshi-automation authored Feb 21, 2020
1 parent 0d0e7d1 commit 10efac5
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"GetIamPolicy": {
"timeout_millis": 10000,
"retry_codes_name": "non_idempotent",
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"SetIamPolicy": {
Expand All @@ -69,7 +69,7 @@
},
"TestIamPermissions": {
"timeout_millis": 10000,
"retry_codes_name": "non_idempotent",
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListTasks": {
Expand All @@ -89,7 +89,7 @@
},
"DeleteTask": {
"timeout_millis": 10000,
"retry_codes_name": "non_idempotent",
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"RunTask": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ message Queue {
// Purge time will be truncated to the nearest microsecond. Purge
// time will be unset if the queue has never been purged.
google.protobuf.Timestamp purge_time = 6;

// Configuration options for writing logs to
// [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
// field is unset, then no logs are written.
StackdriverLoggingConfig stackdriver_logging_config = 9;
}

// Rate limits.
Expand Down Expand Up @@ -344,3 +349,13 @@ message RetryConfig {
// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
int32 max_doublings = 5;
}

// Configuration options for writing logs to
// [Stackdriver Logging](https://cloud.google.com/logging/docs/).
message StackdriverLoggingConfig {
// Specifies the fraction of operations to write to
// [Stackdriver Logging](https://cloud.google.com/logging/docs/).
// This field may contain any value between 0.0 and 1.0, inclusive.
// 0.0 is the default and means that no operations are logged.
double sampling_ratio = 1;
}
103 changes: 95 additions & 8 deletions packages/google-cloud-tasks/google/cloud/tasks_v2/proto/queue_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/google-cloud-tasks/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def default(session):
session.run(
"py.test",
"--quiet",
"--cov=google.cloud.cloudtasks",
"--cov=google.cloud",
"--cov=tests.unit",
"--cov-append",
Expand Down
Loading

0 comments on commit 10efac5

Please sign in to comment.