feat: update log ingestion configuration for OpenTelemetry collector

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-04-16 06:58:07 +08:00
parent 97d906939e
commit d597e30b1b

View File

@ -21,9 +21,13 @@ spec:
filelog: filelog:
include: include:
- {{ .Values.logIngest.logPathPattern }} - {{ .Values.logIngest.logPathPattern }}
start_at: beginning start_at: end
include_file_path: true include_file_path: true
include_file_name: true include_file_name: true
operators:
- type: json_parser
parse_from: body
parse_to: attribute
processors: processors:
k8sattributes: k8sattributes:
auth_type: "serviceAccount" auth_type: "serviceAccount"
@ -57,6 +61,11 @@ spec:
- key: loki.format - key: loki.format
action: insert action: insert
value: json value: json
transform:
log_statements:
- context: log
statements:
- merge_maps(attributes, resource.attributes)
batch: batch:
send_batch_size: 1000 send_batch_size: 1000
timeout: 10s timeout: 10s
@ -74,6 +83,6 @@ spec:
pipelines: pipelines:
logs: logs:
receivers: [filelog] receivers: [filelog]
processors: [k8sattributes, resource, batch] processors: [k8sattributes, resource, transform, batch]
exporters: [debug, loki] exporters: [debug, loki]
{{- end }} {{- end }}