Commit f655b29
committed
cmd/internal/cmdconfig: include Cloud Run instance ID in logs
This aids in diagnosing per-instance issues. The instance ID seems like
it would belong in the MonitoredResource labels (configured in
serverconfig), but the top-level instanceId field is the standard name
for this field on Cloud Run.
Log messages going directly to stderr (before we configure logging) get
this label automatically from the Cloud Run infra. When we use
stackdriver directly we apparently need to add this ourselves.
See https://cloud.google.com/run/docs/logging#service-fields.
Change-Id: I6a6a636cb11a2abc00347e0679605ebbdb9995f4
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/700396
Reviewed-by: Jonathan Amsterdam <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
kokoro-CI: kokoro <[email protected]>1 parent 52bba2a commit f655b29
File tree
2 files changed
+11
-4
lines changed- cmd/internal/cmdconfig
- internal/config/serverconfig
2 files changed
+11
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
0 commit comments