@opentelemetry/instrumentation-pg
Advanced tools
Comparing version 0.43.0 to 0.44.0
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
import { PgInstrumentationConfig } from './types'; | ||
export declare class PgInstrumentation extends InstrumentationBase { | ||
export declare class PgInstrumentation extends InstrumentationBase<PgInstrumentationConfig> { | ||
constructor(config?: PgInstrumentationConfig); | ||
protected init(): InstrumentationNodeModuleDefinition[]; | ||
setConfig(config?: PgInstrumentationConfig): void; | ||
getConfig(): PgInstrumentationConfig; | ||
private _getClientConnectPatch; | ||
@@ -9,0 +7,0 @@ private _getClientQueryPatch; |
@@ -64,8 +64,2 @@ "use strict"; | ||
} | ||
setConfig(config = {}) { | ||
this._config = Object.assign({}, config); | ||
} | ||
getConfig() { | ||
return this._config; | ||
} | ||
_getClientConnectPatch() { | ||
@@ -158,4 +152,4 @@ const plugin = this; | ||
} | ||
if (typeof instrumentationConfig.requestHook === 'function' && | ||
queryConfig) { | ||
const { requestHook } = instrumentationConfig; | ||
if (typeof requestHook === 'function' && queryConfig) { | ||
(0, instrumentation_1.safeExecuteInTheMiddle)(() => { | ||
@@ -166,3 +160,3 @@ // pick keys to expose explicitly, so we're not leaking pg package | ||
const connection = { database, host, port, user }; | ||
instrumentationConfig.requestHook(span, { | ||
requestHook(span, { | ||
connection, | ||
@@ -169,0 +163,0 @@ query: { |
@@ -1,3 +0,3 @@ | ||
export declare const PACKAGE_VERSION = "0.43.0"; | ||
export declare const PACKAGE_VERSION = "0.44.0"; | ||
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-pg"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,4 +20,4 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.PACKAGE_VERSION = '0.43.0'; | ||
exports.PACKAGE_VERSION = '0.44.0'; | ||
exports.PACKAGE_NAME = '@opentelemetry/instrumentation-pg'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-pg", | ||
"version": "0.43.0", | ||
"version": "0.44.0", | ||
"description": "OpenTelemetry instrumentation for `pg` and `pg-pool` database client for PostgreSQL", | ||
@@ -56,3 +56,3 @@ "main": "build/src/index.js", | ||
"@opentelemetry/context-async-hooks": "^1.8.0", | ||
"@opentelemetry/contrib-test-utils": "^0.40.0", | ||
"@opentelemetry/contrib-test-utils": "^0.41.0", | ||
"@opentelemetry/sdk-trace-base": "^1.8.0", | ||
@@ -62,3 +62,3 @@ "@opentelemetry/sdk-trace-node": "^1.8.0", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "10.0.18", | ||
"@types/sinon": "10.0.20", | ||
"cross-env": "7.0.3", | ||
@@ -69,3 +69,3 @@ "mocha": "7.2.0", | ||
"pg-pool": "3.4.1", | ||
"rimraf": "5.0.5", | ||
"rimraf": "5.0.10", | ||
"safe-stable-stringify": "^2.4.1", | ||
@@ -78,10 +78,10 @@ "sinon": "15.2.0", | ||
"dependencies": { | ||
"@opentelemetry/instrumentation": "^0.52.0", | ||
"@opentelemetry/semantic-conventions": "^1.22.0", | ||
"@opentelemetry/instrumentation": "^0.53.0", | ||
"@opentelemetry/semantic-conventions": "^1.27.0", | ||
"@opentelemetry/sql-common": "^0.40.1", | ||
"@types/pg": "8.6.1", | ||
"@types/pg-pool": "2.0.4" | ||
"@types/pg-pool": "2.0.6" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-pg#readme", | ||
"gitHead": "ad8436d6a4174f2288cb939080cd4e74da94b0d7" | ||
"gitHead": "9dc58afed8134f95908331bcff35c5d9ec46fe9a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103864
821
+ Added@opentelemetry/api-logs@0.53.0(transitive)
+ Added@opentelemetry/instrumentation@0.53.0(transitive)
+ Added@types/pg-pool@2.0.6(transitive)
- Removed@opentelemetry/api-logs@0.52.1(transitive)
- Removed@opentelemetry/instrumentation@0.52.1(transitive)
- Removed@types/pg-pool@2.0.4(transitive)
Updated@types/pg-pool@2.0.6