Skip to content

Commit b1d69fd

Browse files
authored
Fix analysis tracing profiling error (#13372)
1 parent 6b5013a commit b1d69fd

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

docs/en/changes/changes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* Bump up grpc to 1.70.0.
4242
* BanyanDB: support new Index rule type `SKIPPING/TREE`, and update the record `log`'s `trace_id` indexType to `SKIPPING`
4343
* BanyanDB: remove `index-only` from tag setting.
44+
* Fix analysis tracing profiling span failure in ES storage.
4445

4546
#### UI
4647

@@ -52,6 +53,7 @@
5253
* Implement the Status API on Settings page.
5354
* Bump vite from 6.2.6 to 6.3.4.
5455
* Enhance async profiling by adding shorter and custom duration options.
56+
* Fix select wrong span to analysis in trace profiling.
5557

5658
#### Documentation
5759

oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/ProfileThreadSnapshotQueryEsDAO.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ protected int querySequenceWithAgg(AggregationBuilder aggregationBuilder,
152152
(Map<String, Object>) response.getAggregations()
153153
.get(ProfileThreadSnapshotRecord.SEQUENCE);
154154

155-
return ((Number) agg.get("value")).intValue();
155+
final Object val = agg.get("value");
156+
// return not found if no snapshot found
157+
if (val == null) {
158+
return -1;
159+
}
160+
return ((Number) val).intValue();
156161
}
157162
}

0 commit comments

Comments
 (0)