Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 70b597a

Browse files
feat(tasks): add support for stackdriver logging config; update retry config (via synth) (#8)
1 parent b06306c commit 70b597a

File tree

5 files changed

+135
-18
lines changed

5 files changed

+135
-18
lines changed

‎google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
},
6060
"GetIamPolicy": {
6161
"timeout_millis": 10000,
62-
"retry_codes_name": "non_idempotent",
62+
"retry_codes_name": "idempotent",
6363
"retry_params_name": "default",
6464
},
6565
"SetIamPolicy": {
@@ -69,7 +69,7 @@
6969
},
7070
"TestIamPermissions": {
7171
"timeout_millis": 10000,
72-
"retry_codes_name": "non_idempotent",
72+
"retry_codes_name": "idempotent",
7373
"retry_params_name": "default",
7474
},
7575
"ListTasks": {
@@ -89,7 +89,7 @@
8989
},
9090
"DeleteTask": {
9191
"timeout_millis": 10000,
92-
"retry_codes_name": "non_idempotent",
92+
"retry_codes_name": "idempotent",
9393
"retry_params_name": "default",
9494
},
9595
"RunTask": {

‎google/cloud/tasks_v2/proto/queue.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ message Queue {
166166
// Purge time will be truncated to the nearest microsecond. Purge
167167
// time will be unset if the queue has never been purged.
168168
google.protobuf.Timestamp purge_time = 6;
169+
170+
// Configuration options for writing logs to
171+
// [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
172+
// field is unset, then no logs are written.
173+
StackdriverLoggingConfig stackdriver_logging_config = 9;
169174
}
170175

171176
// Rate limits.
@@ -344,3 +349,13 @@ message RetryConfig {
344349
// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
345350
int32 max_doublings = 5;
346351
}
352+
353+
// Configuration options for writing logs to
354+
// [Stackdriver Logging](https://cloud.google.com/logging/docs/).
355+
message StackdriverLoggingConfig {
356+
// Specifies the fraction of operations to write to
357+
// [Stackdriver Logging](https://cloud.google.com/logging/docs/).
358+
// This field may contain any value between 0.0 and 1.0, inclusive.
359+
// 0.0 is the default and means that no operations are logged.
360+
double sampling_ratio = 1;
361+
}

‎google/cloud/tasks_v2/proto/queue_pb2.py

Lines changed: 95 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def default(session):
7272
session.run(
7373
"py.test",
7474
"--quiet",
75+
"--cov=google.cloud.cloudtasks",
7576
"--cov=google.cloud",
7677
"--cov=tests.unit",
7778
"--cov-append",

0 commit comments

Comments
 (0)