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