Skip to content

Commit

Permalink
Merge branch 'main' into log-table
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Mar 24, 2022
2 parents b7520c4 + a743498 commit ed74f11
Show file tree
Hide file tree
Showing 944 changed files with 25,497 additions and 7,011 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/add-to-ao-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Add issues to Actionable Observability project
on:
issues:
types: [labeled]
jobs:
sync_issues_with_table:
runs-on: ubuntu-latest
name: Add issues to project
if: |
github.event.label.name == 'Team: Actionable Observability'
steps:
- name: Add
uses: richkuz/[email protected]
id: add_to_projects
with:
config: |
[
{"label": "Team: Actionable Observability", "projectNumber": 669}
]
env:
GRAPHQL_API_BASE: 'https://api.github.com'
PAT_TOKEN: ${{ secrets.PROJECT_ASSIGNER_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 13 additions & 4 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"expressions": "src/plugins/expressions",
"expressionShape": "src/plugins/expression_shape",
"expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud",
"eventAnnotation": "src/plugins/event_annotation",
"fieldFormats": "src/plugins/field_formats",
"flot": "packages/kbn-flot-charts/lib",
"home": "src/plugins/home",
Expand All @@ -50,7 +51,10 @@
"kibana-react": "src/plugins/kibana_react",
"kibanaOverview": "src/plugins/kibana_overview",
"lists": "packages/kbn-securitysolution-list-utils/src",
"management": ["src/legacy/core_plugins/management", "src/plugins/management"],
"management": [
"src/legacy/core_plugins/management",
"src/plugins/management"
],
"monaco": "packages/kbn-monaco/src",
"navigation": "src/plugins/navigation",
"newsfeed": "src/plugins/newsfeed",
Expand All @@ -62,8 +66,13 @@
"sharedUX": "src/plugins/shared_ux",
"sharedUXComponents": "packages/kbn-shared-ux-components/src",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"],
"timelion": ["src/plugins/vis_types/timelion"],
"telemetry": [
"src/plugins/telemetry",
"src/plugins/telemetry_management_section"
],
"timelion": [
"src/plugins/vis_types/timelion"
],
"uiActions": "src/plugins/ui_actions",
"uiActionsExamples": "examples/ui_action_examples",
"usageCollection": "src/plugins/usage_collection",
Expand All @@ -83,4 +92,4 @@
"visualizations": "src/plugins/visualizations"
},
"translations": []
}
}
2 changes: 1 addition & 1 deletion dev_docs/contributing/standards.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Every team should be collecting telemetry metrics on it’s public API usage. Th

### APM

