-
Notifications
You must be signed in to change notification settings - Fork 226
feat: support meta protocol instrumentation #1480
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: support meta protocol instrumentation #1480
Conversation
112ec4b to
4fe2450
Compare
kaylareopelle
left a comment
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.
Hi @nickamorim! Thanks for your contribution!
There's a comment in the server patch that should be updated too:
Line 11 in f631a26
| # Module to prepend to Dalli::Server (or Dalli::Protocol::Binary in 3.0+) for instrumentation |
I wonder if we should rename the patch now that it applies to so many different classes?
| ::Dalli::Server.prepend(Patches::Server) | ||
| else | ||
| ::Dalli::Protocol::Binary.prepend(Patches::Server) | ||
| ::Dalli::Protocol::Meta.prepend(Patches::Server) if defined?(::Dalli::Protocol::Meta) |
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.
The tests currently run on the default protocol.
Line 18 in 06c8de0
| let(:dalli) { Dalli::Client.new("#{host}:#{port}", {}) } |
In the latest version, this should default to binary. Now that the protocol could be :binary or :meta, what do you think about updating the tests to run on a :meta protocol?
I'm not exactly sure what this would look like but it seems that
|
1051959 to
b12e3f8
Compare
* feat: support meta protocol instrumentation * test: dalli meta and binary protocol instrumentation support --------- Co-authored-by: Robert <[email protected]>
* feat: support meta protocol instrumentation * test: dalli meta and binary protocol instrumentation support --------- Co-authored-by: Robert <[email protected]>
Description
Dalli supports Memcached's meta protocol as of 3.2.0. This PR adds support for instrumentation when clients are using the meta protocol.