-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x-pack/filebeat/input/entityanalytics/provider/{azuread,okta}: add request tracing support #39821
Conversation
31209b8
to
c1090de
Compare
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Couple of minor comments that apply to both.
@@ -383,6 +398,41 @@ func New(cfg *config.C, logger *logp.Logger, auth authenticator.Authenticator) ( | |||
return &f, nil | |||
} | |||
|
|||
// requestTrace decorates cli with an httplog.LoggingRoundTripper if cfg.Trace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// requestTrace decorates cli with an httplog.LoggingRoundTripper if cfg.Trace | |
// requestTrace decorates cli with an httplog.LoggingRoundTripper if cfg.Tracer |
) | ||
traceLogger := zap.New(core) | ||
|
||
const margin = 1e3 // 1OkB ought to be enough room for all the remainder of the trace details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't 1e3 == 1kB?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it is 🤦.
Proposed commit message
See title.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Run tests in the okta/internal/okta and azuread/fetcher/graph packages with the
-request_trace
flag to see tracing behaviour.Related issues
Use cases
Screenshots
Logs