-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[APM] Don’t include UI filters when fetching a specific transaction #57934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,7 +64,7 @@ export async function getErrorGroup({ | |
|
|
||
| let transaction; | ||
| if (transactionId && traceId) { | ||
| transaction = await getTransaction(transactionId, traceId, setup); | ||
| transaction = await getTransaction({ transactionId, traceId, setup }); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using destructuring for consistency with other functions. |
||
| } | ||
|
|
||
| return { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,12 +18,16 @@ import { | |
| } from '../../helpers/setup_request'; | ||
| import { ProcessorEvent } from '../../../../common/processor_event'; | ||
|
|
||
| export async function getTransaction( | ||
| transactionId: string, | ||
| traceId: string, | ||
| setup: Setup & SetupTimeRange & SetupUIFilters | ||
| ) { | ||
| const { start, end, uiFiltersES, client, indices } = setup; | ||
| export async function getTransaction({ | ||
| transactionId, | ||
| traceId, | ||
| setup | ||
| }: { | ||
| transactionId: string; | ||
| traceId: string; | ||
| setup: Setup & SetupTimeRange & SetupUIFilters; | ||
| }) { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I converted the function signature to use a destructured object. Therefore the noise. |
||
| const { start, end, client, indices } = setup; | ||
|
|
||
| const params = { | ||
| index: indices['apm_oss.transactionIndices'], | ||
|
|
@@ -35,8 +39,7 @@ export async function getTransaction( | |
| { term: { [PROCESSOR_EVENT]: ProcessorEvent.transaction } }, | ||
| { term: { [TRANSACTION_ID]: transactionId } }, | ||
| { term: { [TRACE_ID]: traceId } }, | ||
| { range: rangeFilter(start, end) }, | ||
| ...uiFiltersES | ||
| { range: rangeFilter(start, end) } | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reviewer, look here: this is the meat of the PR. |
||
| ] | ||
| } | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collapsed these for readability and changed
term: { 'service.environment': 'prod' }toterm: { 'my.custom.ui.filter': 'foo-bar'to make it clear in the snapshots that it's the ui filter value.