Skip to content

Commit

Permalink
Merge branch 'master' into shim-doc-views-registry
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Dec 19, 2019
2 parents e817686 + e9ac373 commit 505f772
Show file tree
Hide file tree
Showing 1,187 changed files with 26,761 additions and 12,982 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@
/x-pack/legacy/plugins/alerting @elastic/kibana-alerting-services
/x-pack/legacy/plugins/actions @elastic/kibana-alerting-services
/x-pack/legacy/plugins/task_manager @elastic/kibana-alerting-services
/x-pack/test/alerting_api_integration @elastic/kibana-alerting-services
/x-pack/test/plugin_api_integration/plugins/task_manager @elastic/kibana-alerting-services
/x-pack/test/plugin_api_integration/test_suites/task_manager @elastic/kibana-alerting-services

# Design
**/*.scss @elastic/kibana-design
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
uses: elastic/github-actions/[email protected]
id: project_assigner
with:
issue-mappings: '[{"label": "Team:AppAch", "projectName": "kibana-app-arch", "columnId": 6173897}]'
ghToken: ${{ secrets.GITHUB_TOKEN }}
issue-mappings: '[{"label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173897}, {"label": "Feature:Lens", "projectName": "Lens", "columnId": 6219362}]'
ghToken: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/project-assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: elastic/github-actions/[email protected]
id: project_assigner
with:
issue-mappings: '[{"label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173895}]'
issue-mappings: '[{"label": "Team:AppArch", "projectName": "kibana-app-arch", "columnId": 6173895}, {"label": "Feature:Lens", "projectName": "Lens", "columnId": 6219363}]'
ghToken: ${{ secrets.GITHUB_TOKEN }}


1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ disabledPlugins
webpackstats.json
/config/*
!/config/kibana.yml
!/config/apm.js
coverage
selenium
.babel_register_cache.json
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"kbn": "src/legacy/core_plugins/kibana",
"kbnDocViews": "src/legacy/core_plugins/kbn_doc_views",
"kbnVislibVisTypes": "src/legacy/core_plugins/kbn_vislib_vis_types",
"management": "src/legacy/core_plugins/management",
"management": ["src/legacy/core_plugins/management", "src/plugins/management"],
"kibana_react": "src/legacy/core_plugins/kibana_react",
"kibana-react": "src/plugins/kibana_react",
"kibana_utils": "src/plugins/kibana_utils",
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.15.2
10.18.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.15.2
10.18.0
87 changes: 0 additions & 87 deletions config/apm.js

This file was deleted.

33 changes: 33 additions & 0 deletions docs/development/core/server/kibana-plugin-server.logger.get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [Logger](./kibana-plugin-server.logger.md) &gt; [get](./kibana-plugin-server.logger.get.md)

## Logger.get() method

Returns a new [Logger](./kibana-plugin-server.logger.md) instance extending the current logger context.

<b>Signature:</b>

```typescript
get(...childContextPaths: string[]): Logger;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| childContextPaths | <code>string[]</code> | |

<b>Returns:</b>

`Logger`

## Example


```typescript
const logger = loggerFactory.get('plugin', 'service'); // 'plugin.service' context
const subLogger = logger.get('feature'); // 'plugin.service.feature' context

```

2 changes: 1 addition & 1 deletion docs/development/core/server/kibana-plugin-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [PluginManifest](./kibana-plugin-server.pluginmanifest.md) | Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file. |
| [PluginsServiceSetup](./kibana-plugin-server.pluginsservicesetup.md) | |
| [PluginsServiceStart](./kibana-plugin-server.pluginsservicestart.md) | |
| [RequestHandlerContext](./kibana-plugin-server.requesthandlercontext.md) | Plugin specific context passed to a route handler.<!-- -->Provides the following clients: - [savedObjects.client](./kibana-plugin-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [elasticsearch.dataClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request |
| [RequestHandlerContext](./kibana-plugin-server.requesthandlercontext.md) | Plugin specific context passed to a route handler.<!-- -->Provides the following clients: - [savedObjects.client](./kibana-plugin-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [elasticsearch.dataClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request |
| [RouteConfig](./kibana-plugin-server.routeconfig.md) | Route specific configuration. |
| [RouteConfigOptions](./kibana-plugin-server.routeconfigoptions.md) | Additional route options. |
| [RouteConfigOptionsBody](./kibana-plugin-server.routeconfigoptionsbody.md) | Additional body options for a route |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Plugin specific context passed to a route handler.

Provides the following clients: - [savedObjects.client](./kibana-plugin-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [elasticsearch.dataClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request
Provides the following clients: - [savedObjects.client](./kibana-plugin-server.savedobjectsclient.md) - Saved Objects client which uses the credentials of the incoming request - [elasticsearch.dataClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch data client which uses the credentials of the incoming request - [elasticsearch.adminClient](./kibana-plugin-server.scopedclusterclient.md) - Elasticsearch admin client which uses the credentials of the incoming request - [uiSettings.client](./kibana-plugin-server.iuisettingsclient.md) - uiSettings client which uses the credentials of the incoming request

<b>Signature:</b>

Expand Down
126 changes: 51 additions & 75 deletions docs/discover/context.asciidoc
Original file line number Diff line number Diff line change
@@ -1,90 +1,66 @@
[[document-context]]
== Viewing Document Context
== Viewing a document in context

For certain applications it can be useful to inspect a window of documents
surrounding a specific event. The context view enables you to do just that for
<<index-patterns, index patterns>> that are configured to contain time-based events.
Once you've narrowed your search to a specific event,
you might want to inspect the documents that occurred
immediately before and after the event. With the Context view,
you can do just that for index patterns that contain time-based events.

To show the context surrounding an anchor document, click the *Expand* button
image:images/ExpandButton.jpg[Expand Button] to the left of the document's
table entry and then click the *View surrounding documents* link.
To open the Context view, click the expand icon (<) in the document table, and then click
*View surrounding documents.*

image::images/Expanded-Document.png[Expanded Document]
{nbsp}
The documents are sorted
by the time field specified in the index pattern and displayed using the
same set of columns as the *Discover* view from which the context was opened.
The anchor document is highlighted in blue.

The context view displays a number of documents before and after the anchor
document. The anchor document itself is highlighted in blue. The view is sorted
by the time field specified in the index pattern configuration and uses the
same set of columns as the Discover view the context was opened from. If there
are multiple documents with the same time field value, the internal document
order is used as a secondary sorting criterion by default.

[NOTE]
--
The field used for tiebreaking in case of equal time field values can be
configured using the advanced setting `context:tieBreakerFields` in
<<advanced-options, *Management > Advanced Settings*>>, which defaults to the
`_doc` field. The value of this setting can be a comma-separated list of field
names, which will be checked in sequence for suitability when a context is
about to be displayed. The first suitable field is then used as the tiebreaking
field. A field is suitable if the field exists and is sortable in the index
pattern the context is based on.

While not required, it is recommended to only
use fields which have {ref}/doc-values.html[doc values] enabled to achieve
good performance and avoid unnecessary {ref}/modules-fielddata.html[field
data] usage. Common examples for suitable fields include log line numbers,
monotonically increasing counters and high-precision timestamps.
--

[role="screenshot"]
image::images/Discover-ContextView.png[Context View]

NOTE: The number of documents displayed by default can be configured
via the `context:defaultSize` setting in <<advanced-options, *Management >
Advanced Settings*>>.

[float]
[[change-context-size]]
=== Changing the Context Size

You can change the number documents displayed before and after the anchor
document independently.

To increase the number of displayed documents that are newer than the anchor
document, click the *Load 5 more* button above the document list or enter the
desired number into the input box right of the button.

image::images/Discover-ContextView-SizePicker-Newer.png[]
{nbsp}

To increase the number of displayed documents that are older than the anchor
document, click the *Load 5 more* button below the document list or enter the
desired number into the input box right of the button.
[[filter-context]]
=== Filter the context

image::images/Discover-ContextView-SizePicker-Older.png[]
{nbsp}
The
filters you applied in *Discover* are carried over to the Context view. Pinned filters remain active, while normal
filters are copied in a disabled state. You can re-enable these filters to
refine your context view.

NOTE: The default number of documents loaded with each button click can be
configured via the `context:step` setting in <<advanced-options, *Management >
Advanced Settings*>>.
If the Context view contains a large number of documents not related to the event under
investigation, you can use filters to restrict the documents to
display.

[float]
[[filter-context]]
=== Filtering the Context

Depending on how the documents are partitioned into index patterns, the context
view might contain a large number of documents not related to the event under
investigation. In order to adapt the focus of the context view to the task at
hand, you can use filters to restrict the documents considered by Kibana for
display in the context view.

When switching from the discover view to the context view, the previously
applied filters are carried over. Pinned filters remain active while normal
filters are copied in a disabled state. You can selectively re-enabled them to
refine your context view.
[[change-context-size]]
=== Change the number of surrounding documents

New filters can be added via the *Add a filter* link in the filter bar, by
clicking the filter icons appearing when hovering a field, or by expanding
documents and clicking the filter icons in the table.
By default, the five newest and oldest
documents are listed. To increase the number of documents that surround the anchor document,
click *Load*. Five documents are added with each click.

image::images/Discover-ContextView-FilterMontage.png[]
[float]
[[configure-context-ContextView]]
=== Configure the context view

To configure the Context view, use these settings in <<advanced-options,
Advanced Settings>>.

[horizontal]
`context:defaultSize`:: The number of documents to display by default.
`context:step`:: The default number of documents to load with each button click.
`context:tieBreakerFields`:: The field to use for tiebreaking in case of equal time field values.
The default is the
`_doc` field.
+
You can enter a comma-separated list of field
names, which is checked in sequence for suitability when a context is
displayed. The first suitable field is used as the tiebreaking
field. A field is suitable if the field exists and is sortable in the index
pattern the context is based on.
+
Although not required, it is recommended to only
use fields that have {ref}/doc-values.html[doc values] enabled to achieve
good performance and avoid unnecessary {ref}/modules-fielddata.html[field
data] usage. Common examples for suitable fields include log line numbers,
monotonically increasing counters and high-precision timestamps.
Loading

0 comments on commit 505f772

Please sign in to comment.