def get_service_info(self):
language_version = platform.python_version()
if hasattr(sys, 'pypy_version_info'):
runtime_version = '.'.join(map(str, sys.pypy_version_info[:3]))
else:
runtime_version = language_version
result = {
'name': self.config.service_name,
'version': self.config.app_version,
'agent': {
'name': 'python',
'version': elasticapm.VERSION,
},
'argv': sys.argv,
'language': {
'name': 'python',
'version': platform.python_version(),
},
'pid': os.getpid(),
'process_title': None,
'runtime': {
'name': platform.python_implementation(),
'version': runtime_version,
}
}
if self.config.framework_name:
result['framework'] = {
'name': self.config.framework_name,
'version': self.config.framework_version,
}
return result
评论列表
文章目录