Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into machine-learning-fi…
Browse files Browse the repository at this point in the history
…elds
  • Loading branch information
nikitaindik committed Dec 18, 2024
2 parents 468a083 + 0aa45fc commit 0975e4a
Show file tree
Hide file tree
Showing 623 changed files with 5,609 additions and 5,144 deletions.
8 changes: 0 additions & 8 deletions .buildkite/pipelines/pull_request/renovate.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10
agents:
machineType: n2-standard-2

- wait

- command: .buildkite/scripts/steps/renovate.sh
label: 'Renovate validation'
agents:
Expand Down
7 changes: 4 additions & 3 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ const getPipeline = (filename: string, removeSteps = true) => {
return;
}

pipeline.push(getAgentImageConfig({ returnYaml: true }));

const onlyRunQuickChecks = await areChangesSkippable([/^renovate\.json$/], REQUIRED_PATHS);
if (onlyRunQuickChecks) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/renovate.yml', false));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));
console.log('Isolated changes to renovate.json. Skipping main PR pipeline.');

console.log([...new Set(pipeline)].join('\n'));
return;
}

pipeline.push(getAgentImageConfig({ returnYaml: true }));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false));

if (await doAnyChangesMatch([/^packages\/kbn-handlebars/])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source .buildkite/scripts/common/util.sh
echo --- Security Solution OpenAPI Code Generation

echo -e "\n[Security Solution OpenAPI Code Generation] OpenAPI Common Package\n"
(cd packages/kbn-openapi-common && yarn openapi:generate)
(cd src/platform/packages/shared/kbn-openapi-common && yarn openapi:generate)

echo -e "\n[Security Solution OpenAPI Code Generation] Lists Common Package\n"
(cd x-pack/solutions/security/packages/kbn-securitysolution-lists-common && yarn openapi:generate)
Expand Down
13 changes: 10 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ packages/kbn-monaco @elastic/appex-sharedux
packages/kbn-object-versioning @elastic/appex-sharedux
packages/kbn-object-versioning-utils @elastic/appex-sharedux
packages/kbn-openapi-bundler @elastic/security-detection-rule-management
packages/kbn-openapi-common @elastic/security-detection-rule-management
packages/kbn-openapi-generator @elastic/security-detection-rule-management
packages/kbn-optimizer @elastic/kibana-operations
packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations
Expand Down Expand Up @@ -499,7 +498,6 @@ packages/kbn-whereis-pkg-cli @elastic/kibana-operations
packages/kbn-xstate-utils @elastic/obs-ux-logs-team
packages/kbn-yarn-lock-validator @elastic/kibana-operations
packages/kbn-zod @elastic/kibana-core
packages/kbn-zod-helpers @elastic/security-detection-rule-management
packages/presentation/presentation_containers @elastic/kibana-presentation
packages/presentation/presentation_publishing @elastic/kibana-presentation
packages/react/kibana_context/common @elastic/appex-sharedux
Expand Down Expand Up @@ -595,6 +593,7 @@ src/platform/packages/shared/kbn-management/settings/components/field_row @elast
src/platform/packages/shared/kbn-management/settings/field_definition @elastic/kibana-management
src/platform/packages/shared/kbn-management/settings/types @elastic/kibana-management
src/platform/packages/shared/kbn-management/settings/utilities @elastic/kibana-management
src/platform/packages/shared/kbn-openapi-common @elastic/security-detection-rule-management
src/platform/packages/shared/kbn-osquery-io-ts-types @elastic/security-asset-management
src/platform/packages/shared/kbn-securitysolution-ecs @elastic/security-threat-hunting-explore
src/platform/packages/shared/kbn-securitysolution-es-utils @elastic/security-detection-engine
Expand All @@ -609,6 +608,7 @@ src/platform/packages/shared/kbn-sse-utils-client @elastic/obs-knowledge-team
src/platform/packages/shared/kbn-sse-utils-server @elastic/obs-knowledge-team
src/platform/packages/shared/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team
src/platform/packages/shared/kbn-unsaved-changes-prompt @elastic/kibana-management
src/platform/packages/shared/kbn-zod-helpers @elastic/security-detection-rule-management
src/platform/packages/shared/serverless/settings/security_project @elastic/security-solution @elastic/kibana-management
src/platform/plugins/shared/ai_assistant_management/selection @elastic/obs-ai-assistant
src/platform/plugins/shared/console @elastic/kibana-management
Expand Down Expand Up @@ -938,7 +938,7 @@ x-pack/plugins/stack_connectors @elastic/response-ops
x-pack/plugins/task_manager @elastic/response-ops
x-pack/plugins/telemetry_collection_xpack @elastic/kibana-core
x-pack/plugins/triggers_actions_ui @elastic/response-ops
x-pack/plugins/upgrade_assistant @elastic/kibana-management
x-pack/plugins/upgrade_assistant @elastic/kibana-core
x-pack/solutions/observability/packages/alert_details @elastic/obs-ux-management-team
x-pack/solutions/observability/packages/alerting_test_data @elastic/obs-ux-management-team
x-pack/solutions/observability/packages/get_padded_alert_time_range_util @elastic/obs-ux-management-team
Expand Down Expand Up @@ -2638,7 +2638,14 @@ oas_docs/kibana.info.yaml @elastic/platform-docs

# Plugin manifests
/src/plugins/**/kibana.jsonc @elastic/kibana-core
/src/platform/plugins/shared/**/kibana.jsonc @elastic/kibana-core
/src/platform/plugins/private/**/kibana.jsonc @elastic/kibana-core
/x-pack/plugins/**/kibana.jsonc @elastic/kibana-core
/x-pack/platform/plugins/shared/**/kibana.jsonc @elastic/kibana-core
/x-pack/platform/plugins/private/**/kibana.jsonc @elastic/kibana-core
/x-pack//solutions/observability/plugins/**/kibana.jsonc @elastic/kibana-core
/x-pack//solutions/search/plugins/**/kibana.jsonc @elastic/kibana-core
/x-pack//solutions/security/plugins/**/kibana.jsonc @elastic/kibana-core

# Temporary Encrypted Saved Objects (ESO) guarding
# This additional code-ownership is meant to be a temporary precaution to notify the Kibana platform security team
Expand Down
2 changes: 1 addition & 1 deletion config/serverless.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ xpack.fleet.internal.registry.excludePackages: [
'dga',

# Unsupported in serverless
'cloud-defend',
'cloud_defend',
]
# fleet_server package installed to publish agent metrics
xpack.fleet.packages:
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/key_concepts/building_blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ and <DocLink id="kibBuildingBlocks" section="index-patterns" text="Index Pattern
### Dashboard Embeddable

Add a Dashboard Embeddable directly inside your application to provide users with a set of visualizations and graphs that work seamlessly
with the <DocLink id="kibBuildingBlocks" section="query-bar" text="Query Bar"/>. Every feature that is added to a registered <DocLink id="kibBuildingBlocks" section="embeddables" text="Embeddable" /> (Lens, Maps, Saved Searches and more) will be available automatically, as well as any <DocLink id="kibBuildingBlocks" section="ui-actions--triggers" text="UI Actions" /> that are added to the Embeddable context menu panel (for example, drilldowns, custom panel time ranges, and "share to" features).
with the <DocLink id="kibBuildingBlocks" section="query-bar" text="Query Bar"/>. Every feature that is added to a registered <DocLink id="kibBuildingBlocks" section="embeddables" text="Embeddable" /> (Lens, Maps, Discover sessions and more) will be available automatically, as well as any <DocLink id="kibBuildingBlocks" section="ui-actions--triggers" text="UI Actions" /> that are added to the Embeddable context menu panel (for example, drilldowns, custom panel time ranges, and "share to" features).

The Dashboard Embeddable is one of the highest-level UI components you can add to your application.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,63 @@ This event will be indexed with the following structure:
}
```

#### Add time ranges

The meta field supports telemetry on time ranges, providing calculated metrics for enhanced context. This includes:

- **Query range in ceconds:**

- Calculated as the time difference in seconds between `rangeFrom` and `rangeTo`.

- **Offset calculation:**
- A **negative offset** indicates that `rangeTo` is in the past.
- A **positive offset** indicates that `rangeTo` is in the future.
- An offset of **zero** indicates that `rangeTo` matches `'now'`.

###### Code example

```
onPageReady({
meta: {
rangeFrom: 'now-15m',
rangeTo: 'now',
}
});
```

This will be indexed as:

```typescript
{
"_index": "backing-ebt-kibana-browser-performance-metrics-000001", // Performance metrics are stored in a dedicated simplified index (browser \ server).
"_source": {
"timestamp": "2024-08-13T11:29:58.275Z"
"event_type": "performance_metric", // All performance events share a common event type to simplify mapping
"eventName": 'kibana:plugin_render_time', // Event name as specified when reporting it
"duration": 736, // Event duration as specified when reporting it
"meta": {
"target": '/home',
"query_range_secs": 900
"query_offset_secs": 0 // now
},
"context": { // Context holds information identifying the deployment, version, application and page that generated the event
"version": "8.16.0-SNAPSHOT",
"cluster_name": "elasticsearch",
"pageName": "application:home:app",
"applicationId": "home",
"page": "app",
"entityId": "61c58ad0-3dd3-11e8-b2b9-5d5dc1715159",
"branch": "main",
...
},

...
},
}
```

#### Add custom metrics

Having `kibana:plugin_render_time` metric event is not always enough, depending on the use case you would likely need some complementary information to give some sense to the value reported by the metric (e.g. number of hosts, number of services, number of dataStreams, etc).
`kibana:plugin_render_time` metric API supports up to 9 numbered free fields that can be used to report numeric metrics that you intend to analyze. Note that they can be used for any type of numeric information you may want to report.

Expand All @@ -304,10 +360,12 @@ We could make use of these custom metrics using the following format:
...
// Call onPageReady once the meaningful data has rendered and visible to the user
onPageReady({
key1: 'datasets',
value1: 5,
key2: 'documents',
value2: 1000,
customMetrics: {
key1: 'datasets',
value1: 5,
key2: 'documents',
value2: 1000,
}
});
...
```
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/data-views.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ clusters or indicies from cross-cluster search].
When you delete a {data-source}, you cannot recover the associated field formatters, runtime fields, source filters,
and field popularity data. Deleting a {data-source} does not remove any indices or data documents from {es}.

