Promtail --dry-run not working as expected

I’m trying to test my promtail config by using the --dry-run option but it seems to be giving output that I wouldn’t expect.

Here’s my example. Using the config below, I was trying to invoke promtail on the example logs in order to test out my scrape pipeline which attempts to parse the json and extract the timestamp from “mulog/timestamp”, using the following command to test but it produced only diagnostic output about the clients and nothing about parsing the input log.

cat arqam-logs.log| docker run --rm -v ${PWD}/config/promtail.yml:/etc/promtail/config.yml grafana/promtail:3.1.0 -config.file /etc/promtail/config.yml --stdin --dry-run --client.url http://loki:3100/loki/api/v1/push
Clients configured:
----------------------
url: http://loki:3100/loki/api/v1/push
batchwait: 1s
batchsize: 1048576
follow_redirects: true
enable_http2: true
backoff_config:
  min_period: 500ms
  max_period: 5m0s
  max_retries: 10
timeout: 10s
tenant_id: ""
drop_rate_limited_batches: false

----------------------
url: http://loki:3100/loki/api/v1/push
batchwait: 1s
batchsize: 1048576
follow_redirects: false
enable_http2: false
backoff_config:
  min_period: 500ms
  max_period: 5m0s
  max_retries: 10
timeout: 10s
tenant_id: ""
drop_rate_limited_batches: false

docker-compose fragment

  loki:
    image: grafana/loki:2.9.2
    volumes:
      - ./config/loki.yaml:/etc/loki/local-config.yaml
    ports:
      - "3100:3100"
    command: -config.file=/etc/loki/local-config.yaml
    networks:
      - loki

promtail config

~/code/statsbomb/andy-loki-demo cat config/promtail.yml
server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

clients:
  - url: http://loki:3100/loki/api/v1/push

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: varlogs
      __path__: /var/log/arqam-syncer.log
  pipeline_stages:
  - json:
      expressions:
        app: app
        timestamp: mulog_timestamp
  - labels:
      app:
  - timestamp:
      format: UnixMs
      source: timestamp%

example log line (arqam-syncer.log)

{"app":"cdc-sink","profile":"staging","version":"f81e009","mulog/trace-id":"4xx2sv02Xb_t20Gv4BpDV7L3LMGkOtpn","mulog/timestamp":1720168227872,"mulog/event-name":"arqam-syncer.logging/started","mulog/namespace":"arqam-syncer.logging"}

Make sure you clear/delete the promtail positions file first.