Skip to content

Commit

Permalink
Merge branch 'master' into dev/search/misc-integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jan 13, 2021
2 parents a5c7548 + ff17581 commit 8aa0a64
Show file tree
Hide file tree
Showing 461 changed files with 5,798 additions and 3,131 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kib
# Security
/src/core/server/csp/ @elastic/kibana-security @elastic/kibana-core
/src/plugins/security_oss/ @elastic/kibana-security
/src/plugins/spaces_oss/ @elastic/kibana-security
/test/security_functional/ @elastic/kibana-security
/x-pack/plugins/spaces/ @elastic/kibana-security
/x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security
Expand Down
Binary file added docs/apm/images/all-instances.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 added docs/apm/images/error-rate.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 added docs/apm/images/latency.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 added docs/apm/images/metadata-icons.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 added docs/apm/images/spans-dependencies.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 added docs/apm/images/traffic-transactions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 104 additions & 1 deletion docs/apm/service-overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,107 @@
[[service-overview]]
=== Service overview

Selecting a <<services,*service*>> brings you to the *Service overview*.
Selecting a <<services,*service*>> brings you to the *Service overview*.
The *Service overview* contains a wide variety of charts and tables that provide
visibility into how a service performs across your infrastructure.

[discrete]
[[service-latency]]
=== Latency

Response times for the service. You can filter the *Latency* chart to display the average,
95th, or 99th percentile latency times for the service.

[role="screenshot"]
image::apm/images/latency.png[Service latency]

[discrete]
[[service-traffic-transactions]]
=== Traffic and transactions

The *Traffic* chart visualizes the average number of transactions per minute for the selected service.

The *Transactions* table displays a list of _transaction groups_ for the
selected service and includes the latency, traffic, error rate, and the impact for each transaction.
Transactions that share the same name are grouped, and only one entry is displayed for each group.

By default, transaction groups are sorted by _Impact_ to show the most used and slowest endpoints in your
service. If there is a particular endpoint you are interested in, click *View transactions* to view a
list of similar transactions on the <<transactions, transactions overview>> page.

[role="screenshot"]
image::apm/images/traffic-transactions.png[Traffic and transactions]

[discrete]
[[service-error-rates]]
=== Error rate and errors

The *Error rate* chart displays the average error rates relating to the service, within a specific time range.

The *Errors* table provides a high-level view of each error message when it first and last occurred,
along with the total number of occurrences. This makes it very easy to quickly see which errors affect
your services and take actions to rectify them. To do so, click *View errors*.

[role="screenshot"]
image::apm/images/error-rate.png[Error rate and errors]

[discrete]
[[service-span-duration]]
=== Span types average duration and dependencies

The *Average duration by span type* chart visualizes each span type's average duration and helps you determine
which spans could be slowing down transactions. The "app" label displayed under the
chart indicates that something was happening within the application. This could signal that the
agent does not have auto-instrumentation for whatever was happening during that time or that the time was spent in the
application code and not in database or external requests.

The *Dependencies* table displays a list of downstream services or external connections relevant
to the service at the selected time range. The table displays latency, traffic, error rate, and the impact of
each dependency. By default, dependencies are sorted by _Impact_ to show the most used and the slowest dependency.
If there is a particular dependency you are interested in, click *View service map* to view the related
<<service-maps, service map>>.

[role="screenshot"]
image::apm/images/spans-dependencies.png[Span type duration and dependencies]

[discrete]
[[service-instances]]
=== All instances

The *All instances* table displays a list of all the available service instances within the selected time range.
Depending on how the service runs, the instance could be a host or a container. The table displays latency, traffic,
errors, CPU usage, and memory usage for each instance. By default, instances are sorted by _Traffic_.

[role="screenshot"]
image::apm/images/all-instances.png[All instances]

[discrete]
[[service-metadata]]
=== Service metadata

To view metadata relating to the service agent, and if relevant, the container and cloud provider,
click on each icon located at the top of the page beside the service name.

[role="screenshot"]
image::apm/images/metadata-icons.png[Service metadata]

*Service information*

* Service version
* Runtime name and version
* Framework name
* Agent name and version

*Container information*

* Operating system
* Containerized - Yes or no.
* Total number of instances
* Orchestration

*Cloud provider information*

* Cloud provider
* Availability zones
* Machine types
* Project ID
1 change: 1 addition & 0 deletions docs/apm/transactions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Like in the Transaction duration graph, you can zoom in on anomalies to further

*Error rate*::
Visualize the total number of transactions with errors divided by the total number of transactions.
The error rate value is based on the `event.outcome` field and is the relative number of failed transactions.
Any unexpected increases, decreases, or irregular patterns can be investigated further
with the <<errors,errors overview>>.

Expand Down
4 changes: 2 additions & 2 deletions docs/developer/advanced/upgrading-nodejs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Theses files must be updated when upgrading Node.js:

