[APM] Use 7.x compatible archive for API tests (#107367)

This commit is contained in:
Dario Gieselaar 2021-08-03 12:29:06 +02:00 committed by GitHub
parent 0df0255bbf
commit 66b951c07c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 4837 additions and 12096 deletions

View file

@ -8,7 +8,7 @@
/* eslint-disable-next-line*/
export default {
'apm_8.0.0': {
start: '2021-07-27T08:08:11.069Z',
end: '2021-07-27T08:38:11.069Z',
start: '2021-08-03T06:50:15.910Z',
end: '2021-08-03T07:20:15.910Z',
},
};

View file

@ -102,18 +102,6 @@ async function run() {
],
},
},
{
index: '.kibana',
bool: {
filter: [
{
term: {
type: 'ml-job',
},
},
],
},
},
];
// eslint-disable-next-line no-console
@ -159,10 +147,7 @@ async function run() {
(bucket) => bucket.key as string
) ?? [];
const indicesToArchive = indicesWithDocs
.filter((index) => !index.startsWith('.kibana'))
.concat('.kibana')
.join(',');
const indicesToArchive = indicesWithDocs.join(',');
// create the archive
const tmpDir = path.join(__dirname, 'tmp/');

View file

@ -8,7 +8,7 @@
/* eslint-disable-next-line*/
export default {
'apm_8.0.0': {
start: '2021-07-27T08:08:11.069Z',
end: '2021-07-27T08:38:11.069Z',
start: '2021-08-03T06:50:15.910Z',
end: '2021-08-03T07:20:15.910Z',
},
};

View file

@ -109,6 +109,9 @@ export const registry = {
running = true;
const esArchiver = context.getService('esArchiver');
const logger = context.getService('log');
const supertest = context.getService('supertestAsApmWriteUser');
const logWithTimer = () => {
const start = process.hrtime();
@ -148,6 +151,9 @@ export const registry = {
archiveName
)
);
// sync jobs from .ml-config to .kibana SOs
await supertest.get('/api/ml/saved_objects/sync').set('kbn-xsrf', 'foo');
}
if (condition.archives.length) {
log('Loaded all archives');

View file

@ -64,6 +64,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(sortedFieldNames).toMatchInline(`
Array [
"user_agent.name",
"user_agent.name",
]
`);
});
@ -73,6 +74,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(significantTerms.map((term) => term.timeseries.length)).toMatchInline(`
Array [
31,
31,
]
`);
});

View file

@ -59,9 +59,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
it('returns overall distribution', () => {
// less precision for distributionInterval as it is not exact
expectSnapshot(response.body?.distributionInterval?.toPrecision(2)).toMatchInline(
`"3.3e+5"`
`"3.8e+5"`
);
expectSnapshot(response.body?.maxLatency?.toPrecision(2)).toMatchInline(`"5.0e+6"`);
expectSnapshot(response.body?.maxLatency?.toPrecision(2)).toMatchInline(`"5.8e+6"`);
expectSnapshot(response.body?.overallDistribution?.length).toMatchInline(`15`);
});
}

View file

