@opentelemetry/instrumentation-redis
Advanced tools
Comparing version 0.38.0 to 0.39.0
@@ -8,3 +8,3 @@ import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation'; | ||
setConfig(config?: RedisInstrumentationConfig): void; | ||
protected init(): InstrumentationNodeModuleDefinition<any>[]; | ||
protected init(): InstrumentationNodeModuleDefinition[]; | ||
/** | ||
@@ -11,0 +11,0 @@ * Patch internal_send_command(...) to trace requests |
@@ -36,4 +36,3 @@ "use strict"; | ||
return [ | ||
new instrumentation_1.InstrumentationNodeModuleDefinition('redis', ['^2.6.0', '^3.0.0'], (moduleExports, moduleVersion) => { | ||
api_1.diag.debug(`Patching redis@${moduleVersion}`); | ||
new instrumentation_1.InstrumentationNodeModuleDefinition('redis', ['^2.6.0', '^3.0.0'], moduleExports => { | ||
api_1.diag.debug('Patching redis.RedisClient.internal_send_command'); | ||
@@ -40,0 +39,0 @@ if ((0, instrumentation_1.isWrapped)(moduleExports.RedisClient.prototype['internal_send_command'])) { |
@@ -73,4 +73,4 @@ "use strict"; | ||
attributes: { | ||
[semantic_conventions_1.SemanticAttributes.DB_SYSTEM]: semantic_conventions_1.DbSystemValues.REDIS, | ||
[semantic_conventions_1.SemanticAttributes.DB_STATEMENT]: dbStatementSerializer(cmd.command, cmd.args), | ||
[semantic_conventions_1.SEMATTRS_DB_SYSTEM]: semantic_conventions_1.DBSYSTEMVALUES_REDIS, | ||
[semantic_conventions_1.SEMATTRS_DB_STATEMENT]: dbStatementSerializer(cmd.command, cmd.args), | ||
}, | ||
@@ -81,8 +81,8 @@ }); | ||
span.setAttributes({ | ||
[semantic_conventions_1.SemanticAttributes.NET_PEER_NAME]: this.options.host, | ||
[semantic_conventions_1.SemanticAttributes.NET_PEER_PORT]: this.options.port, | ||
[semantic_conventions_1.SEMATTRS_NET_PEER_NAME]: this.options.host, | ||
[semantic_conventions_1.SEMATTRS_NET_PEER_PORT]: this.options.port, | ||
}); | ||
} | ||
if (this.address) { | ||
span.setAttribute(semantic_conventions_1.SemanticAttributes.DB_CONNECTION_STRING, `redis://${this.address}`); | ||
span.setAttribute(semantic_conventions_1.SEMATTRS_DB_CONNECTION_STRING, `redis://${this.address}`); | ||
} | ||
@@ -89,0 +89,0 @@ const originalCallback = arguments[0].callback; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.38.0"; | ||
export declare const VERSION = "0.39.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.38.0'; | ||
exports.VERSION = '0.39.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/instrumentation-redis", | ||
"version": "0.38.0", | ||
"version": "0.39.0", | ||
"description": "Automatic OpenTelemetry instrumentation for redis package version 2 and 3", | ||
@@ -53,3 +53,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", | ||
@@ -70,8 +70,8 @@ "@opentelemetry/sdk-trace-node": "^1.8.0", | ||
"dependencies": { | ||
"@opentelemetry/instrumentation": "^0.50.0", | ||
"@opentelemetry/redis-common": "^0.36.1", | ||
"@opentelemetry/semantic-conventions": "^1.0.0" | ||
"@opentelemetry/instrumentation": "^0.51.0", | ||
"@opentelemetry/redis-common": "^0.36.2", | ||
"@opentelemetry/semantic-conventions": "^1.22.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-redis#readme", | ||
"gitHead": "17a0bc1da3baa472ba9b867eee3c60730cc130fb" | ||
"gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973" | ||
} |
@@ -77,2 +77,16 @@ # OpenTelemetry redis Instrumentation for Node.js | ||
## Semantic Conventions | ||
This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) | ||
Attributes collected: | ||
| Attribute | Short Description | | ||
|------------------------|--------------------------------------------------------------| | ||
| `db.connection_string` | URL to Redis server address, of the form `redis://host:port` | | ||
| `db.statement` | Executed Redis statement | | ||
| `db.system` | Database identifier; always `redis` | | ||
| `net.peer.name` | Hostname or IP of the connected Redis server | | ||
| `net.peer.port` | Port of the connected Redis server | | ||
## Useful links | ||
@@ -79,0 +93,0 @@ |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56104
106
338
+ Added@opentelemetry/api-logs@0.51.1(transitive)
+ Added@opentelemetry/instrumentation@0.51.1(transitive)
+ Addedacorn-import-attributes@1.9.5(transitive)
+ Addedimport-in-the-middle@1.7.4(transitive)
- Removed@opentelemetry/api-logs@0.50.0(transitive)
- Removed@opentelemetry/instrumentation@0.50.0(transitive)
- Removedacorn-import-assertions@1.9.0(transitive)
- Removedimport-in-the-middle@1.7.1(transitive)