Skip to content

Commit

Permalink
Add transaction.id to kuery param only when it's defined (elastic#135896
Browse files Browse the repository at this point in the history
)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
gbamparop and kibanamachine authored Jul 7, 2022
1 parent 0573c83 commit a1b68e4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,17 @@ function RelatedErrors({
'/traces/explorer'
);

let kuery = `${TRACE_ID} : "${item.doc.trace.id}"`;
if (item.doc.transaction?.id) {
kuery += ` and ${TRANSACTION_ID} : "${item.doc.transaction?.id}"`;
}

const href = apmRouter.link(`/services/{serviceName}/errors`, {
path: { serviceName: item.doc.service.name },
query: {
...query,
serviceGroup: '',
kuery: `${TRACE_ID} : "${item.doc.trace.id}" and ${TRANSACTION_ID} : "${item.doc.transaction?.id}"`,
kuery,
},
});

Expand Down

0 comments on commit a1b68e4

Please sign in to comment.