-
Notifications
You must be signed in to change notification settings - Fork 186
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
Integrating Phantom with Opentracing #733
Comments
Hi @wsargent, There's probably a far far easier way to expose this from within phantom, let us think of a way to include it in the next release, sounds like all you need is access to that session initialiser, we can de-couple that implementation and allow you to deal with it from within the phantom builder itself. Regards, |
Thanks! I know that working with a type safe builder pattern can be involved -- what I've done in the past has been to use a trait with an abstract type member Self: so implementations can return the subtype: and not the super type like you'd normally get. (There was a reason I didn't use |
@wsargent Where is the actual line where the tracer gets used? This has now become top priority and we can deliver the functionality as part of phantom, but I can't really tell rom the above code where it's interplaying with Cassandra, I'm guessing that's inside Please let me know if you can so we can push this to prod quickly for you. |
The TracingCluster is part of the opentracing-cassandra-driver, so I've been mapping everything out through there. OpentracingCassandraConnection is my rendering of https://github.com/outworkers/phantom/blob/develop/phantom-connectors/src/main/scala/com/outworkers/phantom/connectors/CassandraConnection.scala |
Hi @wsargent This is becoming a priority on our part soon. However, I don't really like all the open tracing code, because it's got things that work around query strings, which is necessary in the raw driver but not so much in Phantom, because we actually have complex ADTs to model all CQL data-structures and things like that. Query generation is an afterthought from the DSL structures, so we wouldn't need most of the code found in the example. It may take a while, but if you could invest some time at least to sanity check the output in follow up PRs, I'm sure we can get this out, I know it's already been more than a while since we last discussed this. |
@alexflav23 if you can point me at them I'll take a look when I have time. Fair warning, it may be a couple of weeks. |
I'm looking to see how to integrate the java-cassandra-driver for opentracing with Phantom.
The Java API expects to wrap Cluster, and takes an Initializer:
https://github.com/opentracing-contrib/java-cassandra-driver#usage
But there doesn't seem to be an accessible way to do this from Phantom -- the closest I've found is extend the SessionProvider:
But from there, it doesn't seem practical to swap out the SessionProvider instantiation. I can't map it through the Cluster.Builder as the API expects the end result.
So where I am right now is...
The text was updated successfully, but these errors were encountered: