diff --git a/compose.yaml b/compose.yaml index d41a4f8a..82169391 100644 --- a/compose.yaml +++ b/compose.yaml @@ -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: diff --git a/infra/observability/collector.yaml b/infra/observability/collector.yaml index 5307f687..a9846edb 100644 --- a/infra/observability/collector.yaml +++ b/infra/observability/collector.yaml @@ -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 diff --git a/research/observability_cost.py b/research/observability_cost.py index 12836267..757f1754 100644 --- a/research/observability_cost.py +++ b/research/observability_cost.py @@ -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'])