- {kib-repo}blob/{branch}/.ci/Dockerfile[`.ci/Dockerfile`] - The version is specified in the `NODE_VERSION` constant.
This is used to pull the relevant image from https://hub.docker.com/_/node[Docker Hub].
Note that Docker Hub can take 24+ hours to be updated with the new images after a new release of Node.js, so if you're upgrading Node.js in Kibana _just_ after the official Node.js release, you have to check if the new images are present on Docker Hub.
Note that Docker Hub can take 24+ hours to be updated with the new images after a new release of Node.js, so if you're upgrading Node.js in Kibana just after the official Node.js release, you have to check if the new images are present on Docker Hub.
If they are not, and the update is urgent, you can skip this file and update it later once Docker Hub has been updated.
- {kib-repo}blob/{branch}/.node-version[`.node-version`]
- {kib-repo}blob/{branch}/.nvmrc[`.nvmrc`]
Expand All @@ -29,7 +29,7 @@ Hence, upgrades to either Node.js 14 or Node.js 10 shold be done as separate PRs

==== Node.js patch upgrades

Typically, you want to backport Node.js *patch* upgrades to all supported release branches that run the same _major_ Node.js version:
Typically, you want to backport Node.js *patch* upgrades to all supported release branches that run the same *major* Node.js version:

- If upgrading Node.js 14, and the current release is 7.11.1, the main PR should target `master` and be backported to `7.x` and `7.11`.
- If upgrading Node.js 10, the main PR should target `6.8` only.
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 @@ -194,6 +194,10 @@ so they can properly protect the data within their clusters.
|Replaces the legacy ui/share module for registering share context menus.
|{kib-repo}blob/{branch}/src/plugins/spaces_oss/README.md[spacesOss]
|Bridge plugin for consumption of the Spaces feature from OSS plugins.
|{kib-repo}blob/{branch}/src/plugins/telemetry/README.md[telemetry]
|Telemetry allows Kibana features to have usage tracked in the wild. The general term "telemetry" refers to multiple things:
Expand Down
Binary file modified docs/discover/images/Discover-Start.png
100755 → 100644
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/discover/images/document-table-expanded.png
100755 → 100644
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/discover/images/document-table.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/discover/images/visualize-from-discover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"dedent": "^0.7.0",
"deep-freeze-strict": "^1.1.1",
"del": "^5.1.0",
"elastic-apm-node": "^3.7.0",
"elastic-apm-node": "^3.10.0",
"elasticsearch": "^16.7.0",
"execa": "^4.0.2",
"exit-hook": "^2.2.0",
Expand Down Expand Up @@ -440,6 +440,7 @@
"@types/enzyme": "^3.10.5",
"@types/eslint": "^6.1.3",
"@types/extract-zip": "^1.6.2",
"@types/faker": "^5.1.5",
"@types/fancy-log": "^1.3.1",
"@types/fetch-mock": "^7.3.1",
"@types/file-saver": "^2.0.0",
Expand Down Expand Up @@ -647,7 +648,7 @@
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-react-perf": "^3.2.3",
"expose-loader": "^0.7.5",
"faker": "1.1.0",
"faker": "^5.1.0",
"fancy-log": "^1.3.2",
"fast-glob": "2.2.7",
"fetch-mock": "^7.3.9",
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 @@ -106,3 +106,4 @@ pageLoadAssetSize:
stackAlerts: 29684
presentationUtil: 28545
runtimeFieldEditor: 46986
spacesOss: 18817
4 changes: 4 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ export class DocLinksService {
apiKeyServiceSettings: `${ELASTICSEARCH_DOCS}security-settings.html#api-key-service-settings`,
clusterPrivileges: `${ELASTICSEARCH_DOCS}security-privileges.html#privileges-list-cluster`,
elasticsearchSettings: `${ELASTICSEARCH_DOCS}security-settings.html`,
elasticsearchEnableSecurity: `${ELASTICSEARCH_DOCS}get-started-enable-security.html`,
indicesPrivileges: `${ELASTICSEARCH_DOCS}security-privileges.html#privileges-list-indices`,
kibanaTLS: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/configuring-tls.html`,
kibanaPrivileges: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-privileges.html`,
mappingRoles: `${ELASTICSEARCH_DOCS}mapping-roles.html`,
mappingRolesFieldRules: `${ELASTICSEARCH_DOCS}role-mapping-resources.html#mapping-roles-rule-field`,
runAsPrivilege: `${ELASTICSEARCH_DOCS}security-privileges.html#_run_as_privilege`,
},
watcher: {
jiraAction: `${ELASTICSEARCH_DOCS}actions-jira.html`,
Expand All @@ -219,6 +222,7 @@ export class DocLinksService {
createIndex: `${ELASTICSEARCH_DOCS}indices-create-index.html`,
createSnapshotLifecylePolicy: `${ELASTICSEARCH_DOCS}slm-api-put-policy.html`,
createRoleMapping: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html`,
createRoleMappingTemplates: `${ELASTICSEARCH_DOCS}security-api-put-role-mapping.html#_role_templates`,
createApiKey: `${ELASTICSEARCH_DOCS}security-api-create-api-key.html`,
createPipeline: `${ELASTICSEARCH_DOCS}put-pipeline-api.html`,
createTransformRequest: `${ELASTICSEARCH_DOCS}put-transform.html#put-transform-request-body`,
Expand Down
21 changes: 21 additions & 0 deletions src/plugins/advanced_settings/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": [
"public/**/*",
"server/**/*"
],
"references": [
{ "path": "../../core/tsconfig.json" },
{ "path": "../management/tsconfig.json" },
{ "path": "../home/tsconfig.json" },
{ "path": "../usage_collection/tsconfig.json" },
{ "path": "../kibana_react/tsconfig.json" },
]
}
16 changes: 16 additions & 0 deletions src/plugins/charts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": ["common/**/*", "public/**/*", "server/**/*"],
"references": [
{ "path": "../../core/tsconfig.json" },
{ "path": "../expressions/tsconfig.json" },
{ "path": "../embeddable/tsconfig.json" }
]
}
2 changes: 2 additions & 0 deletions src/plugins/dashboard/.storybook/storyshots.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'moment-timezone';
import ReactDOM from 'react-dom';

