Skip to content

Commit 1e77b84

Browse files
Merge branch 'master' into newplatform/plugin-gen-paths
2 parents 8ef6f05 + 0340fac commit 1e77b84

File tree

19 files changed

+191
-93
lines changed

19 files changed

+191
-93
lines changed

x-pack/legacy/plugins/apm/public/utils/testHelpers.tsx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -151,23 +151,10 @@ export async function inspectSearchParams(
151151
const mockSetup = {
152152
start: 1528113600000,
153153
end: 1528977600000,
154-
client: {
155-
search: spy
156-
} as any,
157-
internalClient: {
158-
search: spy
159-
} as any,
160-
config: new Proxy(
161-
{},
162-
{
163-
get: () => 'myIndex'
164-
}
165-
) as APMConfig,
166-
uiFiltersES: [
167-
{
168-
term: { 'service.environment': 'prod' }
169-
}
170-
],
154+
client: { search: spy } as any,
155+
internalClient: { search: spy } as any,
156+
config: new Proxy({}, { get: () => 'myIndex' }) as APMConfig,
157+
uiFiltersES: [{ term: { 'my.custom.ui.filter': 'foo-bar' } }],
171158
indices: {
172159
'apm_oss.sourcemapIndices': 'myIndex',
173160
'apm_oss.errorIndices': 'myIndex',

x-pack/legacy/plugins/apm/server/lib/errors/__snapshots__/queries.test.ts.snap

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/apm/server/lib/errors/distribution/__snapshots__/queries.test.ts.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/apm/server/lib/errors/get_error_group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function getErrorGroup({
6464

6565
let transaction;
6666
if (transactionId && traceId) {
67-
transaction = await getTransaction(transactionId, traceId, setup);
67+
transaction = await getTransaction({ transactionId, traceId, setup });
6868
}
6969

7070
return {

x-pack/legacy/plugins/apm/server/lib/metrics/__snapshots__/queries.test.ts.snap

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/apm/server/lib/service_nodes/__snapshots__/queries.test.ts.snap

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/apm/server/lib/services/__snapshots__/queries.test.ts.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/apm/server/lib/transaction_groups/__snapshots__/queries.test.ts.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/apm/server/lib/transactions/__snapshots__/queries.test.ts.snap

Lines changed: 6 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/apm/server/lib/transactions/get_transaction/index.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ import {
1818
} from '../../helpers/setup_request';
1919
import { ProcessorEvent } from '../../../../common/processor_event';
2020

21-
export async function getTransaction(
22-
transactionId: string,
23-
traceId: string,
24-
setup: Setup & SetupTimeRange & SetupUIFilters
25-
) {
26-
const { start, end, uiFiltersES, client, indices } = setup;
21+
export async function getTransaction({
22+
transactionId,
23+
traceId,
24+
setup
25+
}: {
26+
transactionId: string;
27+
traceId: string;
28+
setup: Setup & SetupTimeRange & SetupUIFilters;
29+
}) {
30+
const { start, end, client, indices } = setup;
2731

2832
const params = {
2933
index: indices['apm_oss.transactionIndices'],
@@ -35,8 +39,7 @@ export async function getTransaction(
3539
{ term: { [PROCESSOR_EVENT]: ProcessorEvent.transaction } },
3640
{ term: { [TRANSACTION_ID]: transactionId } },
3741
{ term: { [TRACE_ID]: traceId } },
38-
{ range: rangeFilter(start, end) },
39-
...uiFiltersES
42+
{ range: rangeFilter(start, end) }
4043
]
4144
}
4245
}

0 commit comments

Comments
 (0)