Skip to content

Commit 3b14478

Browse files
Merge pull request #714 from solarwinds/NH-120288
Disable some noisy instrumentations by default and add `oracledb`
2 parents 0428b45 + e73321a commit 3b14478

File tree

7 files changed

+53
-47
lines changed

7 files changed

+53
-47
lines changed

.yarn/versions/5120708f.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
releases:
2+
"@solarwinds-apm/instrumentations": minor
3+
solarwinds-apm: major

packages/instrumentations/COMPATIBILITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
| `mysql` | `>=2.0.0 <3.0.0` | `@opentelemetry/instrumentation-mysql` |
3939
| `mysql2` | `>=1.4.2 <4.0.0` | `@opentelemetry/instrumentation-mysql2` |
4040
| `net` | `*` | `@opentelemetry/instrumentation-net` |
41+
| `oracledb` | `>=6.7.0 <7.0.0` | `@opentelemetry/instrumentation-oracledb` |
4142
| `pg` | `>=8.0.3 <9.0.0` | `@opentelemetry/instrumentation-pg` |
4243
| `pg-pool` | `>=2.0.0 <4.0.0` | `@opentelemetry/instrumentation-pg` |
4344
| `pino` | `>=5.14.0 <10.0.0` | `@opentelemetry/instrumentation-pino` |

packages/instrumentations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@
7171
"@opentelemetry/instrumentation-mysql2": "^0.52.0",
7272
"@opentelemetry/instrumentation-nestjs-core": "^0.51.0",
7373
"@opentelemetry/instrumentation-net": "^0.49.0",
74+
"@opentelemetry/instrumentation-oracledb": "^0.31.0",
7475
"@opentelemetry/instrumentation-pg": "^0.58.0",
7576
"@opentelemetry/instrumentation-pino": "^0.52.0",
7677
"@opentelemetry/instrumentation-redis": "^0.54.1",
77-
"@opentelemetry/instrumentation-redis-4": "^0.49.0",
7878
"@opentelemetry/instrumentation-restify": "^0.51.0",
7979
"@opentelemetry/instrumentation-router": "^0.50.0",
8080
"@opentelemetry/instrumentation-runtime-node": "^0.19.0",

packages/instrumentations/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ import { type MySQLInstrumentation } from "@opentelemetry/instrumentation-mysql"
4747
import { type MySQL2Instrumentation } from "@opentelemetry/instrumentation-mysql2"
4848
import { type NestInstrumentation } from "@opentelemetry/instrumentation-nestjs-core"
4949
import { type NetInstrumentation } from "@opentelemetry/instrumentation-net"
50+
import { type OracleInstrumentation } from "@opentelemetry/instrumentation-oracledb"
5051
import { type PgInstrumentation } from "@opentelemetry/instrumentation-pg"
5152
import { type PinoInstrumentation } from "@opentelemetry/instrumentation-pino"
5253
import { type RedisInstrumentation as RedisInstrumentationV2 } from "@opentelemetry/instrumentation-redis"
53-
import { type RedisInstrumentation as RedisInstrumentationV4 } from "@opentelemetry/instrumentation-redis-4"
5454
import { type RestifyInstrumentation } from "@opentelemetry/instrumentation-restify"
5555
import { type RouterInstrumentation } from "@opentelemetry/instrumentation-router"
5656
import { type RuntimeNodeInstrumentation } from "@opentelemetry/instrumentation-runtime-node"
@@ -92,10 +92,10 @@ interface InstrumentationTypes {
9292
"@opentelemetry/instrumentation-mysql": typeof MySQLInstrumentation
9393
"@opentelemetry/instrumentation-nestjs-core": typeof NestInstrumentation
9494
"@opentelemetry/instrumentation-net": typeof NetInstrumentation
95+
"@opentelemetry/instrumentation-oracledb": typeof OracleInstrumentation
9596
"@opentelemetry/instrumentation-pg": typeof PgInstrumentation
9697
"@opentelemetry/instrumentation-pino": typeof PinoInstrumentation
9798
"@opentelemetry/instrumentation-redis": typeof RedisInstrumentationV2
98-
"@opentelemetry/instrumentation-redis-4": typeof RedisInstrumentationV4
9999
"@opentelemetry/instrumentation-restify": typeof RestifyInstrumentation
100100
"@opentelemetry/instrumentation-router": typeof RouterInstrumentation
101101
"@opentelemetry/instrumentation-runtime-node": typeof RuntimeNodeInstrumentation
@@ -140,10 +140,10 @@ const INSTRUMENTATIONS = {
140140
"@opentelemetry/instrumentation-mysql": "MySQLInstrumentation",
141141
"@opentelemetry/instrumentation-nestjs-core": "NestInstrumentation",
142142
"@opentelemetry/instrumentation-net": "NetInstrumentation",
143+
"@opentelemetry/instrumentation-oracledb": "OracleInstrumentation",
143144
"@opentelemetry/instrumentation-pg": "PgInstrumentation",
144145
"@opentelemetry/instrumentation-pino": "PinoInstrumentation",
145146
"@opentelemetry/instrumentation-redis": "RedisInstrumentation",
146-
"@opentelemetry/instrumentation-redis-4": "RedisInstrumentation",
147147
"@opentelemetry/instrumentation-restify": "RestifyInstrumentation",
148148
"@opentelemetry/instrumentation-router": "RouterInstrumentation",
149149
"@opentelemetry/instrumentation-runtime-node": "RuntimeNodeInstrumentation",

packages/solarwinds-apm/src/patches.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ const PATCHERS = [
7171
}
7272
}),
7373

74+
patcher(["@opentelemetry/instrumentation-cassandra-driver"], (config) => {
75+
config.enhancedDatabaseReporting ??= true
76+
}),
77+
7478
patcher(["@opentelemetry/instrumentation-fs"], (config) => {
79+
config.enabled ??= false
7580
config.requireParentSpan ??= true
7681
}),
7782

@@ -112,6 +117,16 @@ const PATCHERS = [
112117
},
113118
),
114119

120+
patcher(
121+
[
122+
"@opentelemetry/instrumentation-dns",
123+
"@opentelemetry/instrumentation-net",
124+
],
125+
(config) => {
126+
config.enabled ??= false
127+
},
128+
),
129+
115130
patcher(
116131
[
117132
"@opentelemetry/instrumentation-bunyan",

packages/solarwinds-apm/test/patches.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ describe("patch", () => {
6363
})
6464
expect(configs["@opentelemetry/instrumentation-aws-sdk"]).to.deep.equal({})
6565
expect(configs["@opentelemetry/instrumentation-fs"]).to.deep.equal({
66+
enabled: false,
6667
requireParentSpan: true,
6768
})
6869
expect(configs["@opentelemetry/instrumentation-mysql2"]).to.deep.equal({
@@ -72,6 +73,12 @@ describe("patch", () => {
7273
requireParentSpan: true,
7374
addSqlCommenterCommentToQueries: false,
7475
})
76+
expect(configs["@opentelemetry/instrumentation-dns"]).to.deep.equal({
77+
enabled: false,
78+
})
79+
expect(configs["@opentelemetry/instrumentation-net"]).to.deep.equal({
80+
enabled: false,
81+
})
7582
expect(configs["@opentelemetry/instrumentation-bunyan"]).to.deep.include({
7683
disableLogCorrelation: true,
7784
disableLogSending: true,

yarn.lock

Lines changed: 23 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)