-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Background
The format_json support was implemented in #2692 but it only allows flat single-level objects as JSON output. As I understand from the discussion on the issue, nesting was left out because there was no clear need for it at the time, but the API was designed to be future proof to support it.
Rational
At Wikimedia, we ingest all the access logs into Kafka, funneling them into Hadoop for analytics purposes. All of our logs have a schema, and unluckily, our schema has nested objects. We would like to have envoy access logs conform to the common schema patterns we have.
There are endless possibilities on how to convert flat JSON structure into a nested one when upon ingestion, but by far the cleanest option is to support nested structures in envoy natively to emit the logs in a correct format right away. In the end, I do not see any downsides in supporting nested objects, so the rational could be best described as "why not?".
Proposal
Support nested JSON in format_json access log.
If we provide the implementation/testing/documentation, would this feature be accepted?
cc @aa-stripe as an author of the original patch