Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/instrumentation-redis-4

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/instrumentation-redis-4 - npm Package Compare versions

Comparing version 0.35.6 to 0.36.0

build/src/internal-types.d.ts

1

build/src/instrumentation.d.ts

@@ -17,4 +17,5 @@ import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';

private _traceClientCommand;
private _endSpansWithRedisReplies;
private _endSpanWithResponse;
}
//# sourceMappingURL=instrumentation.d.ts.map

43

build/src/instrumentation.js

@@ -179,18 +179,3 @@ "use strict";

const openSpans = this[OTEL_OPEN_SPANS];
if (!openSpans) {
return plugin._diag.error('cannot find open spans to end for redis multi command');
}
if (redisRes.length !== openSpans.length) {
return plugin._diag.error('number of multi command spans does not match response from redis');
}
for (let i = 0; i < openSpans.length; i++) {
const { span, commandName, commandArgs } = openSpans[i];
const currCommandRes = redisRes[i];
if (currCommandRes instanceof Error) {
plugin._endSpanWithResponse(span, commandName, commandArgs, null, currCommandRes);
}
else {
plugin._endSpanWithResponse(span, commandName, commandArgs, currCommandRes, undefined);
}
}
plugin._endSpansWithRedisReplies(openSpans, redisRes);
return redisRes;

@@ -201,7 +186,9 @@ })

if (!openSpans) {
return plugin._diag.error('cannot find open spans to end for redis multi command');
plugin._diag.error('cannot find open spans to end for redis multi command');
}
for (let i = 0; i < openSpans.length; i++) {
const { span, commandName, commandArgs } = openSpans[i];
plugin._endSpanWithResponse(span, commandName, commandArgs, null, err);
else {
const replies = err.constructor.name === 'MultiErrorReply'
? err.replies
: new Array(openSpans.length).fill(err);
plugin._endSpansWithRedisReplies(openSpans, replies);
}

@@ -316,2 +303,18 @@ return Promise.reject(err);

}
_endSpansWithRedisReplies(openSpans, replies) {
if (!openSpans) {
return this._diag.error('cannot find open spans to end for redis multi command');
}
if (replies.length !== openSpans.length) {
return this._diag.error('number of multi command spans does not match response from redis');
}
for (let i = 0; i < openSpans.length; i++) {
const { span, commandName, commandArgs } = openSpans[i];
const currCommandRes = replies[i];
const [res, err] = currCommandRes instanceof Error
? [null, currCommandRes]
: [currCommandRes, undefined];
this._endSpanWithResponse(span, commandName, commandArgs, res, err);
}
}
_endSpanWithResponse(span, commandName, commandArgs, response, error) {

@@ -318,0 +321,0 @@ if (!error && this._config.responseHook) {

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

export declare const VERSION = "0.35.6";
export declare const VERSION = "0.36.0";
//# sourceMappingURL=version.d.ts.map

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

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.35.6';
exports.VERSION = '0.36.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/instrumentation-redis-4",
"version": "0.35.6",
"version": "0.36.0",
"description": "Automatic OpenTelemetry instrumentation for redis package version 4",

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

"@opentelemetry/context-async-hooks": "^1.8.0",
"@opentelemetry/contrib-test-utils": "^0.35.1",
"@opentelemetry/contrib-test-utils": "^0.36.0",
"@opentelemetry/core": "^1.8.0",

@@ -70,3 +70,3 @@ "@opentelemetry/sdk-trace-base": "^1.8.0",

"dependencies": {
"@opentelemetry/instrumentation": "^0.46.0",
"@opentelemetry/instrumentation": "^0.48.0",
"@opentelemetry/redis-common": "^0.36.1",

@@ -76,3 +76,3 @@ "@opentelemetry/semantic-conventions": "^1.0.0"

"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-redis-4#readme",
"gitHead": "90928231259bbbdf6980f184bc7420503048b77e"
"gitHead": "32204a362d9dffd4cd69a1300e1f7d245df9df52"
}

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