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

Add db.redis.arguments for requests and responses #2908

Closed
haddasbronfman opened this issue Oct 30, 2022 · 7 comments
Closed

Add db.redis.arguments for requests and responses #2908

haddasbronfman opened this issue Oct 30, 2022 · 7 comments
Labels
[label deprecated] triaged-needmoreinfo [label deprecated] The issue is triaged - the OTel community needs more information to decide spec:trace Related to the specification/trace directory

Comments

@haddasbronfman
Copy link
Member

What are you trying to achieve?

I want to add to the database semantic conventions additional attributes for redis spans.
The value of adding the metadata is to help users get more information from the traces which could allow for easier troubleshooting.

I propose the following names for the attribute:

  • db.redis.arguments
@haddasbronfman haddasbronfman added the spec:trace Related to the specification/trace directory label Oct 30, 2022
@carlosalberto
Copy link
Contributor

Hey @haddasbronfman - would you mind mentioning examples/use cases?

@carlosalberto carlosalberto added the [label deprecated] triaged-needmoreinfo [label deprecated] The issue is triaged - the OTel community needs more information to decide label Oct 31, 2022
@haddasbronfman
Copy link
Member Author

Hi, sure:
example 1 - hset command:
attributes: { 'db.system': 'redis', 'db.statement': 'hset', 'db.redis.arguments': '["myhash","key1","value1"]', }

example 2 - hgetall command:
attributes: { 'db.system': 'redis', 'db.statement': 'hgetall', 'db.redis.arguments': '["myhash"]', }

example 3 - hkeys command:
attributes: { 'db.system': 'redis', 'db.statement': 'hkeys', 'db.redis.arguments': '["myhash"]', }

example 4 - hget command:
attributes: { 'db.system': 'redis', 'db.statement': 'hget', 'db.redis.arguments': '["myhash","key1"]', }

example 5 - del command:
attributes: { 'db.system': 'redis', 'db.statement': 'del', 'db.redis.arguments': '["key1"]', }

@tigrannajaryan
Copy link
Member

Does this need to be Redis specific? I see for example a very similar request that is more generic: https://cloud-native.slack.com/archives/C01N7PP1THC/p1668007675690439

@haddasbronfman
Copy link
Member Author

I wrote it specifically for Redis, but you're right there might be more databases that this attribute can fit to.
How can we proceed from here?

@tigrannajaryan
Copy link
Member

I wrote it specifically for Redis, but you're right there might be more databases that this attribute can fit to. How can we proceed from here?

See if you can generalize it and make applicable to other database and name appropriately (e.g. db.statement_arguments or similar).

@tigrannajaryan tigrannajaryan removed their assignment Nov 10, 2022
@carlosalberto
Copy link
Contributor

So in theory we should be reporting the arguments as part of the statement, as per the Spec:

SELECT * FROM wuser_table; SET mykey "WuValue"

So we should poke the instrumentation authors. @haddasbronfman what instrumentation/language/version are you using?

@haddasbronfman
Copy link
Member Author

@carlosalberto you're right. I opened this issue: open-telemetry/opentelemetry-js-contrib#1294
to handle this.
We can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[label deprecated] triaged-needmoreinfo [label deprecated] The issue is triaged - the OTel community needs more information to decide spec:trace Related to the specification/trace directory
Projects
None yet
Development

No branches or pull requests

3 participants