File tree 1 file changed +1
-2
lines changed
packages/opentelemetry-plugin-http/src
1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -432,13 +432,12 @@ export class HttpPlugin extends BasePlugin<Http> {
432
432
* If a parent is required but not present, we use a `NoRecordingSpan` to still
433
433
* propagate context without recording it.
434
434
*/
435
- const hasParent = this . _tracer . getCurrentSpan ( ) !== undefined ;
436
435
const requireParent =
437
436
options . kind === SpanKind . CLIENT
438
437
? this . _config . requireParentforOutgoingSpans
439
438
: this . _config . requireParentforIncomingSpans ;
440
439
let span : Span ;
441
- if ( hasParent === false && requireParent === true ) {
440
+ if ( requireParent === true && this . _tracer . getCurrentSpan ( ) === undefined ) {
442
441
const spanContext =
443
442
getExtractedSpanContext ( context . active ( ) ) ?? plugin . _emptySpanContext ;
444
443
// TODO: Refactor this when a solution is found in
You can’t perform that action at this time.
0 commit comments