LogDriver.StartLogging: error creating client config: A hosts flag is required

I'm receiving the following error when I try to start a docker-compose service with elastic-apm.jar configured.

LogDriver.StartLogging: error creating client config: A hosts flag is required

I've looked at this answer, but how can I fix this using docker-compose?

Why this error happens without any jar update?

elastic apm agent version: tested with 1.35.0 and 1.36.0

docker-compose version 1.24.1, build 4667896b, also tested in 1.25.0
Client: Docker Engine - Community
Version: 20.10.22

I've done this with success:

version: "3.4"

services:
  nginx:
    image: nginx:latest
    ports:
      - "8080:80"
    logging:
      driver: "elastic/elastic-logging-plugin:8.6.1"
      options:
        api_key: "${ELASTIC_API_KEY}"
        cloud_id: "${ELASTIC_CLOUD_ID}"
        hosts: ""
        max-size: "8M"
        max-file: "12"

Remember to install the plugin on the host first.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.