Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should span_in_stack_context be throwing exceptions? #111

Open
yurishkuro opened this issue Mar 31, 2020 · 0 comments
Open

Should span_in_stack_context be throwing exceptions? #111

yurishkuro opened this issue Mar 31, 2020 · 0 comments

Comments

@yurishkuro
Copy link
Contributor

@Jamim I'm interested in your thoughts. One of our users complained about getting this error:

# .../python2/local/lib/python2.7/site-packages/opentracing_instrumentation/client_hooks/boto3.pyc in perform_call(self, original_func, kind, service_name, operation_name, *args, **kwargs)
    135         span.set_tag('boto3.service_name', service_name)
    136 
--> 137         with span, span_in_stack_context(span):
    138             try:
    139                 response = original_func(*args, **kwargs)

# .../python2/local/lib/python2.7/site-packages/opentracing_instrumentation/request_context.pyc in span_in_stack_context(span)
    210 
    211     if not isinstance(opentracing.tracer.scope_manager, TornadoScopeManager):
--> 212         raise RuntimeError('scope_manager is not TornadoScopeManager')
    213 
    214     # Enter the newly created stack context so we have

They were running Jupyter notebook and trying to upload data using boto client. The notebook runs inside managed workspace for notebooks, which (apparently) enables Jaeger for all sessions automatically, but since they are not Tornado-based apps, it does not enable TornadoScopeManager.

it appears that boto instrumentation is just not usable wit non-tornado code. Would it make more sense for span_in_stack_context to fallback onto span_in_context when not in the tornado environment?

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

No branches or pull requests

1 participant