Kibana server and client are instrumented with APM node and APM RUM clients respectively, tracking serveral types of transactions by default, such as `page-load`, `request`, etc.
Kibana server and client are instrumented with APM node and APM RUM clients respectively, tracking several types of transactions by default, such as `page-load`, `request`, etc.
You may introduce custom transactions. Please refer to the [APM documentation](https://www.elastic.co/guide/en/apm/get-started/current/index.html) and follow these guidelines when doing so:

- Use dashed syntax for transaction types and names: `my-transaction-type` and `my-transaction-name`
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/key_concepts/kibana_platform_plugin_intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ plugins to customize the Kibana experience. Examples of extension points are:
- core.overlays.showModal
- embeddables.registerEmbeddableFactory
- uiActions.registerAction
- core.saedObjects.registerType
- core.savedObjects.registerType

## Follow up material

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 @@ -94,6 +94,10 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a
|This plugin contains reusable code in the form of self-contained modules (or libraries). Each of these modules exports a set of functionality relevant to the domain of the module.
|{kib-repo}blob/{branch}/src/plugins/event_annotation/README.md[eventAnnotation]
|The Event Annotation service contains expressions for event annotations
|{kib-repo}blob/{branch}/src/plugins/expression_error/README.md[expressionError]
|Expression Error plugin adds an error renderer to the expression plugin. The renderer will display the error image.
Expand Down
18 changes: 10 additions & 8 deletions docs/maps/maps-aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,24 @@ image::maps/images/grid_to_docs.gif[]

[role="xpack"]
[[maps-grid-aggregation]]
=== Grid aggregation
=== Clusters

Grid aggregation layers use {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[GeoTile grid aggregation] to group your documents into grids. You can calculate metrics for each gridded cell.
Clusters use {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[Geotile grid aggregation] or {ref}/search-aggregations-bucket-geohexgrid-aggregation.html[Geohex grid aggregation] to group your documents into grids. You can calculate metrics for each gridded cell.

Symbolize grid aggregation metrics as:
Symbolize cluster metrics as:

*Clusters*:: Creates a <<vector-layer, vector layer>> with a cluster symbol for each gridded cell.
*Clusters*:: Uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[Geotile grid aggregation] to group your documents into grids. Creates a <<vector-layer, vector layer>> with a cluster symbol for each gridded cell.
The cluster location is the weighted centroid for all documents in the gridded cell.

*Grid rectangles*:: Creates a <<vector-layer, vector layer>> with a bounding box polygon for each gridded cell.
*Grids*:: Uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[Geotile grid aggregation] to group your documents into grids. Creates a <<vector-layer, vector layer>> with a bounding box polygon for each gridded cell.

*Heat map*:: Creates a <<heatmap-layer, heat map layer>> that clusters the weighted centroids for each gridded cell.
*Heat map*:: Uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[Geotile grid aggregation] to group your documents into grids. Creates a <<heatmap-layer, heat map layer>> that clusters the weighted centroids for each gridded cell.

To enable a grid aggregation layer:
*Hexbins*:: Uses {ref}/search-aggregations-bucket-geohexgrid-aggregation.html[Geohex grid aggregation] to group your documents into H3 hexagon grids. Creates a <<vector-layer, vector layer>> with a hexagon polygon for each gridded cell.

. Click *Add layer*, then select the *Clusters and grids* or *Heat map* layer.
To enable a clusters layer:

. Click *Add layer*, then select the *Clusters* or *Heat map* layer.

To enable a blended layer that dynamically shows clusters or documents:

Expand Down
2 changes: 1 addition & 1 deletion docs/maps/maps-getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ traffic. Larger circles will symbolize grids with
more total bytes transferred, and smaller circles will symbolize
grids with less bytes transferred.

. Click **Add layer**, and select **Clusters and grids**.
. Click **Add layer**, and select **Clusters**.
. Set **Data view** to **kibana_sample_data_logs**.
. Click **Add layer**.
. In **Layer settings**, set:
Expand Down
2 changes: 1 addition & 1 deletion docs/maps/vector-layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To add a vector layer to your map, click *Add layer*, then select one of the fol

*Choropleth*:: Shaded areas to compare statistics across boundaries.

*Clusters and grids*:: Geospatial data grouped in grids with metrics for each gridded cell.
*Clusters*:: Geospatial data grouped in grids with metrics for each gridded cell.
The index must contain at least one field mapped as {ref}/geo-point.html[geo_point] or {ref}/geo-shape.html[geo_shape].

*Create index*:: Draw shapes on the map and index in Elasticsearch.
Expand Down
5 changes: 5 additions & 0 deletions docs/settings/task-manager-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ These non-persisted action tasks have a risk that they won't be run at all if th
`xpack.task_manager.ephemeral_tasks.request_capacity`::
Sets the size of the ephemeral queue defined above. Defaults to 10.

`xpack.task_manager.event_loop_delay.monitor`::
Enables event loop delay monitoring, which will log a warning when a task causes an event loop delay which exceeds the `warn_threshold` setting. Defaults to true.

`xpack.task_manager.event_loop_delay.warn_threshold`::
Sets the amount of event loop delay during a task execution which will cause a warning to be logged. Defaults to 5000 milliseconds (5 seconds).

[float]
[[task-manager-health-settings]]
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ on the {kib} index at startup. {kib} users still need to authenticate with
{es}, which is proxied through the {kib} server.

|[[elasticsearch-service-account-token]] `elasticsearch.serviceAccountToken:`
| beta[]. If your {es} is protected with basic authentication, this token provides the credentials
| If your {es} is protected with basic authentication, this token provides the credentials
that the {kib} server uses to perform maintenance on the {kib} index at startup. This setting
is an alternative to `elasticsearch.username` and `elasticsearch.password`.

Expand Down
9 changes: 9 additions & 0 deletions examples/search_examples/public/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ import { SearchExamplePage, ExampleLink } from './common/example_page';
import { SearchExamplesApp } from './search/app';
import { SearchSessionsExampleApp } from './search_sessions/app';
import { RedirectAppLinks } from '../../../src/plugins/kibana_react/public';
import { SqlSearchExampleApp } from './sql_search/app';

const LINKS: ExampleLink[] = [
{
path: '/search',
title: 'Search',
},
{
path: '/sql-search',
title: 'SQL Search',
},
{
path: '/search-sessions',
title: 'Search Sessions',
Expand Down Expand Up @@ -51,12 +56,16 @@ export const renderApp = (
/>
</Route>
<Route path={LINKS[1].path}>
<SqlSearchExampleApp notifications={notifications} data={data} />
</Route>
<Route path={LINKS[2].path}>
<SearchSessionsExampleApp
navigation={navigation}
notifications={notifications}
data={data}
/>
</Route>

<Route path="/" exact={true}>
<Redirect to={LINKS[0].path} />
</Route>
Expand Down
164 changes: 164 additions & 0 deletions examples/search_examples/public/sql_search/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import React, { useState } from 'react';

import {
EuiCodeBlock,
EuiFlexGroup,
EuiFlexItem,
EuiForm,
EuiPageBody,
EuiPageContent,
EuiPageContentBody,
EuiPageHeader,
EuiPanel,
EuiSuperUpdateButton,
EuiText,
EuiTextArea,
EuiTitle,
} from '@elastic/eui';

import { CoreStart } from '../../../../src/core/public';

import {
DataPublicPluginStart,
IKibanaSearchResponse,
isCompleteResponse,
isErrorResponse,
} from '../../../../src/plugins/data/public';
import {
SQL_SEARCH_STRATEGY,
SqlSearchStrategyRequest,
SqlSearchStrategyResponse,
} from '../../../../src/plugins/data/common';

interface SearchExamplesAppDeps {
notifications: CoreStart['notifications'];
data: DataPublicPluginStart;
}

export const SqlSearchExampleApp = ({ notifications, data }: SearchExamplesAppDeps) => {
const [sqlQuery, setSqlQuery] = useState<string>('');
const [request, setRequest] = useState<Record<string, any>>({});
const [isLoading, setIsLoading] = useState<boolean>(false);
const [rawResponse, setRawResponse] = useState<Record<string, any>>({});

function setResponse(response: IKibanaSearchResponse) {
setRawResponse(response.rawResponse);
}

const doSearch = async () => {
const req: SqlSearchStrategyRequest = {
params: {
query: sqlQuery,
},
};

// Submit the search request using the `data.search` service.
setRequest(req.params!);
setIsLoading(true);

data.search
.search<SqlSearchStrategyRequest, SqlSearchStrategyResponse>(req, {
strategy: SQL_SEARCH_STRATEGY,
})
.subscribe({
next: (res) => {
if (isCompleteResponse(res)) {
setIsLoading(false);
setResponse(res);
} else if (isErrorResponse(res)) {
setIsLoading(false);
setResponse(res);
notifications.toasts.addDanger('An error has occurred');
}
},
error: (e) => {
setIsLoading(false);
data.search.showError(e);
},
});
};

return (
<EuiPageBody>
<EuiPageHeader>
<EuiTitle size="l">
<h1>SQL search example</h1>
</EuiTitle>
</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody>
<EuiForm>
<EuiFlexGroup>
<EuiFlexItem grow>
<EuiTextArea
placeholder="SELECT * FROM library ORDER BY page_count DESC"
aria-label="SQL query to run"
value={sqlQuery}
onChange={(e) => setSqlQuery(e.target.value)}
fullWidth
data-test-subj="sqlQueryInput"
/>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiSuperUpdateButton
isLoading={isLoading}
isDisabled={sqlQuery.length === 0}
onClick={doSearch}
fill={true}
data-test-subj="querySubmitButton"
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiForm>

<EuiFlexGroup gutterSize="l">
<EuiFlexItem grow style={{ minWidth: 0 }}>
<EuiPanel grow>
<EuiText>
<h3>Request</h3>
</EuiText>
<EuiCodeBlock
language="json"
fontSize="s"
paddingSize="s"
overflowHeight={720}
isCopyable
data-test-subj="requestCodeBlock"
isVirtualized
>
{JSON.stringify(request, null, 2)}
</EuiCodeBlock>
</EuiPanel>
</EuiFlexItem>
<EuiFlexItem grow style={{ minWidth: 0 }}>
<EuiPanel grow>
<EuiText>
<h3>Response</h3>
</EuiText>
<EuiCodeBlock
language="json"
fontSize="s"
paddingSize="s"
isCopyable
data-test-subj="responseCodeBlock"
overflowHeight={720}
isVirtualized
>
{JSON.stringify(rawResponse, null, 2)}
</EuiCodeBlock>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContentBody>
</EuiPageContent>
</EuiPageBody>
);
};
Loading

0 comments on commit ed74f11

Please sign in to comment.