@ -69,11 +69,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
"url.original",
"url.original",
"url.original",
"url.original",
"url.original",
"url.original",
"url.original",
"url.original",
"user_agent.name",
"user_agent.name",
"user_agent.name",
"user_agent.name",
"user_agent.os.name",
]
@ -92,8 +90,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
15,
15,
15,
15,
15,
]
`);
});

View file

@ -52,9 +52,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expect(response.body.serviceCount).to.be.greaterThan(0);
expect(response.body.transactionPerMinute.timeseries.length).to.be.greaterThan(0);
expectSnapshot(response.body.serviceCount).toMatchInline(`10`);
expectSnapshot(response.body.serviceCount).toMatchInline(`8`);
expectSnapshot(response.body.transactionPerMinute.value).toMatchInline(`132.833333333333`);
expectSnapshot(response.body.transactionPerMinute.value).toMatchInline(`58.9`);
expectSnapshot(response.body.transactionPerMinute.timeseries.length).toMatchInline(`30`);
expectSnapshot(
@ -67,24 +67,24 @@ export default function ApiTest({ getService }: FtrProviderContext) {
).toMatchInline(`
Array [
Object {
"x": "2021-07-27T08:08:00.000Z",
"y": 85,
"x": "2021-08-03T06:50:00.000Z",
"y": 36,
},
Object {
"x": "2021-07-27T08:09:00.000Z",
"y": 108,
"x": "2021-08-03T06:51:00.000Z",
"y": 55,
},
Object {
"x": "2021-07-27T08:10:00.000Z",
"y": 76,
"x": "2021-08-03T06:52:00.000Z",
"y": 40,
},
Object {
"x": "2021-07-27T08:11:00.000Z",
"y": 77,
"x": "2021-08-03T06:53:00.000Z",
"y": 53,
},
Object {
"x": "2021-07-27T08:12:00.000Z",
"y": 56,
"x": "2021-08-03T06:54:00.000Z",
"y": 39,
},
]
`);

View file

@ -89,8 +89,6 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
expectSnapshot(serviceNames).toMatchInline(`
Array [
"auditbeat",
"kibana",
"kibana-frontend",
"opbeans-dotnet",
"opbeans-go",
"opbeans-java",
@ -109,10 +107,7 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
expectSnapshot(externalDestinations).toMatchInline(`
Array [
">8b37cb7ca2ae49ada54db165f32d3a19.us-central1.gcp.foundit.no:9243",
">elasticsearch",
">epr-snapshot.elastic.co:443",
">feeds.elastic.co:443",
">postgresql",
">redis",
">sqlite",
@ -150,22 +145,22 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
expect(dataWithAnomalies).not.to.be.empty();
expectSnapshot(dataWithAnomalies.length).toMatchInline(`6`);
expectSnapshot(dataWithAnomalies.length).toMatchInline(`7`);
expectSnapshot(dataWithAnomalies.slice(0, 3)).toMatchInline(`
Array [
Object {
"data": Object {
"agent.name": "nodejs",
"id": "kibana",
"service.environment": "production",
"service.name": "kibana",
"agent.name": "rum-js",
"id": "opbeans-rum",
"service.environment": "testing",
"service.name": "opbeans-rum",
"serviceAnomalyStats": Object {
"actualValue": 635652.26283725,
"actualValue": 1020870.96774194,
"anomalyScore": 0,
"healthStatus": "healthy",
"jobId": "apm-production-802c-high_mean_transaction_duration",
"serviceName": "kibana",
"transactionType": "request",
"jobId": "apm-testing-41e5-high_mean_transaction_duration",
"serviceName": "opbeans-rum",
"transactionType": "page-load",
},
},
},
@ -176,10 +171,10 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
"service.environment": "production",
"service.name": "opbeans-ruby",
"serviceAnomalyStats": Object {
"actualValue": 24400.8867924528,
"actualValue": 62009.3356643357,
"anomalyScore": 0,
"healthStatus": "healthy",
"jobId": "apm-production-802c-high_mean_transaction_duration",
"jobId": "apm-production-6117-high_mean_transaction_duration",
"serviceName": "opbeans-ruby",
"transactionType": "request",
},
@ -187,16 +182,16 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext)
},
Object {
"data": Object {
"agent.name": "java",
"id": "opbeans-java",
"agent.name": "python",
"id": "opbeans-python",
"service.environment": "production",
"service.name": "opbeans-java",
"service.name": "opbeans-python",
"serviceAnomalyStats": Object {
"actualValue": 19105.8492063492,
"anomalyScore": 0,
"actualValue": 38862.7831325301,
"anomalyScore": 0.0725701910161626,
"healthStatus": "healthy",
"jobId": "apm-production-802c-high_mean_transaction_duration",
"serviceName": "opbeans-java",
"jobId": "apm-production-6117-high_mean_transaction_duration",
"serviceName": "opbeans-python",
"transactionType": "request",
},
},

View file

@ -2,17 +2,17 @@
exports[`APM API tests basic apm_8.0.0 Instance details when data is loaded fetch instance details return the correct data 1`] = `
Object {
"@timestamp": "2021-07-27T08:08:17.707Z",
"@timestamp": "2021-08-03T06:50:50.204Z",
"agent": Object {
"ephemeral_id": "1f810e6f-e78a-4f49-9773-2142b9af9943",
"ephemeral_id": "2745d454-f57f-4473-a09b-fe6bef295860",
"name": "java",
"version": "1.25.1-SNAPSHOT.UNKNOWN",
},
"cloud": Object {
"availability_zone": "europe-west1-c",
"instance": Object {
"id": "4295368814211072338",
"name": "gke-edge-oblt-gcp-edge-oblt-gcp-pool-b6b9e929-92m2",
"id": "2549868447004523210",
"name": "gke-release-oblt-release-oblt-pool-d839a4cc-7sjc",
},
"machine": Object {
"type": "n1-standard-4",
@ -25,25 +25,26 @@ Object {
"region": "europe-west1",
},
"container": Object {
"id": "6dc7ea7824d0887cdfa0cb876bca5b27346c8b7cd196a9b1a6fe91968b99fbc2",
"id": "31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad",
},
"host": Object {
"architecture": "amd64",
"ip": "10.40.0.248",
"ip": "35.233.127.253",
"os": Object {
"platform": "Linux",
},
},
"kubernetes": Object {
"pod": Object {
"name": "opbeans-java-59f5cddddf-s9bvt",
"uid": "9aa1e495-4eca-49ca-bd26-2914e05a0226",
"name": "opbeans-java-b8fcdf794-czvtr",
"uid": "e0bf3100-4a0d-4d96-88ef-4e3aa3c78a5d",
},
},
"service": Object {
"environment": "production",
"framework": Object {
"name": "Servlet API",
"name": "Spring Web MVC",
"version": "5.0.6.RELEASE",
},
"language": Object {
"name": "Java",
@ -51,13 +52,13 @@ Object {
},
"name": "opbeans-java",
"node": Object {
"name": "6dc7ea7824d0887cdfa0cb876bca5b27346c8b7cd196a9b1a6fe91968b99fbc2",
"name": "31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad",
},
"runtime": Object {
"name": "Java",
"version": "11.0.11",
},
"version": "2021-07-27 03:47:01",
"version": "2021-08-03 04:26:27",
},
}
`;

View file

@ -344,11 +344,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(firstItem.location).toMatchInline(`
Object {
"backendName": "postgresql",
"id": "d4e2a4d33829d41c096c26f8037921cfc7e566b2",
"spanSubtype": "postgresql",
"spanType": "db",
"type": "backend",
"agentName": "dotnet",
"environment": "production",
"id": "5948c153c2d8989f92a9c75ef45bb845f53e200d",
"serviceName": "opbeans-dotnet",
"type": "service",
}
`);
@ -361,14 +361,14 @@ export default function ApiTest({ getService }: FtrProviderContext) {
).toMatchInline(`
Object {
"errorRate": Object {
"value": 0.00308832612723904,
"value": 0.163636363636364,
},
"impact": 100,
"latency": Object {
"value": 30177.8418777023,
"value": 1117085.74545455,
},
"throughput": Object {
"value": 53.9666666666667,
"value": 1.83333333333333,
},
}
`);
@ -379,7 +379,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(names.sort()).toMatchInline(`
Array [
"elasticsearch",
"opbeans-python",
"opbeans-dotnet",
"postgresql",
"redis",
]
@ -395,7 +395,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(serviceNames.sort()).toMatchInline(`
Array [
"opbeans-python",
"opbeans-dotnet",
]
`);
});
@ -412,19 +412,19 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(latencyValues).toMatchInline(`
Array [
Object {
"latency": 10125.412371134,
"latency": 9496.32291666667,
"name": "elasticsearch",
},
Object {
"latency": 42984.2941176471,
"name": "opbeans-python",
"latency": 1117085.74545455,
"name": "opbeans-dotnet",
},
Object {
"latency": 30177.8418777023,
"latency": 27826.9968314322,
"name": "postgresql",
},
Object {
"latency": 1341.11624072547,
"latency": 1468.27242524917,
"name": "redis",
},
]
@ -444,19 +444,19 @@ export default function ApiTest({ getService }: FtrProviderContext) {
Array [
Object {
"name": "elasticsearch",
"throughput": 3.23333333333333,
"throughput": 3.2,
},
Object {
"name": "opbeans-python",
"throughput": 1.7,
"name": "opbeans-dotnet",
"throughput": 1.83333333333333,
},
Object {
"name": "postgresql",
"throughput": 53.9666666666667,
"throughput": 52.6,
},
Object {
"name": "redis",
"throughput": 40.4333333333333,
"throughput": 40.1333333333333,
},
]
`);
@ -477,27 +477,27 @@ export default function ApiTest({ getService }: FtrProviderContext) {
Array [
Object {
"impact": 0,
"latency": 10125.412371134,
"latency": 9496.32291666667,
"name": "elasticsearch",
"throughput": 3.23333333333333,
},
Object {
"impact": 2.52744598670713,
"latency": 42984.2941176471,
"name": "opbeans-python",
"throughput": 1.7,
"throughput": 3.2,
},
Object {
"impact": 100,
"latency": 30177.8418777023,
"name": "postgresql",
"throughput": 53.9666666666667,
"latency": 1117085.74545455,
"name": "opbeans-dotnet",
"throughput": 1.83333333333333,
},
Object {
"impact": 1.34642037334926,
"latency": 1341.11624072547,
"impact": 71.0403531954737,
"latency": 27826.9968314322,
"name": "postgresql",
"throughput": 52.6,
},
Object {
"impact": 1.41447268043525,
"latency": 1468.27242524917,
"name": "redis",
"throughput": 40.4333333333333,
"throughput": 40.1333333333333,
},
]
`);

View file

@ -106,7 +106,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(Object.keys(response.body.currentPeriod)).toMatchInline(`
Array [
"6dc7ea7824d0887cdfa0cb876bca5b27346c8b7cd196a9b1a6fe91968b99fbc2",
"31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad",
]
`);
@ -173,12 +173,12 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(Object.keys(response.body.currentPeriod)).toMatchInline(`
Array [
"6dc7ea7824d0887cdfa0cb876bca5b27346c8b7cd196a9b1a6fe91968b99fbc2",
"31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad",
]
`);
expectSnapshot(Object.keys(response.body.previousPeriod)).toMatchInline(`
Array [
"6dc7ea7824d0887cdfa0cb876bca5b27346c8b7cd196a9b1a6fe91968b99fbc2",
"31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad",
]
`);

View file

@ -97,7 +97,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(serviceNodeNames).toMatchInline(`
Array [
"6dc7ea7824d0887cdfa0cb876bca5b27346c8b7cd196a9b1a6fe91968b99fbc2",
"31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad",
]
`);
@ -113,11 +113,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(values).toMatchInline(`
Object {
"cpuUsage": 0.0022,
"errorRate": 0.0194300518134715,
"latency": 17660.3103448276,
"memoryUsage": 0.826234181722005,
"throughput": 25.7333333333333,
"cpuUsage": 0.002,
"errorRate": 0.0252659574468085,
"latency": 411589.785714286,
"memoryUsage": 0.786029688517253,
"throughput": 25.0666666666667,
}
`);
});
@ -162,7 +162,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(serviceNodeNames).toMatchInline(`
Array [
"399a87146c0036592f6ee78553324b10c00757e024143913c97993384751e15e",
"b4c600993a0b233120cd333b8c4a7e35e73ee8f18f95b5854b8d7f6442531466",
]
`);
@ -172,10 +172,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(values).toMatchInline(`
Object {
"cpuUsage": 0.00108333333333333,
"errorRate": 0.000779423226812159,
"latency": 44571.2584615385,
"throughput": 42.7666666666667,
"cpuUsage": 0.001,
"errorRate": 0.000907441016333938,
"latency": 40989.5802047782,
"throughput": 36.7333333333333,
}
`);
@ -243,7 +243,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(serviceNodeNames).toMatchInline(`
Array [
"6dc7ea7824d0887cdfa0cb876bca5b27346c8b7cd196a9b1a6fe91968b99fbc2",
"31651f3c624b81c55dd4633df0b5b9f9ab06b151121b0404ae796632cd1f87ad",
]
`);
@ -259,11 +259,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(values).toMatchInline(`
Object {
"cpuUsage": 0.00203333333333333,
"errorRate": 0.023598820058997,
"latency": 16843.0833333333,
"memoryUsage": 0.82624028523763,
"throughput": 22.6,
"cpuUsage": 0.00223333333333333,
"errorRate": 0.0268292682926829,
"latency": 739013.634146341,
"memoryUsage": 0.783296203613281,
"throughput": 27.3333333333333,
}
`);
});

View file

