feat(metrics): lab6 expose per-queue RabbitMQ metrics

This commit is contained in:
Голиков Maximillian Антон
2026-11-17 17:24:30 +03:00
parent 6f37282ee8
commit 2f0906cbd7
5 changed files with 12 additions and 0 deletions
+1
View File
@@ -99,6 +99,7 @@ func (p *RabbitPublisher) Publish(ctx context.Context, routingKey string, body [
ContentType: "application/json",
DeliveryMode: amqp.Persistent,
Body: body,
Timestamp: time.Now().UTC(),
})
if err != nil {
return err
+1
View File
@@ -74,6 +74,7 @@ services:
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_PASSWORD}"
volumes:
- rabbitmq_data:/var/lib/rabbitmq
- ./infra/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins:ro
ports:
- "15672:15672"
- "5672:5672"
+1
View File
@@ -9,6 +9,7 @@ receivers:
exporters:
prometheus:
endpoint: 0.0.0.0:9464
add_metric_suffixes: false
resource_to_telemetry_conversion:
enabled: true
opensearch:
+8
View File
@@ -5,3 +5,11 @@ scrape_configs:
- job_name: otel-collector
static_configs:
- targets: ["otel-collector:9464"]
- job_name: rabbitmq
metrics_path: /metrics/detailed
params:
vhost: ["/"]
family: [queue_coarse_metrics, queue_metrics]
static_configs:
- targets: ["rabbitmq:15692"]
+1
View File
@@ -0,0 +1 @@
[rabbitmq_management,rabbitmq_prometheus].