-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Exploratory View] Mobile experience #99565
Changes from 23 commits
5461cf8
195ad59
9e261b8
9626988
850f555
b522c08
720c68f
e8a678f
5a260b2
e2a6e1b
32d36c2
9884d27
487e9c4
24768ea
41a76f3
9ea07ec
f71aa48
dde04c3
2cb4f1a
51569fa
e54969c
1631c07
1f9c6ad
17786ca
9421c50
5192aa0
716184f
6a1390d
3a8bb82
48ece1f
26de779
6754f80
541df52
fe641a0
423fba9
a802015
dfc1690
8ab2ddd
7f3bbc3
b1005cd
c949862
ec009fb
2a9e540
22ef586
ebf4ec5
0ecb538
2289c58
067a7c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { ConfigProps, DataSeries } from '../../types'; | ||
import { FieldLabels, OPERATION_COLUMN } from '../constants'; | ||
import { buildPhraseFilter } from '../utils'; | ||
import { | ||
METRIC_SYSTEM_CPU_USAGE, | ||
METRIC_SYSTEM_MEMORY_USAGE, | ||
SERVICE_NAME, | ||
TRANSACTION_DURATION, | ||
} from '../constants/elasticsearch_fieldnames'; | ||
|
||
export function getMobileKPIConfig({ seriesId, indexPattern }: ConfigProps): DataSeries { | ||
return { | ||
id: seriesId, | ||
reportType: 'service-latency', | ||
defaultSeriesType: 'line', | ||
seriesTypes: ['line', 'bar'], | ||
xAxisColumn: { | ||
sourceField: '@timestamp', | ||
}, | ||
yAxisColumns: [ | ||
{ | ||
sourceField: 'business.kpi', | ||
operationType: 'median', | ||
}, | ||
], | ||
hasOperationType: true, | ||
defaultFilters: [ | ||
'labels.net_connection_carrier_name', | ||
'labels.device_model', | ||
'labels.net_connection_type', | ||
'host.os.platform', | ||
'host.os.full', | ||
'service.version', | ||
], | ||
breakdowns: [ | ||
'labels.net_connection_carrier_name', | ||
'labels.device_model', | ||
'labels.net_connection_type', | ||
'host.os.platform', | ||
'host.os.full', | ||
'service.version', | ||
'labels.net_connection_carrier_isoCountryCode', | ||
], | ||
filters: [...buildPhraseFilter('agent.name', 'iOS/swift', indexPattern)], | ||
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. we probably needs to discuss with APM-UI team on what other default filters we need to add here to fetch apm ios data. 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. possibly also |
||
labels: { | ||
...FieldLabels, | ||
[TRANSACTION_DURATION]: 'Response latency', | ||
[SERVICE_NAME]: 'Mobile app', | ||
[METRIC_SYSTEM_MEMORY_USAGE]: 'Memory usage', | ||
[METRIC_SYSTEM_CPU_USAGE]: 'CPU usage', | ||
}, | ||
reportDefinitions: [ | ||
{ | ||
field: SERVICE_NAME, | ||
required: true, | ||
}, | ||
{ | ||
field: 'business.kpi', | ||
custom: true, | ||
options: [ | ||
{ | ||
label: 'Response latency', | ||
field: TRANSACTION_DURATION, | ||
id: TRANSACTION_DURATION, | ||
columnType: OPERATION_COLUMN, | ||
}, | ||
{ | ||
label: 'Memory Usage', | ||
field: METRIC_SYSTEM_MEMORY_USAGE, | ||
id: METRIC_SYSTEM_MEMORY_USAGE, | ||
columnType: OPERATION_COLUMN, | ||
}, | ||
{ | ||
label: 'CPU Usage', | ||
field: METRIC_SYSTEM_CPU_USAGE, | ||
id: METRIC_SYSTEM_CPU_USAGE, | ||
columnType: OPERATION_COLUMN, | ||
}, | ||
], | ||
}, | ||
], | ||
}; | ||
} |
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.
It seems a little odd to return the indices from this endpoint, since it's called
has_data
. If we really want to do it, shouldn't this include all of the indices that are being queried?Eg:
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.
ideally i think we should return info like this from all endpoints. I will modify it to return whole APM indices settings, instead of just transaction.
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.
Why should every API return this info? We already have an API (
GET /api/apm/settings/apm-index-settings
) where you can get this.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.
i meant in a sense of visiblity perspective, the way we are doing that inspect stuff for debugging purpose, i think it's no harm if we return indices information as an API response, it instanlty give you a view, against which indices that API got executed.