@ -2,130 +2,130 @@
exports[`APM API tests basic apm_8.0.0 Error groups detailed statistics when data is loaded returns the correct data 1`] = `
Object {
"groupId": "237562dfa8b8ab4eb94f22c87e42112b",
"groupId": "1f716bc1e7234ff5119ac615d1b90b6e",
"timeseries": Array [
Object {
"x": 1627373280000,
"x": 1627973400000,
"y": 0,
},
Object {
"x": 1627373340000,
"x": 1627973460000,
"y": 0,
},
Object {
"x": 1627373400000,
"x": 1627973520000,
"y": 0,
},
Object {
"x": 1627373460000,
"x": 1627973580000,
"y": 0,
},
Object {
"x": 1627373520000,
"x": 1627973640000,
"y": 0,
},
Object {
"x": 1627373580000,
"x": 1627973700000,
"y": 0,
},
Object {
"x": 1627373640000,
"x": 1627973760000,
"y": 0,
},
Object {
"x": 1627373700000,
"x": 1627973820000,
"y": 0,
},
Object {
"x": 1627373760000,
"x": 1627973880000,
"y": 0,
},
Object {
"x": 1627373820000,
"x": 1627973940000,
"y": 0,
},
Object {
"x": 1627373880000,
"x": 1627974000000,
"y": 0,
},
Object {
"x": 1627373940000,
"x": 1627974060000,
"y": 0,
},
Object {
"x": 1627374000000,
"x": 1627974120000,
"y": 0,
},
Object {
"x": 1627374060000,
"x": 1627974180000,
"y": 0,
},
Object {
"x": 1627374120000,
"x": 1627974240000,
"y": 0,
},
Object {
"x": 1627374180000,
"x": 1627974300000,
"y": 0,
},
Object {
"x": 1627374240000,
"x": 1627974360000,
"y": 0,
},
Object {
"x": 1627374300000,
"x": 1627974420000,
"y": 0,
},
Object {
"x": 1627974480000,
"y": 0,
},
Object {
"x": 1627974540000,
"y": 0,
},
Object {
"x": 1627974600000,
"y": 1,
},
Object {
"x": 1627374360000,
"x": 1627974660000,
"y": 0,
},
Object {
"x": 1627374420000,
"x": 1627974720000,
"y": 0,
},
Object {
"x": 1627374480000,
"x": 1627974780000,
"y": 0,
},
Object {
"x": 1627374540000,
"x": 1627974840000,
"y": 0,
},
Object {
"x": 1627374600000,
"x": 1627974900000,
"y": 0,
},
Object {
"x": 1627374660000,
"x": 1627974960000,
"y": 0,
},
Object {
"x": 1627374720000,
"x": 1627975020000,
"y": 0,
},
Object {
"x": 1627374780000,
"x": 1627975080000,
"y": 0,
},
Object {
"x": 1627374840000,
"y": 1,
},
Object {
"x": 1627374900000,
"x": 1627975140000,
"y": 0,
},
Object {
"x": 1627374960000,
"y": 1,
},
Object {
"x": 1627375020000,
"y": 0,
},
Object {
"x": 1627375080000,
"x": 1627975200000,
"y": 0,
},
],
@ -134,70 +134,70 @@ Object {
exports[`APM API tests basic apm_8.0.0 Error groups detailed statistics when data is loaded with previous data returns the correct data returns correct timeseries 1`] = `
Object {
"groupId": "237562dfa8b8ab4eb94f22c87e42112b",
"groupId": "1f716bc1e7234ff5119ac615d1b90b6e",
"timeseries": Array [
Object {
"x": 1627374180000,
"x": 1627974300000,
"y": 0,
},
Object {
"x": 1627374240000,
"x": 1627974360000,
"y": 0,
},
Object {
"x": 1627374300000,
"x": 1627974420000,
"y": 0,
},
Object {
"x": 1627974480000,
"y": 0,
},
Object {
"x": 1627974540000,
"y": 0,
},
Object {
"x": 1627974600000,
"y": 1,
},
Object {
"x": 1627374360000,
"x": 1627974660000,
"y": 0,
},
Object {
"x": 1627374420000,
"x": 1627974720000,
"y": 0,
},
Object {
"x": 1627374480000,
"x": 1627974780000,
"y": 0,
},
Object {
"x": 1627374540000,
"x": 1627974840000,
"y": 0,
},
Object {
"x": 1627374600000,
"x": 1627974900000,
"y": 0,
},
Object {
"x": 1627374660000,
"x": 1627974960000,
"y": 0,
},
Object {
"x": 1627374720000,
"x": 1627975020000,
"y": 0,
},
Object {
"x": 1627374780000,
"x": 1627975080000,
"y": 0,
},
Object {
"x": 1627374840000,
"y": 1,
},
Object {
"x": 1627374900000,
"x": 1627975140000,
"y": 0,
},
Object {
"x": 1627374960000,
"y": 1,
},
Object {
"x": 1627375020000,
"y": 0,
},
Object {
"x": 1627375080000,
"x": 1627975200000,
"y": 0,
},
],

View file

@ -3,127 +3,127 @@
exports[`APM API tests basic apm_8.0.0 Throughput when data is loaded has the correct throughput 1`] = `
Array [
Object {
"x": 1627373280000,
"y": 10,
},
Object {
"x": 1627373340000,
"x": 1627973400000,
"y": 4,
},
Object {
"x": 1627373400000,
"y": 11,
"x": 1627973460000,
"y": 2,
},
Object {
"x": 1627373460000,
"y": 13,
},
Object {
"x": 1627373520000,
"y": 1,
},
Object {
"x": 1627373580000,
"y": 5,
},
Object {
"x": 1627373640000,
"y": 4,
},
Object {
"x": 1627373700000,
"y": 5,
},
Object {
"x": 1627373760000,
"y": 10,
},
Object {
"x": 1627373820000,
"y": 0,
},
Object {
"x": 1627373880000,
"y": 5,
},
Object {
"x": 1627373940000,
"x": 1627973520000,
"y": 3,
},
Object {
"x": 1627374000000,
"y": 4,
},
Object {
"x": 1627374060000,
"y": 4,
},
Object {
"x": 1627374120000,
"x": 1627973580000,
"y": 8,
},
Object {
"x": 1627374180000,
"x": 1627973640000,
"y": 4,
},
Object {
"x": 1627973700000,
"y": 4,
},
Object {
"x": 1627973760000,
"y": 6,
},
Object {
"x": 1627973820000,
"y": 10,
},
Object {
"x": 1627374240000,
"y": 11,
"x": 1627973880000,
"y": 8,
},
Object {
"x": 1627374300000,
"y": 7,
},
Object {
"x": 1627374360000,
"x": 1627973940000,
"y": 9,
},
Object {
"x": 1627374420000,
"y": 11,
},
Object {
"x": 1627374480000,
"y": 5,
},
Object {
"x": 1627374540000,
"y": 17,
},
Object {
"x": 1627374600000,
"y": 14,
},
Object {
"x": 1627374660000,
"y": 1,
},
Object {
"x": 1627374720000,
"y": 5,
},
Object {
"x": 1627374780000,
"y": 2,
},
Object {
"x": 1627374840000,
"y": 4,
},
Object {
"x": 1627374900000,
"x": 1627974000000,
"y": 10,
},
Object {
"x": 1627374960000,
"y": 8,
"x": 1627974060000,
"y": 11,
},
Object {
"x": 1627375020000,
"x": 1627974120000,
"y": 7,
},
Object {
"x": 1627974180000,
"y": 10,
},
Object {
"x": 1627974240000,
"y": 12,
},
Object {
"x": 1627974300000,
"y": 6,
},
Object {
"x": 1627974360000,
"y": 0,
},
Object {
"x": 1627974420000,
"y": 4,
},
Object {
"x": 1627974480000,
"y": 3,
},
Object {
"x": 1627974540000,
"y": 5,
},
Object {
"x": 1627974600000,
"y": 5,
},
Object {
"x": 1627974660000,
"y": 5,
},
Object {
"x": 1627974720000,
"y": 4,
},
Object {
"x": 1627974780000,
"y": 7,
},
Object {
"x": 1627974840000,
"y": 2,
},
Object {
"x": 1627375080000,
"x": 1627974900000,
"y": 14,
},
Object {
"x": 1627974960000,
"y": 3,
},
Object {
"x": 1627975020000,
"y": 6,
},
Object {
"x": 1627975080000,
"y": 12,
},
Object {
"x": 1627975140000,
"y": 8,
},
Object {
"x": 1627975200000,
"y": 0,
},
]
@ -133,133 +133,133 @@ exports[`APM API tests basic apm_8.0.0 Throughput when data is loaded with time
Object {
"currentPeriod": Array [
Object {
"x": 1627374180000,
"y": 10,
"x": 1627974300000,
"y": 6,
},
Object {
"x": 1627374240000,
"y": 11,
"x": 1627974360000,
"y": 0,
},
Object {
"x": 1627374300000,
"y": 7,
},
Object {
"x": 1627374360000,
"y": 9,
},
Object {
"x": 1627374420000,
"y": 11,
},
Object {
"x": 1627374480000,
"y": 5,
},
Object {
"x": 1627374540000,
"y": 17,
},
Object {
"x": 1627374600000,
"y": 14,
},
Object {
"x": 1627374660000,
"y": 1,
},
Object {
"x": 1627374720000,
"y": 5,
},
Object {
"x": 1627374780000,
"y": 2,
},
Object {
"x": 1627374840000,
"x": 1627974420000,
"y": 4,
},
Object {
"x": 1627374900000,
"y": 10,
"x": 1627974480000,
"y": 3,
},
Object {
"x": 1627374960000,
"y": 8,
"x": 1627974540000,
"y": 5,
},
Object {
"x": 1627375020000,
"x": 1627974600000,
"y": 5,
},
Object {
"x": 1627974660000,
"y": 5,
},
Object {
"x": 1627974720000,
"y": 4,
},
Object {
"x": 1627974780000,
"y": 7,
},
Object {
"x": 1627974840000,
"y": 2,
},
Object {
"x": 1627375080000,
"x": 1627974900000,
"y": 14,
},
Object {
"x": 1627974960000,
"y": 3,
},
Object {
"x": 1627975020000,
"y": 6,
},
Object {
"x": 1627975080000,
"y": 12,
},
Object {
"x": 1627975140000,
"y": 8,
},
Object {
"x": 1627975200000,
"y": 0,
},
],
"previousPeriod": Array [
Object {
"x": 1627374180000,
"y": 10,
},
Object {
"x": 1627374240000,
"x": 1627974300000,
"y": 4,
},
Object {
"x": 1627374300000,
"y": 11,
"x": 1627974360000,
"y": 2,
},
Object {
"x": 1627374360000,
"y": 13,
},
Object {
"x": 1627374420000,
"y": 1,
},
Object {
"x": 1627374480000,
"y": 5,
},
Object {
"x": 1627374540000,
"y": 4,
},
Object {
"x": 1627374600000,
"y": 5,
},
Object {
"x": 1627374660000,
"y": 10,
},
Object {
"x": 1627374720000,
"y": 0,
},
Object {
"x": 1627374780000,
"y": 5,
},
Object {
"x": 1627374840000,
"x": 1627974420000,
"y": 3,
},
Object {
"x": 1627374900000,
"y": 4,
},
Object {
"x": 1627374960000,
"y": 4,
},
Object {
"x": 1627375020000,
"x": 1627974480000,
"y": 8,
},
Object {
"x": 1627375080000,
"x": 1627974540000,
"y": 4,
},
Object {
"x": 1627974600000,
"y": 4,
},
Object {
"x": 1627974660000,
"y": 6,
},
Object {
"x": 1627974720000,
"y": 10,
},
Object {
"x": 1627974780000,
"y": 8,
},
Object {
"x": 1627974840000,
"y": 9,
},
Object {
"x": 1627974900000,
"y": 10,
},
Object {
"x": 1627974960000,
"y": 11,
},
Object {
"x": 1627975020000,
"y": 7,
},
Object {
"x": 1627975080000,
"y": 10,
},
Object {
"x": 1627975140000,
"y": 12,
},
Object {
"x": 1627975200000,
"y": 0,
},
],

View file

@ -76,9 +76,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
"Response status 404",
"No converter found for return value of type: class com.sun.proxy.$Proxy162",
"Response status 404",
"Connection reset by peer",
"Broken pipe",
"java.io.IOException: Connection reset by peer",
"Request method 'POST' not supported",
"java.io.IOException: Broken pipe",
"java.io.IOException: Connection reset by peer",
"null",
]
`);
@ -90,11 +92,13 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(occurences).toMatchInline(`
Array [
17,
12,
11,
4,
4,
3,
2,
2,
1,
1,
]
`);
@ -104,9 +108,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(firstItem).toMatchInline(`
Object {
"group_id": "d16d39e7fa133b8943cea035430a7b4e",
"last_seen": 1627374613628,
"last_seen": 1627975146078,
"name": "Response status 404",
"occurrences": 12,
"occurrences": 17,
}
`);
});

View file

@ -69,7 +69,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
},
"service": Object {
"agent": Object {
"ephemeral_id": "1f810e6f-e78a-4f49-9773-2142b9af9943",
"ephemeral_id": "2745d454-f57f-4473-a09b-fe6bef295860",
"name": "java",
"version": "1.25.1-SNAPSHOT.UNKNOWN",
},
@ -78,7 +78,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
"version": "11.0.11",
},
"versions": Array [
"2021-07-27 03:47:01",
"2021-08-03 04:26:27",
],
},
}
@ -124,7 +124,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
"version": "3.9.6",
},
"versions": Array [
"2021-07-27 03:46:59",
"2021-08-03 04:26:25",
],
},
}

View file

@ -68,13 +68,13 @@ export default function ApiTest({ getService }: FtrProviderContext) {
it('has the correct start date', () => {
expectSnapshot(
new Date(first(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
).toMatchInline(`"2021-07-27T08:08:00.000Z"`);
).toMatchInline(`"2021-08-03T06:50:00.000Z"`);
});
it('has the correct end date', () => {
expectSnapshot(
new Date(last(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
).toMatchInline(`"2021-07-27T08:38:00.000Z"`);
).toMatchInline(`"2021-08-03T07:20:00.000Z"`);
});
it('has the correct number of buckets', () => {
@ -122,21 +122,21 @@ export default function ApiTest({ getService }: FtrProviderContext) {
it('has the correct start date', () => {
expectSnapshot(
new Date(first(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
).toMatchInline(`"2021-07-27T08:23:00.000Z"`);
).toMatchInline(`"2021-08-03T07:05:00.000Z"`);
expectSnapshot(
new Date(first(throughputResponse.previousPeriod)?.x ?? NaN).toISOString()
).toMatchInline(`"2021-07-27T08:23:00.000Z"`);
).toMatchInline(`"2021-08-03T07:05:00.000Z"`);
});
it('has the correct end date', () => {
expectSnapshot(
new Date(last(throughputResponse.currentPeriod)?.x ?? NaN).toISOString()
).toMatchInline(`"2021-07-27T08:38:00.000Z"`);
).toMatchInline(`"2021-08-03T07:20:00.000Z"`);
expectSnapshot(
new Date(last(throughputResponse.previousPeriod)?.x ?? NaN).toISOString()
).toMatchInline(`"2021-07-27T08:38:00.000Z"`);
).toMatchInline(`"2021-08-03T07:20:00.000Z"`);
});
it('has the correct number of buckets', () => {

View file

@ -72,8 +72,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(sortedItems.map((item) => item.serviceName)).toMatchInline(`
Array [
"auditbeat",
"kibana",
"kibana-frontend",
"opbeans-dotnet",
"opbeans-go",
"opbeans-java",
@ -100,101 +98,79 @@ export default function ApiTest({ getService }: FtrProviderContext) {
Object {},
Object {
"avgResponseTime": Object {
"value": 658101.291021672,
"value": 520294.126436782,
},
"transactionErrorRate": Object {
"value": 0.0316091954022989,
},
"transactionsPerMinute": Object {
"value": 11.6,
},
},
Object {
"avgResponseTime": Object {
"value": 74805.1452830189,
},
"transactionErrorRate": Object {
"value": 0.00566037735849057,
},
"transactionsPerMinute": Object {
"value": 17.6666666666667,
},
},
Object {
"avgResponseTime": Object {
"value": 411589.785714286,
},
"transactionErrorRate": Object {
"value": 0.0848214285714286,
},
"transactionsPerMinute": Object {
"value": 7.46666666666667,
},
},
Object {
"avgResponseTime": Object {
"value": 53906.6603773585,
},
"transactionErrorRate": Object {
"value": 0,
},
"transactionsPerMinute": Object {
"value": 75.3666666666667,
"value": 7.06666666666667,
},
},
Object {
"avgResponseTime": Object {
"value": 3588095,
"value": 420634.9,
},
"transactionErrorRate": Object {
"value": 0.025,
},
"transactionsPerMinute": Object {
"value": 5.33333333333333,
},
},
Object {
"avgResponseTime": Object {
"value": 40989.5802047782,
},
"transactionErrorRate": Object {
"value": 0.00341296928327645,
},
"transactionsPerMinute": Object {
"value": 9.76666666666667,
},
},
Object {
"avgResponseTime": Object {
"value": 1040880.77777778,
},
"transactionErrorRate": Object {
"value": null,
},
"transactionsPerMinute": Object {
"value": 0.133333333333333,
},
},
Object {
"avgResponseTime": Object {
"value": 586249.027027027,
},
"transactionErrorRate": Object {
"value": 0.00337837837837838,
},
"transactionsPerMinute": Object {
"value": 9.86666666666667,
},
},
Object {
"avgResponseTime": Object {
"value": 218838.954459203,
},
"transactionErrorRate": Object {
"value": 0.0113851992409867,
},
"transactionsPerMinute": Object {
"value": 17.5666666666667,
},
},
Object {
"avgResponseTime": Object {
"value": 17660.3103448276,
},
"transactionErrorRate": Object {
"value": 0.0646551724137931,
},
"transactionsPerMinute": Object {
"value": 7.73333333333333,
},
},
Object {
"avgResponseTime": Object {
"value": 22281.4255319149,
},
"transactionErrorRate": Object {
"value": 0.00531914893617021,
},
"transactionsPerMinute": Object {
"value": 6.26666666666667,
},
},
Object {
"avgResponseTime": Object {
"value": 243948.538461538,
},
"transactionErrorRate": Object {
"value": 0.032051282051282,
},
"transactionsPerMinute": Object {
"value": 5.2,
},
},
Object {
"avgResponseTime": Object {
"value": 44571.2584615385,
},
"transactionErrorRate": Object {
"value": 0.00307692307692308,
},
"transactionsPerMinute": Object {
"value": 10.8333333333333,
},
},
Object {
"avgResponseTime": Object {
"value": 1381526.7037037,
},
"transactionErrorRate": Object {
"value": null,
},
"transactionsPerMinute": Object {
"value": 1.8,
"value": 2.4,
},
},
]
@ -204,12 +180,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
it('returns environments', () => {
expectSnapshot(sortedItems.map((item) => item.environments ?? [])).toMatchInline(`
Array [
Array [
"production",
],
Array [
"production",
],
Array [
"production",
],
@ -345,12 +315,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
"healthy",
"healthy",
"healthy",
undefined,
"healthy",
undefined,
"healthy",
"healthy",
undefined,
"healthy",
"healthy",
]
`);
});

View file

@ -392,8 +392,6 @@ export default function agentConfigurationTests({ getService }: FtrProviderConte
"serviceNames": Array [
"ALL_OPTION_VALUE",
"auditbeat",
"kibana",
"kibana-frontend",
"opbeans-dotnet",
"opbeans-go",
"opbeans-java",

File diff suppressed because it is too large Load diff

View file

@ -45,7 +45,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});
it('returns the correct number of buckets', async () => {
expectSnapshot(response.body.items.length).toMatchInline(`111`);
expectSnapshot(response.body.items.length).toMatchInline(`81`);
});
it('returns the correct buckets', async () => {
@ -60,7 +60,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(firstItem).toMatchInline(`
Object {
"averageResponseTime": 1663,
"averageResponseTime": 1639,
"impact": 0,
"key": Object {
"service.name": "opbeans-java",
@ -75,16 +75,16 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(lastItem).toMatchInline(`
Object {
"averageResponseTime": 131831.268456376,
"averageResponseTime": 5963775,
"impact": 100,
"key": Object {
"service.name": "kibana",
"transaction.name": "markAvailableTasksAsClaimed",
"service.name": "opbeans-dotnet",
"transaction.name": "GET Orders/Get",
},
"serviceName": "kibana",
"transactionName": "markAvailableTasksAsClaimed",
"transactionType": "taskManager markAvailableTasksAsClaimed",
"transactionsPerMinute": 39.7333333333333,
"serviceName": "opbeans-dotnet",
"transactionName": "GET Orders/Get",
"transactionType": "request",
"transactionsPerMinute": 0.633333333333333,
}
`);
@ -98,17 +98,17 @@ export default function ApiTest({ getService }: FtrProviderContext) {
"service.name": "opbeans-node",
"transaction.name": "POST /api/orders",
},
Object {
"service.name": "kibana",
"transaction.name": "GET /translations/?.json",
},
Object {
"service.name": "kibana",
"transaction.name": "GET /ui/#",
},
Object {
"service.name": "opbeans-node",
"transaction.name": "GET /api/orders/:id",
"transaction.name": "GET /api/products/:id",
},
Object {
"service.name": "opbeans-dotnet",
"transaction.name": "POST Orders/Post",
},
Object {
"service.name": "opbeans-python",
"transaction.name": "GET opbeans.views.product",
},
]
`);

View file

@ -3,127 +3,127 @@
exports[`APM API tests basic apm_8.0.0 Error rate when data is loaded returns the transaction error rate has the correct error rate 1`] = `
Array [
Object {
"x": 1627373280000,
"y": 0.4,
},
Object {
"x": 1627373340000,
"y": 0.25,
},
Object {
"x": 1627373400000,
"x": 1627973400000,
"y": 0,
},
Object {
"x": 1627373460000,
"x": 1627973460000,
"y": 0,
},
Object {
"x": 1627373520000,
"y": 0,
},
Object {
"x": 1627373580000,
"y": 0,
},
Object {
"x": 1627373640000,
"y": 0,
},
Object {
"x": 1627373700000,
"y": 0,
},
Object {
"x": 1627373760000,
"y": 0.0833333333333333,
},
Object {
"x": 1627373820000,
"y": null,
},
Object {
"x": 1627373880000,
"y": 0,
},
Object {
"x": 1627373940000,
"x": 1627973520000,
"y": 0.333333333333333,
},
Object {
"x": 1627374000000,
"y": 0.2,
"x": 1627973580000,
"y": 0.181818181818182,
},
Object {
"x": 1627374060000,
"x": 1627973640000,
"y": 0,
},
Object {
"x": 1627374120000,
"x": 1627973700000,
"y": 0,
},
Object {
"x": 1627374180000,
"x": 1627973760000,
"y": 0.166666666666667,
},
Object {
"x": 1627973820000,
"y": 0.181818181818182,
},
Object {
"x": 1627973880000,
"y": 0,
},
Object {
"x": 1627374240000,
"x": 1627973940000,
"y": 0,
},
Object {
"x": 1627374300000,
"y": 0.285714285714286,
"x": 1627974000000,
"y": 0.0833333333333333,
},
Object {
"x": 1627374360000,
"y": 0,
},
Object {
"x": 1627374420000,
"x": 1627974060000,
"y": 0.0769230769230769,
},
Object {
"x": 1627374480000,
"y": 0.142857142857143,
},
Object {
"x": 1627374540000,
"x": 1627974120000,
"y": 0,
},
Object {
"x": 1627374600000,
"y": 0.133333333333333,
"x": 1627974180000,
"y": 0.1,
},
Object {
"x": 1627374660000,
"x": 1627974240000,
"y": 0.153846153846154,
},
Object {
"x": 1627974300000,
"y": 0,
},
Object {
"x": 1627374720000,
"x": 1627974360000,
"y": null,
},
Object {
"x": 1627974420000,
"y": 0,
},
Object {
"x": 1627374780000,
"y": 0.5,
},
Object {
"x": 1627374840000,
"x": 1627974480000,
"y": 0,
},
Object {
"x": 1627374900000,
"x": 1627974540000,
"y": 0,
},
Object {
"x": 1627374960000,
"x": 1627974600000,
"y": 0.125,
},
Object {
"x": 1627974660000,
"y": 0.6,
},
Object {
"x": 1627974720000,
"y": 0.2,
},
Object {
"x": 1627974780000,
"y": 0,
},
Object {
"x": 1627375020000,
"x": 1627974840000,
"y": 0,
},
Object {
"x": 1627375080000,
"x": 1627974900000,
"y": 0.0666666666666667,
},
Object {
"x": 1627974960000,
"y": 0,
},
Object {
"x": 1627975020000,
"y": 0,
},
Object {
"x": 1627975080000,
"y": 0,
},
Object {
"x": 1627975140000,
"y": 0.181818181818182,
},
Object {
"x": 1627975200000,
"y": null,
},
]
@ -132,67 +132,67 @@ Array [
exports[`APM API tests basic apm_8.0.0 Error rate when data is loaded returns the transaction error rate with comparison data has the correct error rate 1`] = `
Array [
Object {
"x": 1627374180000,
"x": 1627974300000,
"y": 0,
},
Object {
"x": 1627374240000,
"x": 1627974360000,
"y": null,
},
Object {
"x": 1627974420000,
"y": 0,
},
Object {
"x": 1627374300000,
"y": 0.285714285714286,
},
Object {
"x": 1627374360000,
"x": 1627974480000,
"y": 0,
},
Object {
"x": 1627374420000,
"y": 0.0769230769230769,
},
Object {
"x": 1627374480000,
"y": 0.142857142857143,
},
Object {
"x": 1627374540000,
"x": 1627974540000,
"y": 0,
},
Object {
"x": 1627374600000,
"y": 0.133333333333333,
"x": 1627974600000,
"y": 0.125,
},
Object {
"x": 1627374660000,
"x": 1627974660000,
"y": 0.6,
},
Object {
"x": 1627974720000,
"y": 0.2,
},
Object {
"x": 1627974780000,
"y": 0,
},
Object {
"x": 1627374720000,
"x": 1627974840000,
"y": 0,
},
Object {
"x": 1627374780000,
"y": 0.5,
"x": 1627974900000,
"y": 0.0666666666666667,
},
Object {
"x": 1627374840000,
"x": 1627974960000,
"y": 0,
},
Object {
"x": 1627374900000,
"x": 1627975020000,
"y": 0,
},
Object {
"x": 1627374960000,
"x": 1627975080000,
"y": 0,
},
Object {
"x": 1627375020000,
"y": 0,
"x": 1627975140000,
"y": 0.181818181818182,
},
Object {
"x": 1627375080000,
"x": 1627975200000,
"y": null,
},
]
@ -201,67 +201,67 @@ Array [
exports[`APM API tests basic apm_8.0.0 Error rate when data is loaded returns the transaction error rate with comparison data has the correct error rate 2`] = `
Array [
Object {
"x": 1627374180000,
"y": 0.4,
},
Object {
"x": 1627374240000,
"y": 0.25,
},
Object {
"x": 1627374300000,
"x": 1627974300000,
"y": 0,
},
Object {
"x": 1627374360000,
"x": 1627974360000,
"y": 0,
},
Object {
"x": 1627374420000,
"y": 0,
},
Object {
"x": 1627374480000,
"y": 0,
},
Object {
"x": 1627374540000,
"y": 0,
},
Object {
"x": 1627374600000,
"y": 0,
},
Object {
"x": 1627374660000,
"y": 0.0833333333333333,
},
Object {
"x": 1627374720000,
"y": null,
},
Object {
"x": 1627374780000,
"y": 0,
},
Object {
"x": 1627374840000,
"x": 1627974420000,
"y": 0.333333333333333,
},
Object {
"x": 1627374900000,
"y": 0.2,
"x": 1627974480000,
"y": 0.181818181818182,
},
Object {
"x": 1627374960000,
"x": 1627974540000,
"y": 0,
},
Object {
"x": 1627375020000,
"x": 1627974600000,
"y": 0,
},
Object {
"x": 1627375080000,
"x": 1627974660000,
"y": 0.166666666666667,
},
Object {
"x": 1627974720000,
"y": 0.181818181818182,
},
Object {
"x": 1627974780000,
"y": 0,
},
Object {
"x": 1627974840000,
"y": 0,
},
Object {
"x": 1627974900000,
"y": 0.0833333333333333,
},
Object {
"x": 1627974960000,
"y": 0.0769230769230769,
},
Object {
"x": 1627975020000,
"y": 0,
},
Object {
"x": 1627975080000,
"y": 0.1,
},
Object {
"x": 1627975140000,
"y": 0.153846153846154,
},
Object {
"x": 1627975200000,
"y": null,
},
]

View file

@ -3,64 +3,64 @@
exports[`APM API tests basic apm_8.0.0 Latency with a basic license when data is loaded time comparison returns some data 1`] = `
Array [
Object {
"x": 1627374180000,
"y": 17647,
"x": 1627974300000,
"y": 22799,
},
Object {
"x": 1627374240000,
"y": 15743,
"x": 1627974360000,
"y": 3227391,
},
Object {
"x": 1627374300000,
"y": 81311,
"x": 1627974420000,
"y": 15565.2222222222,
},
Object {
"x": 1627374360000,
"y": 12303,
"x": 1627974480000,
"y": 54307.5714285714,
},
Object {
"x": 1627374420000,
"y": 11344.4545454545,
"x": 1627974540000,
"y": 16655,
},
Object {
"x": 1627374480000,
"y": 17843,
"x": 1627974600000,
"y": 9453,
},
Object {
"x": 1627374540000,
"y": 35049.6666666667,
"x": 1627974660000,
"y": 31119,
},
Object {
"x": 1627374600000,
"y": 19551,
"x": 1627974720000,
"y": 15282.2,
},
Object {
"x": 1627374660000,
"y": 34125.5454545455,
"x": 1627974780000,
"y": 18709,
},
Object {
"x": 1627374720000,
"y": 34247,
"x": 1627974840000,
"y": 12095,
},
Object {
"x": 1627374780000,
"y": 9727,
"x": 1627974900000,
"y": 16291,
},
Object {
"x": 1627374840000,
"y": 19711,
"x": 1627974960000,
"y": 13444.3333333333,
},
Object {
"x": 1627374900000,
"y": 33738.6363636364,
"x": 1627975020000,
"y": 13241.6666666667,
},
Object {
"x": 1627374960000,
"y": 17160.1428571429,
"x": 1627975080000,
"y": 25535,
},
Object {
"x": 1627375020000,
"y": 14847,
"x": 1627975140000,
"y": 11024.6,
},
]
`;
@ -68,64 +68,64 @@ Array [
exports[`APM API tests basic apm_8.0.0 Latency with a basic license when data is loaded time comparison returns some data 2`] = `
Array [
Object {
"x": 1627374180000,
"y": 11951,
"x": 1627974300000,
"y": 34866.2,
},
Object {
"x": 1627374240000,
"y": 13195.8,
"x": 1627974360000,
"y": 104799,
},
Object {
"x": 1627374300000,
"y": 33892,
"x": 1627974420000,
"y": 36247,
},
Object {
"x": 1627374360000,
"y": 18893.2222222222,
"x": 1627974480000,
"y": 22207,
},
Object {
"x": 1627374420000,
"y": 24063,
"x": 1627974540000,
"y": 80191,
},
Object {
"x": 1627374480000,
"y": 22984.1428571429,
"x": 1627974600000,
"y": 11520.4545454545,
},
Object {
"x": 1627374540000,
"y": 22100.3333333333,
"x": 1627974660000,
"y": 47031.8888888889,
},
Object {
"x": 1627374600000,
"y": 11497.6666666667,
"x": 1627974720000,
"y": 30249.6666666667,
},
Object {
"x": 1627374660000,
"y": 16639,
"x": 1627974780000,
"y": 14868.3333333333,
},
Object {
"x": 1627374720000,
"y": 16719,
"x": 1627974840000,
"y": 17199,
},
Object {
"x": 1627374780000,
"y": 18352.7777777778,
"x": 1627974900000,
"y": 19837.2222222222,
},
Object {
"x": 1627374840000,
"y": 7635.57142857143,
"x": 1627974960000,
"y": 19397.6666666667,
},
Object {
"x": 1627374900000,
"y": 14345.6666666667,
"x": 1627975020000,
"y": 22473.6666666667,
},
Object {
"x": 1627374960000,
"y": 10291.5714285714,
"x": 1627975080000,
"y": 11362.2,
},
Object {
"x": 1627375020000,
"y": 11847,
"x": 1627975140000,
"y": 26319,
},
]
`;
@ -133,14 +133,14 @@ Array [
exports[`APM API tests trial apm_8.0.0 Transaction latency with a trial license when data is loaded with environment selected should return a non-empty anomaly series 1`] = `
Array [
Object {
"x": 1627373700000,
"y": 430148.522515332,
"y0": 0,
"x": 1627974000000,
"y": 85916.7945636914,
"y0": 24329.7607058434,
},
Object {
"x": 1627374600000,
"y": 431362.606025631,
"y0": 0,
"x": 1627974900000,
"y": 88154.9755916935,
"y0": 23498.4070709888,
},
]
`;

View file

@ -3,154 +3,144 @@
exports[`APM API tests basic apm_8.0.0 Top transaction groups when data is loaded returns the correct buckets (when ignoring samples) 1`] = `
Array [
Object {
"averageResponseTime": 1841.66666666667,
"averageResponseTime": 3279,
"impact": 0,
"key": "POST /api/orders",
"p95": 2600,
"p95": 3264,
"serviceName": "opbeans-node",
"transactionName": "POST /api/orders",
"transactionType": "request",
"transactionsPerMinute": 0.1,
},
Object {
"averageResponseTime": 3015,
"impact": 0.016184662836617,
"key": "GET /*",
"p95": 3952,
"serviceName": "opbeans-node",
"transactionName": "GET /*",
"transactionType": "request",
"transactionsPerMinute": 0.0666666666666667,
},
Object {
"averageResponseTime": 15807,
"impact": 0.329526145120981,
"key": "POST /api",
"p95": 15744,
"serviceName": "opbeans-node",
"transactionName": "POST /api",
"transactionType": "request",
"transactionsPerMinute": 0.0333333333333333,
},
Object {
"averageResponseTime": 7135,
"impact": 0.508935536327678,
"key": "GET /api/products",
"p95": 9760,
"averageResponseTime": 2119,
"impact": 0.030253201010799,
"key": "GET /*",
"p95": 2296,
"serviceName": "opbeans-node",
"transactionName": "GET /api/products",
"transactionName": "GET /*",
"transactionType": "request",
"transactionsPerMinute": 0.1,
},
Object {
"averageResponseTime": 11167,
"impact": 0.538708906179593,
"key": "GET /api/orders/:id",
"p95": 11264,
"averageResponseTime": 5167,
"impact": 0.0693425383792029,
"key": "GET /api/products/:id",
"p95": 6144,
"serviceName": "opbeans-node",
"transactionName": "GET /api/orders/:id",
"transactionName": "GET /api/products/:id",
"transactionType": "request",
"transactionsPerMinute": 0.0666666666666667,
},
Object {
"averageResponseTime": 8097.66666666667,
"impact": 1.38005498298527,
"key": "GET /api/products/:id",
"p95": 14640,
"averageResponseTime": 5551,
"impact": 0.349690833515986,
"key": "GET /api/orders/:id",
"p95": 11696,
"serviceName": "opbeans-node",
"transactionName": "GET /api/products/:id",
"transactionName": "GET /api/orders/:id",
"transactionType": "request",
"transactionsPerMinute": 0.2,
"transactionsPerMinute": 0.233333333333333,
},
Object {
"averageResponseTime": 8836.33333333333,
"impact": 1.5220954298999,
"key": "GET /api/products/top",
"p95": 12144,
"serviceName": "opbeans-node",
"transactionName": "GET /api/products/top",
"transactionType": "request",
"transactionsPerMinute": 0.2,
},
Object {
"averageResponseTime": 7675,
"impact": 1.79072878415044,
"key": "GET /api/customers/:id",
"p95": 25200,
"serviceName": "opbeans-node",
"transactionName": "GET /api/customers/:id",
"transactionType": "request",
"transactionsPerMinute": 0.266666666666667,
},
Object {
"averageResponseTime": 7919,
"impact": 1.85328811456049,
"key": "GET /api/orders",
"p95": 13216,
"serviceName": "opbeans-node",
"transactionName": "GET /api/orders",
"transactionType": "request",
"transactionsPerMinute": 0.266666666666667,
},
Object {
"averageResponseTime": 9546.42857142857,
"impact": 1.9645937265042,
"averageResponseTime": 9607,
"impact": 0.723177313441051,
"key": "GET /api/types",
"p95": 15408,
"p95": 18672,
"serviceName": "opbeans-node",
"transactionName": "GET /api/types",
"transactionType": "request",
"transactionsPerMinute": 0.233333333333333,
"transactionsPerMinute": 0.266666666666667,
},
Object {
"averageResponseTime": 12204.7142857143,
"impact": 2.56095849098691,
"key": "GET /api/types/:id",
"p95": 29024,
"serviceName": "opbeans-node",
"transactionName": "GET /api/types/:id",
"transactionType": "request",
"transactionsPerMinute": 0.233333333333333,
},
Object {
"averageResponseTime": 8292.64705882353,
"impact": 4.34101501231637,
"averageResponseTime": 8669.22222222222,
"impact": 0.734647581660545,
"key": "GET /api/products/:id/customers",
"p95": 13360,
"p95": 15920,
"serviceName": "opbeans-node",
"transactionName": "GET /api/products/:id/customers",
"transactionType": "request",
"transactionsPerMinute": 0.566666666666667,
},
Object {
"averageResponseTime": 14449,
"impact": 7.23210857633296,
"key": "GET /api/stats",
"p95": 20704,
"serviceName": "opbeans-node",
"transactionName": "GET /api/stats",
"transactionType": "request",
"transactionsPerMinute": 0.533333333333333,
},
Object {
"averageResponseTime": 26807.8888888889,
"impact": 7.5553851981804,
"key": "GET /api/customers",
"p95": 43136,
"serviceName": "opbeans-node",
"transactionName": "GET /api/customers",
"transactionType": "request",
"transactionsPerMinute": 0.3,
},
Object {
"averageResponseTime": 33610.3548387097,
"averageResponseTime": 7571,
"impact": 0.860741901273131,
"key": "GET /api/types/:id",
"p95": 13552,
"serviceName": "opbeans-node",
"transactionName": "GET /api/types/:id",
"transactionType": "request",
"transactionsPerMinute": 0.4,
},
Object {
"averageResponseTime": 8753.90909090909,
"impact": 0.914220675379615,
"key": "GET /api/customers/:id",
"p95": 11248,
"serviceName": "opbeans-node",
"transactionName": "GET /api/customers/:id",
"transactionType": "request",
"transactionsPerMinute": 0.366666666666667,
},
Object {
"averageResponseTime": 7807,
"impact": 1.04204487263284,
"key": "GET /api/products/top",
"p95": 14000,
"serviceName": "opbeans-node",
"transactionName": "GET /api/products/top",
"transactionType": "request",
"transactionsPerMinute": 0.466666666666667,
},
Object {
"averageResponseTime": 11913.6666666667,
"impact": 1.37294294450729,
"key": "GET /api/orders",
"p95": 15008,
"serviceName": "opbeans-node",
"transactionName": "GET /api/orders",
"transactionType": "request",
"transactionsPerMinute": 0.4,
},
Object {
"averageResponseTime": 9062.52941176471,
"impact": 1.48203335322037,
"key": "GET /api/products",
"p95": 15728,
"serviceName": "opbeans-node",
"transactionName": "GET /api/products",
"transactionType": "request",
"transactionsPerMinute": 0.566666666666667,
},
Object {
"averageResponseTime": 19858.2,
"impact": 1.91960393665109,
"key": "GET /api/stats",
"p95": 33984,
"serviceName": "opbeans-node",
"transactionName": "GET /api/stats",
"transactionType": "request",
"transactionsPerMinute": 0.333333333333333,
},
Object {
"averageResponseTime": 22276.8181818182,
"impact": 2.37628180493074,
"key": "GET /api/customers",
"p95": 26304,
"serviceName": "opbeans-node",
"transactionName": "GET /api/customers",
"transactionType": "request",
"transactionsPerMinute": 0.366666666666667,
},
Object {
"averageResponseTime": 107130.621052632,
"impact": 100,
"key": "GET /api",
"p95": 98272,
"p95": 151520,
"serviceName": "opbeans-node",
"transactionName": "GET /api",
"transactionType": "request",
"transactionsPerMinute": 3.1,
"transactionsPerMinute": 3.16666666666667,
},
]
`;

View file

@ -69,23 +69,23 @@ export default function ApiTest({ getService }: FtrProviderContext) {
).toMatchInline(`
Array [
Object {
"x": "2021-07-27T08:08:00.000Z",
"x": "2021-08-03T06:50:00.000Z",
"y": null,
},
Object {
"x": "2021-07-27T08:08:30.000Z",
"x": "2021-08-03T06:50:30.000Z",
"y": 1,
},
Object {
"x": "2021-07-27T08:09:00.000Z",
"x": "2021-08-03T06:51:00.000Z",
"y": null,
},
Object {
"x": "2021-08-03T06:51:30.000Z",
"y": 1,
},
Object {
"x": "2021-07-27T08:09:30.000Z",
"y": 1,
},
Object {
"x": "2021-07-27T08:10:00.000Z",
"x": "2021-08-03T06:52:00.000Z",
"y": 1,
},
]

View file

@ -64,11 +64,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});
it('returns the correct number of buckets', () => {
expectSnapshot(response.body.buckets.length).toMatchInline(`12`);
expectSnapshot(response.body.buckets.length).toMatchInline(`26`);
});
it('returns the correct bucket size', () => {
expectSnapshot(response.body.bucketSize).toMatchInline(`5000`);
expectSnapshot(response.body.bucketSize).toMatchInline(`1000`);
});
it('returns the correct buckets', () => {
@ -76,22 +76,14 @@ export default function ApiTest({ getService }: FtrProviderContext) {
(bucket: any) => !isEmpty(bucket.samples)
);
expectSnapshot(bucketWithSamples.count).toMatchInline(`3`);
expectSnapshot(bucketWithSamples.count).toMatchInline(`1`);
expectSnapshot(bucketWithSamples.samples.sort((sample: any) => sample.traceId))
.toMatchInline(`
Array [
Object {
"traceId": "e48afea3046e0e8c17c72bf8bfac1607",
"transactionId": "ed4e7a5c044aff66",
},
Object {
"traceId": "0733f58b70d8a3fd983a15459e4a5fcf",
"transactionId": "564511c803125e00",
},
Object {
"traceId": "c1bc7fcf4e999c03107c129c131fb55c",
"transactionId": "82c81c2c6c483da3",
"traceId": "6d85d8f1bc4bbbfdb19cdba59d2fc164",
"transactionId": "d0a16f0f52f25d6b",
},
]
`);

View file

@ -101,7 +101,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
new Date(
first(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
).toISOString()
).toMatchInline(`"2021-07-27T08:08:00.000Z"`);
).toMatchInline(`"2021-08-03T06:50:00.000Z"`);
});
it('has the correct end date', () => {
@ -109,7 +109,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
new Date(
last(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
).toISOString()
).toMatchInline(`"2021-07-27T08:38:00.000Z"`);
).toMatchInline(`"2021-08-03T07:20:00.000Z"`);
});
it('has the correct number of buckets', () => {
@ -120,7 +120,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
it('has the correct calculation for average', () => {
expectSnapshot(errorRateResponse.currentPeriod.average).toMatchInline(
`0.0646551724137931`
`0.0848214285714286`
);
});
@ -172,12 +172,12 @@ export default function ApiTest({ getService }: FtrProviderContext) {
new Date(
first(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
).toISOString()
).toMatchInline(`"2021-07-27T08:23:00.000Z"`);
).toMatchInline(`"2021-08-03T07:05:00.000Z"`);
expectSnapshot(
new Date(
first(errorRateResponse.previousPeriod.transactionErrorRate)?.x ?? NaN
).toISOString()
).toMatchInline(`"2021-07-27T08:23:00.000Z"`);
).toMatchInline(`"2021-08-03T07:05:00.000Z"`);
});
it('has the correct end date', () => {
@ -185,12 +185,12 @@ export default function ApiTest({ getService }: FtrProviderContext) {
new Date(
last(errorRateResponse.currentPeriod.transactionErrorRate)?.x ?? NaN
).toISOString()
).toMatchInline(`"2021-07-27T08:38:00.000Z"`);
).toMatchInline(`"2021-08-03T07:20:00.000Z"`);
expectSnapshot(
new Date(
last(errorRateResponse.previousPeriod.transactionErrorRate)?.x ?? NaN
).toISOString()
).toMatchInline(`"2021-07-27T08:38:00.000Z"`);
).toMatchInline(`"2021-08-03T07:20:00.000Z"`);
});
it('has the correct number of buckets', () => {
@ -204,10 +204,10 @@ export default function ApiTest({ getService }: FtrProviderContext) {
it('has the correct calculation for average', () => {
expectSnapshot(errorRateResponse.currentPeriod.average).toMatchInline(
`0.0514705882352941`
`0.0792079207920792`
);
expectSnapshot(errorRateResponse.previousPeriod.average).toMatchInline(
`0.0833333333333333`
`0.0894308943089431`
);
});

View file

@ -160,7 +160,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expect(latencyChartReturn.currentPeriod.overallAvgDuration).not.to.be(null);
expectSnapshot(latencyChartReturn.currentPeriod.overallAvgDuration).toMatchInline(
`22281.4255319149`
`53906.6603773585`
);
expect(latencyChartReturn.currentPeriod.latencyTimeseries.length).to.be.eql(31);
@ -293,7 +293,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expect(latencyChartReturn).to.have.property('anomalyTimeseries');
expect(latencyChartReturn.anomalyTimeseries).to.have.property('jobId');
expectSnapshot(latencyChartReturn.anomalyTimeseries?.jobId).toMatchInline(
`"apm-production-802c-high_mean_transaction_duration"`
`"apm-production-6117-high_mean_transaction_duration"`
);
});

View file

@ -61,7 +61,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});
it('returns the correct number of buckets', () => {
expectSnapshot(response.body.items.length).toMatchInline(`15`);
expectSnapshot(response.body.items.length).toMatchInline(`14`);
});
it('returns the correct buckets (when ignoring samples)', async () => {

View file

@ -104,7 +104,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expect(removeEmptyCoordinates(errorRate).length).to.be.greaterThan(0);
expectSnapshot(errorRate).toMatch();
expectSnapshot(roundNumber(impact)).toMatchInline(`"45.25"`);
expectSnapshot(roundNumber(impact)).toMatchInline(`"98.49"`);
});
it('returns the correct data for latency aggregation 99th percentile', async () => {
@ -280,8 +280,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const currentPeriodFirstItem = currentPeriodItems[0];
const previousPeriodFirstItem = previousPeriodItems[0];
expectSnapshot(roundNumber(currentPeriodFirstItem.impact)).toMatchInline(`"41.24"`);
expectSnapshot(roundNumber(previousPeriodFirstItem.impact)).toMatchInline(`"51.40"`);
expectSnapshot(roundNumber(currentPeriodFirstItem.impact)).toMatchInline(`"59.04"`);
expectSnapshot(roundNumber(previousPeriodFirstItem.impact)).toMatchInline(`"99.05"`);
});
});
}

