aws_xray_sdk/core/plugins/elasticbeanstalk_plugin.py
raw| 1 | import logging |
| 2 | import json |
| 3 | |
| 4 | log = logging.getLogger(__name__) |
| 5 | |
| 6 | CONF_PATH = '/var/elasticbeanstalk/xray/environment.conf' |
| 7 | SERVICE_NAME = 'elastic_beanstalk' |
| 8 | ORIGIN = 'AWS::ElasticBeanstalk::Environment' |
| 9 | |
| 10 | |
| 11 | def initialize(): |
| 12 | global runtime_context |
| 13 | try: |
| 14 | with open(CONF_PATH) as f: |
| 15 | runtime_context = json.load(f) |
| 16 | except Exception: |
| 17 | runtime_context = None |
| 18 | log.warning("failed to load Elastic Beanstalk environment config file") |