Skip to content

Commit c15287b

Browse files
committed
adding filter by transaction name
1 parent 148b827 commit c15287b

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

x-pack/test/apm_api_integration/basic/tests/transaction_groups/avg_duration_by_browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
4242
});
4343
it('returns the average duration by browser filtering by transaction name', async () => {
4444
const response = await supertest.get(
45-
`/api/apm/services/client/transaction_groups/avg_duration_by_browser?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionName=${transactionName}&_debug=true`
45+
`/api/apm/services/client/transaction_groups/avg_duration_by_browser?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionName=${transactionName}`
4646
);
4747

4848
expect(response.status).to.be(200);

x-pack/test/apm_api_integration/basic/tests/transaction_groups/breakdown.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,35 @@ export default function ApiTest({ getService }: FtrProviderContext) {
3333
before(() => esArchiver.load('8.0.0'));
3434
after(() => esArchiver.unload('8.0.0'));
3535

36-
it('returns the transaction breakdown', async () => {
36+
it('returns the transaction breakdown for a service', async () => {
3737
const response = await supertest.get(
3838
`/api/apm/services/opbeans-node/transaction_groups/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
3939
);
4040

4141
expect(response.status).to.be(200);
4242
expect(response.body).to.eql(expectedBreakdown);
4343
});
44-
it('returns the transaction breakdown with transaction name', async () => {
44+
it('returns the transaction breakdown for a transaction group', async () => {
4545
const response = await supertest.get(
4646
`/api/apm/services/opbeans-node/transaction_groups/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}&transactionName=${transactionName}`
4747
);
4848

4949
expect(response.status).to.be(200);
5050
expect(response.body).to.eql(expectedBreakdownWithTransactionName);
5151
});
52+
it('returns the kpis sorted by percentage and name', async () => {
53+
const response = await supertest.get(
54+
`/api/apm/services/opbeans-node/transaction_groups/breakdown?start=${start}&end=${end}&uiFilters=${uiFilters}&transactionType=${transactionType}`
55+
);
56+
57+
expect(response.status).to.be(200);
58+
expect(response.body.kpis).to.eql([
59+
{ name: 'app', percentage: 0.16700861715223636, color: '#54b399' },
60+
{ name: 'http', percentage: 0.7702092736971686, color: '#6092c0' },
61+
{ name: 'postgresql', percentage: 0.0508822322527698, color: '#d36086' },
62+
{ name: 'redis', percentage: 0.011899876897825195, color: '#9170b8' },
63+
]);
64+
});
5265
});
5366
});
5467
}

0 commit comments

Comments
 (0)