fix(opentelemetry): enhance log transformation by adding log statements and updating exporters
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
4d591a03c0
commit
8dda0bada9
@ -66,12 +66,19 @@ spec:
|
|||||||
- action: insert
|
- action: insert
|
||||||
key: kubernetes.node_name
|
key: kubernetes.node_name
|
||||||
from_attribute: k8s.node.name
|
from_attribute: k8s.node.name
|
||||||
|
transform:
|
||||||
|
log_statements:
|
||||||
|
- context: log
|
||||||
|
statements:
|
||||||
|
- merge_maps(log.cache, ParseJSON(log.body), "upsert")
|
||||||
|
- set(log.cache["kubernetes"], resource.attributes["kubernetes"])
|
||||||
|
- set(log.body, log.cache)
|
||||||
batch:
|
batch:
|
||||||
send_batch_size: 5
|
send_batch_size: 5
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
exporters:
|
exporters:
|
||||||
loki:
|
otlphttp:
|
||||||
endpoint: {{ .Values.logIngest.lokiEndpoint }}
|
endpoint: {{ .Values.logIngest.lokiEndpoint }}/otlp
|
||||||
tls:
|
tls:
|
||||||
insecure: true
|
insecure: true
|
||||||
debug:
|
debug:
|
||||||
@ -80,6 +87,6 @@ spec:
|
|||||||
pipelines:
|
pipelines:
|
||||||
logs:
|
logs:
|
||||||
receivers: [filelog]
|
receivers: [filelog]
|
||||||
processors: [k8sattributes, attributes/k8s, batch]
|
processors: [k8sattributes, attributes/k8s, transform, batch]
|
||||||
exporters: [loki, debug]
|
exporters: [otlphttp, debug]
|
||||||
{{- end }}
|
{{- end }}
|
||||||
Loading…
Reference in New Issue
Block a user