Skip to content

Commit

Permalink
Merge branch 'main' into guided_onboarding/8.8/roles
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech authored Apr 25, 2023
2 parents 6ab8f1d + 0772456 commit 1abaab9
Show file tree
Hide file tree
Showing 451 changed files with 16,966 additions and 3,110 deletions.
24 changes: 12 additions & 12 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ x-pack/plugins/notifications @elastic/appex-sharedux
packages/kbn-object-versioning @elastic/appex-sharedux
x-pack/packages/observability/alert_details @elastic/actionable-observability
x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops
x-pack/plugins/observability_onboarding @elastic/apm-ui
x-pack/plugins/observability @elastic/actionable-observability
x-pack/plugins/observability_shared @elastic/actionable-observability
x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security
Expand Down Expand Up @@ -776,21 +777,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
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,10 @@ Elastic.
|This plugin provides shared components and services for use across observability solutions, as well as the observability landing page UI.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_onboarding/README.md[observabilityOnboarding]
|This plugin provides an onboarding framework for observability solutions: Logs and APM.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_shared/README.md[observabilityShared]
|A plugin that contains components and utilities shared by all Observability plugins.
Expand Down
8 changes: 5 additions & 3 deletions docs/user/alerting/create-and-manage-rules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ to re-open the flyout and change the rule properties.

Depending on the {kib} app and context, you might be prompted to choose the type of rule to create. Some apps will preselect the type of rule for you.

Each rule type provides its own way of defining the conditions to detect, but an expression formed by a series of clauses is a common pattern. For example, in an index threshold rule, the `WHEN` clause enables you to select an aggregation operation to apply to a numeric field.
Each rule type provides its own way of defining the conditions to detect, but an expression formed by a series of clauses is a common pattern. For example, in a metric threshold rule, the `WHEN` clause enables you to select an aggregation operation to apply to a numeric field.

[role="screenshot"]
image::images/rule-flyout-rule-conditions.png[UI for defining rule conditions on an index threshold rule,500]
image::images/rule-flyout-rule-conditions.png[UI for defining rule conditions on a metric threshold rule,500]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

All rules must have a check interval, which defines how often to evaluate the rule conditions. Checks are queued; they run as close to the defined value as capacity allows.
Expand All @@ -67,14 +67,15 @@ Each action uses a connector, which provides connection information for a {kib}
After you select a connector, set the action frequency. If the rule type supports alert summaries, you can choose to create a summary of alerts on each check interval or on a custom interval. For example, if you create a metrics threshold rule, you can send email notifications that summarize the new, ongoing, and recovered alerts each day:

[role="screenshot"]
image::images/rule-flyout-action-summary.png[UI for defining rule conditions on an index threshold rule,500]
image::images/rule-flyout-action-summary.png[UI for defining rule conditions on a metric threshold rule,500]

TIP: If you choose a custom action interval, it cannot be shorter than the rule's check interval.

Alternatively, you can set the action frequency such that the action runs for each alert. If the rule type does not support alert summaries, this is your only available option. You must choose when the action runs (for example, at each check interval, only when the alert status changes, or at a custom action interval). You must also choose an action group, which affects whether the action runs (for example, the action runs when the issue is detected or when it is recovered). Each rule type has a specific set of valid action groups.

[role="screenshot"]
image::images/rule-flyout-action-details.png[UI for defining an email action,500]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

Each connector enables different action properties. For example, an email connector enables you to set the recipients, the subject, and a message body in markdown format. For more information about connectors, refer to <<action-types>>.

Expand Down Expand Up @@ -107,6 +108,7 @@ To view the list of variables available for your rule, click the "add rule varia

[role="screenshot"]
image::images/rule-flyout-action-variables.png[Passing rule values to an action,500]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

For more information about common action variables, refer to <<rule-action-variables>>.

Expand Down
Binary file modified docs/user/alerting/images/rule-flyout-action-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/alerting/images/rule-flyout-action-variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/user/alerting/images/rule-flyout-rule-conditions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@
"@kbn/object-versioning": "link:packages/kbn-object-versioning",
"@kbn/observability-alert-details": "link:x-pack/packages/observability/alert_details",
"@kbn/observability-fixtures-plugin": "link:x-pack/test/cases_api_integration/common/plugins/observability",
"@kbn/observability-onboarding-plugin": "link:x-pack/plugins/observability_onboarding",
"@kbn/observability-plugin": "link:x-pack/plugins/observability",
"@kbn/observability-shared-plugin": "link:x-pack/plugins/observability_shared",
"@kbn/oidc-provider-plugin": "link:x-pack/test/security_api_integration/plugins/oidc_provider",
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const getText = (node?: Array<string | { _: string }>) => {
const isLikelyIrrelevant = (name: string, failure: string) => {
if (
failure.includes('NoSuchSessionError: This driver instance does not have a valid session ID') ||
failure.includes('NoSuchSessionError: Tried to run command without establishing a connection')
failure.includes(
'NoSuchSessionError: Tried to run command without establishing a connection'
) ||
failure.includes('NoSuchSessionError: invalid session id')
) {
return true;
}
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ pageLoadAssetSize:
navigation: 37269
newsfeed: 42228
observability: 95000
observabilityOnboarding: 19573
observabilityShared: 21266
osquery: 107090
painlessLab: 179748
Expand Down
Loading

0 comments on commit 1abaab9

Please sign in to comment.