fix: statistics span data (#395)

This commit is contained in:
Starry 2024-05-18 13:45:02 +08:00 committed by GitHub
parent 9001a96128
commit 88dbee311c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -54,11 +54,11 @@ limitations under the License. -->
const result: StatisticsSpan[] = [];
const map = traceTable.changeStatisticsTree(data);
map.forEach((nodes, nodeKey) => {
const nodeKeyData = nodeKey.split(":");
const lastColonIndex = nodeKey.lastIndexOf(":");
result.push(
getSpanGroupData(nodes, {
endpointName: nodeKeyData[0],
type: nodeKeyData[1],
endpointName: nodeKey.slice(0, lastColonIndex),
type: nodeKey.slice(lastColonIndex + 1),
}),
);
});