Description
Is your feature request related to a problem? Please describe.
Temporal SDK silently ignores the error when the upstream exporter fails to export the spans. I ran into a issue that the RunWorkflow
span is not exported when the upstream gRPC otel exporter was misconfigured (concurrentLimit
was set to 1). The problem is otel exporter returns the error through the callback function while temporal sdk just ignores it which makes it harder to debug.
Describe the solution you'd like
Add an optional callback parameter to the makeWorkflowExporter
, and just pass it to the upstream exporter as its callback. This is the easiest solution. User will at least have a way to know about the error. We can also have a default implementation for it. Take SimpleSpanProcessor
as an example, the default can just be globalErrorHandler
.
Additional context
It will be an API change, but shouldn't be a breaking change, since the new callback parameter will be optional.
I can help to add this if you think this is a good approach.