Below is my otel-collector "config.yaml" file
receivers:
filelog:
include: [ "/var/log/api/log-*.log" ]
start_at: end
include_file_path: true
include_file_name: false
poll_interval: 200ms
operators:
- type: regex_parser
regex: '^.?(?P<body>{.})'
output: parsedata
- type: json_parser
id: parsedata
parse_from: attributes.body
- type: time_parser
parse_from: attributes.time
layout: '2006-01-02T150405Z07:00'
layout_type: gotime
processors:
batch:
send_batch_size: 10000
send_batch_max_size: 11000
timeout: 10s
exporters:
otlp/log:
endpoint: <http//n4317|http//<endpoint>4317>
tls:
insecure: true
service:
pipelines:
logs:
receivers: [filelog]
processors: [batch]
exporters: [otlp/log]