WARNING: Deleting a {data-source} breaks all visualizations, saved searches, and other saved objects that reference the data view.
WARNING: Deleting a {data-source} breaks all visualizations, saved Discover sessions, and other saved objects that reference the data view.

. Go to the **Data Views** management page using the navigation menu or the <<kibana-navigation-search,global search field>>.

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/esql.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ disabled using the `enableESQL` setting from the
{kibana-ref}/advanced-options.html[Advanced Settings].
This will hide the {esql} user interface from various applications.
However, users will be able to access existing {esql} artifacts like saved searches and visualizations.
However, users will be able to access existing {esql} artifacts like saved Discover sessions and visualizations.
====

[float]
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/save-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Save this query, and you can embed the search results in dashboards,
use them as a foundation for building a visualization,
and share them in a link or CVS form.

Saved queries are different than <<save-open-search,saved searches>>,
Saved queries are different than <<save-open-search,saved Discover sessions>>,
which include the *Discover* configuration&mdash;selected columns in the document table, sort order, and
{data-source}&mdash;in addition to the query.
Saved searches are primarily used for adding search results to a dashboard.
Discover sessions are primarily used for adding search results to a dashboard.

[role="xpack"]
==== Read-only access
Expand Down
1 change: 1 addition & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ oss plugins.
|{kib-repo}blob/{branch}/src/plugins/saved_search/README.md[savedSearch]
|Contains the saved search saved object definition and helpers.
This object is created when a user saves their current session in the Discover app.
|{kib-repo}blob/{branch}/src/plugins/screenshot_mode/README.md[screenshotMode]
Expand Down
2 changes: 1 addition & 1 deletion docs/discover/document-explorer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In the pop-up, drag the column names to their new order.

