Make OSProfiler compatible with OpenTracing API

Registered by Tovin Seven on 2017-04-28

OSprofiler [1] has the same concept with Google Dapper [2], Zipkin [3].
OSprofiler traces can be retrieved as json, dot graph, html output. However, it lacks of UI, sampling rate, instruments, etc.

Making OSprofiler compatible with OpenTracing API [4,5,6] has some great advantages:
- Standardize data structure/model with OpenTracing API
- Store trace in various back-end
- Show traces in various UIs: Jaeger, Zipkin, LightStep, Appdash, Hawkular, etc.
- Use query model of other tracers
- Implement sampling rate and supported from other tracers

References:
[1] OSprofiler spec in Mitaka: https://specs.openstack.org/openstack/oslo-specs/specs/mitaka/osprofiler-cross-service-project-profiling.html
[2] Google Dapper: https://research.google.com/pubs/pub36356.html
[3] Twitter Zipkin: http://zipkin.io/
[4] OpenTracing: http://opentracing.io/
[5] OpenTracing API specification: https://github.com/opentracing/specification
[6] OpenTracing Python: https://github.com/opentracing/opentracing-python/

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Tovin Seven
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

TODO(tovin07): Find the way to change span_id from outside tracer.start_span (or start_manual_span, start_active_span)

NOTE(tovin07): Override Jaeger span id with id from OSprofiler. Jaeger, lighstep, basic tracer and some other tracers generate new id for span inside tracer.start_span method.

TODO(tovin07): tracer inject/extract should call inject/extract from opentracing API in the future, after we replace current inject/extract mechanism with mechanism from OpenTracing API

Gerrit topic: https://review.openstack.org/#q,topic:bp/opentracing-compatible,n,z

Addressed by: https://review.openstack.org/480018
    [WiP] OSprofiler with OpenTracing compatible

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.