|
223 | 223 |
|
224 | 224 | it 'increments purge metrics' do |
225 | 225 | redis_connection_pool.with do |redis_connection| |
226 | | - expect(metrics).to receive(:increment).with("purge.pending.#{pool}.count") |
| 226 | + expect(metrics).to receive(:increment).with("vmpooler_purge.pending.#{pool}.count") |
227 | 227 |
|
228 | 228 | subject.purge_pending_queue(pool, redis_connection) |
229 | 229 | end |
|
460 | 460 |
|
461 | 461 | it 'pushes status metric' do |
462 | 462 | allow(metrics).to receive(:gauge) |
463 | | - expect(metrics).to receive(:gauge).with('health.status', 0) |
| 463 | + expect(metrics).to receive(:gauge).with('vmpooler_health.status', 0) |
464 | 464 |
|
465 | 465 | subject.push_health_metrics(metrics_data, 'healthy') |
466 | 466 | end |
467 | 467 |
|
468 | 468 | it 'pushes error metrics' do |
469 | 469 | allow(metrics).to receive(:gauge) |
470 | | - expect(metrics).to receive(:gauge).with('health.dlq.total_size', 25) |
471 | | - expect(metrics).to receive(:gauge).with('health.stuck_vms.count', 2) |
472 | | - expect(metrics).to receive(:gauge).with('health.orphaned_metadata.count', 3) |
| 470 | + expect(metrics).to receive(:gauge).with('vmpooler_health.dlq.total_size', 25) |
| 471 | + expect(metrics).to receive(:gauge).with('vmpooler_health.stuck_vms.count', 2) |
| 472 | + expect(metrics).to receive(:gauge).with('vmpooler_health.orphaned_metadata.count', 3) |
473 | 473 |
|
474 | 474 | subject.push_health_metrics(metrics_data, 'healthy') |
475 | 475 | end |
476 | 476 |
|
477 | 477 | it 'pushes per-pool queue metrics' do |
478 | 478 | allow(metrics).to receive(:gauge) |
479 | | - expect(metrics).to receive(:gauge).with('health.queue.test-pool.pending.size', 10) |
480 | | - expect(metrics).to receive(:gauge).with('health.queue.test-pool.pending.oldest_age', 3600) |
481 | | - expect(metrics).to receive(:gauge).with('health.queue.test-pool.pending.stuck_count', 2) |
482 | | - expect(metrics).to receive(:gauge).with('health.queue.test-pool.ready.size', 50) |
| 479 | + expect(metrics).to receive(:gauge).with('vmpooler_health.queue.test-pool.pending.size', 10) |
| 480 | + expect(metrics).to receive(:gauge).with('vmpooler_health.queue.test-pool.pending.oldest_age', 3600) |
| 481 | + expect(metrics).to receive(:gauge).with('vmpooler_health.queue.test-pool.pending.stuck_count', 2) |
| 482 | + expect(metrics).to receive(:gauge).with('vmpooler_health.queue.test-pool.ready.size', 50) |
483 | 483 |
|
484 | 484 | subject.push_health_metrics(metrics_data, 'healthy') |
485 | 485 | end |
486 | 486 |
|
487 | 487 | it 'pushes task metrics' do |
488 | 488 | allow(metrics).to receive(:gauge) |
489 | | - expect(metrics).to receive(:gauge).with('health.tasks.clone.active', 3) |
490 | | - expect(metrics).to receive(:gauge).with('health.tasks.ondemand.active', 2) |
491 | | - expect(metrics).to receive(:gauge).with('health.tasks.ondemand.pending', 5) |
| 489 | + expect(metrics).to receive(:gauge).with('vmpooler_health.tasks.clone.active', 3) |
| 490 | + expect(metrics).to receive(:gauge).with('vmpooler_health.tasks.ondemand.active', 2) |
| 491 | + expect(metrics).to receive(:gauge).with('vmpooler_health.tasks.ondemand.pending', 5) |
492 | 492 |
|
493 | 493 | subject.push_health_metrics(metrics_data, 'healthy') |
494 | 494 | end |
|
0 commit comments