Autodiscover not working on docker swarm

If I config directly in metricbeat.yml:

  - module: traefik
    metricsets:
      - health
    hosts: ["http://traefik:8080"]
    period: 10s
    enabled: true

It will work.
But If I use autodiscover, by configuring matricbeat.yml as:

metricbeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true
      host: tcp://docker-engine-api:2375

And in my docker-compose.yml:

services:
  traefik:
    ...
    deploy:
      labels:
        - co.elastic.metrics/module=traefik
        - co.elastic.metrics/metricsets=health
        - co.elastic.metrics/hosts=traefik:8080
        - co.elastic.metrics/period=10s

It won't work.
From the logs, I can see that, traefik is discovered, but I don't know why, it doesn't send any data to Elasticsearch:

{"log.level":"debug","@timestamp":"2022-04-24T06:50:11.004Z","log.logger":"autodiscover.bus-metricbeat","log.origin":{"file.name":"bus/bus.go","file.line":88},"message":"map[config:[] container:{\"id\":\"c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2\",\"image\":{\"name\":\"traefik:v2.3@sha256:0181e35c5af98f7f30fb391f91a6dbd281a90d7cf971e9909e26afd4ea923251\"},\"labels\":{\"com\":{\"docker\":{\"stack\":{\"namespace\":\"makabaka_traefik\"},\"swarm\":{\"node\":{\"id\":\"4npup4z1xmibx4o63jzh3gb74\"},\"service\":{\"id\":\"zqor3dyi8xhbtrup0velofc8v\",\"name\":\"makabaka_traefik_traefik\"},\"task\":{\"id\":\"fgxctab9m6qe5u66hbg04mwy9\",\"name\":\"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9\",\"value\":\"\"}}}},\"org\":{\"opencontainers\":{\"image\":{\"description\":\"A modern reverse-proxy\",\"documentation\":\"https://docs.traefik.io\",\"title\":\"Traefik\",\"url\":\"https://traefik.io\",\"vendor\":\"Traefik Labs\",\"version\":\"v2.3.7\"}}}},\"name\":\"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9\"} docker:{\"container\":{\"id\":\"c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2\",\"image\":\"traefik:v2.3@sha256:0181e35c5af98f7f30fb391f91a6dbd281a90d7cf971e9909e26afd4ea923251\",\"labels\":{\"com\":{\"docker\":{\"stack\":{\"namespace\":\"makabaka_traefik\"},\"swarm\":{\"node\":{\"id\":\"4npup4z1xmibx4o63jzh3gb74\"},\"service\":{\"id\":\"zqor3dyi8xhbtrup0velofc8v\",\"name\":\"makabaka_traefik_traefik\"},\"task\":{\"id\":\"fgxctab9m6qe5u66hbg04mwy9\",\"name\":\"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9\",\"value\":\"\"}}}},\"org\":{\"opencontainers\":{\"image\":{\"description\":\"A modern reverse-proxy\",\"documentation\":\"https://docs.traefik.io\",\"title\":\"Traefik\",\"url\":\"https://traefik.io\",\"vendor\":\"Traefik Labs\",\"version\":\"v2.3.7\"}}}},\"name\":\"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9\"}} host:10.0.0.13 id:c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2 meta:{\"container\":{\"id\":\"c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2\",\"image\":{\"name\":\"traefik:v2.3@sha256:0181e35c5af98f7f30fb391f91a6dbd281a90d7cf971e9909e26afd4ea923251\"},\"name\":\"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9\"},\"docker\":{\"container\":{\"labels\":{\"com_docker_stack_namespace\":\"makabaka_traefik\",\"com_docker_swarm_node_id\":\"4npup4z1xmibx4o63jzh3gb74\",\"com_docker_swarm_service_id\":\"zqor3dyi8xhbtrup0velofc8v\",\"com_docker_swarm_service_name\":\"makabaka_traefik_traefik\",\"com_docker_swarm_task\":\"\",\"com_docker_swarm_task_id\":\"fgxctab9m6qe5u66hbg04mwy9\",\"com_docker_swarm_task_name\":\"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9\",\"org_opencontainers_image_description\":\"A modern reverse-proxy\",\"org_opencontainers_image_documentation\":\"https://docs.traefik.io\",\"org_opencontainers_image_title\":\"Traefik\",\"org_opencontainers_image_url\":\"https://traefik.io\",\"org_opencontainers_image_vendor\":\"Traefik Labs\",\"org_opencontainers_image_version\":\"v2.3.7\"}}}} provider:62bad358-6f75-4779-ab56-536e6326724a start:true]","service.name":"metricbeat","libbeat.bus":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"debug","@timestamp":"2022-04-24T06:50:11.005Z","log.logger":"autodiscover","log.origin":{"file.name":"autodiscover/autodiscover.go","file.line":181},"message":"Got a start event.","service.name":"metricbeat","autodiscover.event":{"config":[],"container":{"id":"c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2","image":{"name":"traefik:v2.3@sha256:0181e35c5af98f7f30fb391f91a6dbd281a90d7cf971e9909e26afd4ea923251"},"labels":{"com":{"docker":{"stack":{"namespace":"makabaka_traefik"},"swarm":{"node":{"id":"4npup4z1xmibx4o63jzh3gb74"},"service":{"id":"zqor3dyi8xhbtrup0velofc8v","name":"makabaka_traefik_traefik"},"task":{"id":"fgxctab9m6qe5u66hbg04mwy9","name":"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9","value":""}}}},"org":{"opencontainers":{"image":{"description":"A modern reverse-proxy","documentation":"https://docs.traefik.io","title":"Traefik","url":"https://traefik.io","vendor":"Traefik Labs","version":"v2.3.7"}}}},"name":"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9"},"docker":{"container":{"id":"c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2","image":"traefik:v2.3@sha256:0181e35c5af98f7f30fb391f91a6dbd281a90d7cf971e9909e26afd4ea923251","labels":{"com":{"docker":{"stack":{"namespace":"makabaka_traefik"},"swarm":{"node":{"id":"4npup4z1xmibx4o63jzh3gb74"},"service":{"id":"zqor3dyi8xhbtrup0velofc8v","name":"makabaka_traefik_traefik"},"task":{"id":"fgxctab9m6qe5u66hbg04mwy9","name":"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9","value":""}}}},"org":{"opencontainers":{"image":{"description":"A modern reverse-proxy","documentation":"https://docs.traefik.io","title":"Traefik","url":"https://traefik.io","vendor":"Traefik Labs","version":"v2.3.7"}}}},"name":"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9"}},"host":"10.0.0.13","id":"c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2","meta":{"container":{"id":"c584fa16ecaac07bc991b84a97e6cb14cce02f9cf9460a68300f135b3f3e5ce2","image":{"name":"traefik:v2.3@sha256:0181e35c5af98f7f30fb391f91a6dbd281a90d7cf971e9909e26afd4ea923251"},"name":"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9"},"docker":{"container":{"labels":{"com_docker_stack_namespace":"makabaka_traefik","com_docker_swarm_node_id":"4npup4z1xmibx4o63jzh3gb74","com_docker_swarm_service_id":"zqor3dyi8xhbtrup0velofc8v","com_docker_swarm_service_name":"makabaka_traefik_traefik","com_docker_swarm_task":"","com_docker_swarm_task_id":"fgxctab9m6qe5u66hbg04mwy9","com_docker_swarm_task_name":"makabaka_traefik_traefik.4npup4z1xmibx4o63jzh3gb74.fgxctab9m6qe5u66hbg04mwy9","org_opencontainers_image_description":"A modern reverse-proxy","org_opencontainers_image_documentation":"https://docs.traefik.io","org_opencontainers_image_title":"Traefik","org_opencontainers_image_url":"https://traefik.io","org_opencontainers_image_vendor":"Traefik Labs","org_opencontainers_image_version":"v2.3.7"}}}},"provider":"62bad358-6f75-4779-ab56-536e6326724a","start":true},"ecs.version":"1.6.0"}

I have two traefik containers on the whole docker swarm.