fix: statistics span data

This commit is contained in:
zhouzixin 2024-05-17 23:11:59 +08:00
parent 9001a96128
commit f1c12b6a33

View File

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