Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
luke6Lh43 opened this issue Nov 14, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request never-stale

Comments

@luke6Lh43
Copy link

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

@luke6Lh43 luke6Lh43 added the bug Something isn't working label Nov 14, 2022
@dyladan dyladan added enhancement New feature or request up-for-grabs Good for taking. Extra help will be provided by maintainers and removed bug Something isn't working labels Nov 16, 2022
@dyladan
Copy link
Member

dyladan commented Nov 16, 2022

When this is handled it should be applied to both redis instrumentations

@luke6Lh43
Copy link
Author

When this is handled it should be applied to both redis instrumentations

@dyladan do you mean redis and redis-4, right? Are you ok for me to open PR fot this enhancement?

@dyladan
Copy link
Member

dyladan commented Nov 16, 2022

Yes and yes 😀

@dyladan dyladan removed the up-for-grabs Good for taking. Extra help will be provided by maintainers label Nov 16, 2022
@blumamir
Copy link
Member

When this is handled it should be applied to both redis instrumentations

@dyladan do you mean redis and redis-4, right? Are you ok for me to open PR fot this enhancement?

Also, need to be added to @opentelemetry/instrumentation-ioredis. Could be done in separate PRs

@luke6Lh43 luke6Lh43 changed the title [@opentelemetry/instrumentation-redis-4] The db.redis.database_index argument is not being send to OpenTelemetry collector feat(redis & redis-4): The db.redis.database_index argument is not being send to OpenTelemetry collector Nov 28, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request never-stale
Projects
None yet
Development

No branches or pull requests

3 participants