Socket
Socket
Sign inDemoInstall

@opentelemetry/instrumentation-ioredis

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-ioredis - npm Package Compare versions

Comparing version 0.42.0 to 0.43.0

4

build/src/instrumentation.d.ts
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import { IORedisInstrumentationConfig } from './types';
export declare class IORedisInstrumentation extends InstrumentationBase {
protected _config: IORedisInstrumentationConfig;
export declare class IORedisInstrumentation extends InstrumentationBase<IORedisInstrumentationConfig> {
constructor(config?: IORedisInstrumentationConfig);
setConfig(config?: IORedisInstrumentationConfig): void;
init(): InstrumentationNodeModuleDefinition[];

@@ -7,0 +7,0 @@ /**

@@ -31,4 +31,7 @@ "use strict";

constructor(config = {}) {
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, Object.assign({}, DEFAULT_CONFIG, config));
super(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION, Object.assign(Object.assign({}, DEFAULT_CONFIG), config));
}
setConfig(config = {}) {
super.setConfig(Object.assign(Object.assign({}, DEFAULT_CONFIG), config));
}
init() {

@@ -80,5 +83,5 @@ return [

const config = instrumentation.getConfig();
const dbStatementSerializer = (config === null || config === void 0 ? void 0 : config.dbStatementSerializer) || redis_common_1.defaultDbStatementSerializer;
const dbStatementSerializer = config.dbStatementSerializer || redis_common_1.defaultDbStatementSerializer;
const hasNoParentSpan = api_1.trace.getSpan(api_1.context.active()) === undefined;
if ((config === null || config === void 0 ? void 0 : config.requireParentSpan) === true && hasNoParentSpan) {
if (config.requireParentSpan === true && hasNoParentSpan) {
return original.apply(this, arguments);

@@ -93,4 +96,5 @@ }

});
if (config === null || config === void 0 ? void 0 : config.requestHook) {
(0, instrumentation_2.safeExecuteInTheMiddle)(() => config === null || config === void 0 ? void 0 : config.requestHook(span, {
const { requestHook } = config;
if (requestHook) {
(0, instrumentation_2.safeExecuteInTheMiddle)(() => requestHook(span, {
moduleVersion,

@@ -116,3 +120,3 @@ cmdName: cmd.name,

cmd.resolve = function (result) {
(0, instrumentation_2.safeExecuteInTheMiddle)(() => { var _a; return (_a = config === null || config === void 0 ? void 0 : config.responseHook) === null || _a === void 0 ? void 0 : _a.call(config, span, cmd.name, cmd.args, result); }, e => {
(0, instrumentation_2.safeExecuteInTheMiddle)(() => { var _a; return (_a = config.responseHook) === null || _a === void 0 ? void 0 : _a.call(config, span, cmd.name, cmd.args, result); }, e => {
if (e) {

@@ -141,5 +145,5 @@ api_1.diag.error('ioredis instrumentation: response hook failed', e);

return function () {
const config = instrumentation.getConfig();
const hasNoParentSpan = api_1.trace.getSpan(api_1.context.active()) === undefined;
if ((config === null || config === void 0 ? void 0 : config.requireParentSpan) === true && hasNoParentSpan) {
if (instrumentation.getConfig().requireParentSpan === true &&
hasNoParentSpan) {
return original.apply(this, arguments);

@@ -146,0 +150,0 @@ }

@@ -1,3 +0,3 @@

export declare const PACKAGE_VERSION = "0.42.0";
export declare const PACKAGE_VERSION = "0.43.0";
export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-ioredis";
//# sourceMappingURL=version.d.ts.map

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

// this is autogenerated file, see scripts/version-update.js
exports.PACKAGE_VERSION = '0.42.0';
exports.PACKAGE_VERSION = '0.43.0';
exports.PACKAGE_NAME = '@opentelemetry/instrumentation-ioredis';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-ioredis",
"version": "0.42.0",
"version": "0.43.0",
"description": "OpenTelemetry instrumentation for `ioredis` database redis client for Redis",

@@ -53,3 +53,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",

@@ -60,3 +60,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",

@@ -66,3 +66,3 @@ "ioredis": "5.2.2",

"nyc": "15.1.0",
"rimraf": "5.0.5",
"rimraf": "5.0.10",
"sinon": "15.2.0",

@@ -74,8 +74,8 @@ "test-all-versions": "6.1.0",

"dependencies": {
"@opentelemetry/instrumentation": "^0.52.0",
"@opentelemetry/instrumentation": "^0.53.0",
"@opentelemetry/redis-common": "^0.36.2",
"@opentelemetry/semantic-conventions": "^1.23.0"
"@opentelemetry/semantic-conventions": "^1.27.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-ioredis#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

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