From ea45065dac7382da588f0867675b31a45f5f68d6 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sat, 5 Nov 2022 15:43:00 -0400 Subject: [PATCH] set proper http client on reddit --- internal/reddit/client.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/reddit/client.go b/internal/reddit/client.go index 3325927..88995e1 100644 --- a/internal/reddit/client.go +++ b/internal/reddit/client.go @@ -95,11 +95,16 @@ func NewClient(id, secret string, tracer trace.Tracer, statsd statsd.ClientInter pool.Put(parsers[i]) } + httpClient := &http.Client{ + Transport: otelhttp.NewTransport(http.DefaultTransport), + Timeout: 4 * time.Second, + } + return &Client{ id, secret, tracer, - otelhttp.DefaultClient, + httpClient, pool, statsd, redis,