Skip to content

feat(redis & redis-4): The db.redis.database_index argument is not being send to OpenTelemetry collector #1288

Open
@luke6Lh43

Description

@luke6Lh43

What version of OpenTelemetry are you using?

InstrumentationScope @opentelemetry/instrumentation-redis-4 0.33.0

What version of Node are you using?

v16.18.0

What did you do?

This issue is related to another one which I opened in python repository link I've been recently playing with OpenTelemetry for Node.js (Express) application and noticed that for Redis db.redis.database_index argument is not being send to OpenTelemetry collector.

===> NODEJS EXAMPLE

ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope @opentelemetry/instrumentation-redis-4 0.33.0
Span #0
Trace ID : 21a071f4d1d7c860ecb758398d304f60
Parent ID : 1bbf5328c079ceda
ID : 13dc47b2521f7f82
Name : redis-GET
Kind : SPAN_KIND_CLIENT
Start time : 2022-10-21 09:47:16.9553723 +0000 UTC
End time : 2022-10-21 09:47:16.957585 +0000 UTC
Status code : STATUS_CODE_UNSET
Status message :
Attributes:
-> db.system: STRING(redis)
-> net.peer.name: STRING(redis-svc)
-> net.peer.port: INT(6379)
-> db.statement: STRING(GET)
ResourceSpans open-telemetry/opentelemetry-python-contrib#4
Resource SchemaURL:
Resource labels:
-> service.name: STRING(nodejs-redis)
-> telemetry.sdk.language: STRING(nodejs)
-> telemetry.sdk.name: STRING(opentelemetry)
-> telemetry.sdk.version: STRING(0.24.0)

It may be a problem in a scenario when multiple Redis databases are used and we want to differentiate it in some backend (e.g. on a flow map).

According to this document, we should send db.redis.database_index argument to OTel collector/backend.

What did you expect to see?

The db.redis.database_index is being sent to OTel collector/backend.

What did you see instead?

The db.redis.database_index is not being send to OTel collector/backend.

@svrnm

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions