We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b475f9 commit 22f02e1Copy full SHA for 22f02e1
sloggers/slogstackdriver/slogstackdriver.go
@@ -26,8 +26,11 @@ import (
26
func Sink(w io.Writer) slog.Sink {
27
// When not running in Google Cloud, the default metadata client will
28
// leak a goroutine.
29
+ //
30
+ // We use a very short timeout because the metadata server should be
31
+ // within the same datacenter as the cloud instance.
32
client := metadata.NewClient(&http.Client{
- Timeout: time.Second * 5,
33
+ Timeout: time.Second * 3,
34
})
35
projectID, _ := client.ProjectID()
36
0 commit comments