census-instrumentation / opencensus-python

A stats collection and distributed tracing framework
Apache License 2.0
669 stars 250 forks source link

tracer: option to use multiple exporters instead of just one #181

Open odeke-em opened 6 years ago

odeke-em commented 6 years ago

I am just wrapping up some presentations and noticed that currently all the signatures require just one exporter, unless am mistaken. I'd like to use Zipkin, Stackdriver Tracing and Jaeger at the same time.

I believe I should be able to register infinitely many exporters and have the same data exported to each one of them -- as this accomplishes one of the benefits of OpenCensus i.e. multiplicity of backends and no single vendor lock-in.

Thank you.

chingor13 commented 6 years ago

I would suggest creating a MultiExporter that implements the base exporter interface and accepts many exporters in the constructor.

liyanhui1228 commented 6 years ago

@chingor13 Thanks for the suggestion!

odeke-em commented 6 years ago

Great suggestion @chingor13, thank you! Thank you @liyanhui1228 too for taking this on!

flands commented 6 years ago

@liyanhui1228 any update on this? very much needed. /cc @c24t

c24t commented 6 years ago

@flands I put up an exploratory PR at #397, if this approach works for you we can get (something like) it merged in later.

flands commented 6 years ago

@c24t thanks! I will try it out and let you know.