Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into logging-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
TinaHeiligers committed Feb 22, 2021
2 parents bf6fdb4 + e772488 commit 4e3ea2b
Show file tree
Hide file tree
Showing 63 changed files with 2,051 additions and 285 deletions.
8 changes: 6 additions & 2 deletions docs/user/alerting/defining-alerts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ image::images/alert-flyout-sections.png[The three sections of an alert definitio
All alert share the following four properties in common:

[role="screenshot"]
image::images/alert-flyout-general-details.png[alt='All alerts have name, tags, check every, and notify every properties in common']
image::images/alert-flyout-general-details.png[alt='All alerts have name, tags, check every, and notify properties in common']

Name:: The name of the alert. While this name does not have to be unique, the name can be referenced in actions and also appears in the searchable alert listing in the management UI. A distinctive name can help identify and find an alert.
Tags:: A list of tag names that can be applied to an alert. Tags can help you organize and find alerts, because tags appear in the alert listing in the management UI which is searchable by tag.
Check every:: This value determines how frequently the alert conditions below are checked. Note that the timing of background alert checks are not guaranteed, particularly for intervals of less than 10 seconds. See <<alerting-production-considerations>> for more information.
Notify every:: This value limits how often actions are repeated when an alert instance remains active across alert checks. See <<alerting-concepts-suppressing-duplicate-notifications>> for more information.
Notify:: This value limits how often actions are repeated when an alert instance remains active across alert checks. See <<alerting-concepts-suppressing-duplicate-notifications>> for more information. +
- **Only on status change**: Actions are not repeated when an alert instance remains active across checks. Actions run only when the alert status changes.
- **Every time alert is active**: Actions are repeated when an alert instance remains active across checks.
- **On a custom action interval**: Actions are suppressed for the throttle interval, but repeat when an alert instance remains active across checks for a duration longer than the throttle interval.


[float]
[[defining-alerts-type-conditions]]
Expand Down
Binary file modified docs/user/alerting/images/alert-flyout-alert-conditions.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/alert-flyout-alert-type-selection.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/alert-flyout-general-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"kbn:watch": "node scripts/build --dev --watch"
},
"dependencies": {
"@kbn/analytics": "link:../kbn-analytics",
"@kbn/i18n": "link:../kbn-i18n",
"@kbn/monaco": "link:../kbn-monaco"
},
Expand Down
11 changes: 11 additions & 0 deletions src/core/server/logging/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tags: ['kibana','dev', 'contributor', 'api docs']
- [Configuration](#configuration)
- [Usage](#usage)
- [Logging config migration](#logging-config-migration)
- [Logging configuration via CLI](#logging-configuration-via-CLI)
- [Log record format changes](#log-record-format-changes)

The way logging works in Kibana is inspired by `log4j 2` logging framework used by [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html#logging).
Expand Down Expand Up @@ -540,6 +541,16 @@ and you can enable them by adjusting the minimum required [logging level](#log-l
#### logging.filter
TBD

### Logging configuration via CLI

| legacy logging | Kibana Platform logging|
|-|-|
|--verbose| --logging.root.level=debug --logging.root.appenders[0]=default --logging.root.appenders[1]=console|
|--quiet| --logging.root.level=error --logging.root.appenders[0]=default --logging.root.appenders[1]=console|
|--silent| --logging.root.level=off|

*note that you have to pass the `default` appender until the legacy logging system is removed in v8.0

### Log record format changes

| Parameter | Platform log record in **pattern** format | Legacy Platform log record **text** format |
Expand Down
3 changes: 1 addition & 2 deletions src/core/server/ui_settings/integration_tests/routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import { schema } from '@kbn/config-schema';
import * as kbnTestServer from '../../../test_helpers/kbn_server';

// FLAKY: https://github.com/elastic/kibana/issues/89191
describe.skip('ui settings service', () => {
describe('ui settings service', () => {
describe('routes', () => {
let root: ReturnType<typeof kbnTestServer.createRoot>;
beforeAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export async function mountManagementSection(
chrome.setBadge(readOnlyBadge);
}

chrome.docTitle.change(title);

ReactDOM.render(
<I18nProvider>
<Router history={params.history}>
Expand All @@ -90,6 +92,7 @@ export async function mountManagementSection(
params.element
);
return () => {
chrome.docTitle.reset();
ReactDOM.unmountComponentAtNode(params.element);
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export const mountManagementSection = async ({
);

return () => {
coreStart.chrome.docTitle.reset();
ReactDOM.unmountComponentAtNode(element);
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source test/scripts/jenkins_test_setup_xpack.sh
echo " -> Running security solution cypress tests"
cd "$XPACK_DIR"

checks-reporter-with-killswitch "Security Solution Cypress Tests" \
checks-reporter-with-killswitch "Security Solution Cypress Tests (Chrome)" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_INSTALL_DIR" \
Expand Down
15 changes: 15 additions & 0 deletions test/scripts/jenkins_security_solution_cypress_firefox.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

source test/scripts/jenkins_test_setup_xpack.sh

echo " -> Running security solution cypress tests"
cd "$XPACK_DIR"

checks-reporter-with-killswitch "Security Solution Cypress Tests (Firefox)" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_INSTALL_DIR" \
--config test/security_solution_cypress/config.firefox.ts

echo ""
echo ""
3 changes: 2 additions & 1 deletion vars/tasks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ def functionalXpack(Map params = [:]) {
'x-pack/plugins/triggers_actions_ui/public/application/context/actions_connectors_context.tsx',
]) {
if (githubPr.isPr()) {
task(kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh'))
task(kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypressChrome', './test/scripts/jenkins_security_solution_cypress_chrome.sh'))
task(kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypressFirefox', './test/scripts/jenkins_security_solution_cypress_firefox.sh'))
}
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions x-pack/plugins/apm/common/elasticsearch_fieldnames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,17 @@ export const LCP_FIELD = 'transaction.marks.agent.largestContentfulPaint';
export const TBT_FIELD = 'transaction.experience.tbt';
export const FID_FIELD = 'transaction.experience.fid';
export const CLS_FIELD = 'transaction.experience.cls';

export const PROFILE_ID = 'profile.id';
export const PROFILE_DURATION = 'profile.duration';
export const PROFILE_TOP_ID = 'profile.top.id';
export const PROFILE_STACK = 'profile.stack';

export const PROFILE_SAMPLES_COUNT = 'profile.samples.count';
export const PROFILE_CPU_NS = 'profile.cpu.ns';
export const PROFILE_WALL_US = 'profile.wall.us';

export const PROFILE_ALLOC_OBJECTS = 'profile.alloc_objects.count';
export const PROFILE_ALLOC_SPACE = 'profile.alloc_space.bytes';
export const PROFILE_INUSE_OBJECTS = 'profile.inuse_objects.count';
export const PROFILE_INUSE_SPACE = 'profile.inuse_space.bytes';
1 change: 1 addition & 0 deletions x-pack/plugins/apm/common/processor_event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export enum ProcessorEvent {
error = 'error',
metric = 'metric',
span = 'span',
profile = 'profile',
}
/**
* Processor events that are searchable in the UI via the query bar.
Expand Down
112 changes: 112 additions & 0 deletions x-pack/plugins/apm/common/profiling.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
* 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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { i18n } from '@kbn/i18n';
import {
PROFILE_ALLOC_OBJECTS,
PROFILE_ALLOC_SPACE,
PROFILE_CPU_NS,
PROFILE_INUSE_OBJECTS,
PROFILE_INUSE_SPACE,
PROFILE_SAMPLES_COUNT,
PROFILE_WALL_US,
} from './elasticsearch_fieldnames';

export enum ProfilingValueType {
wallTime = 'wall_time',
cpuTime = 'cpu_time',
samples = 'samples',
allocObjects = 'alloc_objects',
allocSpace = 'alloc_space',
inuseObjects = 'inuse_objects',
inuseSpace = 'inuse_space',
}

export enum ProfilingValueTypeUnit {
ns = 'ns',
us = 'us',
count = 'count',
bytes = 'bytes',
}

export interface ProfileNode {
id: string;
label: string;
fqn: string;
value: number;
children: string[];
}

const config = {
[ProfilingValueType.wallTime]: {
unit: ProfilingValueTypeUnit.us,
label: i18n.translate(
'xpack.apm.serviceProfiling.valueTypeLabel.wallTime',
{
defaultMessage: 'Wall',
}
),
field: PROFILE_WALL_US,
},
[ProfilingValueType.cpuTime]: {
unit: ProfilingValueTypeUnit.ns,
label: i18n.translate('xpack.apm.serviceProfiling.valueTypeLabel.cpuTime', {
defaultMessage: 'On-CPU',
}),
field: PROFILE_CPU_NS,
},
[ProfilingValueType.samples]: {
unit: ProfilingValueTypeUnit.count,
label: i18n.translate('xpack.apm.serviceProfiling.valueTypeLabel.samples', {
defaultMessage: 'Samples',
}),
field: PROFILE_SAMPLES_COUNT,
},
[ProfilingValueType.allocObjects]: {
unit: ProfilingValueTypeUnit.count,
label: i18n.translate(
'xpack.apm.serviceProfiling.valueTypeLabel.allocObjects',
{
defaultMessage: 'Alloc. objects',
}
),
field: PROFILE_ALLOC_OBJECTS,
},
[ProfilingValueType.allocSpace]: {
unit: ProfilingValueTypeUnit.bytes,
label: i18n.translate(
'xpack.apm.serviceProfiling.valueTypeLabel.allocSpace',
{
defaultMessage: 'Alloc. space',
}
),
field: PROFILE_ALLOC_SPACE,
},
[ProfilingValueType.inuseObjects]: {
unit: ProfilingValueTypeUnit.count,
label: i18n.translate(
'xpack.apm.serviceProfiling.valueTypeLabel.inuseObjects',
{
defaultMessage: 'In-use objects',
}
),
field: PROFILE_INUSE_OBJECTS,
},
[ProfilingValueType.inuseSpace]: {
unit: ProfilingValueTypeUnit.bytes,
label: i18n.translate(
'xpack.apm.serviceProfiling.valueTypeLabel.inuseSpace',
{
defaultMessage: 'In-use space',
}
),
field: PROFILE_INUSE_SPACE,
},
};

export const getValueTypeConfig = (type: ProfilingValueType) => {
return config[type];
};

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 @@ -114,6 +114,12 @@ function ServiceDetailsTransactions(
return <ServiceDetails {...props} tab="transactions" />;
}

function ServiceDetailsProfiling(
props: RouteComponentProps<{ serviceName: string }>
) {
return <ServiceDetails {...props} tab="profiling" />;
}

function SettingsAgentConfiguration(props: RouteComponentProps<{}>) {
return (
<Settings {...props}>
Expand Down Expand Up @@ -307,6 +313,14 @@ export const routes: APMRouteDefinition[] = [
return query.transactionName as string;
},
},
{
exact: true,
path: '/services/:serviceName/profiling',
component: withApmServiceContext(ServiceDetailsProfiling),
breadcrumb: i18n.translate('xpack.apm.breadcrumb.serviceProfilingTitle', {
defaultMessage: 'Profiling',
}),
},
{
exact: true,
path: '/services/:serviceName/service-map',
Expand Down
Loading

0 comments on commit 4e3ea2b

Please sign in to comment.