Skip to content

[APM] Highlight selected bucket in transaction bucket distribution#26266

Merged
sorenlouv merged 1 commit intoelastic:masterfrom
sorenlouv:show-selected-bucket
Nov 28, 2018
Merged

[APM] Highlight selected bucket in transaction bucket distribution#26266
sorenlouv merged 1 commit intoelastic:masterfrom
sorenlouv:show-selected-bucket

Conversation

@sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Nov 27, 2018

Closes #24740

This fixes the issue with highlighting the currently viewed transaction sample in the histogram. By supplying the transactionId to 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.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

{ term: { [PROCESSOR_EVENT]: 'transaction' } }
]
],
should: [{ term: { [TRANSACTION_SAMPLED]: true } }]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just something we missed from before but unrelated to this ticket right? (Cool to do that here just making sure I understand)

Copy link
Member Author

@sorenlouv sorenlouv Nov 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yeah, we should probably have added it in the beginning.

} = req.query as {
transaction_name: string;
transaction_id: string;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show currently selected bucket in transaction group page histogram

4 participants