# The template for otel-collector to create the log pipeline for a mule app.
receivers:
  filelog/${app.id}:
    include:
      - "${log.file}"
    multiline:
      line_start_pattern: ^(?:INFO|WARN|DEBUG|ERROR|TRACE|FATAL)\s
    include_file_name: false
    max_log_size: 8KiB
    poll_interval: 10s
    fingerprint_size: 1kb
    max_concurrent_files: 2
    max_batches: 2
    storage: file_storage
    start_at: beginning
    resource:
      app_id: "${app.id}"
      env_id: "${environment.id}"
      log_type: log
      mulesoft.ingest.namespace: runtime
      mulesoft.env.id: "${environment.id}"
      mulesoft.root_org.id: "${master.organization.id}"
      mulesoft.sub_org.id: "${organization.id}"
      org_id: "${organization.id}"
      root_org_id: "${master.organization.id}"
      runtime: hybrid
      tz: "${time.zone}"
      worker_id: "${cluster.id}"
    retry_on_failure:
      enabled: true
      initial_interval: 1s
      max_interval: 10s
      max_elapsed_time: 0

service:
    pipelines:
      logs/${app.id}:
        receivers: [filelog/${app.id}]
        processors: [memory_limiter, batch/log]
        exporters: [otlphttp/log]
