Commit 4879a26
committed
Use a shorter read timeout for the metadata endpoint
Use a shorter timeout of 2 seconds instead of the read of 5 seconds to
avoid blocking too much if the metadata server is not available.
This makes the code behave more similar to the go one:
https://github.com/googleapis/google-cloud-go/blob/main/compute/metadata/metadata.go#L651 parent 1f17758 commit 4879a26
File tree
1 file changed
+4
-3
lines changed- opentelemetry-resourcedetector-gcp/src/opentelemetry/resourcedetector/gcp_resource_detector
1 file changed
+4
-3
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
0 commit comments