-
Notifications
You must be signed in to change notification settings - Fork 312
Add phantom instrumentation #1515
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
Conversation
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.
We definitely want to add in latestDepTest
and clean up commented out code but otherwise this is looking good. Thanks
|
||
where: | ||
id | cmd | cql | ec | ||
UUID.randomUUID() | insertBook | "UPDATE books.books SET title = 'Programming in Scala', author = 'Odersky' WHERE id = " + id + ";" | scala.concurrent.ExecutionContext$.MODULE$.global() |
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.
Is the cassandra instrumentation adding in the query parameters here, or is this the phantom instrumentation? If it's phantom we we would not want to do that by default. We don't want users potentially sending secrets to us without realizing it
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 was wondering about this. Is there something in the cassandra instrumentation that avoids this issue?
testCompile deps.scala | ||
testCompile group: 'org.scala-lang', name: 'scala-reflect', version: '2.11.12' | ||
testCompile group: 'org.cassandraunit', name: 'cassandra-unit', version: '3.11.2.0' | ||
} |
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.
Generally we like to have a latestDepTest task that would test the latest version of phantom that this instrumentation supports
apply from: "${rootDir}/gradle/test-with-scala.gradle" | ||
|
||
apply plugin: 'org.unbroken-dome.test-sets' | ||
|
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.
Ah, I missed this. We also need a muzzle check. This gives us a test that the instrumentation activates when we expect it to, and optionally doesn't activate when we expect it not to
@devinsba Can you help me understand why I get the error |
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.
- Can't use a static port or it's fail in CI
- Run
./gradlew googleJavaFormat
to fix formatting
@Shared | ||
Cluster cluster | ||
@Shared | ||
int port = 9142 |
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.
int port = 9142 | |
int port = PortUtils.randomOpenPort(); |
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.
Updated to use random port
@michaelpigg Do you need help finishing this up? |
@tylerbenson I think my main issue is #1515 (comment). I can't figure out why the phantom span doesn't seem to finish cleanly. The scope manager thinks it's still active when the test tries to close the "parent" span. |
@michaelpigg thanks for the update. @devinsba will take a look at this next week. |
@michaelpigg checking this morning |
@michaelpigg can we close this in favor of #1665 since that seems to be the underlying problem? |
@tylerbenson Closing for now. May want to bring it back at some point. |
Adding support for Scala Phantom library https://github.com/outworkers/phantom
Strategy is to add a completion listener to the Future returned from the
future
method.TODO: