From ef4a4e3b24abbbfdc56b70a29a162fb1f92507c5 Mon Sep 17 00:00:00 2001 From: Ching Kuo Date: Tue, 9 Feb 2021 16:11:06 +0800 Subject: [PATCH] Add timeout, method to RPC Client Label We are missing timeout and method in label definition for rpc client this will cause message router to failed to parse messages as there are unexpected labels sent from oslo.messaging. This commit added timeout and method to rpc client labels to fix the issue. Change-Id: I9ed133543ae6846256c1ea81602ca864f3847dec --- oslo_metrics/metrics/oslo_messaging.py | 2 +- oslo_metrics/tests/test_message_process.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/oslo_metrics/metrics/oslo_messaging.py b/oslo_metrics/metrics/oslo_messaging.py index 22f9f54..5b57581 100644 --- a/oslo_metrics/metrics/oslo_messaging.py +++ b/oslo_metrics/metrics/oslo_messaging.py @@ -21,7 +21,7 @@ rpc_server_common_labels = [ ] rpc_client_common_labels = [ 'call_type', 'exchange', 'topic', 'namespace', 'version', - 'server', 'fanout', 'process' + 'server', 'fanout', 'process', 'method', 'timeout' ] rpc_processing_seconds_buckets = [ diff --git a/oslo_metrics/tests/test_message_process.py b/oslo_metrics/tests/test_message_process.py index c25aebe..4c49203 100644 --- a/oslo_metrics/tests/test_message_process.py +++ b/oslo_metrics/tests/test_message_process.py @@ -69,11 +69,13 @@ class TestProcessMessage(base.BaseTestCase): "call_type": "call", "exchange": "foo", "topic": "bar", + "method": "get", "server": "foobar", "namespace": "ns", "version": "v2", "process": "done", - "fanout": "foo" + "fanout": "foo", + "timeout": 10 } }""".encode() -- GitLab