opentelemetry-js-api icon indicating copy to clipboard operation
opentelemetry-js-api copied to clipboard

Add suport to flush via API

Open Flarna opened this issue 3 years ago • 8 comments

The AWS Lambda Plugin as the requirement to flush data at the time the invocation of the function is done. See https://github.com/open-telemetry/opentelemetry-js-contrib/blob/b128dae70cf5723162ef72ed0ed83924f3edf4dc/plugins/node/opentelemetry-instrumentation-aws-lambda/src/aws-lambda.ts#L199-L206

As once can see this creates a binding from instrumentation to a specific SDK. Usually an instrumentation should have no need to require SDK components.

Currently API offers no way to get the TracerProvider used (it returns a ProxyTracerProvider) nor does it offer a way to force flush the trace data.

Should we enhance the API with some functionality regarding this?

Flarna avatar Apr 20 '21 11:04 Flarna