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

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

@chenbodeng719

Description

@chenbodeng719


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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions