Socket
Socket
Sign inDemoInstall

@opentelemetry/instrumentation-pg

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-pg - npm Package Compare versions

Comparing version 0.40.0 to 0.41.0

4

build/src/instrumentation.d.ts
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import type * as pgTypes from 'pg';
import type * as pgPoolTypes from 'pg-pool';
import { PgInstrumentationConfig } from './types';
export declare class PgInstrumentation extends InstrumentationBase {
constructor(config?: PgInstrumentationConfig);
protected init(): (InstrumentationNodeModuleDefinition<typeof pgTypes> | InstrumentationNodeModuleDefinition<typeof pgPoolTypes>)[];
protected init(): InstrumentationNodeModuleDefinition[];
setConfig(config?: PgInstrumentationConfig): void;

@@ -9,0 +7,0 @@ getConfig(): PgInstrumentationConfig;

@@ -30,4 +30,3 @@ "use strict";

init() {
const modulePG = new instrumentation_1.InstrumentationNodeModuleDefinition('pg', ['8.*'], (module, moduleVersion) => {
this._diag.debug(`Applying patch for pg@${moduleVersion}`);
const modulePG = new instrumentation_1.InstrumentationNodeModuleDefinition('pg', ['8.*'], (module) => {
const moduleExports = module[Symbol.toStringTag] === 'Module'

@@ -45,7 +44,6 @@ ? module.default // ESM

return module;
}, (module, moduleVersion) => {
}, (module) => {
const moduleExports = module[Symbol.toStringTag] === 'Module'
? module.default // ESM
: module; // CommonJS
this._diag.debug(`Removing patch for pg@${moduleVersion}`);
if ((0, instrumentation_1.isWrapped)(moduleExports.Client.prototype.query)) {

@@ -55,4 +53,3 @@ this._unwrap(moduleExports.Client.prototype, 'query');

});
const modulePGPool = new instrumentation_1.InstrumentationNodeModuleDefinition('pg-pool', ['2.*', '3.*'], (moduleExports, moduleVersion) => {
this._diag.debug(`Applying patch for pg-pool@${moduleVersion}`);
const modulePGPool = new instrumentation_1.InstrumentationNodeModuleDefinition('pg-pool', ['2.*', '3.*'], (moduleExports) => {
if ((0, instrumentation_1.isWrapped)(moduleExports.prototype.connect)) {

@@ -63,4 +60,3 @@ this._unwrap(moduleExports.prototype, 'connect');

return moduleExports;
}, (moduleExports, moduleVersion) => {
this._diag.debug(`Removing patch for pg-pool@${moduleVersion}`);
}, (moduleExports) => {
if ((0, instrumentation_1.isWrapped)(moduleExports.prototype.connect)) {

@@ -67,0 +63,0 @@ this._unwrap(moduleExports.prototype, 'connect');

@@ -1,2 +0,2 @@

export declare const VERSION = "0.40.0";
export declare const VERSION = "0.41.0";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.40.0';
exports.VERSION = '0.41.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-pg",
"version": "0.40.0",
"version": "0.41.0",
"description": "OpenTelemetry postgres automatic instrumentation package.",

@@ -55,3 +55,3 @@ "main": "build/src/index.js",

"@opentelemetry/context-async-hooks": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.38.0",
"@opentelemetry/contrib-test-utils": "^0.39.0",
"@opentelemetry/sdk-trace-base": "^1.8.0",

@@ -75,5 +75,5 @@ "@opentelemetry/sdk-trace-node": "^1.8.0",

"dependencies": {
"@opentelemetry/instrumentation": "^0.50.0",
"@opentelemetry/instrumentation": "^0.51.0",
"@opentelemetry/semantic-conventions": "^1.22.0",
"@opentelemetry/sql-common": "^0.40.0",
"@opentelemetry/sql-common": "^0.40.1",
"@types/pg": "8.6.1",

@@ -83,3 +83,3 @@ "@types/pg-pool": "2.0.4"

"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-pg#readme",
"gitHead": "17a0bc1da3baa472ba9b867eee3c60730cc130fb"
"gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc