We're adopting Elastic stack to log our Kubernetes applications. We have installed ElasticAgent into our cluster via the Fleet managed manifest:
We are using the default Kubernetes Elastic Agent integration / policy to grab the container logs. We're outputting structured JSON logs using golang / zap + the ecszap package. Kibana is correctly pulling these in.
The JSON logs are not being parsed, the JSON object is just being added as a string. I understand from reading that the ElasticAgent integration will pull the logs in as "Container Logs" and not JSON.
I cannot figure out how to have ElasticAgent pull the ecszap logs in as structured logs. The ElasticAgent / Kubernetes integration gives no information, and I can't find any tutorials. I am meant to use the hints on the pod annonations to get this to work?