File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 77 "github.com/benbjohnson/clock"
88 "github.com/golang-jwt/jwt/v5"
99 "github.com/sovietaced/okta-jwt-verifier/metadata"
10+ "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
1011 "io"
1112 "log/slog"
1213 "net/http"
@@ -72,7 +73,12 @@ func WithBackgroundCtx(ctx context.Context) Option {
7273
7374func defaultOptions () * Options {
7475 opts := & Options {}
75- WithHttpClient (http .DefaultClient )(opts )
76+
77+ httpClient := http.Client {
78+ Transport : otelhttp .NewTransport (http .DefaultTransport ),
79+ }
80+
81+ WithHttpClient (& httpClient )(opts )
7682 withClock (clock .New ())(opts )
7783 WithCacheTtl (DefaultCacheTtl )(opts )
7884 WithFetchStrategy (Lazy )(opts )
Original file line number Diff line number Diff line change 66 "fmt"
77 "github.com/benbjohnson/clock"
88 "github.com/sovietaced/okta-jwt-verifier/metadata"
9+ "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
910 "log/slog"
1011 "net/http"
1112 "sync"
@@ -70,7 +71,11 @@ func WithBackgroundCtx(ctx context.Context) Option {
7071
7172func defaultOptions () * Options {
7273 opts := & Options {}
73- WithHttpClient (http .DefaultClient )(opts )
74+
75+ httpClient := http.Client {
76+ Transport : otelhttp .NewTransport (http .DefaultTransport ),
77+ }
78+ WithHttpClient (& httpClient )(opts )
7479 withClock (clock .New ())(opts )
7580 WithCacheTtl (DefaultCacheTtl )(opts )
7681 WithFetchStrategy (Lazy )(opts )
You can’t perform that action at this time.
0 commit comments