membphis commented on PR #13568:
URL: https://github.com/apache/apisix/pull/13568#issuecomment-4727791811
[P2] `log_format_extra` is silently dropped by Google Cloud Logging and
Splunk HEC in the default-format path.
This PR adds `log_format_extra` to every logger schema and documents it as
an additive field set, but not every logger sends the enriched entry directly.
In particular, `google-cloud-logging` and `splunk-hec-logging` call
`log_util.get_log_entry(...)` and then rebuild the provider-specific default
payload from a fixed list of fields.
Because `log_format_extra` does not set `customized = true`, these plugins
still take their default mapping path:
- `google-cloud-logging` only writes fixed fields such as `route_id` and
`service_id` into `jsonPayload` for the default entry.
- `splunk-hec-logging` rebuilds `event` from fixed request/response fields.
So a user can configure, for example, `log_format_extra = { upstream_host =
"$upstream_unresolved_host" }`, pass schema validation, and still never see
`upstream_host` in Google Cloud Logging or Splunk HEC output.
Please either merge extra fields into the final provider-specific payload
for these plugins, or do not advertise/support `log_format_extra` for plugins
where the default output path drops it. It would also be good to add coverage
for at least one provider-specific remapping logger so this does not regress.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]