Skip to content

Commit

Permalink
fix: use batch processor and memory limiter on otel-collector
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-micah committed Feb 29, 2024
1 parent b8b9cd1 commit 865c1bd
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions otel-collector/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +19,12 @@ processors:
timeout: 2s
override: false

resource:
attributes:
- key: service.instance.id
from_attribute: faas.id
action: upsert

exporters:
googlecloud:
log:
Expand All @@ -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]
processors: [batch, memory_limiter, resourcedetection, resource]
exporters: [googlemanagedprometheus]

0 comments on commit 865c1bd

Please sign in to comment.