extensions:
  file_storage:
    directory: /var/lib/otelcol/storage
    create_directory: true

receivers:
  filelog:
    include: [/var/log/myapp/*.log]
    start_at: end
    storage: file_storage
    operators:
      # "22.10.2026 10:15:02 INFO message": the time has no zone, so the
      # location says which one it was written in.
      - type: regex_parser
        regex: '^(?P<ts>\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}:\d{2}) (?P<level>[A-Z]+) (?P<msg>.*)$'
        timestamp:
          parse_from: attributes.ts
          layout_type: strptime
          layout: '%d.%m.%Y %H:%M:%S'
          location: Europe/Zurich
        on_error: send

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 25
  batch:
    timeout: 5s

exporters:
  otlphttp:
    endpoint: https://your-backend:4318

service:
  extensions: [file_storage]
  pipelines:
    logs:
      receivers: [filelog]
      processors: [memory_limiter, batch]
      exporters: [otlphttp]
