-
Notifications
You must be signed in to change notification settings - Fork 207
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
Adding support for multiple DCs #416
base: master
Are you sure you want to change the base?
Conversation
@@ -86,6 +86,28 @@ | |||
end | |||
end | |||
|
|||
describe "#configure" do |
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.
@ryakh This looks fine to me. I'm wondering if you can create a small test that pushes some data back and forth in both of these cases, so we all can be sure it works?
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.
+1
lib/cequel/metal/keyspace.rb
Outdated
def extract_cassandra_options(configuration) | ||
configuration[:cassandra_options] | ||
end | ||
|
||
def extract_datacenter(configuration) | ||
configuration.fetch(:datacenter, nil) |
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.
I'd prefer just configuration[:datacenter]
56ab0ec
to
5107227
Compare
Cequel is trying to work around the potential that ActiveSupport's Module.delegate monkey patch exists. It reset's Forwardable's delegate method to use ActiveSupport's delegate method definition. But with Ruby 3 no longer handling mixed positional and keyword args, this monkey patch no longer works. We've updated to handle the kwargs.
AM-493: Monkey patch Util::Forwardable to work with Ruby 3 kwargs
It makes it *highly* non-obvious how instrumentation is actually happening / being set up. Instead move it into a `Cequel::Metal::DatadogInstrumentation.instrument!` method, which we can call in the midst of setting up all other datadog instrumentation.
As we attempt to migrate to Datadog, we need Cassandra instrumentation to match what we currently use in New Relic. Follow along with the built in New Relic instrumentation, but using Datadog's APIs. Caveat: The existing New Relic instrumentation attempts to patch the client code automatically based on if attempting to load the new relic library "works". We don't want to do this with Datadog. It makes the instrumentation "appear out of nowhere" (source: over an hour of me trying to figure out where New Relic instrumentation came from). Instead, do the patching inside of a `Cequel::Metal::DatadogInstrumentation.instrument!` method, which we can call during an initializer along with all other Datadog instrumentation.
Reviving #262
Adding support for multiple DC's with a
DCAwareRoundRobin
load-balancing policy.