opentracing-python-instrumentation
opentracing-python-instrumentation copied to clipboard
Perform customization with client Patchers for injecting tags
Using opentracing-instrumentation==3.3.1, opentracing==2.4.0, jaeger-client==4.3.0.
What we want to achieve
Based on HTTP status code we want to add warning & other tags to our HTTP get span, tried to follow the readme help.
from opentracing_instrumentation.client_hooks.requests import patcher
def hook(response, span):
if not response.ok:
span.set_tag('error', 'true')
patcher.set_response_handler_hook(hook)
But here we cannot find the patcher within requests class,
Also we want to assign hook when application boots, so should we assign before install_all_patches() or later on?