-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Proposal: Support nested structures JSON formatted in access_log #12582
Comments
I agree, nested objects are totally reasonable, and if you need that support, we should add it natively. Imo we should definitely avoid any kind of "flatten when emitted, but re-nest upon ingestion type of solution". I'd be curious of what your specific use case is - what nesting would you like to introduce? |
+1 this sounds like a good thing to add. |
Add support for nested JSON format in JSON logging mode. Risk Level: low, feature only used if nested objects are configured, thus opt-in. Testing: unit tests Docs Changes: yes Release Notes: added Fixes: #12582 Signed-off-by: Petr Pchelko <ppchelko@wikimedia.org>
@Pchelolo Hi! I'm a product designer working at HashiCorp, and I'm researching how we can best show envoy access logs in Consul's UI. I saw your comment above and thought you might be a good person to reach out to. If you aren't interested in them being shown in the UI, though, please feel free to ignore this! If you are, can you tell me what information from the logs would be most important for you to see in the UI? Also, are these logs something you'd like to see on a per-service basis, or for a whole namespace? Or both? |
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
The text was updated successfully, but these errors were encountered: