Skip to content

Commit

Permalink
Add transaction.id to kuery param only when it's defined
Browse files Browse the repository at this point in the history
  • Loading branch information
gbamparop committed Jul 7, 2022
1 parent b46763f commit 6ba1eb4
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 6ba1eb4

Please sign in to comment.