LinkMesh

Search docs, blog and changelog

ENDE

memory_limiter and batch, in the right order

A collector that runs out of memory under a traffic spike, and one that floods its backend with tiny requests. memory_limiter and batch fix one each.

Signals
Logs
Category
Reliability
Source
OTLP
Components
otlpbatchmemory_limiterotlphttp
Destination
OTLP/HTTP endpoint

OpenTelemetry Collector

OpenTelemetry Collector YAML
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 25
  batch:
    timeout: 5s
    send_batch_size: 8192
    send_batch_max_size: 10000

exporters:
  otlphttp:
    endpoint: https://your-backend:4318

service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [memory_limiter, batch]
      exporters: [otlphttp]

LinkMesh

Library › Processors › Rate Limiting

check_interval
1s
limit_mib
512
spike_limit_mib
128

What LinkMesh then pushes to the collector, under processors:

Pushed to the collector
memory_limiter/route_00000506_pipe_proc_1:
  check_interval: 1s
  limit_mib: 512
  spike_limit_mib: 128

The same, as an API call (see automation recipes):

API call
curl -X POST "$LINKMESH/pipelines" \
  -H "Authorization: Bearer $LMSAT" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Rate Limiting",
  "processors": [
    {
      "config": {},
      "enabled": true,
      "order": 1,
      "templateSlug": "rate-limiting"
    }
  ]
}'

The rest of the collector config above (otlp, batch, otlphttp) is not part of this template: in LinkMesh those are separate sources, processors and destinations on the route.

Generated from LinkMesh's template catalogue by linkmesh-server snippet-render 1.470.5, not written by hand.

Download config.yamlValidated with otelcol-contrib v0.165.0 on 2026-11-30

Complete config files, each checked with the collector's own validate command (otelcol-contrib v0.165.0). Replace https://your-backend:4318 with your own OTLP endpoint before you run it.

Before and after

Example telemetry in, and what this exact config sent out when we ran it in otelcol-contrib v0.165.0. CI re-runs it on every change and fails if the output differs. Changed values are highlighted.

3 log records in, 3 log records out

  1. Before

    body
    order 1001 accepted
    timestamp
    2025-10-09T08:53:20.000Z
    severity
    INFO
    severity_number
    9
    resource.service.name
    checkout

    After

    body
    order 1001 accepted
    timestamp
    2025-10-09T08:53:20.000Z
    severity
    INFO
    severity_number
    9
    resource.service.name
    checkout
  2. Before

    body
    order 1002 accepted
    timestamp
    2025-10-09T08:53:21.000Z
    severity
    INFO
    severity_number
    9
    resource.service.name
    checkout

    After

    body
    order 1002 accepted
    timestamp
    2025-10-09T08:53:21.000Z
    severity
    INFO
    severity_number
    9
    resource.service.name
    checkout
  3. Before

    body
    payment provider timeout
    timestamp
    2025-10-09T08:53:22.000Z
    severity
    ERROR
    severity_number
    17
    resource.service.name
    checkout

    After

    body
    payment provider timeout
    timestamp
    2025-10-09T08:53:22.000Z
    severity
    ERROR
    severity_number
    17
    resource.service.name
    checkout

Manage this across a fleet

LinkMesh manages collector configuration across a fleet from one self-hosted control plane, so a change like this is made once rather than host by host. The first 25 Collectors are free after a no-card registration in the OpenSight Customer Portal (5 without one).