@opentelemetry/plugin-redis
Advanced tools
Comparing version
import { BasePlugin } from '@opentelemetry/core'; | ||
import * as redisTypes from 'redis'; | ||
import type * as redisTypes from 'redis'; | ||
export declare class RedisPlugin extends BasePlugin<typeof redisTypes> { | ||
@@ -4,0 +4,0 @@ readonly moduleName: string; |
@@ -1,4 +0,2 @@ | ||
/// <reference types="node" /> | ||
import * as redisTypes from 'redis'; | ||
import { EventEmitter } from 'events'; | ||
import type * as redisTypes from 'redis'; | ||
export interface RedisCommand { | ||
@@ -18,8 +16,2 @@ command: string; | ||
} | ||
export interface RedisPluginStreamTypes { | ||
stream?: { | ||
get(): EventEmitter; | ||
set(val: EventEmitter): void; | ||
}; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
@@ -1,7 +0,7 @@ | ||
import * as redisTypes from 'redis'; | ||
import type * as redisTypes from 'redis'; | ||
import { Tracer } from '@opentelemetry/api'; | ||
import { RedisPluginStreamTypes, RedisPluginClientTypes, RedisCommand } from './types'; | ||
import { RedisCommand, RedisPluginClientTypes } from './types'; | ||
export declare const getTracedCreateClient: (tracer: Tracer, original: Function) => (this: redisTypes.RedisClient) => redisTypes.RedisClient; | ||
export declare const getTracedCreateStreamTrace: (tracer: Tracer, original: Function) => (this: RedisPluginStreamTypes) => any; | ||
export declare const getTracedInternalSendCommand: (tracer: Tracer, original: Function) => (this: redisTypes.RedisClient & RedisPluginClientTypes, cmd?: RedisCommand | undefined) => any; | ||
export declare const getTracedCreateStreamTrace: (tracer: Tracer, original: Function) => (this: redisTypes.RedisClient) => any; | ||
export declare const getTracedInternalSendCommand: (tracer: Tracer, original: Function) => (this: RedisPluginClientTypes, cmd?: RedisCommand | undefined) => any; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -21,3 +21,3 @@ "use strict"; | ||
const redis_1 = require("./redis"); | ||
const enums_1 = require("./enums"); | ||
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions"); | ||
const endSpan = (span, err) => { | ||
@@ -65,4 +65,4 @@ if (err) { | ||
attributes: { | ||
[enums_1.AttributeNames.COMPONENT]: redis_1.RedisPlugin.COMPONENT, | ||
[enums_1.AttributeNames.DB_STATEMENT]: cmd.command, | ||
[semantic_conventions_1.DatabaseAttribute.DB_SYSTEM]: redis_1.RedisPlugin.COMPONENT, | ||
[semantic_conventions_1.DatabaseAttribute.DB_STATEMENT]: cmd.command, | ||
}, | ||
@@ -73,8 +73,8 @@ }); | ||
span.setAttributes({ | ||
[enums_1.AttributeNames.PEER_HOSTNAME]: this.options.host, | ||
[enums_1.AttributeNames.PEER_PORT]: this.options.port, | ||
[semantic_conventions_1.GeneralAttribute.NET_PEER_HOSTNAME]: this.options.host, | ||
[semantic_conventions_1.GeneralAttribute.NET_PEER_PORT]: this.options.port, | ||
}); | ||
} | ||
if (this.address) { | ||
span.setAttribute(enums_1.AttributeNames.PEER_ADDRESS, `redis://${this.address}`); | ||
span.setAttribute(semantic_conventions_1.GeneralAttribute.NET_PEER_ADDRESS, `redis://${this.address}`); | ||
} | ||
@@ -81,0 +81,0 @@ const originalCallback = arguments[0].callback; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.9.0"; | ||
export declare const VERSION = "0.10.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.9.0'; | ||
exports.VERSION = '0.10.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/plugin-redis", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "OpenTelemetry redis automatic instrumentation package.", | ||
@@ -46,11 +46,12 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@opentelemetry/context-async-hooks": "0.10.1", | ||
"@opentelemetry/node": "0.10.1", | ||
"@opentelemetry/test-utils": "^0.9.0", | ||
"@opentelemetry/tracing": "0.10.1", | ||
"@opentelemetry/context-async-hooks": "^0.11.0", | ||
"@opentelemetry/node": "^0.11.0", | ||
"@opentelemetry/semantic-conventions": "^0.11.0", | ||
"@opentelemetry/test-utils": "^0.10.0", | ||
"@opentelemetry/tracing": "^0.11.0", | ||
"@types/mocha": "7.0.2", | ||
"@types/node": "12.12.47", | ||
"@types/redis": "2.8.24", | ||
"@types/node": "14.0.27", | ||
"@types/redis": "2.8.25", | ||
"@types/shimmer": "1.0.1", | ||
"codecov": "3.7.1", | ||
"codecov": "3.7.2", | ||
"cross-env": "7.0.2", | ||
@@ -66,10 +67,10 @@ "gts": "2.0.2", | ||
"tslint-microsoft-contrib": "6.2.0", | ||
"typescript": "3.9.6" | ||
"typescript": "3.9.7" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.10.1", | ||
"@opentelemetry/core": "^0.10.1", | ||
"@opentelemetry/api": "^0.11.0", | ||
"@opentelemetry/core": "^0.11.0", | ||
"shimmer": "^1.2.1" | ||
}, | ||
"gitHead": "44dbe5bfb07e16380a297935a36c9bef109bf42e" | ||
"gitHead": "903ee951bcfe54fb048a76aed5bf1117951605d7" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28177
-6.62%21
5%13
-13.33%273
-16.77%1
Infinity%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated