Skip to content

Commit 90db232

Browse files
authored
Add oracledb instrumentation (#1)
Add Oracledb instrumentation
1 parent 21e1331 commit 90db232

File tree

25 files changed

+9182
-4770
lines changed

25 files changed

+9182
-4770
lines changed

.github/component-label-map.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ pkg:instrumentation-net:
183183
- changed-files:
184184
- any-glob-to-any-file:
185185
- plugins/node/opentelemetry-instrumentation-net/**
186+
pkg:instrumentation-oracledb:
187+
- changed-files:
188+
- any-glob-to-any-file:
189+
- plugins/node/opentelemetry-instrumentation-oracledb/**
190+
- packages/opentelemetry-test-utils/**
186191
pkg:instrumentation-pg:
187192
- changed-files:
188193
- any-glob-to-any-file:

.github/component_owners.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ components:
114114
# Unmaintained
115115
plugins/node/opentelemetry-instrumentation-net:
116116
- seemk
117+
plugins/node/opentelemetry-instrumentation-oracledb:
118+
- sudarshan12s
117119
plugins/node/instrumentation-runtime-node:
118120
- d4nyll
119121
plugins/node/opentelemetry-instrumentation-pg:

.github/workflows/test-all-versions.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ jobs:
8080
--health-interval 10s
8181
--health-timeout 5s
8282
--health-retries 5
83+
oracledb:
84+
image: gvenzl/oracle-free:slim
85+
env:
86+
APP_USER: otel
87+
APP_USER_PASSWORD: secret
88+
ORACLE_PASSWORD: oracle
89+
ports:
90+
- 1521:1521
91+
options: >-
92+
--health-cmd "sqlplus system/oracle@//localhost/FREEPDB1"
93+
--health-interval 10s
94+
--health-timeout 5s
95+
--health-retries 5
8396
postgres:
8497
image: postgres:16-alpine
8598
env:
@@ -122,6 +135,12 @@ jobs:
122135
MYSQL_USER: otel
123136
OPENTELEMETRY_REDIS_HOST: localhost
124137
OPENTELEMETRY_REDIS_PORT: 6379
138+
ORACLE_HOSTNAME: localhost
139+
ORACLE_PORT: 1521
140+
ORACLE_CONNECTSTRING: localhost:1521/freepdb1
141+
ORACLE_USER: otel
142+
ORACLE_PASSWORD: secret
143+
ORACLE_SERVICENAME: FREEPDB1
125144
POSTGRES_DB: otel_pg_database
126145
POSTGRES_HOST: localhost
127146
POSTGRES_PORT: 5432
@@ -130,6 +149,7 @@ jobs:
130149
RUN_MONGODB_TESTS: 1
131150
RUN_MSSQL_TESTS: 1
132151
RUN_MYSQL_TESTS: 1
152+
RUN_ORACLEDB_TESTS: 1
133153
RUN_POSTGRES_TESTS: 1
134154
RUN_REDIS_TESTS: 1
135155
NPM_CONFIG_UNSAFE_PERM: true

.github/workflows/unit-test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ jobs:
7878
--health-interval 10s
7979
--health-timeout 5s
8080
--health-retries 5
81+
oracledb:
82+
image: gvenzl/oracle-free:slim
83+
env:
84+
APP_USER: otel
85+
APP_USER_PASSWORD: secret
86+
ORACLE_PASSWORD: oracle
87+
ports:
88+
- 1521:1521
89+
options: >-
90+
--health-cmd "sqlplus system/oracle@//localhost/FREEPDB1"
91+
--health-interval 10s
92+
--health-timeout 5s
93+
--health-retries 5
8194
postgres:
8295
image: postgres:16-alpine
8396
env:
@@ -117,6 +130,7 @@ jobs:
117130
RUN_MONGODB_TESTS: 1
118131
RUN_MYSQL_TESTS: 1
119132
RUN_MSSQL_TESTS: 1
133+
RUN_ORACLEDB_TESTS: 1
120134
RUN_POSTGRES_TESTS: 1
121135
RUN_REDIS_TESTS: 1
122136
RUN_RABBIT_TESTS: 1
@@ -135,6 +149,12 @@ jobs:
135149
OPENTELEMETRY_MEMCACHED_PORT: 11211
136150
OPENTELEMETRY_REDIS_HOST: localhost
137151
OPENTELEMETRY_REDIS_PORT: 6379
152+
ORACLE_HOSTNAME: localhost
153+
ORACLE_PORT: 1521
154+
ORACLE_CONNECTSTRING: localhost:1521/freepdb1
155+
ORACLE_USER: otel
156+
ORACLE_PASSWORD: secret
157+
ORACLE_SERVICENAME: FREEPDB1
138158
POSTGRES_DB: otel_pg_database
139159
POSTGRES_HOST: localhost
140160
POSTGRES_PORT: 5432

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"plugins/node/opentelemetry-instrumentation-mysql2": "0.45.0",
4949
"plugins/node/opentelemetry-instrumentation-nestjs-core": "0.44.0",
5050
"plugins/node/opentelemetry-instrumentation-net": "0.43.0",
51+
"plugins/node/opentelemetry-instrumentation-oracledb": "0.26.0",
5152
"plugins/node/opentelemetry-instrumentation-pg": "0.50.0",
5253
"plugins/node/opentelemetry-instrumentation-pino": "0.46.0",
5354
"plugins/node/opentelemetry-instrumentation-redis": "0.46.0",

metapackages/auto-instrumentations-node/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ registerInstrumentations({
188188
- [@opentelemetry/instrumentation-mysql2](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-mysql2)
189189
- [@opentelemetry/instrumentation-nestjs-core](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-nestjs-core)
190190
- [@opentelemetry/instrumentation-net](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-net)
191+
- [@opentelemetry/instrumentation-oracledb](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-oracledb)
191192
- [@opentelemetry/instrumentation-pg](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-pg)
192193
- [@opentelemetry/instrumentation-pino](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-pino)
193194
- [@opentelemetry/instrumentation-redis](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-redis)

metapackages/auto-instrumentations-node/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"@opentelemetry/instrumentation-mysql2": "^0.45.0",
7777
"@opentelemetry/instrumentation-nestjs-core": "^0.44.0",
7878
"@opentelemetry/instrumentation-net": "^0.43.0",
79+
"@opentelemetry/instrumentation-oracledb": "^0.26.0",
7980
"@opentelemetry/instrumentation-pg": "^0.50.0",
8081
"@opentelemetry/instrumentation-pino": "^0.46.0",
8182
"@opentelemetry/instrumentation-redis": "^0.46.0",

metapackages/auto-instrumentations-node/src/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import { MySQL2Instrumentation } from '@opentelemetry/instrumentation-mysql2';
4646
import { MySQLInstrumentation } from '@opentelemetry/instrumentation-mysql';
4747
import { NestInstrumentation } from '@opentelemetry/instrumentation-nestjs-core';
4848
import { NetInstrumentation } from '@opentelemetry/instrumentation-net';
49+
import { OracleInstrumentation } from '@opentelemetry/instrumentation-oracledb';
4950
import { PgInstrumentation } from '@opentelemetry/instrumentation-pg';
5051
import { PinoInstrumentation } from '@opentelemetry/instrumentation-pino';
5152
import { RedisInstrumentation as RedisInstrumentationV2 } from '@opentelemetry/instrumentation-redis';
@@ -124,6 +125,7 @@ const InstrumentationMap = {
124125
'@opentelemetry/instrumentation-mysql': MySQLInstrumentation,
125126
'@opentelemetry/instrumentation-nestjs-core': NestInstrumentation,
126127
'@opentelemetry/instrumentation-net': NetInstrumentation,
128+
'@opentelemetry/instrumentation-oracledb': OracleInstrumentation,
127129
'@opentelemetry/instrumentation-pg': PgInstrumentation,
128130
'@opentelemetry/instrumentation-pino': PinoInstrumentation,
129131
'@opentelemetry/instrumentation-redis': RedisInstrumentationV2,

0 commit comments

Comments
 (0)