Log host identifier in EnrollAgent service logging (#2313)

This can help identify circumstances in which multiple hosts are
providing the same identifier and clobbering the node key for each
other.
This commit is contained in:
Zachary Wasserman 2020-10-02 13:23:54 -07:00 committed by GitHub
parent c61ba759dd
commit f2d3683d80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,6 +21,7 @@ func (mw loggingMiddleware) EnrollAgent(ctx context.Context, enrollSecret string
"method", "EnrollAgent",
"ip_addr", ctx.Value(kithttp.ContextKeyRequestRemoteAddr).(string),
"x_for_ip_addr", ctx.Value(kithttp.ContextKeyRequestXForwardedFor).(string),
"host_identifier", hostIdentifier,
"err", err,
"took", time.Since(begin),
)