Skip to content

Commit

Permalink
[Apm] rollback metrics (#112304)
Browse files Browse the repository at this point in the history
* disabling metrics

* fixing api tests
  • Loading branch information
cauemarcondes committed Sep 15, 2021
1 parent a9f9d16 commit add5d2c
Show file tree
Hide file tree
Showing 18 changed files with 2,428 additions and 837 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/apm/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const config = {
schema.literal(SearchAggregatedTransactionSetting.always),
schema.literal(SearchAggregatedTransactionSetting.never),
],
{ defaultValue: SearchAggregatedTransactionSetting.auto }
{ defaultValue: SearchAggregatedTransactionSetting.never }
),
telemetryCollectionEnabled: schema.boolean({ defaultValue: true }),
metricsInterval: schema.number({ defaultValue: 30 }),
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/apm_api_integration/tests/inspect/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function customLinksTests({ getService }: FtrProviderContext) {
},
});
expect(status).to.be(200);
expect(body._inspect?.length).to.be(2);
expect(body._inspect?.length).to.be(1);

// @ts-expect-error
expect(Object.keys(body._inspect[0])).to.eql([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import expect from '@kbn/expect';
import archives_metadata from '../../common/fixtures/es_archiver/archives_metadata';
import { FtrProviderContext } from '../../common/ftr_provider_context';
import { registry } from '../../common/registry';
import { roundNumber } from '../../utils';

export default function ApiTest({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
Expand Down Expand Up @@ -54,8 +55,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {

expectSnapshot(response.body.serviceCount).toMatchInline(`8`);

expectSnapshot(response.body.transactionPerMinute.value).toMatchInline(`58.9`);
expectSnapshot(response.body.transactionPerMinute.timeseries.length).toMatchInline(`30`);
expectSnapshot(roundNumber(response.body.transactionPerMinute.value)).toMatchInline(
`"59.17"`
);
expectSnapshot(response.body.transactionPerMinute.timeseries.length).toMatchInline(`31`);

expectSnapshot(
response.body.transactionPerMinute.timeseries
Expand All @@ -68,23 +71,23 @@ export default function ApiTest({ getService }: FtrProviderContext) {
Array [
Object {
"x": "2021-08-03T06:50:00.000Z",
"y": 36,
"y": 51,
},
Object {
"x": "2021-08-03T06:51:00.000Z",
"y": 55,
"y": 62,
},
Object {
"x": "2021-08-03T06:52:00.000Z",
"y": 40,
"y": 56,
},
Object {
"x": "2021-08-03T06:53:00.000Z",
"y": 53,
"y": 50,
},
Object {
"x": "2021-08-03T06:54:00.000Z",
"y": 39,
"y": 77,
},
]
`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
"avgErrorRate": 0,
"avgMemoryUsage": 0.202572668763642,
"transactionStats": Object {
"avgRequestsPerMinute": 5.2,
"avgTransactionDuration": 53906.6603773585,
"avgRequestsPerMinute": 7.13333333333333,
"avgTransactionDuration": 53147.5747663551,
},
}
`);
Expand Down
Loading

0 comments on commit add5d2c

Please sign in to comment.