File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
components/gitpod-protocol/src/util Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,14 @@ export type TraceContextWithSpan = TraceContext & {
22
22
23
23
24
24
export namespace TraceContext {
25
- export function startSpan ( operation : string , parentCtx ?: TraceContext , ...referencedSpans : ( opentracing . Span | opentracing . SpanContext | undefined ) [ ] ) : opentracing . Span {
25
+ export function startSpan ( operation : string , parentCtx ?: TraceContext , ...referencedSpans : ( opentracing . Span | undefined ) [ ] ) : opentracing . Span {
26
26
const options : opentracing . SpanOptions = { } ;
27
27
if ( parentCtx ) {
28
28
options . childOf = parentCtx . span ;
29
29
}
30
30
if ( referencedSpans ) {
31
- options . references = referencedSpans . filter ( s => s !== undefined ) . map ( s => followsFrom ( s ! ) ) ;
31
+ // note: allthough followsForm's type says it takes 'opentracing.Span | opentracing.SpanContext', it only works with SpanContext (typing mismatch)
32
+ options . references = referencedSpans . filter ( s => s !== undefined ) . map ( s => followsFrom ( s ! . context ( ) ) ) ;
32
33
}
33
34
34
35
return opentracing . globalTracer ( ) . startSpan ( operation , options ) ;
You can’t perform that action at this time.
0 commit comments