Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions collector/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,27 @@ receivers:

processors:
batch:
# batch metrics before sending to reduce API usage
# Traces pipeline: cap request size. Metrics use batch/metrics below.
send_batch_max_size: 200
send_batch_size: 200
timeout: 5s

# Metrics pipeline: batch WITHOUT send_batch_max_size (0 = no upper limit).
#
# The googlemanagedprometheus exporter already chunks CreateTimeSeries into
# GCM's hard limit of 200 timeseries/request internally, and it emits the
# target_info / otel_scope_info series once per PushMetrics call. If the
# batch processor splits a single ~60s export into multiple batches (as
# send_batch_max_size: 200 does once total series > 200), the exporter runs
# once per batch and re-emits those info series with near-identical
# timestamps, which GMP rejects with "One or more points were written more
# frequently than the maximum sampling period configured for the metric".
# Leaving send_batch_max_size unset keeps each export in a single PushMetrics
# call, so the info series are written exactly once regardless of cardinality.
batch/metrics:
send_batch_size: 200
timeout: 5s

memory_limiter:
# drop metrics if memory usage gets too high
check_interval: 1s
Expand Down Expand Up @@ -53,5 +69,5 @@ service:
exporters: [googlecloud]
metrics:
receivers: [otlp]
processors: [batch, memory_limiter, resource_detection, resource]
processors: [batch/metrics, memory_limiter, resource_detection, resource]
exporters: [googlemanagedprometheus]