qonto / prometheus-rds-exporter

Prometheus exporter for AWS RDS
MIT License
60 stars 10 forks source link

Fix crash on ec2 type missing info #154

Closed vmercierfr closed 5 months ago

vmercierfr commented 5 months ago

Objective

Fix crash when polling EC2 instance without EBS optimized storage

Why

The https://github.com/qonto/prometheus-rds-exporter/issues/141 bug was partially fixed by https://github.com/qonto/prometheus-rds-exporter/pull/152.

The EbsInfo.EbsOptimizedInfo could be a nil pointer as well as EbsInfo when an EC2 instance don't have EBS optimization information. So we need to check this value before using it.

How

Release plan

vmercierfr commented 5 months ago

sre

github-actions[bot] commented 5 months ago

Code Coverage

Package Line Rate Health
github.com/qonto/prometheus-rds-exporter/internal/app/cloudwatch 87%
github.com/qonto/prometheus-rds-exporter/internal/app/ec2 87%
github.com/qonto/prometheus-rds-exporter/internal/app/exporter 80%
github.com/qonto/prometheus-rds-exporter/internal/app/rds 75%
github.com/qonto/prometheus-rds-exporter/internal/app/servicequotas 51%
github.com/qonto/prometheus-rds-exporter/internal/app/trace 100%
github.com/qonto/prometheus-rds-exporter/internal/app/unit 100%
Summary 80% (1030 / 1290)

Minimum allowed line rate is 60%