This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from jaeger_client import Config | |
from opentracing_instrumentation.client_hooks import install_all_patches | |
def init_tracer(): | |
install_all_patches() | |
config = Config( | |
config={ # usually read from some yaml config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import pkgutil | |
def import_all_subclasses_of(module_to_scan, baseclass, scope): | |
""" | |
:param module_to_scan: Module to scan. | |
:param baseclass: A base class to check. | |
:param scope: globals(), locals() or a dict-like object. | |
""" |