elastic/fleet-server

logs consistency

michel-laterman opened this issue · 3 comments

fleet-server has log lines with inconsistent attributes.

For example:

Str("fleet.policy.output.name", p.Name).Logger()

logger.Error().Err(err).Str("outputName", outputName).Msg(doc.Message)

Both refer to policy outputs but are named different things.
We should go through the codebase and try to make these more consistent (following ecs)

Few more places to make consistent:
The action type is logged under different fields:

ack event
actionId

Action delivered to agent on checkin
id

Found that the policy id is also logged under different names:

New revision of policy received and added to the queue
fleet.policy.id

Policy coordinator added a new policy revision
policy_id

Revision_idx fields are changed in this pr #3234

Found one more place where revision and coordinator idx is logged under a different name:

Int64("fleet.policyRevision", pp.Policy.RevisionIdx).
Int64("fleet.policyCoordinator", pp.Policy.CoordinatorIdx).