From 22d48c8ed4121578b0709980cc1c801987bc6a2e Mon Sep 17 00:00:00 2001 From: Shashankft9 Date: Thu, 17 Aug 2023 19:40:04 +0530 Subject: [PATCH] adding filter processor in receiver and collector --- example/collector-builder.yml | 1 + example/collector-k8-manifest.yml | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/example/collector-builder.yml b/example/collector-builder.yml index 96b236d..3d9dd00 100644 --- a/example/collector-builder.yml +++ b/example/collector-builder.yml @@ -20,6 +20,7 @@ processors: - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.81.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.81.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.81.0 +- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.81.0 replaces: - github.com/kubearmor/OTel-receiver/kubearmor_receiver => ../kubearmor_receiver diff --git a/example/collector-k8-manifest.yml b/example/collector-k8-manifest.yml index bb402dc..e11986f 100644 --- a/example/collector-k8-manifest.yml +++ b/example/collector-k8-manifest.yml @@ -19,13 +19,19 @@ spec: verbosity: detailed loki: endpoint: "http://loki.default.svc:3100/loki/api/v1/push" - + processors: + filter/ottl: + error_mode: ignore + logs: + log_record: + - 'not (IsMatch(body, ".*Permission denied.*"))' service: pipelines: logs: receivers: - kubearmor_receiver - processors: [] + processors: + - filter/ottl exporters: - loki - logging