Skip to content

Commit d5b0829

Browse files
authored
chore: include execution stats when logging slow query warn message (#133)
* chore: include execution stats when logging slow query warn message * update google protobuf to 3.19.2 * update google protobuf to 3.19.2 in other modules * update google protobuf to 3.19.2 in other modules
1 parent ed668d2 commit d5b0829

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

query-service-api/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ val generateLocalGoGrpcFiles = false
1616

1717
protobuf {
1818
protoc {
19-
artifact = "com.google.protobuf:protoc:3.15.6"
19+
artifact = "com.google.protobuf:protoc:3.19.2"
2020
}
2121
plugins {
2222
// Optional: an artifact spec for a protoc plugin, with "grpc" as
@@ -72,5 +72,5 @@ dependencies {
7272
api("javax.annotation:javax.annotation-api:1.3.2")
7373

7474
testImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
75-
testImplementation("com.google.protobuf:protobuf-java-util:3.15.6")
75+
testImplementation("com.google.protobuf:protobuf-java-util:3.19.2")
7676
}

query-service-impl/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies {
4040
implementation("org.slf4j:slf4j-api:1.7.32")
4141
implementation("commons-codec:commons-codec:1.15")
4242
implementation("org.hypertrace.core.serviceframework:platform-metrics:0.1.33")
43-
implementation("com.google.protobuf:protobuf-java-util:3.15.6")
43+
implementation("com.google.protobuf:protobuf-java-util:3.19.2")
4444
implementation("com.google.guava:guava:30.1.1-jre")
4545
implementation("io.reactivex.rxjava3:rxjava:3.0.11")
4646
implementation("com.squareup.okhttp3:okhttp:4.9.1")

query-service-impl/src/main/java/org/hypertrace/core/query/service/pinot/PinotBasedRequestHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,11 @@ public Observable<Row> handleRequest(
416416
if (requestTimeMs > slowQueryThreshold) {
417417
try {
418418
LOG.warn(
419-
"Query Execution time: {} ms, sqlQuery: {}, queryRequest: {}",
419+
"Query Execution time: {} ms, sqlQuery: {}, queryRequest: {}, executionStats: {}",
420420
requestTimeMs,
421421
pql.getKey(),
422-
protoJsonPrinter.print(request));
422+
protoJsonPrinter.print(request),
423+
resultSetGroup.getExecutionStats());
423424
} catch (InvalidProtocolBufferException ignore) {
424425
}
425426
}

query-service/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies {
1717

1818
runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl:2.17.1")
1919
runtimeOnly("io.grpc:grpc-netty")
20-
integrationTestImplementation("com.google.protobuf:protobuf-java-util:3.17.3")
20+
integrationTestImplementation("com.google.protobuf:protobuf-java-util:3.19.2")
2121
integrationTestImplementation("org.junit.jupiter:junit-jupiter:5.7.1")
2222
integrationTestImplementation("org.testcontainers:testcontainers:1.16.2")
2323
integrationTestImplementation("org.testcontainers:junit-jupiter:1.16.2")

0 commit comments

Comments
 (0)