-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
What did you do?
client = &acme.Client{
Key: config.PrivateKey,
DirectoryURL: *ServerApiURL,
RetryBackoff: func(n int, r *http.Request, res *http.Response) time.Duration {
ctx := r.Context()
retryLogger := zc.L(ctx) // get logger from context https://github.com/rekby/zapcontext
if retryLogger == nil {
retryLogger = logger.With(zap.String("request_context", "no-logger"))
}
retryLogger.Info("Test")
}
}
Send request to Lets encrypt with retrieval error.
_, err = client.Accept(ctx, httpchallenge)
What did you expect to see?
logs with my logger from ctx, and without request_context" = "no-logger"
What did you see instead?
logs with "request_context" = "no-logger" and without my logger from context ctx.
I suggest to send req with external context to function. Now it receive clear context (but http call do with external context).
My patch for self: https://github.com/rekby/crypto/commit/9874cac870c3253304772cee7f13a87c56040e88
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.