🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@opentelemetry/instrumentation-oracledb

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-oracledb

OpenTelemetry instrumentation for `oracledb` database client for Oracle DB

0.27.0
latest
Source
npm
Version published
Weekly downloads
114K
231.08%
Maintainers
3
Weekly downloads
 
Created
Source

OpenTelemetry oracledb Instrumentation for Node.js

NPM Published Version Apache License

This module provides automatic instrumentation for the oracledb module, which may be loaded using the @opentelemetry/sdk-trace-node package and is included in the @opentelemetry/auto-instrumentations-node bundle.

If total installation size is not constrained, it is recommended to use the @opentelemetry/auto-instrumentations-node bundle with @opentelemetry/sdk-node for the most seamless instrumentation experience.

Compatible with OpenTelemetry JS API and SDK 1.0+.

Installation

npm install --save @opentelemetry/instrumentation-oracledb

Supported Versions

  • oracledb versions >=6.7.0 <7

Usage

OpenTelemetry OracleInstrumentation allows the user to automatically collect trace data and export them to the backend of choice, to give observability to distributed systems when working with oracledb. This module works with both Thin and Thick modes of the oracledb package, although there may be some caveats with Thick Mode now, which are listed in a later paragraph.

To load a specific plugin (OracleInstrumentation in this case), specify it in the configuration of the registerInstrumentations object.

const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { OracleInstrumentation } = require('@opentelemetry/instrumentation-oracledb');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

const provider = new NodeTracerProvider();
provider.register();

registerInstrumentations({
  instrumentations: [
    new OracleInstrumentation(),
  ],
})

Caveats with oracledb Thick mode:

  • RoundTrip Spans will not appear for Thick Mode
  • Hostname will not be available in Thick Mode

Oracle Instrumentation Options

OptionsTypeDefaultDescription
enhancedDatabaseReportingbooleanfalseIf true, details about the sql statement's bind values (being set on parameters db.operation.parameter.<key>) and the sql string (being set on parameter db.query.text) will be attached to the spans generated
dbStatementDumpbooleanfalseIf true, db.query.text will contain the sql string in the spans generated
requestHookOracleInstrumentationExecutionRequestHook (function)Function for adding custom span attributes using information about the data for the sql statement being executed
responseHookOracleInstrumentationExecutionResponseHook (function)Function for adding custom span attributes from the db response
requireParentSpanbooleanfalseIf true, requires a parent span to create new spans

License

Apache 2.0 - See LICENSE for more information.

Keywords

instrumentation

FAQs

Package last updated on 15 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts