feat: telemetry cost profile with head sampling, coarse buckets and balanced tail sampling
- [telemetry] trace_sample_ratio (ParentBased(TraceIdRatioBased), 1 keeps ParentBased(ALWAYS_ON)) and metric_buckets (default|coarse with SLO bounds), export interval <= 30 s; otel.sdk.span.started, span.live dropped; startup records name ratio, buckets and interval - bench: telemetry services on mtusi-bench, TELEMETRY=on switch for uploads and queue, make bench_telemetry[_quick] with off/full/full-aa/head/tail/ metrics/balanced, rare events, lookup from Tempo/Loki/Prometheus, cost sampler, verdicts H1-H8 and B1-B5; collector layers and lean Prometheus in bench/otel with preflight checks - REPORT: telemetry cost hypotheses and criteria before the label Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ from fakes import (
|
||||
FakeUnitOfWork,
|
||||
)
|
||||
from src.config import settings
|
||||
from src.schemas.enums import MetricBucketsEnum
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -44,6 +45,14 @@ def fixed_settings(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
{"body_timeout_seconds": 1, "max_unfinished_jobs": 0},
|
||||
),
|
||||
(settings.app, {"instance_id": "test-instance"}),
|
||||
(
|
||||
settings.telemetry,
|
||||
{
|
||||
"trace_sample_ratio": 1.0,
|
||||
"metric_buckets": MetricBucketsEnum.DEFAULT,
|
||||
"metric_export_interval_seconds": 15,
|
||||
},
|
||||
),
|
||||
)
|
||||
for section, fields in fixed:
|
||||
for name, value in fields.items():
|
||||
|
||||
Reference in New Issue
Block a user