View file

@ -72,15 +72,15 @@ export default function ApiTest({ getService }: FtrProviderContext) {
).toMatchInline(`
Array [
"DispatcherServlet#doGet",
"APIRestController#topProducts",
"APIRestController#customerWhoBought",
"ResourceHttpRequestHandler",
"APIRestController#orders",
"APIRestController#topProducts",
"APIRestController#customer",
"APIRestController#products",
"APIRestController#product",
"APIRestController#order",
"APIRestController#stats",
"APIRestController#customerWhoBought",
"APIRestController#product",
"APIRestController#orders",
"APIRestController#products",
"APIRestController#customers",
"DispatcherServlet#doPost",
]
@ -91,18 +91,18 @@ export default function ApiTest({ getService }: FtrProviderContext) {
);
expectSnapshot(impacts).toMatchInline(`
Array [
45.2518944682114,
7.66727553895448,
6.67159361826343,
6.77808118340561,
4.02770970947908,
5.4534910738867,
4.13361150758861,
4.84592862623963,
2.34043217891668,
7.66153990342654,
5.09839421730785,
0.0700479743199733,
98.4867713293593,
0.0910992862692518,
0.217172932411727,
0.197499651612207,
0.117088451625813,
0.203168003440319,
0.0956764857936742,
0.353287132108131,
0.043688393280619,
0.0754467823979389,
0.115710953190738,
0.00339059851027124,
]
`);
@ -113,11 +113,11 @@ export default function ApiTest({ getService }: FtrProviderContext) {
expectSnapshot(pick(firstItem, 'name', 'latency', 'throughput', 'errorRate', 'impact'))
.toMatchInline(`
Object {
"errorRate": 0.0181818181818182,
"impact": 45.2518944682114,
"latency": 33710.1272727273,
"errorRate": 0.08,
"impact": 98.4867713293593,
"latency": 1816019.48,
"name": "DispatcherServlet#doGet",
"throughput": 1.83333333333333,
"throughput": 1.66666666666667,
}
`);
});
@ -140,7 +140,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const transctionsGroupsPrimaryStatistics = response.body as TransactionsGroupsPrimaryStatistics;
const firstItem = transctionsGroupsPrimaryStatistics.transactionGroups[0];
expectSnapshot(firstItem.latency).toMatchInline(`193944.6`);
expectSnapshot(firstItem.latency).toMatchInline(`66846719`);
});
}
);