Skip to content

Commit 494563b

Browse files
committed
chore(redis): remove comments and update README
1 parent 4980fd4 commit 494563b

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

packages/instrumentation-redis/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![NPM Published Version][npm-img]][npm-url]
44
[![Apache License][license-image]][license-image]
55

6-
This module provides automatic instrumentation for the [`redis`](https://github.com/NodeRedis/node_redis) module versions `>=2.6.0 <5`, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
6+
This module provides automatic instrumentation for the [`redis`](https://github.com/NodeRedis/node_redis) module versions `>=2.6.0 <6`, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
77

88
If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.
99

@@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-redis
1717

1818
### Supported Versions
1919

20-
- [`redis`](https://www.npmjs.com/package/redis) versions `>=2.6.0 <5`
20+
- [`redis`](https://www.npmjs.com/package/redis) versions `>=2.6.0 <6`
2121

2222
## Usage
2323

@@ -82,10 +82,13 @@ Attributes collected:
8282
| Attribute | Short Description |
8383
|------------------------|--------------------------------------------------------------|
8484
| `db.connection_string` | URL to Redis server address, of the form `redis://host:port` |
85-
| `db.statement` | Executed Redis statement |
86-
| `db.system` | Database identifier; always `redis` |
87-
| `net.peer.name` | Hostname or IP of the connected Redis server |
88-
| `net.peer.port` | Port of the connected Redis server |
85+
| `db.operation.name` | Redis command name |
86+
| `db.operation.batch.size` | Number of commands in a Redis `MULTI/EXEC` transaction |
87+
| `db.query.text` | The database query being executed |
88+
| `db.system.name` | Database identifier; always `redis` |
89+
| `server.address` | Hostname or IP of the connected Redis server |
90+
| `server.port` | Port of the connected Redis server |
91+
8992

9093
## Useful links
9194

packages/instrumentation-redis/src/v2-v3/instrumentation.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,6 @@ export class RedisInstrumentationV2_V3 extends InstrumentationBase<RedisInstrume
148148
[ATTR_SERVER_PORT]: this.connection_options.port,
149149
});
150150
}
151-
if (this.address) {
152-
// DB_CONNECTION_STRING is deprecated; Replaced by server.address and server.port.
153-
// span.setAttribute(
154-
// SEMATTRS_DB_CONNECTION_STRING,
155-
// `redis://${this.address}`
156-
// );
157-
}
158151

159152
const originalCallback = arguments[0].callback;
160153
if (originalCallback) {

0 commit comments

Comments
 (0)