-
Notifications
You must be signed in to change notification settings - Fork 873
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
Add instrumentation for vertx-sql-client #8311
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.
This is looking good to me! Tricky stuff and hard to get right. I haven't yet internalized if/how vertx sql might have thread reentrance and how that might impact nesting calls.
.../test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientTest.java
Show resolved
Hide resolved
equalTo(NET_PEER_NAME, "localhost"), | ||
equalTo(NET_PEER_PORT, port)))); | ||
} | ||
} |
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 could happen in another PR if you want, but it might be nice to see a second query issued from inside the callback in order to verify the span parentage (depth 2 instead of depth 1).
...o/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientAttributesGetter.java
Outdated
Show resolved
Hide resolved
...pentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientNetAttributesGetter.java
Outdated
Show resolved
Hide resolved
...pentelemetry/javaagent/instrumentation/vertx/v4_0/sql/QueryResultBuilderInstrumentation.java
Outdated
Show resolved
Hide resolved
import io.vertx.sqlclient.SqlConnectOptions; | ||
|
||
// Helper class for accessing virtual field on package private QueryExecutor class. | ||
public class QueryExecutorUtil { |
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.
Hacktastic! ❤️
} | ||
} else if (argument instanceof PromiseInternal) { | ||
promiseInternal = (PromiseInternal) argument; | ||
} |
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.
Looking forward to pattern matching in java one day...... 💤
.../io/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/QueryExecutorInstrumentation.java
Show resolved
Hide resolved
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.
(thx for reviewing @breedx-splk)
Resolves #8292