feat(RelayOpenTelemetry): add db.statement attribute#32
feat(RelayOpenTelemetry): add db.statement attribute#32vmihailenco wants to merge 5 commits intocachewerk:mainfrom
Conversation
8c54ec6 to
3cb67e4
Compare
3cb67e4 to
1fdda35
Compare
| ->setAttribute('db.operation', $operation) | ||
| ->setAttribute('db.statement', $stmt) |
There was a problem hiding this comment.
This won't work with __construct() and connect() and some other, which aren't Redis commands, but Relay specific methods.
There was a problem hiding this comment.
"This" is db.statement? Why it does work for db.operation?
There was a problem hiding this comment.
That's also sending invalid data currently. We're working on the stubs to make this easier.
There was a problem hiding this comment.
This will make it easier to identify various types of methods: https://relay.so/api
There was a problem hiding this comment.
Okay, sounds like I should wait for some input from you.
There was a problem hiding this comment.
@vmihailenco: We're exploring whether we can use 8.0 attributes in the class stubs. If so we could use reflection to check whether a method should be bypassed (setOption()), should be traced (connect()) or whether it's a Redis command (mget()).
Instead of maintaining arrays of functions we could parse all class methods once, or each method once when it's executed.
There was a problem hiding this comment.
Thanks for update. Let me know what changes do you expect here.
My 5 cents are that I would not worry about this. I'd say that tracing connect is the right thing to do and having setOption also would not hurt. Are you worried about having db.statement on such spans? Again, I don't see what real issues that causes.,,
b694216 to
8c20a1c
Compare
|
Closing in favor of 21f4e06. |


There probably should be a way to disable this attribute in case the value is too large, but I am not sure how the API should look like so I left it for a future PR.