diff --git a/collector/config.yaml b/collector/config.yaml index 893fa8c5..5703e797 100644 --- a/collector/config.yaml +++ b/collector/config.yaml @@ -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 @@ -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]