Skip to content
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]Additional metrics for kpi over time #96532

Merged
merged 110 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
9e7c169
wip
shahzad31 Mar 7, 2021
12c028f
Merge branch 'master' into exploratry-view
shahzad31 Mar 8, 2021
b089a87
Save progress
shahzad31 Mar 10, 2021
501a166
Merge branch 'master' into exploratry-view
shahzad31 Mar 10, 2021
3ed7c82
breakpoint
shahzad31 Mar 11, 2021
c303383
Merge branch 'master' into exploratry-view
shahzad31 Mar 11, 2021
73b2c41
more views
shahzad31 Mar 15, 2021
9166efc
add def col
shahzad31 Mar 15, 2021
3783b5f
Merge branch 'master' into exploratry-view
shahzad31 Mar 15, 2021
04316ab
update
shahzad31 Mar 15, 2021
9677edd
Merge branch 'master' into exploratry-view
shahzad31 Mar 15, 2021
e715ace
wip
shahzad31 Mar 15, 2021
5d3605f
Merge branch 'master' into exploratry-view
shahzad31 Mar 15, 2021
3d824be
wip
shahzad31 Mar 16, 2021
1db17ad
Merge branch 'master' into exploratry-view
shahzad31 Mar 16, 2021
306fa3f
wip
shahzad31 Mar 17, 2021
e2f281f
Merge branch 'master' into exploratry-view
shahzad31 Mar 17, 2021
700cdd7
fix more stuff
shahzad31 Mar 18, 2021
ee82e77
Merge branch 'master' into exploratry-view
shahzad31 Mar 19, 2021
1d5a7c8
update
shahzad31 Mar 21, 2021
91bcf95
Merge branch 'master' into exploratry-view
shahzad31 Mar 22, 2021
2ec3924
update filters
shahzad31 Mar 22, 2021
4f8f118
update
shahzad31 Mar 22, 2021
b2fbc2b
wip
shahzad31 Mar 23, 2021
e5c1e59
update
shahzad31 Mar 23, 2021
c14a2e5
update asset
shahzad31 Mar 24, 2021
165a540
update
shahzad31 Mar 24, 2021
e3b3eb5
update eslint
shahzad31 Mar 24, 2021
4b8aab4
Merge branch 'master' into exploratry-view
shahzad31 Mar 24, 2021
84c2abe
udate
shahzad31 Mar 24, 2021
75b87e1
wip
shahzad31 Mar 24, 2021
533698a
update plugin start/setup
shahzad31 Mar 24, 2021
f60a7f5
Merge branch 'master' into exploratry-view
shahzad31 Mar 24, 2021
805f062
update
shahzad31 Mar 24, 2021
8952b21
Merge branch 'master' into update-obsv-plugin-setup
shahzad31 Mar 24, 2021
68282c6
fix types
shahzad31 Mar 24, 2021
9886ef6
Merge branch 'master' into update-obsv-plugin-setup
shahzad31 Mar 25, 2021
a2121eb
update types
shahzad31 Mar 25, 2021
4b87ef9
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
ad9574f
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
52cbefa
fix type
shahzad31 Mar 25, 2021
a6dcd15
fix types
shahzad31 Mar 25, 2021
7af9e25
fix types
shahzad31 Mar 25, 2021
6c1a330
fix types
shahzad31 Mar 25, 2021
89d87e0
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
a85d735
Merge branch 'master' into exploratry-view
shahzad31 Mar 25, 2021
3c670f2
fix test
shahzad31 Mar 25, 2021
d26f306
update test
shahzad31 Mar 25, 2021
ec98c08
Merge branch 'update-obsv-plugin-setup' into exploratry-view
shahzad31 Mar 25, 2021
43887f1
update types
shahzad31 Mar 26, 2021
967888a
fix types
shahzad31 Mar 26, 2021
8e5109f
Merge branch 'master' into exploratry-view
shahzad31 Mar 26, 2021
9acecc1
fix issue
shahzad31 Mar 26, 2021
082eaf4
Merge branch 'master' into exploratry-view
shahzad31 Mar 26, 2021
211716b
fix types
shahzad31 Mar 26, 2021
635be8e
test
shahzad31 Mar 26, 2021
50e100f
Merge branch 'master' into exploratry-view
shahzad31 Mar 26, 2021
dbb98c7
update tests
shahzad31 Mar 29, 2021
68d8243
added ests
shahzad31 Mar 29, 2021
1f4a516
update
shahzad31 Mar 29, 2021
31b60b6
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
0557ad3
update
shahzad31 Mar 30, 2021
c512b3d
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
e4ce7bd
update labels
shahzad31 Mar 30, 2021
1b57eff
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
17120a6
Merge branch 'master' into exploratry-view
shahzad31 Mar 30, 2021
1710e5d
PR feedback
shahzad31 Mar 31, 2021
f162f96
update
shahzad31 Mar 31, 2021
c43e925
add loading state
shahzad31 Mar 31, 2021
adfefa3
fix types
shahzad31 Mar 31, 2021
e004a7a
fix types
shahzad31 Mar 31, 2021
01a1559
update test
shahzad31 Mar 31, 2021
5406e75
Merge branch 'master' into exploratry-view
shahzad31 Mar 31, 2021
2b5229b
update test
shahzad31 Mar 31, 2021
f894f18
update constants
shahzad31 Mar 31, 2021
7050460
fix type
shahzad31 Mar 31, 2021
510cce9
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Mar 31, 2021
b3af356
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Apr 1, 2021
64c0f36
wip
shahzad31 Apr 1, 2021
b36a967
only update if changed
shahzad31 Apr 2, 2021
d0c4454
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Apr 3, 2021
7871c4f
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Apr 5, 2021
b6a0435
Merge branch 'master' into additional-metrics-for-kpi
shahzad31 Apr 5, 2021
ae233e3
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Apr 5, 2021
1d5194d
update types
shahzad31 Apr 5, 2021
eceed37
use index pattern for formatting
shahzad31 Apr 6, 2021
a762327
update files
shahzad31 Apr 6, 2021
cf61962
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Apr 6, 2021
cf69c6e
fix types
shahzad31 Apr 6, 2021
2c1df9c
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Apr 6, 2021
93927f4
update
shahzad31 Apr 6, 2021
cddd514
added tests
shahzad31 Apr 6, 2021
57fea63
update code ownder
shahzad31 Apr 6, 2021
5deb7e6
Merge branch 'master' into use-index-patterns-for-formatting
shahzad31 Apr 6, 2021
b5d5c22
snapshots
shahzad31 Apr 6, 2021
63bd744
Merge branch 'use-index-patterns-for-formatting' into additional-metr…
shahzad31 Apr 6, 2021
a6ccc47
Merge branch 'master' into additional-metrics-for-kpi
shahzad31 Apr 6, 2021
fe27bc3
Merge branch 'master' into additional-metrics-for-kpi
shahzad31 Apr 6, 2021
320d345
update
shahzad31 Apr 7, 2021
76f26db
Merge branch 'master' into additional-metrics-for-kpi
shahzad31 Apr 7, 2021
e218652
udate
shahzad31 Apr 7, 2021
6bbc85e
add additional metric
shahzad31 Apr 7, 2021
f0ead1b
Merge branch 'master' into additional-metrics-for-kpi
shahzad31 Apr 8, 2021
f93106b
update types
shahzad31 Apr 8, 2021
edef8c2
update kp
shahzad31 Apr 8, 2021
af326a9
fix test
shahzad31 Apr 8, 2021
c5ae1f3
fix test
shahzad31 Apr 8, 2021
c8678ec
i18n
shahzad31 Apr 8, 2021
7da240d
fix loading issues
shahzad31 Apr 8, 2021
e413d18
Merge branch 'master' into additional-metrics-for-kpi
shahzad31 Apr 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions x-pack/plugins/lens/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export type {
IndexPatternPersistedState,
PersistedIndexPatternLayer,
IndexPatternColumn,
FieldBasedIndexPatternColumn,
OperationType,
IncompleteColumn,
FiltersIndexPatternColumn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { IndexPatternAggRestrictions } from '../../../../../src/plugins/data/pub
import { DragDropIdentifier } from '../drag_drop/providers';

export {
FieldBasedIndexPatternColumn,
IndexPatternColumn,
OperationType,
IncompleteColumn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { ConfigProps, DataSeries } from '../../types';
import { FieldLabels } from '../constants';
import { buildPhraseFilter } from '../utils';
import { OperationType } from '../../../../../../../lens/public';

export function getServiceLatencyLensConfig({ seriesId, indexPattern }: ConfigProps): DataSeries {
return {
Expand All @@ -20,11 +19,11 @@ export function getServiceLatencyLensConfig({ seriesId, indexPattern }: ConfigPr
sourceField: '@timestamp',
},
yAxisColumn: {
operationType: 'average' as OperationType,
operationType: 'average',
sourceField: 'transaction.duration.us',
label: 'Latency',
},
hasMetricType: true,
hasOperationType: true,
defaultFilters: [
'user_agent.name',
'user_agent.os.name',
Expand All @@ -37,7 +36,7 @@ export function getServiceLatencyLensConfig({ seriesId, indexPattern }: ConfigPr
'client.geo.country_name',
'user_agent.device.name',
],
filters: [buildPhraseFilter('transaction.type', 'request', indexPattern)],
filters: buildPhraseFilter('transaction.type', 'request', indexPattern),
labels: { ...FieldLabels },
reportDefinitions: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,25 @@
import { ConfigProps, DataSeries } from '../../types';
import { FieldLabels } from '../constants/constants';
import { buildPhraseFilter } from '../utils';
import { OperationType } from '../../../../../../../lens/public';

export function getServiceThroughputLensConfig({
seriesId,
indexPattern,
}: ConfigProps): DataSeries {
return {
id: seriesId,
reportType: 'service-latency',
reportType: 'service-throughput',
defaultSeriesType: 'line',
seriesTypes: ['line', 'bar'],
xAxisColumn: {
sourceField: '@timestamp',
},
yAxisColumn: {
operationType: 'average' as OperationType,
operationType: 'average',
sourceField: 'transaction.duration.us',
label: 'Throughput',
},
hasMetricType: true,
hasOperationType: true,
defaultFilters: [
'user_agent.name',
'user_agent.os.name',
Expand All @@ -40,7 +39,7 @@ export function getServiceThroughputLensConfig({
'client.geo.country_name',
'user_agent.device.name',
],
filters: [buildPhraseFilter('transaction.type', 'request', indexPattern)],
filters: buildPhraseFilter('transaction.type', 'request', indexPattern),
labels: { ...FieldLabels },
reportDefinitions: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import { AppDataType, ReportViewTypeId } from '../../types';
import { CLS_FIELD, FCP_FIELD, FID_FIELD, LCP_FIELD, TBT_FIELD } from './elasticsearch_fieldnames';

export const DEFAULT_TIME = { from: 'now-1h', to: 'now' };

export const FieldLabels: Record<string, string> = {
'user_agent.name': 'Browser family',
'user_agent.version': 'Browser version',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

export enum URL_KEYS {
METRIC_TYPE = 'mt',
OPERATION_TYPE = 'op',
REPORT_TYPE = 'rt',
SERIES_TYPE = 'st',
BREAK_DOWN = 'bd',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,37 @@ describe('Lens Attribute', () => {
it('should return expected field type', function () {
expect(JSON.stringify(lnsAttr.getFieldMeta('transaction.type'))).toEqual(
JSON.stringify({
count: 0,
name: 'transaction.type',
type: 'string',
esTypes: ['keyword'],
scripted: false,
searchable: true,
aggregatable: true,
readFromDocValues: true,
fieldMeta: {
count: 0,
name: 'transaction.type',
type: 'string',
esTypes: ['keyword'],
scripted: false,
searchable: true,
aggregatable: true,
readFromDocValues: true,
},
fieldName: 'transaction.type',
columnType: null,
})
);
});

it('should return expected field type for custom field with default value', function () {
expect(JSON.stringify(lnsAttr.getFieldMeta('performance.metric'))).toEqual(
JSON.stringify({
count: 0,
name: 'transaction.duration.us',
type: 'number',
esTypes: ['long'],
scripted: false,
searchable: true,
aggregatable: true,
readFromDocValues: true,
fieldMeta: {
count: 0,
name: 'transaction.duration.us',
type: 'number',
esTypes: ['long'],
scripted: false,
searchable: true,
aggregatable: true,
readFromDocValues: true,
},
fieldName: 'transaction.duration.us',
columnType: null,
})
);
});
Expand All @@ -76,20 +84,45 @@ describe('Lens Attribute', () => {

expect(JSON.stringify(lnsAttr.getFieldMeta('performance.metric'))).toEqual(
JSON.stringify({
count: 0,
name: LCP_FIELD,
type: 'number',
esTypes: ['scaled_float'],
scripted: false,
searchable: true,
aggregatable: true,
readFromDocValues: true,
fieldMeta: {
count: 0,
name: LCP_FIELD,
type: 'number',
esTypes: ['scaled_float'],
scripted: false,
searchable: true,
aggregatable: true,
readFromDocValues: true,
},
fieldName: LCP_FIELD,
})
);
});

it('should return expected number column', function () {
expect(lnsAttr.getNumberColumn('transaction.duration.us')).toEqual({
it('should return expected number range column', function () {
expect(lnsAttr.getNumberRangeColumn('transaction.duration.us')).toEqual({
dataType: 'number',
isBucketed: true,
label: 'Page load time (Seconds)',
operationType: 'range',
params: {
maxBars: 'auto',
ranges: [
{
from: 0,
label: '',
to: 1000,
},
],
type: 'histogram',
},
scale: 'interval',
sourceField: 'transaction.duration.us',
});
});

it('should return expected number operation column', function () {
expect(lnsAttr.getNumberRangeColumn('transaction.duration.us')).toEqual({
dataType: 'number',
isBucketed: true,
label: 'Page load time (Seconds)',
Expand Down
Loading