* To resize a column, drag the right edge of the column header until the column is the width that you want.
+
Column widths are stored with a saved search. When you visualize saved searches on dashboards, the saved search appears the same as in **Discover**.
Column widths are stored with a Discover session. When you add a Discover session as a dashboard panel, it appears the same as in **Discover**.

[float]
[[document-explorer-density]]
Expand Down
12 changes: 6 additions & 6 deletions docs/discover/get-started-discover.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -293,24 +293,24 @@ Learn more about how to use ES|QL queries in <<try-esql, Using ES|QL>>.

[float]
[[save-discover-search]]
==== Save your search for later use
==== Save your Discover session for later use

Save your search so you can use it later, generate a CSV report, or use it to create visualizations, dashboards, and Canvas workpads.
Saving a search saves the query text, filters,
Save your Discover session so you can use it later, generate a CSV report, or use it to create visualizations, dashboards, and Canvas workpads.
Saving a Discover session saves the query text, filters,
and current view of *Discover*, including the columns selected in
the document table, the sort order, and the {data-source}.

. In the application menu bar, click **Save**.

. Give your search a title and a description.
. Give your session a title and a description.

. Optionally store <<managing-tags,tags>> and the time range with the search.
. Optionally store <<managing-tags,tags>> and the time range with the session.

