File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -434,6 +434,8 @@ span = tracer.startSpan('test', {
434434 foo : 'bar'
435435 }
436436} ) ;
437+ span = tracer . startSpan ( 'test' , { childOf : null } )
438+ span = tracer . startSpan ( 'test' , { integrationName : 'testIntegration' } )
437439
438440tracer . trace ( 'test' , ( ) => { } )
439441tracer . trace ( 'test' , { tags : { foo : 'bar' } } , ( ) => { } )
Original file line number Diff line number Diff line change @@ -295,7 +295,18 @@ interface Plugins {
295295}
296296
297297declare namespace tracer {
298- export type SpanOptions = opentracing . SpanOptions ;
298+ export type SpanOptions = Omit < opentracing . SpanOptions , 'childOf' > & {
299+ /**
300+ * Set childOf to 'null' to create a root span without a parent, even when a parent span
301+ * exists in the current async context. If 'undefined' the parent will be inferred from the
302+ * existing async context.
303+ */
304+ childOf ?: opentracing . Span | opentracing . SpanContext | null ;
305+ /**
306+ * Optional name of the integration that crated this span.
307+ */
308+ integrationName ?: string ;
309+ } ;
299310 export { Tracer } ;
300311
301312 export interface TraceOptions extends Analyzable {
You can’t perform that action at this time.
0 commit comments