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
tempo:
image: grafana/tempo:2.7.2
environment:
GOMEMLIMIT: 512MiB
command:
- -config.file=/etc/tempo/config.yaml
volumes:
@@ -361,7 +363,7 @@ services:
ports:
- 127.0.0.1:13206:3200
cpus: 0.5
mem_limit: 384m
mem_limit: 768m
grafana:
image: grafana/grafana:11.6.0
environment:
+3 -5
View File
@@ -23,10 +23,8 @@ exporters:
metric_expiration: 15m
resource_to_telemetry_conversion:
enabled: true
otlp/tempo:
endpoint: tempo:4317
tls:
insecure: true
otlphttp/tempo:
endpoint: http://tempo:4318
timeout: 2s
sending_queue:
queue_size: 128
@@ -65,7 +63,7 @@ service:
- memory_limiter
- batch
exporters:
- otlp/tempo
- otlphttp/tempo
metrics:
receivers:
- 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()
if line.startswith('otelcol_receiver_accepted_spans') and not line.startswith('#')]
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
@@ -95,7 +97,7 @@ def run_profile(client, profile, repeat):
assert len(instance_ids) == 2
time.sleep(10)
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',
"INSERT INTO test_faults(point,action) VALUES ('after_upload_commit','error'),('after_upload_commit','error')")
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'
time.sleep(10)
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)]
for row in rare:
row['found_in_tempo'] = exists(row['trace_id'])