Skip to content

Commit ff6e0bf

Browse files
deejay1trentm
andauthored
Apply suggestions from code review
Co-authored-by: Trent Mick <[email protected]>
1 parent 53585cb commit ff6e0bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

plugins/node/opentelemetry-instrumentation-knex/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ When upgrading to the new semantic conventions, it is recommended to do so in th
7373

7474
This will cause both the old and new semantic conventions to be emitted during the transition period.
7575

76-
### ### Legacy Behavior (default)
76+
### Legacy Behavior (default)
7777

7878
Enabled when `OTEL_SEMCONV_STABILITY_OPT_IN` contains `database/dup` or DOES NOT CONTAIN `database`.
7979

plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class KnexInstrumentation extends InstrumentationBase<KnexInstrumentation
171171
const transport =
172172
config?.connection?.filename === ':memory:' ? 'inproc' : undefined;
173173

174-
if ((semConv & SemconvStability.OLD) === SemconvStability.OLD) {
174+
if (semConv & SemconvStability.OLD) {
175175
Object.assign(attributes, {
176176
[SEMATTRS_DB_SYSTEM]: mapSystem(config.client),
177177
[SEMATTRS_DB_SQL_TABLE]: table,
@@ -183,7 +183,7 @@ export class KnexInstrumentation extends InstrumentationBase<KnexInstrumentation
183183
[SEMATTRS_NET_TRANSPORT]: transport,
184184
});
185185
}
186-
if ((semConv & SemconvStability.STABLE) === SemconvStability.STABLE) {
186+
if (semConv & SemconvStability.STABLE) {
187187
Object.assign(attributes, {
188188
[ATTR_DB_SYSTEM_NAME]: mapSystem(config.client),
189189
[ATTR_DB_COLLECTION_NAME]: table,

0 commit comments

Comments
 (0)