ensure otel tracing is passed through all event handlers and clients

This commit is contained in:
Mike Mason
2023-07-21 16:12:24 +00:00
parent 4ac8929644
commit c27e50ea0b
9 changed files with 46 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ import (
"net/url"
"time"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.uber.org/zap"
"go.equinixmetal.net/infra9-metal-bridge/internal/metal/providers"
@@ -16,7 +17,8 @@ const (
// DefaultHTTPClient is the default http client used if no client is provided.
var DefaultHTTPClient = &http.Client{
Timeout: defaultHTTPTimeout,
Timeout: defaultHTTPTimeout,
Transport: otelhttp.NewTransport(http.DefaultTransport),
}
var _ providers.Provider = &Client{}