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,7 @@
package emgql
import (
"net/http"
"net/url"
"go.uber.org/zap"
@@ -32,6 +33,15 @@ func WithBaseURL(baseURL string) Option {
}
}
// 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
}
}
// WithConfig applies all configurations defined in the config.
func WithConfig(config Config) Option {
return func(c *Client) error {