From 063cbb3aeb00764aef2829e485602033db21c9ed Mon Sep 17 00:00:00 2001 From: Jeymisson Oliveira Date: Tue, 19 Sep 2023 15:07:13 -0300 Subject: [PATCH] Remove uneccessary userland tracer null protection --- src/tracing/UserLandTracer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tracing/UserLandTracer.ts b/src/tracing/UserLandTracer.ts index d7a5c223..4f845465 100644 --- a/src/tracing/UserLandTracer.ts +++ b/src/tracing/UserLandTracer.ts @@ -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 {