Skip to content
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

Add remoteAddr to remote and json write endpoints #1583

Merged
merged 5 commits into from
Apr 24, 2019

Conversation

robskillington
Copy link
Collaborator

What this PR does / why we need it:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:

Add remote address to JSON and Prometheus remote write error logs

Does this PR require updating code package or user-facing documentation?:

NONE

logger := logging.WithContext(r.Context())
logger.Error("write error",
zap.String("remoteAddr", r.RemoteAddr),
zap.Any("err", err))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: mind changing this to Zap.Error(err) in all the places

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call.

Copy link
Collaborator

@prateek prateek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/nit

@robskillington robskillington merged commit 5451f5f into master Apr 24, 2019
@robskillington robskillington deleted the r/add-caller-to-client-errors branch April 24, 2019 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants