What's new from Grafana Labs
Grafana database metrics deprecation
The following Prometheus metrics are now deprecated in Grafana v13, and will be removed in a future release:
go_sql_stats_connections_max_opengo_sql_stats_connections_opengo_sql_stats_connections_in_usego_sql_stats_connections_idlego_sql_stats_connections_waited_forgo_sql_stats_connections_blocked_secondsgo_sql_stats_connections_closed_max_idlego_sql_stats_connections_closed_max_lifetimego_sql_stats_connections_closed_max_idle_timegrafana_database_conn_max_opengrafana_database_conn_opengrafana_database_conn_in_usegrafana_database_conn_idlegrafana_database_conn_wait_count_totalgrafana_database_conn_wait_duration_secondsgrafana_database_conn_max_idle_closed_totalgrafana_database_conn_max_idle_closed_secondsgrafana_database_conn_max_lifetime_closed_total
They are replaced by the following metrics, which provide the exact same data:
go_sql_max_open_connectionsgo_sql_open_connectionsgo_sql_in_use_connectionsgo_sql_idle_connectionsgo_sql_wait_count_totalgo_sql_wait_duration_seconds_totalgo_sql_max_idle_closed_totalgo_sql_max_idle_time_closed_totalgo_sql_max_lifetime_closed_total
Mitigation
If you were using the grafana_database_conn_* metrics, use the following mapping to replace them:
grafana_database_conn_max_open=>go_sql_max_open_connectionsgrafana_database_conn_open=>go_sql_open_connectionsgrafana_database_conn_in_use=>go_sql_in_use_connectionsgrafana_database_conn_idle=>go_sql_idle_connectionsgrafana_database_conn_wait_count_total=>go_sql_wait_count_totalgrafana_database_conn_wait_duration_seconds=>go_sql_wait_duration_seconds_totalgrafana_database_conn_max_idle_closed_total=>go_sql_max_idle_closed_totalgrafana_database_conn_max_idle_closed_seconds=>go_sql_max_idle_time_closed_totalgrafana_database_conn_max_lifetime_closed_total=>go_sql_max_lifetime_closed_total
If you were using the go_sql_stats_connections_* metrics, use the following mapping to replace them:
go_sql_stats_connections_max_open=>go_sql_max_open_connectionsgo_sql_stats_connections_open=>go_sql_open_connectionsgo_sql_stats_connections_in_use=>go_sql_in_use_connectionsgo_sql_stats_connections_idle=>go_sql_idle_connectionsgo_sql_stats_connections_waited_for=>go_sql_wait_count_totalgo_sql_stats_connections_blocked_seconds=>go_sql_wait_duration_seconds_totalgo_sql_stats_connections_closed_max_idle=>go_sql_max_idle_closed_totalgo_sql_stats_connections_closed_max_lifetime=>go_sql_max_idle_time_closed_totalgo_sql_stats_connections_closed_max_idle_time=>go_sql_max_lifetime_closed_total