From 865c1bd0e3b51a1db9eba41874d724c3bd28c7ca Mon Sep 17 00:00:00 2001 From: Micah Thomas Date: Thu, 29 Feb 2024 14:07:32 -0700 Subject: [PATCH] fix: use batch processor and memory limiter on otel-collector --- otel-collector/config.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/otel-collector/config.yaml b/otel-collector/config.yaml index accddea..a99a411 100644 --- a/otel-collector/config.yaml +++ b/otel-collector/config.yaml @@ -5,13 +5,11 @@ receivers: processors: batch: - # batch metrics before sending to reduce API usage send_batch_max_size: 200 send_batch_size: 200 timeout: 5s memory_limiter: - # drop metrics if memory usage gets too high check_interval: 1s limit_percentage: 65 spike_limit_percentage: 20 @@ -21,6 +19,12 @@ processors: timeout: 2s override: false + resource: + attributes: + - key: service.instance.id + from_attribute: faas.id + action: upsert + exporters: googlecloud: log: @@ -35,13 +39,13 @@ service: pipelines: traces: receivers: [otlp] - processors: [resourcedetection] + processors: [batch, memory_limiter, resourcedetection, resource] exporters: [googlecloud] logs: receivers: [otlp] - processors: [resourcedetection] + processors: [batch, memory_limiter, resourcedetection, resource] exporters: [googlecloud] metrics: receivers: [otlp] - processors: [resourcedetection] - exporters: [googlemanagedprometheus] \ No newline at end of file + processors: [batch, memory_limiter, resourcedetection, resource] + exporters: [googlemanagedprometheus]