Skip to content

Commit

Permalink
Remove uneccessary userland tracer null protection
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeymisson committed Sep 19, 2023
1 parent 1bf0a36 commit 063cbb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tracing/UserLandTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ export class UserLandTracer implements IUserLandTracer {

public startSpan(name: string, options?: SpanOptions) {
if (options && (options.childOf || options.references?.length)) {
return this.tracer?.startSpan(name, options)
return this.tracer.startSpan(name, options)
}

return this.tracer?.startSpan(name, { ...options, childOf: this.fallbackSpan })
return this.tracer.startSpan(name, { ...options, childOf: this.fallbackSpan })
}

public inject(spanContext: SpanContext | Span, format: string, carrier: any) {
return this.tracer?.inject(spanContext, format, carrier)
return this.tracer.inject(spanContext, format, carrier)
}

public fallbackSpanContext(): SpanContext | undefined {
Expand Down

0 comments on commit 063cbb3

Please sign in to comment.