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

[kv] Include key name in watch errors #2138

Merged
merged 2 commits into from Feb 10, 2020
Merged

Conversation

schallert
Copy link
Collaborator

@schallert schallert commented Feb 7, 2020

What this PR does / why we need it: Ensures that all watch errors will include the key they're watching. Sometimes loggers have enough context to include this error, but not always. Should make watch errors less ambiguous.

This doesn't fully fix the problem as we don't have access to the raw etcd key, but should make some cases less difficult to debug.

Before:

{"level":"fatal","ts":1581361983.0189734,"msg":"error creating aggregator options","error":"initializing value error:init watch timeout"}

After:

{"level":"fatal","ts":1581362476.4911253,"msg":"error creating aggregator options","error":"initializing value error (key='m3aggregator'): init watch timeout"}

Fixes #

Special notes for your reviewer:

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

Improve dynamic config errors

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

NONE

@schallert schallert marked this pull request as ready for review February 10, 2020 19:22
Copy link
Collaborator

@robskillington robskillington left a comment

Choose a reason for hiding this comment

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

LGTM

v.Unlock()
continue
}
if err = v.processWithLockFn(update); err != nil {
v.log.Error("error updating update", zap.Error(err))
v.log.Error("error updating update",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: "error applying update"?

Copy link
Collaborator

@arnikola arnikola 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

@schallert schallert merged commit b429452 into master Feb 10, 2020
@schallert schallert deleted the schallert/watch_error_incl_key branch February 10, 2020 19:45
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.

None yet

3 participants