# Профиль «tail sampling» (трек 1, lab6): SDK отправляет 100 % спанов, Collector оставляет # - все трассы с ошибками, - все медленные (> 500 мс), - 10 % остальных. # Метрики и логи без изменений. Подключается через COLLECTOR_CONFIG=/etc/otelcol/collector-tail.yaml. receivers: otlp: protocols: grpc: {endpoint: 0.0.0.0:4317} http: {endpoint: 0.0.0.0:4318} processors: memory_limiter: {check_interval: 1s, limit_mib: 280, spike_limit_mib: 60} batch: {send_batch_size: 1024, send_batch_max_size: 2048, timeout: 2s} attributes/scrub: actions: - {key: http.request.header.authorization, action: delete} - {key: http.request.header.cookie, action: delete} - {key: db.statement, action: delete} - {key: url.query, action: delete} tail_sampling: decision_wait: 5s num_traces: 20000 expected_new_traces_per_sec: 500 policies: - {name: errors, type: status_code, status_code: {status_codes: [ERROR]}} - {name: slow, type: latency, latency: {threshold_ms: 500}} - {name: baseline, type: probabilistic, probabilistic: {sampling_percentage: 10}} exporters: otlp_grpc/tempo: endpoint: tempo:4317 tls: {insecure: true} sending_queue: {enabled: true, num_consumers: 2, queue_size: 500} retry_on_failure: {enabled: true, initial_interval: 1s, max_interval: 10s, max_elapsed_time: 30s} otlp_http/loki: endpoint: http://loki:3100/otlp sending_queue: {enabled: true, num_consumers: 2, queue_size: 500} retry_on_failure: {enabled: true, initial_interval: 1s, max_interval: 10s, max_elapsed_time: 30s} prometheus: endpoint: 0.0.0.0:8889 resource_to_telemetry_conversion: {enabled: true} metric_expiration: 20s service: telemetry: metrics: level: normal readers: - pull: exporter: prometheus: {host: 0.0.0.0, port: 8888} logs: {level: warn} pipelines: traces: receivers: [otlp] processors: [memory_limiter, attributes/scrub, tail_sampling, batch] exporters: [otlp_grpc/tempo] metrics: receivers: [otlp] processors: [memory_limiter, batch] exporters: [prometheus] logs: receivers: [otlp] processors: [memory_limiter, attributes/scrub, batch] exporters: [otlp_http/loki]