From 0c198ee471df7ebb5fdd9ccc367425e80ca95285 Mon Sep 17 00:00:00 2001 From: Daniel Jaglowski Date: Wed, 7 Apr 2021 09:32:31 -0400 Subject: [PATCH] Promote 'log' to top of record in k8s examples (#2873) Addresses #2851 --- examples/kubernetes/otel-collector-config.yml | 10 +++------- examples/kubernetes/otel-collector.yaml | 10 +++------- testbed/datasenders/k8s.go | 20 ++++++------------- 3 files changed, 12 insertions(+), 28 deletions(-) diff --git a/examples/kubernetes/otel-collector-config.yml b/examples/kubernetes/otel-collector-config.yml index e40b27ff973a..553f8e9a9c10 100644 --- a/examples/kubernetes/otel-collector-config.yml +++ b/examples/kubernetes/otel-collector-config.yml @@ -61,13 +61,9 @@ receivers: - type: restructure id: clean-up-log-record ops: - - remove: logtag - - remove: stream - - remove: container_name - - remove: namespace - - remove: pod_name - - remove: run_id - - remove: uid + - move: + from: log + to: $ exporters: logging: loglevel: debug diff --git a/examples/kubernetes/otel-collector.yaml b/examples/kubernetes/otel-collector.yaml index 696935832c54..7ba29d1385d6 100644 --- a/examples/kubernetes/otel-collector.yaml +++ b/examples/kubernetes/otel-collector.yaml @@ -68,13 +68,9 @@ data: - type: restructure id: clean-up-log-record ops: - - remove: logtag - - remove: stream - - remove: container_name - - remove: namespace - - remove: pod_name - - remove: run_id - - remove: uid + - move: + from: log + to: $ exporters: logging: loglevel: debug diff --git a/testbed/datasenders/k8s.go b/testbed/datasenders/k8s.go index aa6da69e5b8b..bc856d1b6ae8 100644 --- a/testbed/datasenders/k8s.go +++ b/testbed/datasenders/k8s.go @@ -215,13 +215,9 @@ func NewKubernetesContainerWriter() *FileLogK8sWriter { - type: restructure id: clean-up-log-record ops: - - remove: logtag - - remove: stream - - remove: container_name - - remove: namespace - - remove: pod_name - - remove: run_id - - remove: uid + - move: + from: log + to: $ `) } @@ -261,13 +257,9 @@ func NewKubernetesCRIContainerdWriter() *FileLogK8sWriter { - type: restructure id: clean-up-log-record ops: - - remove: logtag - - remove: stream - - remove: container_name - - remove: namespace - - remove: pod_name - - remove: run_id - - remove: uid + - move: + from: log + to: $ `) }