opentracing / opentracing-javascript

OpenTracing API for Javascript (both Node and browser). 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io
Apache License 2.0
1.09k stars 145 forks source link

Consider marking Span.constructor protected #142

Open lcapaldo opened 4 years ago

lcapaldo commented 4 years ago

Creating a span via new Span will almost never do what folks intend, especially if they have a non noop tracer. I appreciate that doing this would make the noop tracer implementation for javascript somewhat more complex, but I have seen folks using new Span for "default" parent spans (when using an actual tracer implementation), so it may be worth it to help consumers fall into the "pit of success."