Skip to content

Commit a0630e6

Browse files
committed
chore: added stability opt-in flag check
1 parent f2d182a commit a0630e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/instrumentation-redis/src/v4-v5/instrumentation.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,10 @@ export class RedisInstrumentationV4_V5 extends InstrumentationBase<RedisInstrume
511511
currCommandRes instanceof Error
512512
? [null, currCommandRes]
513513
: [currCommandRes, undefined];
514-
span.setAttribute(ATTR_DB_OPERATION_NAME, operationName);
514+
515+
if (this._semconvStability & SemconvStability.STABLE) {
516+
span.setAttribute(ATTR_DB_OPERATION_NAME, operationName);
517+
}
515518

516519
this._endSpanWithResponse(span, allCommands[i], commandArgs, res, err);
517520
}

0 commit comments

Comments
 (0)