-
Notifications
You must be signed in to change notification settings - Fork 82
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: Add Redis watcher #293
Feat: Add Redis watcher #293
Conversation
1a85134
to
be6cafb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #293 +/- ##
============================================
- Coverage 84.80% 82.68% -2.12%
- Complexity 947 949 +2
============================================
Files 80 89 +9
Lines 3798 3807 +9
============================================
- Hits 3221 3148 -73
- Misses 577 659 +82
Flags with carried forward coverage won't be shown. Click here to find out more. see 17 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@brettmc How can I improve this PR. |
I think we looked at this in last week's SIG meeting, and this one was good to merge, @ChrisLightfootWild ? |
src/Instrumentation/Laravel/src/Watchers/RedisCommand/RedisCommandWatcher.php
Outdated
Show resolved
Hide resolved
src/Instrumentation/Laravel/src/Watchers/RedisCommand/RedisCommandWatcher.php
Outdated
Show resolved
Hide resolved
src/Instrumentation/Laravel/src/Watchers/RedisCommand/Serializer.php
Outdated
Show resolved
Hide resolved
Apologies for my very delayed response @MilesChou - I did promise to take a look at both of your PRs this week and I have unfortunately only just gotten around to it. Sorry! ❤️ |
…mandWatcher.php Co-authored-by: Chris Lightfoot-Wild <[email protected]>
Don't cause application problem.
TraceAttributes::DB_SYSTEM => TraceAttributeValues::DB_SYSTEM_REDIS, | ||
TraceAttributes::DB_NAME => $this->fetchDbIndex($event->connection), | ||
TraceAttributes::DB_OPERATION => $operationName, | ||
TraceAttributes::DB_QUERY_TEXT => Serializer::serializeCommand($event->command, $event->parameters), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be unavailable in semconv 1.24, which is the target for a 1.0 release (and the last supported version for php 8.0).
Not sure if there is an alternative which might be better suited here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use DB_STATEMENT for compatibility with semconv 1.24.
Call facade
Redis::enableEvents()
before using this watcher.