From b1643368beeb8c53572339e6a72e45e951abc2d4 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 11 Jan 2023 14:49:34 -0800 Subject: [PATCH] Make metrics names a little more consistent Some of these metrics decorator were unlabeled without a class which would result in semi-confusing structures for the metrics counters. Now, we should be semi-consistent. Change-Id: Ie2795419991dc941f2a2b2bc0c6116b92d285041 --- ironic/drivers/modules/agent_base.py | 6 +++--- releasenotes/notes/change-c9c01700dcfd599b.yaml | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/change-c9c01700dcfd599b.yaml diff --git a/ironic/drivers/modules/agent_base.py b/ironic/drivers/modules/agent_base.py index ff2a454ea4..7732840d59 100644 --- a/ironic/drivers/modules/agent_base.py +++ b/ironic/drivers/modules/agent_base.py @@ -100,7 +100,7 @@ _FASTTRACK_HEARTBEAT_ALLOWED = (states.DEPLOYWAIT, states.CLEANWAIT, FASTTRACK_HEARTBEAT_ALLOWED = frozenset(_FASTTRACK_HEARTBEAT_ALLOWED) -@METRICS.timer('post_clean_step_hook') +@METRICS.timer('AgentBase.post_clean_step_hook') def post_clean_step_hook(interface, step): """Decorator method for adding a post clean step hook. @@ -128,7 +128,7 @@ def post_clean_step_hook(interface, step): return decorator -@METRICS.timer('post_deploy_step_hook') +@METRICS.timer('AgentBase.post_deploy_step_hook') def post_deploy_step_hook(interface, step): """Decorator method for adding a post deploy step hook. @@ -279,7 +279,7 @@ def _get_completed_command(task, commands, step_type): return last_command -@METRICS.timer('log_and_raise_deployment_error') +@METRICS.timer('AgentBase.log_and_raise_deployment_error') def log_and_raise_deployment_error(task, msg, collect_logs=True, exc=None): """Helper method to log the error and raise exception. diff --git a/releasenotes/notes/change-c9c01700dcfd599b.yaml b/releasenotes/notes/change-c9c01700dcfd599b.yaml new file mode 100644 index 0000000000..dbb3bb11e1 --- /dev/null +++ b/releasenotes/notes/change-c9c01700dcfd599b.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + Two statsd metrics names have been modified to provide structural clarity + and consistency for consumers of statistics metrics. Consumers of metrics + statistics may need to update their dashboards as the + ``post_clean_step_hook`` metric is now named + ``AgentBase.post_clean_step_hook``, and the ``post_deploy_step_hook`` is + now named ``AgentBase.post_deploy_step_hook``.