open-telemetry / opentelemetry-python

OpenTelemetry Python API and SDK
https://opentelemetry.io
Apache License 2.0
1.77k stars 619 forks source link

OTLP exporter should support multi-destination exporting #1109

Open codeboten opened 4 years ago

codeboten commented 4 years ago

As per spec: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/otlp.md#multi-destination-exporting

seemk commented 3 years ago

With each exporter contained within BatchSpanProcessor which has its own queue, isn't this the case already? So you just create multiple exporters?

owais commented 3 years ago

I agree. We can consider using multiple processor each with it's own instance of OTLP exporter as a solution for this. Looks like the spec just recommends having one queue per destination which would be satisfied by such a setup. There's no point in re-implementing BatchSpanProcessor's queue inside the exporter IMO.

If we agree with this, this should just be a small documentation change.

owais commented 3 years ago

Using multiple exports+processors does probably not technically satisfy the spec as the spec clearly talks about multi-destination exporting in the context of OTLP exporter but still, we can still recommend wrapping multiple OTLP exporters with different processors to achieve the same result. I realize it may not truly satisfy the spec but it addresses the problem the spec is trying to solve in a rather elegant way without adding too much logic/responsibility to the exporter.

lzchen commented 3 years ago

@owais I agree. The less changes we make the better. So this will just simply be a doc change then to instruct users to go that route to solve this usecase?

github-actions[bot] commented 3 years ago

This issue was marked stale due to lack of activity. It will be closed in 30 days.

owais commented 3 years ago

I somehow missed your comment @lzchen. Yes, I think we should document "how to export to multiple destinations" and it should cover using different exporters or multiple instances of same exporter.