-
Notifications
You must be signed in to change notification settings - Fork 83
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
make str log fields consistent #3247
Conversation
thanks for getting a start on this! |
@@ -431,7 +431,7 @@ func runCoordinatorOutput(ctx context.Context, cord Coordinator, bulker bulk.Bul | |||
if err != nil { | |||
s.Err(err).Msg("Policy coordinator failed to add a new policy revision") | |||
} else { | |||
s.Info().Int64("revision_id", p.RevisionIdx).Msg("Policy coordinator added a new policy revision") |
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.
removed redundant log field (already there in line 429)
internal/pkg/api/handleCheckin.go
Outdated
@@ -765,8 +766,8 @@ func processPolicy(ctx context.Context, zlog zerolog.Logger, bulker bulk.Bulk, a | |||
defer span.End() | |||
zlog = zlog.With(). | |||
Str("fleet.ctx", "processPolicy"). | |||
Int64("fleet.policyRevision", pp.Policy.RevisionIdx). | |||
Int64("fleet.policyCoordinator", pp.Policy.CoordinatorIdx). | |||
Int64(dl.FieldRevisionIdx, pp.Policy.RevisionIdx). |
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.
Should we define these as constants in logger/ecs.go
?
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.
done
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
What is the problem this PR solves?
// Please do not just reference an issue. Explain WHAT the problem this PR solves here.
Making log fields consistent to make it easier to check the logs.
How does this PR solve the problem?
// Explain HOW you solved the problem in your code. It is possible that during PR reviews this changes and then this section should be updated.
How to test this PR locally
Design Checklist
Checklist
./changelog/fragments
using the changelog toolRelated issues
Closes #3239