. Click **Save**.

[float]
[[share-your-findings]]
==== Share your search
==== Share your Discover session

To share your search and **Discover** view with a larger audience, click *Share* in the application menu bar.
For detailed information about the sharing options, refer to <<reporting-getting-started,Reporting>>.
Expand Down
36 changes: 18 additions & 18 deletions docs/discover/save-search.asciidoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[[save-open-search]]
== Save a search for reuse
== Save a Discover session for reuse

A saved search is a convenient way to reuse a search
A saved Discover session is a convenient way to reuse a search
that you've created in *Discover*.
Saved searches are good for adding search results to a dashboard,
Discover sessions are good for saving a configured view of Discover to use later or adding search results to a dashboard,
and can also serve as a foundation for building visualizations.

[role="xpack"]
Expand All @@ -16,27 +16,27 @@ displayed and the *Save* button is not visible. For more information, refer to <
[role="screenshot"]
image::discover/images/read-only-badge.png[Example of Discover's read only access indicator in Kibana's header]
[float]
=== Save a search
=== Save a Discover session

By default, a saved search stores the query text, filters, and
By default, a Discover session stores the query text, filters, and
current view of *Discover*, including the columns and sort order in the document table, and the {data-source}.

. Once you've created a search worth saving, click *Save* in the toolbar.
. Enter a name for the search.
. Optionally store <<managing-tags,tags>> and the time range with the search.
. Once you've created a view worth saving, click *Save* in the toolbar.
. Enter a name for the session.
. Optionally store <<managing-tags,tags>> and the time range with the session.
. Click *Save*.
. To reload your search results in *Discover*, click *Open* in the toolbar, and select the saved search.
. To reload your search results in *Discover*, click *Open* in the toolbar, and select the saved Discover session.
+
If the saved search is associated with a different {data-source} than is currently
selected, opening the saved search changes the selected {data-source}. The query language
used for the saved search is also automatically selected.
If the saved Discover session is associated with a different {data-source} than is currently
selected, opening the saved Discover session changes the selected {data-source}. The query language
used for the saved Discover session is also automatically selected.

[float]
=== Duplicate a search
. In **Discover**, open the search that you want to duplicate.
=== Duplicate a Discover session
. In **Discover**, open the Discover session that you want to duplicate.
. In the toolbar, click *Save*.
. Give the search a new name.
. Turn on **Save as new search**.
. Give the session a new name.
. Turn on **Save as new Discover session**.
. Click *Save*.


Expand All @@ -46,5 +46,5 @@ used for the saved search is also automatically selected.
. Go to *Dashboards*.
. Open or create the dashboard, then click *Edit*.
. Click *Add from library*.
. From the *Types* dropdown, select *Saved search*.
. Select the saved search that you want to visualize, then click *X* to close the list.
. From the *Types* dropdown, select *Discover session*.
. Select the Discover session that you want to add, then click *X* to close the list.
2 changes: 1 addition & 1 deletion docs/discover/search-sessions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ image::images/search-session-awhile.png[Search Session indicator displaying the
Once you save a search session, you can start a new search,
navigate to a different application, or close the browser.

. To view your saved searches, go to the
. To view your saved search sessions, go to the
*Search Sessions* management page using the navigation menu or the <<kibana-navigation-search,global search field>>.
For a saved or completed session, you can also open this view from the search sessions popup.

Expand Down
Loading

0 comments on commit 0975e4a

Please sign in to comment.