Open pichlermarc opened 2 years ago
According to the spec a TracerProvider should return no-op tracer when shutdown.
Test for BasicTracerProvider.test.ts
BasicTracerProvider.test.ts
describe('.getTracer()', () => { it('should return no-op tracer when already shutdown', () => { const tracerProvider = new BasicTracerProvider(); tracerProvider.shutdown(); // returned tracer should be no-op, not instance of Tracer (from SDK) assert.ok(!(tracerProvider.getTracer('foo') instanceof Tracer)); }); });
Spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#shutdown Link to getTracer() code: https://github.com/open-telemetry/opentelemetry-js/blob/3db10568be4387ef024aa431ca1addef18c2441e/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts#L93-L101
getTracer()
would like to take this up!
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Description
According to the spec a TracerProvider should return no-op tracer when shutdown.
Steps to Reproduce
Test for
BasicTracerProvider.test.ts
Additional Details
Spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#shutdown Link to
getTracer()
code: https://github.com/open-telemetry/opentelemetry-js/blob/3db10568be4387ef024aa431ca1addef18c2441e/packages/opentelemetry-sdk-trace-base/src/BasicTracerProvider.ts#L93-L101