Skip to content

X-Opaque-ID support and JSON logging improvement #41350

@pgomulka

Description

@pgomulka

JSON logging implementation used at the moment (v7) is pretty simplistic and there is almost no way to modify or extend the way the messages are logged.
The goal is to refactor the implementation to allow:

  • following more known log4j.JSONLayout style where additional fields can be added (serach for "To include any custom field")
  • adding X-Opaque-Id for Deprecated Logging Include origin information in deprecation logging #34127
  • move SlowLog fields from message field to independent JSON fields.
    doable - but won't be advertised
    - [ ] adding additional fields which could be hardcoded in a log4j configuration, looked up (as per previous log4j.JSONLayout) or calculated and populated from plugins. Not sure we need that - haven't noticed plugin authors asking for this.
    out of scope
    - [ ] possibility to override fields format (different log timestamp format, overriding class (component) formatting etc) Again, do we need this?
    - [ ] reconfigure Slow Logs to exclude fields from logs Add option to disable source logging for search slow log  #22683
    - [ ] move markers (from PrefixLogger) from message to its own field in a JSON log message

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions