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
+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'])