Skip to content

Instrumentation leads to extra fields in logsย #7995

@michaelsproul

Description

@michaelsproul

The instrumentation we've added has lead to the addition of the instrumented fields to logs. E.g. this state cache missed triggered by (presumably) blob verification, results in 3x block_root, 2x state_root, slot and index fields being logged:

Aug 27 03:12:14.471 WARN State cache missed state_root: 0xabbf84a7d9e8305916ddd9558f27241aa7a4bc22d5f4455d5ce4b6aea42a50b7, block_root: 0xc6dfece48906334a091f99cd5f07826ff00816b5765fd0caa34771efcafadafe, state_root: 0xabbf84a7d9e8305916ddd9558f27241aa7a4bc22d5f4455d5ce4b6aea42a50b7, block_root: 0xc6dfece48906334a091f99cd5f07826ff00816b5765fd0caa34771efcafadafe, index: 1, block_root: 0x6ddc3ab728146617dc9626938c53c285d8703b0aa234c0e32ec5f9d59fa967d3, slot: Slot(12453293)

This is despite the event in the code only logging the state_root and block_root:

warn!(?state_root, ?block_root, "State cache missed");

I think to fix this we probably want to remove redundant fields from each log event? Or maybe we should somehow exclude the fields from logs and just keep them in traces.

Additional Info

In our example the duplication is especially confusing because the block_roots are different. One is the block_root of the blob itself, and the other two (lower-level) fields are the parent block being loaded from the DB.

Instrumentation added in:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions