Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

With gevent patch_all, jaeger has no span to show #161

Open
chenbodeng719 opened this issue Sep 1, 2022 · 0 comments
Open

With gevent patch_all, jaeger has no span to show #161

chenbodeng719 opened this issue Sep 1, 2022 · 0 comments

Comments

@chenbodeng719
Copy link

chenbodeng719 commented Sep 1, 2022



import os,sys
g_proj_path = os.path.dirname(os.path.abspath(__file__))+"/../"
sys.path.append(g_proj_path)
sys.path.append(g_proj_path+"module/")
sys.path.append(g_proj_path+"website/")
from gevent import monkey
monkey.patch_all()
from opentracing.scope_managers.gevent import GeventScopeManager

import logging
import time
from jaeger_client import Config

if __name__ == "__main__":
    log_level = logging.DEBUG
    logging.getLogger('').handlers = []
    logging.basicConfig(format='%(asctime)s %(message)s', level=log_level)

    config = Config(
        config={ # usually read from some yaml config
            'sampler': {
                'type': 'const',
                'param': 1,
            },
            'logging': True,
        },
        service_name='te-app-name',
        validate=True,
        scope_manager=GeventScopeManager()
    )
    # this call also sets opentracing.tracer
    tracer = config.initialize_tracer()
    # gevent_opentracing.init_tracing(tracer)
    with tracer.start_span(operation_name='someWork') as span:
        span.set_tag("test","212")

    time.sleep(2)




With gevent patch_all, jaeger has no span to show

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant