Draft: Add support for distributed tracing (opentracing)
This adds basic primitives to support OpenTracing. None of the hive code is instrumented to create tracing spans/log messages, but if you add them they will be sent to the tracer.
I had planned to use this for better understanding why API calls were slow. The plan was:
- nginx would create the top-level span when it accepted the API call (https://docs.nginx.com/nginx/admin-guide/dynamic-modules/opentracing/)
- jussi could be instrumented to create traces as it goes, there's a plugin for the sanic framework it uses (https://github.com/itechub/sanic-opentracing)
- haproxy, the next step in the call chain, supports opentracing natively
- finally, hived would use this code to create a span as soon as it receives the API call, and then track everything that it does processing the call.
Never ended up using it, but might be useful to resurrect it for profiling in the future. This code has been in active use in another FC-based project for quite a while, 4 years at least.
Edited by Eric Frias