Skip to content

Commit

Permalink
Merge branch 'main' into endpoint-e2e-coverage-multipass
Browse files Browse the repository at this point in the history
  • Loading branch information
szwarckonrad authored Apr 25, 2023
2 parents f5ce24d + ecc54af commit 28e459e
Show file tree
Hide file tree
Showing 344 changed files with 11,741 additions and 2,574 deletions.
23 changes: 11 additions & 12 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -776,21 +776,20 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations

### Observability Plugins

# Observability Shared
/x-pack/plugins/observability/public/components/shared/date_picker/ @elastic/uptime
# Observability Shared App
x-pack/plugins/observability_shared @elastic/observability-ui

# Unified Observability - on hold due to team capacity shortage
# For now, if you're changing these pages, get a review from someone who understand the changes
# /x-pack/plugins/observability/public/context @elastic/unified-observability
# /x-pack/test/observability_functional @elastic/unified-observability
# Observability App
x-pack/plugins/observability @elastic/actionable-observability

# Observability App > Overview page
x-pack/plugins/observability/public/pages/overview @elastic/observability-ui

# Home/Overview/Landing Pages
/x-pack/plugins/observability/public/pages/home @elastic/observability-ui
/x-pack/plugins/observability/public/pages/landing @elastic/observability-ui
/x-pack/plugins/observability/public/pages/overview @elastic/observability-ui
# Observability App > Alert Details
x-pack/packages/observability/alert_details @elastic/actionable-observability

# Actionable Observability
/x-pack/test/observability_functional @elastic/actionable-observability
# Observability App > Functional Tests
x-pack/test/observability_functional @elastic/actionable-observability

