base.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:apm-agent-python 作者: elastic 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号