Skip to content

Commit

Permalink
fix!(ioredis): net.peer.ip -> db.connection_string (#917)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
  • Loading branch information
trask and dyladan committed Feb 25, 2022
1 parent 5529261 commit 986c349
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class IORedisInstrumentation extends InstrumentationBase<
span.setAttributes({
[SemanticAttributes.NET_PEER_NAME]: host,
[SemanticAttributes.NET_PEER_PORT]: port,
[SemanticAttributes.NET_PEER_IP]: `redis://${host}:${port}`,
[SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`,
});

try {
Expand Down Expand Up @@ -195,7 +195,7 @@ export class IORedisInstrumentation extends InstrumentationBase<
span.setAttributes({
[SemanticAttributes.NET_PEER_NAME]: host,
[SemanticAttributes.NET_PEER_PORT]: port,
[SemanticAttributes.NET_PEER_IP]: `redis://${host}:${port}`,
[SemanticAttributes.DB_CONNECTION_STRING]: `redis://${host}:${port}`,
});
try {
const client = original.apply(this, arguments);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const DEFAULT_ATTRIBUTES = {
[SemanticAttributes.DB_SYSTEM]: IORedisInstrumentation.DB_SYSTEM,
[SemanticAttributes.NET_PEER_NAME]: CONFIG.host,
[SemanticAttributes.NET_PEER_PORT]: CONFIG.port,
[SemanticAttributes.NET_PEER_IP]: URL,
[SemanticAttributes.DB_CONNECTION_STRING]: URL,
};

const unsetStatus: SpanStatus = {
Expand Down

0 comments on commit 986c349

Please sign in to comment.