# Observability robots
/.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots
Expand Down
6 changes: 6 additions & 0 deletions fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"name": "fleet_server",
"version": "1.3.0"
},
{
"name": "profiler_symbolizer",
"version": "8.8.0-preview",
"forceAlignStackVersion": true,
"allowSyncToPrerelease": true
},
{
"name": "synthetics",
"version": "0.12.1"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export const REMOVED_TYPES: string[] = [
'csp_rule',
// Removed in 8.8 https://github.com/elastic/kibana/pull/151116
'upgrade-assistant-telemetry',
// Removed in 8.8 https://github.com/elastic/kibana/pull/155204
'endpoint:user-artifact',
].sort();

export const excludeUnusedTypesQuery: QueryDslQueryContainer = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ describe('createInitialState', () => {
"type": "csp_rule",
},
},
Object {
"term": Object {
"type": "endpoint:user-artifact",
},
},
Object {
"term": Object {
"type": "file-upload-telemetry",
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type ApmApplicationMetricFields = Partial<{
'faas.timeout': number;
'faas.coldstart_duration': number;
'faas.duration': number;
'application.launch.time': number;
}>;

export type ApmUserAgentFields = Partial<{
Expand Down Expand Up @@ -88,6 +89,7 @@ export type ApmFields = Fields<{
'error.grouping_key': string;
'error.grouping_name': string;
'error.id': string;
'error.type': string;
'event.ingested': number;
'event.name': string;
'event.outcome': string;
Expand Down
22 changes: 21 additions & 1 deletion packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import { Entity } from '../entity';
import { Span } from './span';
import { Transaction } from './transaction';
import { ApmFields, SpanParams, GeoLocation } from './apm_fields';
import { ApmFields, SpanParams, GeoLocation, ApmApplicationMetricFields } from './apm_fields';
import { generateLongId } from '../utils/generate_id';
import { Metricset } from './metricset';
import { ApmError } from './apm_error';

export interface DeviceInfo {
manufacturer: string;
Expand Down Expand Up @@ -115,6 +117,7 @@ export class MobileDevice extends Entity<ApmFields> {
return this;
}

// FIXME synthtrace shouldn't have side-effects like this. We should use an API like .session() which returns a session
startNewSession() {
this.fields['session.id'] = generateLongId();
return this;
Expand Down Expand Up @@ -238,4 +241,21 @@ export class MobileDevice extends Entity<ApmFields> {

return this.span(spanParameters);
}

appMetrics(metrics: ApmApplicationMetricFields) {
return new Metricset<ApmFields>({
...this.fields,
'metricset.name': 'app',
...metrics,
});
}

crash({ message, groupingName }: { message: string; groupingName?: string }) {
return new ApmError({
...this.fields,
'error.type': 'crash',
'error.exception': [{ message, ...{ type: 'crash' } }],
'error.grouping_name': groupingName || message,
});
}
}
88 changes: 60 additions & 28 deletions packages/kbn-apm-synthtrace/src/scenarios/mobile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ const ENVIRONMENT = getSynthtraceEnvironment(__filename);

type DeviceMetadata = DeviceInfo & OSInfo;

const modelIdentifiersWithCrashes = [
'SM-G930F',
'HUAWEI P2-0000',
'Pixel 3a',
'LG K10',
'iPhone11,8',
'Watch6,8',
'iPad12,2',
];

const ANDROID_DEVICES: DeviceMetadata[] = [
{
manufacturer: 'Samsung',
Expand Down Expand Up @@ -354,34 +364,40 @@ const scenario: Scenario<ApmFields> = async ({ scenarioOpts, logger }) => {
device.startNewSession();
const framework =
device.fields['device.manufacturer'] === 'Apple' ? 'iOS' : 'Android Activity';
const couldCrash = modelIdentifiersWithCrashes.includes(
device.fields['device.model.identifier'] ?? ''
);
const startTx = device
.transaction('Start View - View Appearing', framework)
.timestamp(timestamp)
.duration(500)
.success()
.children(
device
.span({
spanName: 'onCreate',
spanType: 'app',
spanSubtype: 'external',
'service.target.type': 'http',
'span.destination.service.resource': 'external',
})
.duration(50)
.success()
.timestamp(timestamp + 20),
device
.httpSpan({
spanName: 'GET backend:1234',
httpMethod: 'GET',
httpUrl: 'https://backend:1234/api/start',
})
.duration(800)
.failure()
.timestamp(timestamp + 400)
);
return [
device
.transaction('Start View - View Appearing', framework)
.timestamp(timestamp)
.duration(500)
.success()
.children(
device
.span({
spanName: 'onCreate',
spanType: 'app',
spanSubtype: 'external',
'service.target.type': 'http',
'span.destination.service.resource': 'external',
})
.duration(50)
.success()
.timestamp(timestamp + 20),
device
.httpSpan({
spanName: 'GET backend:1234',
httpMethod: 'GET',
httpUrl: 'https://backend:1234/api/start',
})
.duration(800)
.failure()
.timestamp(timestamp + 400)
),
couldCrash && index % 2 === 0
? startTx.errors(device.crash({ message: 'error' }).timestamp(timestamp))
: startTx,
device
.transaction('Second View - View Appearing', framework)
.timestamp(10000 + timestamp)
Expand Down Expand Up @@ -418,7 +434,23 @@ const scenario: Scenario<ApmFields> = async ({ scenarioOpts, logger }) => {
});
};

return [...androidDevices, ...iOSDevices].map((device) => sessionTransactions(device));
const appLaunchMetrics = (device: MobileDevice) => {
return clickRate.generator((timestamp, index) =>
device
.appMetrics({
'application.launch.time': 100 * (index + 1),
})
.timestamp(timestamp)
);
};

return [
...androidDevices.flatMap((device) => [
sessionTransactions(device),
appLaunchMetrics(device),
]),
...iOSDevices.map((device) => sessionTransactions(device)),
];
},
};
};
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-doc-links/src/get_doc_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
dashboardSettings: `${KIBANA_DOCS}advanced-options.html#kibana-dashboard-settings`,
indexManagement: `${ELASTICSEARCH_DOCS}index-mgmt.html`,
kibanaSearchSettings: `${KIBANA_DOCS}advanced-options.html#kibana-search-settings`,
discoverSettings: `${KIBANA_DOCS}advanced-options.html#kibana-discover-settings`,
visualizationSettings: `${KIBANA_DOCS}advanced-options.html#kibana-visualization-settings`,
timelionSettings: `${KIBANA_DOCS}advanced-options.html#kibana-timelion-settings`,
savedObjectsApiList: `${KIBANA_DOCS}saved-objects-api.html#saved-objects-api`,
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-rule-data-utils/src/default_alerts_as_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const ALERT_RULE_TAGS = `${ALERT_RULE_NAMESPACE}.tags` as const;
// kibana.alert.rule_type_id - rule type id for rule that generated this alert
const ALERT_RULE_TYPE_ID = `${ALERT_RULE_NAMESPACE}.rule_type_id` as const;

// kibana.alert.url - allow our user to go back to the details url in kibana
// kibana.alert.url - url which will redirect users to a page related to the given alert
const ALERT_URL = `${ALERT_NAMESPACE}.url` as const;

// kibana.alert.rule.uuid - rule ID for rule that generated this alert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"core-usage-stats": "b3c04da317c957741ebcdedfea4524049fdc79ff",
"csp-rule-template": "099c229bf97578d9ca72b3a672d397559b84ee0b",
"dashboard": "71e3f8dfcffeb5fbd410dec81ce46f5691763c43",
"endpoint:user-artifact": "a5b154962fb6cdf5d9e7452e58690054c95cc72a",
"endpoint:user-artifact-manifest": "5989989c0f84dd2d02da1eb46b6254e334bd2ccd",
"endpoint:user-artifact-manifest": "8ad9bd235dcfdc18b567aef0dc36ac686193dc89",
"enterprise_search_telemetry": "4b41830e3b28a16eb92dee0736b44ae6276ced9b",
"epm-packages": "8755f947a00613f994b1bc5d5580e104043e27f6",
"epm-packages-assets": "00c8b5e5bf059627ffc9fbde920e1ac75926c5f6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ describe('split .kibana index into multiple system indices', () => {
"connector_token",
"core-usage-stats",
"csp-rule-template",
"endpoint:user-artifact",
"endpoint:user-artifact-manifest",
"enterprise_search_telemetry",
"epm-packages",
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/discover/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ export const getUiSettings: (docLinks: DocLinksServiceSetup) => Record<string, U
}),
category: ['discover'],
schema: schema.boolean(),
deprecation: {
message: i18n.translate('discover.advancedSettings.showLegacyFieldStatsTextDeprecation', {
defaultMessage: 'This setting is deprecated and will not be supported in a future version.',
}),
docLinksKey: 'discoverSettings',
},
},
[DOC_HIDE_TIME_COLUMN_SETTING]: {
name: i18n.translate('discover.advancedSettings.docTableHideTimeColumnTitle', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
],
".kibana_security_solution": [
"csp-rule-template",
"endpoint:user-artifact",
"endpoint:user-artifact-manifest",
"exception-list",
"exception-list-agnostic",
Expand Down Expand Up @@ -750,7 +749,6 @@
],
".kibana_security_solution": [
"csp-rule-template",
"endpoint:user-artifact",
"endpoint:user-artifact-manifest",
"exception-list",
"exception-list-agnostic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
],
".kibana_security_solution": [
"csp-rule-template",
"endpoint:user-artifact",
"endpoint:user-artifact-manifest",
"exception-list",
"exception-list-agnostic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
],
".kibana_security_solution": [
"csp-rule-template",
"endpoint:user-artifact",
"endpoint:user-artifact-manifest",
"exception-list",
"exception-list-agnostic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
],
".kibana_security_solution": [
"csp-rule-template",
"endpoint:user-artifact",
"endpoint:user-artifact-manifest",
"exception-list",
"exception-list-agnostic",
Expand Down
Loading

0 comments on commit 28e459e

Please sign in to comment.