Compare commits

..

7 Commits

Author SHA1 Message Date
BryantHe 4e6cc13773 debug 6 2023-07-27 16:47:17 +08:00
BryantHe d8ee68bcc6 debug 5 2023-07-27 16:43:29 +08:00
BryantHe 989eb0f0f4 debug 4 2023-07-27 16:13:12 +08:00
BryantHe a9adfa5cb1 debug 3 2023-07-27 16:08:36 +08:00
BryantHe d2025c628e debug 2 2023-07-27 16:04:57 +08:00
BryantHe 45e8b692f0 debug 2023-07-27 16:01:14 +08:00
BryantHe 857d26d092 feat: add metrics for nameko services 2023-07-27 14:02:01 +08:00
1 changed files with 2 additions and 2 deletions

View File

@ -319,13 +319,13 @@ def metric_config_gen(module, class_name_str):
"""
import sys
from statsd.client.timer import Timer
sys.path.append(os.getcwd())
sys.path.append('/home/ubuntu/namekoplus-examples')
click.echo(f'sys.path: {sys.path}')
# Extract information of statsd config from the class of nameko service
dest_dir = module.split('.')[0]
file_name = module.split('.')[-1]
_module = __import__(module)
_module = importlib.import_module(module)
config_list = []
for class_name in class_name_str.split(','):
members = inspect.getmembers(getattr(getattr(_module, file_name), class_name), predicate=inspect.isfunction)