opentelemetry-js
opentelemetry-js copied to clipboard
Disallow `new Span()`
trafficstars
Currently it is possible to call new Span(). We should make the constructor private to disallow this.
Current test usages:
- 1 use of
new spanin contrib tests: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-dns/test/functionals/utils.test.ts#L150 - ? uses of
new Spanin JS tests - honeycomb distro is known to use
Spanin tests - dd-trace may also use
new Spanin tests? @dyladan will look into this
Possible additional goals:
- do not use a class for span (improve minification)
- create test utility library