We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c4eac6 commit 95b1028Copy full SHA for 95b1028
1 file changed
run/logging-manual/e2e_test.py
@@ -16,6 +16,7 @@
16
# This test builds and deploys the two secure services
17
# to test that they interact properly together.
18
19
+import datetime
20
import os
21
import subprocess
22
import time
@@ -117,7 +118,11 @@ def test_end_to_end(services):
117
118
time.sleep(10) # Slight delay writing to stackdriver
119
client = logging_v2.LoggingServiceV2Client()
120
resource_names = [f"projects/{project}"]
121
+ # We add timestamp for making the query faster.
122
+ now = datetime.datetime.now(datetime.timezone.utc)
123
+ filter_date = now - datetime.timedelta(minutes=1)
124
filters = (
125
+ f"timestamp>=\"{filter_date.isoformat('T')}\" "
126
"resource.type=cloud_run_revision "
127
"AND severity=NOTICE "
128
f"AND resource.labels.service_name={service_name} "
0 commit comments