[APM] Highlight selected bucket in transaction bucket distribution#26266
[APM] Highlight selected bucket in transaction bucket distribution#26266sorenlouv merged 1 commit intoelastic:masterfrom
Conversation
💚 Build Succeeded |
| { term: { [PROCESSOR_EVENT]: 'transaction' } } | ||
| ] | ||
| ], | ||
| should: [{ term: { [TRANSACTION_SAMPLED]: true } }] |
There was a problem hiding this comment.
This is just something we missed from before but unrelated to this ticket right? (Cool to do that here just making sure I understand)
There was a problem hiding this comment.
It's sorta related to this ticket, since without this clicking on an item in Trace overview might take the user to a bucket without a sample on the transaction groups page - and thus the bucket won't be highlighted.
There was a problem hiding this comment.
But yeah, we should probably have added it in the beginning.
| } = req.query as { | ||
| transaction_name: string; | ||
| transaction_id: string; | ||
| }; |
There was a problem hiding this comment.
The typescript destructuring can be a bit harder to read. Could be made simple to replace the above 7 lines with the following 2 lines:
const transactionName: string = query.transaction_name;
const transactionId: string = query.transaction_id;
There was a problem hiding this comment.
Good point. I'm actually fixing this and a few other bits in another PR. Is it okay I leave as-is here, and fix it in the next PR?
Closes #24740
This fixes the issue with highlighting the currently viewed transaction sample in the histogram. By supplying the
transactionIdto the histogram query that specific transaction will be scored higher, and thus returned as a sample for the bucket interval, and we will thereby automatically highlight it on the client.