Skip to content

Commit

Permalink
Merge pull request #528 from ExpediaDotCom/timeline-sort-fix
Browse files Browse the repository at this point in the history
sort timeline results by timestamp to fix graph bug
  • Loading branch information
mmenindezsegura authored Nov 7, 2019
2 parents 31e5f33 + 9f829c2 commit 41f1ad2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/connectors/traces/haystack/tracesConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ connector.getLatencyCost = (traceId) => {
connector.getTimeline = (query) =>
traceCountsFetcher.fetch(traceCountsRequestBuilder.buildRequest(query)).then((result) => {
const pbTraceCounts = messages.TraceCounts.toObject(false, result);
return pbTraceCountsConverter.toTraceCountsJson(pbTraceCounts);
return pbTraceCountsConverter.toTraceCountsJson(pbTraceCounts)
.sort((a, b) => (a.x - b.x));
});

module.exports = connector;

0 comments on commit 41f1ad2

Please sign in to comment.