opentracing-javascript icon indicating copy to clipboard operation
opentracing-javascript copied to clipboard

MockTracer._allocSpan is private and can't be overwritten

Open oranoran opened this issue 6 years ago • 2 comments

MockTracer._allocSpan is private and can't be overwritten - so trace can't be fully customized. Should be protected.

oranoran avatar May 29 '19 15:05 oranoran

Not that I am particularly opposed to this change, but making the method protected extends the API surface. Please elaborate on what you are doing with mock tracer that requires you to extend it.

yurishkuro avatar Jun 02 '19 19:06 yurishkuro

It appears https://github.com/opentracing/opentracing-javascript/blob/master/src/mock_tracer/mock_tracer.ts#L20-L22 explicitly talks about overriding _allocSpan, but, since it's private, this is not possible.

ithildir-paypal avatar Jan 07 '22 23:01 ithildir-paypal