Добавлен сбор телеметрии на ВМ2

This commit is contained in:
mi
2026-08-26 15:12:51 +03:00
parent 728b9826a3
commit f989097484
32 changed files with 2029 additions and 134 deletions
@@ -11,6 +11,43 @@ receivers:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
prometheus:
config:
scrape_configs:
- job_name: otel-collector
scrape_interval: 30s
static_configs:
- targets: ["127.0.0.1:8888"]
labels:
service_name: otel-collector
- job_name: redis-safety
scrape_interval: 30s
static_configs:
- targets: ["redis-exporter:9121"]
labels:
service_name: redis
- job_name: nginx
scrape_interval: 30s
static_configs:
- targets: ["nginx-exporter:9113"]
labels:
service_name: nginx
hostmetrics:
root_path: /hostfs
collection_interval: 30s
scrapers:
cpu:
disk:
filesystem:
exclude_mount_points:
mount_points:
- /hostfs/(dev|proc|sys|run)($|/)
match_type: regexp
load:
memory:
network:
paging:
processes:
processors:
memory_limiter:
@@ -19,7 +56,7 @@ processors:
spike_limit_mib: 96
resource/vm2:
attributes:
- {key: service.namespace, value: han-processing, action: upsert}
- {key: service.namespace, value: han-chat, action: upsert}
- {key: deployment.environment, value: "${env:APP_ENV}", action: upsert}
- {key: service.version, value: "${env:RELEASE_VERSION}", action: upsert}
attributes/redact:
@@ -39,6 +76,32 @@ processors:
- {key: messaging.message.body, action: delete}
- {key: aws.s3.key, action: delete}
- {key: s3.object.key, action: delete}
filter/noise:
error_mode: ignore
traces:
span:
- 'attributes["http.route"] == "/health/live"'
- 'attributes["http.route"] == "/nginx-health/live"'
logs:
log_record:
- 'severity_number < SEVERITY_NUMBER_INFO'
tail_sampling:
decision_wait: 10s
num_traces: 10000
expected_new_traces_per_sec: 50
policies:
- name: errors
type: status_code
status_code:
status_codes: [ERROR]
- name: slow
type: latency
latency:
threshold_ms: 1000
- name: baseline
type: probabilistic
probabilistic:
sampling_percentage: 10
batch:
timeout: 5s
send_batch_size: 1024
@@ -64,13 +127,16 @@ service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, resource/vm2, attributes/redact, batch]
processors: [memory_limiter, resource/vm2, attributes/redact, filter/noise, tail_sampling, batch]
exporters: [otlp/remote]
metrics:
receivers: [otlp]
receivers: [otlp, prometheus, hostmetrics]
processors: [memory_limiter, resource/vm2, attributes/redact, batch]
exporters: [otlp/remote]
logs:
receivers: [otlp]
processors: [memory_limiter, resource/vm2, attributes/redact, batch]
processors: [memory_limiter, resource/vm2, attributes/redact, filter/noise, batch]
exporters: [otlp/remote]
telemetry:
metrics:
address: 0.0.0.0:8888