Open carsonip opened 6 days ago
I haven't had the time to confirm the actual code path because one cannot simply run debugger on EA managed apm-server, but I suspect that the culprit is that the config parsing error is ignored by libbeat if it isn't a multierror.MultiError in https://github.com/elastic/beats/blob/38dfc52434ed2478b643d9b30f1a21c0e4c39603/x-pack/libbeat/management/managerV2.go#L836
When running in managed mode there's an elastic-agent-lib
component that validates config for us, by parsing the YAML into a config.C
struct.
AFAIR a C.Validate()
method can be implemented in our own types to specify rules applied when parsing the config.
I am not 100% sure but there may be validate
struct tags that can be added where the config type is defined
to include/exclude certain values.
@carsonip assigned you to this task as you already opened a draft PR. IMO this doesn't have highest urgency or impact, so leaving the timing for the fix up to you.
APM Server version (
apm-server version
): Confirmed on mainDescription of the problem including expected versus actual behavior:
When a config with a wrong schema is passed to apm-server,