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
2
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.34.0 to 0.34.1

10

build/src/instrumentation.js

@@ -22,2 +22,3 @@ "use strict";

const utils_1 = require("./utils");
const redis_common_1 = require("@opentelemetry/redis-common");
const version_1 = require("./version");

@@ -108,2 +109,6 @@ const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");

this._wrap(redisClientPrototype, 'multi', this._getPatchRedisClientMulti());
if (instrumentation_1.isWrapped(redisClientPrototype === null || redisClientPrototype === void 0 ? void 0 : redisClientPrototype.MULTI)) {
this._unwrap(redisClientPrototype, 'MULTI');
}
this._wrap(redisClientPrototype, 'MULTI', this._getPatchRedisClientMulti());
if (instrumentation_1.isWrapped(redisClientPrototype === null || redisClientPrototype === void 0 ? void 0 : redisClientPrototype.sendCommand)) {

@@ -122,2 +127,5 @@ this._unwrap(redisClientPrototype, 'sendCommand');

}
if (instrumentation_1.isWrapped(redisClientPrototype === null || redisClientPrototype === void 0 ? void 0 : redisClientPrototype.MULTI)) {
this._unwrap(redisClientPrototype, 'MULTI');
}
if (instrumentation_1.isWrapped(redisClientPrototype === null || redisClientPrototype === void 0 ? void 0 : redisClientPrototype.sendCommand)) {

@@ -249,3 +257,3 @@ this._unwrap(redisClientPrototype, 'sendCommand');

const commandArgs = redisCommandArguments.slice(1);
const dbStatementSerializer = ((_b = this._config) === null || _b === void 0 ? void 0 : _b.dbStatementSerializer) || utils_1.defaultDbStatementSerializer;
const dbStatementSerializer = ((_b = this._config) === null || _b === void 0 ? void 0 : _b.dbStatementSerializer) || redis_common_1.defaultDbStatementSerializer;
const attributes = utils_1.getClientAttributes(clientOptions);

@@ -252,0 +260,0 @@ try {

2

build/src/utils.d.ts

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

import { DbStatementSerializer } from './types';
export declare const defaultDbStatementSerializer: DbStatementSerializer;
export declare function getClientAttributes(options: any): {

@@ -4,0 +2,0 @@ [x: string]: any;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getClientAttributes = exports.defaultDbStatementSerializer = void 0;
exports.getClientAttributes = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const defaultDbStatementSerializer = cmdName => cmdName;
exports.defaultDbStatementSerializer = defaultDbStatementSerializer;
function getClientAttributes(options) {

@@ -8,0 +21,0 @@ var _a, _b;

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

export declare const VERSION = "0.34.0";
export declare const VERSION = "0.34.1";
//# sourceMappingURL=version.d.ts.map

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

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

@@ -74,6 +74,7 @@ "main": "build/src/index.js",

"@opentelemetry/instrumentation": "^0.34.0",
"@opentelemetry/redis-common": "^0.34.0",
"@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": "59fa57cfd0dff4ae0e6f3833dff73c55dfd79ee5"
"gitHead": "8472e8273d14993a13f921b6f8173b20fb37a383"
}

@@ -56,5 +56,4 @@ # OpenTelemetry redis Instrumentation for Node.js

The instrumentation serializes the command into a Span attribute called
`db.statement`. The default serialization sets the attribute to the command
name, without the command arguments.
The instrumentation serializes the command into a Span attribute called `db.statement`. The standard serialization format attempts to be as informative as possible while avoiding the export of potentially sensitive data. The number of serialized arguments depends on the specific command, see the configuration
list in `@opentelemetry/redis-common`.

@@ -64,3 +63,4 @@ It is also possible to define a custom serialization function. The function

Here is a simple example to serialize the command name and arguments:
Here is a simple example to serialize the command name and all command arguments.
Notice that it might capture sensitive data and big payloads:

@@ -67,0 +67,0 @@ ```javascript

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