Skip to content

Commit

Permalink
Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonip committed Jul 2, 2024
1 parent 84a1597 commit ed26707
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions exporter/elasticsearchexporter/elasticsearch_bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type clientLogger struct {

// LogRoundTrip should not modify the request or response, except for consuming and closing the body.
// Implementations have to check for nil values in request and response.
func (cl *clientLogger) LogRoundTrip(requ *http.Request, resp *http.Response, err error, _ time.Time, dur time.Duration) error {
func (cl *clientLogger) LogRoundTrip(requ *http.Request, resp *http.Response, clientErr error, _ time.Time, dur time.Duration) error {
zl := cl.Logger

var fields []zap.Field
Expand All @@ -56,7 +56,7 @@ func (cl *clientLogger) LogRoundTrip(requ *http.Request, resp *http.Response, er
}

switch {
case err == nil && resp != nil:
case clientErr == nil && resp != nil:
fields = append(
fields,
zap.String("path", sanitize.String(requ.URL.Path)),
Expand All @@ -66,10 +66,10 @@ func (cl *clientLogger) LogRoundTrip(requ *http.Request, resp *http.Response, er
)
zl.Debug("Request roundtrip completed.", fields...)

case err != nil:
case clientErr != nil:
fields = append(
fields,
zap.NamedError("reason", err),
zap.NamedError("reason", clientErr),
)
zl.Debug("Request failed.", fields...)
}
Expand Down

0 comments on commit ed26707

Please sign in to comment.