opentelemetry-js-api
opentelemetry-js-api copied to clipboard
feat(TraceProvider): add shutdown and forceFlush to API
This PR exposes the shutdown
and forcedFlush
functions defined by the TraceProvider specs.
Providing these methods allow to gracefully shutdown instrumentations without data loss. Currently this is only possible with usage of the SDK specific implementations see
Context
Closes https://github.com/open-telemetry/opentelemetry-js-api/issues/34
Codecov Report
Merging #172 (302455d) into main (d2fb706) will decrease coverage by
0.54%
. The diff coverage is50.00%
.
@@ Coverage Diff @@
## main open-telemetry/opentelemetry-js-api#172 +/- ##
==========================================
- Coverage 95.23% 94.68% -0.55%
==========================================
Files 45 45
Lines 650 658 +8
Branches 102 102
==========================================
+ Hits 619 623 +4
- Misses 31 35 +4
Impacted Files | Coverage Δ | |
---|---|---|
src/trace/NoopTracerProvider.ts | 80.00% <50.00%> (-20.00%) |
:arrow_down: |
src/trace/ProxyTracerProvider.ts | 85.00% <50.00%> (-8.75%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@secustor can you please re-apply this in https://github.com/open-telemetry/opentelemetry-js where this package is now moved?