import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots';
// @ts-ignore
import styleSheetSerializer from 'jest-styled-components/src/styleSheetSerializer';
import { addSerializer } from 'jest-specific-snapshot';

Expand Down Expand Up @@ -52,6 +53,7 @@ jest.mock('@elastic/eui/lib/components/overlay_mask/overlay_mask', () => {
};
});

// @ts-ignore
import { EuiObserver } from '@elastic/eui/test-env/components/observer/observer';
jest.mock('@elastic/eui/test-env/components/observer/observer');
EuiObserver.mockImplementation(() => 'EuiObserver');
Expand Down
17 changes: 12 additions & 5 deletions src/plugins/dashboard/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@
"embeddable",
"inspector",
"kibanaLegacy",
"urlForwarding",
"navigation",
"uiActions",
"savedObjects",
"share"
"share",
"uiActions",
"urlForwarding"
],
"optionalPlugins": ["home", "usageCollection", "savedObjectsTaggingOss"],
"optionalPlugins": [
"home",
"savedObjectsTaggingOss",
"usageCollection"],
"server": true,
"ui": true,
"requiredBundles": ["kibanaUtils", "kibanaReact", "home"]
"requiredBundles": [
"home",
"kibanaReact",
"kibanaUtils"
]
}
34 changes: 34 additions & 0 deletions src/plugins/dashboard/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "./target/types",
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true
},
"include": [
"*.ts",
".storybook/**/*",
"common/**/*",
"public/**/*",
"server/**/*",
],
"references": [
{ "path": "../../core/tsconfig.json" },
{ "path": "../inspector/tsconfig.json" },
{ "path": "../kibana_legacy/tsconfig.json" },
{ "path": "../kibana_react/tsconfig.json" },
{ "path": "../kibana_utils/tsconfig.json" },
{ "path": "../share/tsconfig.json" },
{ "path": "../url_forwarding/tsconfig.json" },
{ "path": "../usage_collection/tsconfig.json" },
{ "path": "../data/tsconfig.json"},
{ "path": "../embeddable/tsconfig.json" },
{ "path": "../home/tsconfig.json" },
{ "path": "../navigation/tsconfig.json" },
{ "path": "../saved_objects_tagging_oss/tsconfig.json" },
{ "path": "../saved_objects/tsconfig.json" },
{ "path": "../ui_actions/tsconfig.json" },
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function discoverController($element, $route, $scope, $timeout, Promise, uiCapab
createSearchSessionRestorationDataProvider({
appStateContainer,
data,
getSavedSearchId: () => savedSearch.id,
getSavedSearch: () => savedSearch,
})
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
* under the License.
*/

import { getState, GetStateReturn } from './discover_state';
import {
getState,
GetStateReturn,
createSearchSessionRestorationDataProvider,
} from './discover_state';
import { createBrowserHistory, History } from 'history';
import { dataPluginMock } from '../../../../data/public/mocks';
import { SavedSearch } from '../../saved_searches';

let history: History;
let state: GetStateReturn;
Expand Down Expand Up @@ -103,3 +109,30 @@ describe('Test discover state with legacy migration', () => {
`);
});
});

describe('createSearchSessionRestorationDataProvider', () => {
let mockSavedSearch: SavedSearch = ({} as unknown) as SavedSearch;
const searchSessionInfoProvider = createSearchSessionRestorationDataProvider({
data: dataPluginMock.createStartContract(),
appStateContainer: getState({
history: createBrowserHistory(),
}).appStateContainer,
getSavedSearch: () => mockSavedSearch,
});

describe('session name', () => {
test('No saved search returns default name', async () => {
expect(await searchSessionInfoProvider.getName()).toBe('Discover');
});

test('Saved Search with a title returns saved search title', async () => {
mockSavedSearch = ({ id: 'id', title: 'Name' } as unknown) as SavedSearch;
expect(await searchSessionInfoProvider.getName()).toBe('Name');
});

test('Saved Search without a title returns default name', async () => {
mockSavedSearch = ({ id: 'id', title: undefined } as unknown) as SavedSearch;
expect(await searchSessionInfoProvider.getName()).toBe('Discover');
});
});
});
Loading

0 comments on commit 8aa0a64

Please sign in to comment.