You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wankai123 (via GitHub)" <gi...@apache.org> on 2025/09/29 02:06:52 UTC
[PR] Make TraceQueryResponse internal trace return object. [skywalking-banyandb-java-client]
wankai123 opened a new pull request, #100:
URL: https://github.com/apache/skywalking-banyandb-java-client/pull/100
Update license.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make TraceQueryResponse internal trace return object. [skywalking-banyandb-java-client]
Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #100:
URL: https://github.com/apache/skywalking-banyandb-java-client/pull/100
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make TraceQueryResponse internal trace return object. [skywalking-banyandb-java-client]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #100:
URL: https://github.com/apache/skywalking-banyandb-java-client/pull/100#discussion_r2386522228
##########
src/main/java/org/apache/skywalking/banyandb/v1/client/TraceQueryResponse.java:
##########
@@ -43,14 +45,9 @@ public List<BanyandbTrace.Trace> getTraces() {
/**
* Get the trace query execution trace if enabled.
Review Comment:
The method documentation is incomplete. It should specify the return type and describe what the returned Trace object contains, especially since the method signature changed from String to Trace.
```suggestion
* Returns the execution trace of the trace query if enabled.
*
* @return a {@link Trace} object representing the execution trace of the query,
* or {@code null} if execution tracing is not enabled. The returned {@link Trace}
* contains details about the query execution, such as timing and internal operations,
* which can be useful for debugging or performance analysis.
```
##########
src/main/java/org/apache/skywalking/banyandb/v1/client/TraceQueryResponse.java:
##########
@@ -27,9 +27,11 @@
*/
public class TraceQueryResponse {
private final BanyandbTrace.QueryResponse response;
+ private final Trace trace;
TraceQueryResponse(BanyandbTrace.QueryResponse response) {
this.response = response;
+ this.trace = Trace.convertFromProto(response.getTraceQueryResult());
Review Comment:
The trace field is initialized unconditionally, but the original implementation only returned trace data when `response.hasTraceQueryResult()` was true. This could cause issues if the trace query result is not present. Consider adding a null check: `this.trace = response.hasTraceQueryResult() ? Trace.convertFromProto(response.getTraceQueryResult()) : null;`
```suggestion
this.trace = response.hasTraceQueryResult() ? Trace.convertFromProto(response.getTraceQueryResult()) : null;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Make TraceQueryResponse internal trace return object. [skywalking-banyandb-java-client]
Posted by "wankai123 (via GitHub)" <gi...@apache.org>.
wankai123 commented on code in PR #100:
URL: https://github.com/apache/skywalking-banyandb-java-client/pull/100#discussion_r2386530221
##########
src/main/java/org/apache/skywalking/banyandb/v1/client/TraceQueryResponse.java:
##########
@@ -27,9 +27,11 @@
*/
public class TraceQueryResponse {
private final BanyandbTrace.QueryResponse response;
+ private final Trace trace;
TraceQueryResponse(BanyandbTrace.QueryResponse response) {
this.response = response;
+ this.trace = Trace.convertFromProto(response.getTraceQueryResult());
Review Comment:
```
public org.apache.skywalking.banyandb.common.v1.BanyandbCommon.Trace getTraceQueryResult() {
return traceQueryResult_ == null ? org.apache.skywalking.banyandb.common.v1.BanyandbCommon.Trace.getDefaultInstance() : traceQueryResult_;
}
```
won't be null
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org