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

@@ -1,6 +1,8 @@
package emapi
import (
"net/http"
"go.uber.org/zap"
)
@@ -15,3 +17,12 @@ func WithLogger(logger *zap.SugaredLogger) Option {
return nil
}
}
// WithHTTPClient sets the http client to be used by the client.
func WithHTTPClient(httpClient *http.Client) Option {
return func(c *Client) error {
c.httpClient = httpClient
return nil
}
}