Skip to content

Commit

Permalink
address pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
efd6 committed Jun 7, 2024
1 parent 92139c1 commit 7a424cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func New(ctx context.Context, id string, cfg *config.C, logger *logp.Logger, aut
return &f, nil
}

// requestTrace decorates cli with an httplog.LoggingRoundTripper if cfg.Trace
// requestTrace decorates cli with an httplog.LoggingRoundTripper if cfg.Tracer
// is non-nil.
func requestTrace(ctx context.Context, cli *http.Client, cfg graphConf, log *logp.Logger) *http.Client {
if cfg.Tracer == nil {
Expand All @@ -417,7 +417,7 @@ func requestTrace(ctx context.Context, cli *http.Client, cfg graphConf, log *log
)
traceLogger := zap.New(core)

const margin = 1e3 // 1OkB ought to be enough room for all the remainder of the trace details.
const margin = 10e3 // 1OkB ought to be enough room for all the remainder of the trace details.
maxSize := cfg.Tracer.MaxSize * 1e6
cli.Transport = httplog.NewLoggingRoundTripper(cli.Transport, traceLogger, max(0, maxSize-margin), log)
return cli
Expand Down
4 changes: 2 additions & 2 deletions x-pack/filebeat/input/entityanalytics/provider/okta/okta.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func newClient(ctx context.Context, cfg conf, log *logp.Logger) (*http.Client, e
return client.StandardClient(), nil
}

// requestTrace decorates cli with an httplog.LoggingRoundTripper if cfg.Trace
// requestTrace decorates cli with an httplog.LoggingRoundTripper if cfg.Tracer
// is non-nil.
func requestTrace(ctx context.Context, cli *http.Client, cfg conf, log *logp.Logger) *http.Client {
if cfg.Tracer == nil {
Expand All @@ -203,7 +203,7 @@ func requestTrace(ctx context.Context, cli *http.Client, cfg conf, log *logp.Log
)
traceLogger := zap.New(core)

const margin = 1e3 // 1OkB ought to be enough room for all the remainder of the trace details.
const margin = 10e3 // 1OkB ought to be enough room for all the remainder of the trace details.
maxSize := cfg.Tracer.MaxSize * 1e6
cli.Transport = httplog.NewLoggingRoundTripper(cli.Transport, traceLogger, max(0, maxSize-margin), log)
return cli
Expand Down

0 comments on commit 7a424cf

Please sign in to comment.