Bound Tempo compaction memory and recover OTLP HTTP delivery after outages

This commit is contained in:
2026-11-16 03:12:05 +03:00
parent 548855e2c1
commit a531af3bdb
3 changed files with 10 additions and 8 deletions
+3 -1
View File
@@ -353,6 +353,8 @@ services:
mem_limit: 384m mem_limit: 384m
tempo: tempo:
image: grafana/tempo:2.7.2 image: grafana/tempo:2.7.2
environment:
GOMEMLIMIT: 512MiB
command: command:
- -config.file=/etc/tempo/config.yaml - -config.file=/etc/tempo/config.yaml
volumes: volumes:
@@ -361,7 +363,7 @@ services:
ports: ports:
- 127.0.0.1:13206:3200 - 127.0.0.1:13206:3200
cpus: 0.5 cpus: 0.5
mem_limit: 384m mem_limit: 768m
grafana: grafana:
image: grafana/grafana:11.6.0 image: grafana/grafana:11.6.0
environment: environment:
+3 -5
View File
@@ -23,10 +23,8 @@ exporters:
metric_expiration: 15m metric_expiration: 15m
resource_to_telemetry_conversion: resource_to_telemetry_conversion:
enabled: true enabled: true
otlp/tempo: otlphttp/tempo:
endpoint: tempo:4317 endpoint: http://tempo:4318
tls:
insecure: true
timeout: 2s timeout: 2s
sending_queue: sending_queue:
queue_size: 128 queue_size: 128
@@ -65,7 +63,7 @@ service:
- memory_limiter - memory_limiter
- batch - batch
exporters: exporters:
- otlp/tempo - otlphttp/tempo
metrics: metrics:
receivers: receivers:
- otlp - otlp
+4 -2
View File
@@ -44,6 +44,8 @@ def telemetry_snapshot(instance_ids):
accepted = [float(line.rsplit(' ', 1)[1]) for line in text.splitlines() accepted = [float(line.rsplit(' ', 1)[1]) for line in text.splitlines()
if line.startswith('otelcol_receiver_accepted_spans') and not line.startswith('#')] if line.startswith('otelcol_receiver_accepted_spans') and not line.startswith('#')]
counts['collector_accepted_spans'] = sum(accepted) counts['collector_accepted_spans'] = sum(accepted)
counts['collector_refused_spans'] = sum(float(line.rsplit(' ', 1)[1]) for line in text.splitlines()
if line.startswith('otelcol_receiver_refused_spans') and not line.startswith('#'))
return counts return counts
@@ -95,7 +97,7 @@ def run_profile(client, profile, repeat):
assert len(instance_ids) == 2 assert len(instance_ids) == 2
time.sleep(10) time.sleep(10)
before = telemetry_snapshot(instance_ids) before = telemetry_snapshot(instance_ids)
memory_before = cgroups(['api','worker','collector']) memory_before = cgroups(['api','worker','collector','tempo'])
compose('exec','-T','postgres','psql','-U','messenger','-d','messenger','-c', compose('exec','-T','postgres','psql','-U','messenger','-d','messenger','-c',
"INSERT INTO test_faults(point,action) VALUES ('after_upload_commit','error'),('after_upload_commit','error')") "INSERT INTO test_faults(point,action) VALUES ('after_upload_commit','error'),('after_upload_commit','error')")
calls = [] calls = []
@@ -143,7 +145,7 @@ def run_profile(client, profile, repeat):
assert all(x['status'] in (200,500) for x in calls), 'Unexpected business failure' assert all(x['status'] in (200,500) for x in calls), 'Unexpected business failure'
time.sleep(10) time.sleep(10)
after = telemetry_snapshot(instance_ids) after = telemetry_snapshot(instance_ids)
memory_after = cgroups(['api','worker','collector']) memory_after = cgroups(['api','worker','collector','tempo'])
rare = [row for row in calls if row['status']==500 or (row['kind']=='read' and row['duration_s']>=.15)] rare = [row for row in calls if row['status']==500 or (row['kind']=='read' and row['duration_s']>=.15)]
for row in rare: for row in rare:
row['found_in_tempo'] = exists(row['trace_id']) row['found_in_tempo'] = exists(row['trace_id'])