Report kibana protocol (#135202)

* kibana protocol

* oops

* Update loaded_kibana.ts

* Update core_system.ts
This commit is contained in:
Liza Katz 2022-06-27 18:13:53 +03:00 committed by GitHub
parent 4be65d54c3
commit 071c878717
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View file

@ -255,6 +255,7 @@ describe('#start()', () => {
kibana_version: '1.2.3',
load_started: 456,
bootstrap_started: 123,
protocol: 'http:',
});
expect(window.performance.clearMarks).toHaveBeenCalledTimes(1);
@ -278,6 +279,7 @@ describe('#start()', () => {
memory_js_heap_size_limit: 3,
memory_js_heap_size_total: 2,
memory_js_heap_size_used: 1,
protocol: 'http:',
});
});

View file

@ -146,6 +146,7 @@ export class CoreSystem {
private reportKibanaLoadedEvent(analytics: AnalyticsServiceStart) {
analytics.reportEvent('Loaded Kibana', {
kibana_version: this.coreContext.env.packageInfo.version,
protocol: window.location.protocol,
...fetchOptionalMemoryInfo(),
...this.getLoadMarksInfo(),
});
@ -390,6 +391,12 @@ export class CoreSystem {
optional: true,
},
},
protocol: {
type: 'keyword',
_meta: {
description: 'Value from window.location.protocol',
},
},
},
});
}

View file

@ -24,6 +24,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(event.event_type).to.eql('Loaded Kibana');
expect(event.properties).to.have.property('kibana_version');
expect(event.properties.kibana_version).to.be.a('string');
expect(event.properties).to.have.property('protocol');
expect(event.properties.protocol).to.be.a('string');
// Kibana Loaded timings
expect(event.properties).to.have.property('load_started');