Skip to content

Commit

Permalink
Merge branch 'main' into 147087-case-insensitive-fields-search
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Jan 4, 2023
2 parents 8d74744 + 9a0a72c commit de7b2ea
Show file tree
Hide file tree
Showing 378 changed files with 6,564 additions and 7,371 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -887,6 +887,7 @@ packages/kbn-ambient-ui-types @elastic/kibana-operations
packages/kbn-analytics @elastic/kibana-core
packages/kbn-apm-config-loader @elastic/kibana-core @vigneshshanmugam
packages/kbn-apm-synthtrace @elastic/apm-ui
packages/kbn-apm-synthtrace-client @elastic/apm-ui
packages/kbn-apm-utils @elastic/apm-ui
packages/kbn-axe-config @elastic/kibana-qa
packages/kbn-babel-plugin-package-imports @elastic/kibana-operations
Expand Down
11 changes: 6 additions & 5 deletions docs/user/alerting/create-and-manage-rules.asciidoc
Expand Up @@ -14,6 +14,7 @@ central place to:

[role="screenshot"]
image:images/rules-ui.png[Example rule listing in {rules-ui}]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

For more information on alerting concepts and the types of rules and connectors
available, go to <<alerting-getting-started>>.
Expand Down Expand Up @@ -182,13 +183,15 @@ individual rules. For example, you can change the state of a rule:

[role="screenshot"]
image:images/individual-enable-disable.png[Use the rule status dropdown to enable or disable an individual rule]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

When you snooze a rule, the rule checks continue to run on a schedule but the
alert will not trigger any actions. You can snooze for a specified period of
time, indefinitely, or schedule single or recurring downtimes:

[role="screenshot"]
image:images/snooze-panel.png[Snooze notifications for a rule]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

When a rule is in a `snoozed` state, you can cancel or change the duration of
this state.
Expand All @@ -198,11 +201,9 @@ this state.

A rule can have one of the following statuses:

`active`:: The conditions for the rule have been met, and the associated actions should be invoked.
`ok`:: The conditions for the rule have not been met, and the associated actions are not invoked.
`error`:: An error was encountered by the rule.
`pending`:: The rule has not yet run. The rule was either just created, or enabled after being disabled.
`unknown`:: A problem occurred when calculating the status. Most likely, something went wrong with the alerting code.
`failed`:: The rule ran with errors.
`succeeded`:: The rule ran without errors.
`warning`:: The rule ran with some non-critical errors.

[float]
[[importing-and-exporting-rules]]
Expand Down
Binary file modified docs/user/alerting/images/individual-enable-disable.png
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/rules-ui.png
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/snooze-panel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion package.json
Expand Up @@ -107,7 +107,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.5.0-canary.1",
"@elastic/ems-client": "8.3.3",
"@elastic/eui": "72.0.0",
"@elastic/eui": "72.1.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down Expand Up @@ -740,6 +740,7 @@
"@kbn/ambient-storybook-types": "link:packages/kbn-ambient-storybook-types",
"@kbn/ambient-ui-types": "link:packages/kbn-ambient-ui-types",
"@kbn/apm-synthtrace": "link:packages/kbn-apm-synthtrace",
"@kbn/apm-synthtrace-client": "link:packages/kbn-apm-synthtrace-client",
"@kbn/axe-config": "link:packages/kbn-axe-config",
"@kbn/babel-plugin-package-imports": "link:packages/kbn-babel-plugin-package-imports",
"@kbn/babel-preset": "link:packages/kbn-babel-preset",
Expand Down Expand Up @@ -870,6 +871,7 @@
"@types/fetch-mock": "^7.3.1",
"@types/file-saver": "^2.0.0",
"@types/flot": "^0.0.31",
"@types/fnv-plus": "^1.3.0",
"@types/geojson": "7946.0.7",
"@types/getos": "^3.0.0",
"@types/gulp": "^4.0.6",
Expand Down Expand Up @@ -912,6 +914,7 @@
"@types/minimist": "^1.2.2",
"@types/mock-fs": "^4.13.1",
"@types/moment-duration-format": "^2.2.3",
"@types/multistream": "^4.1.0",
"@types/mustache": "^0.8.31",
"@types/nock": "^10.0.3",
"@types/node": "16.11.41",
Expand All @@ -926,6 +929,7 @@
"@types/pbf": "3.0.2",
"@types/pdfmake": "^0.2.2",
"@types/pegjs": "^0.10.1",
"@types/pidusage": "^2.0.2",
"@types/pixelmatch": "^5.2.4",
"@types/pngjs": "^3.4.0",
"@types/prettier": "^2.3.2",
Expand Down Expand Up @@ -1053,6 +1057,7 @@
"faker": "^5.1.0",
"fetch-mock": "^7.3.9",
"file-loader": "^4.2.0",
"fnv-plus": "^1.3.1",
"form-data": "^4.0.0",
"geckodriver": "^3.2.0",
"gulp-brotli": "^3.0.0",
Expand Down Expand Up @@ -1098,7 +1103,9 @@
"mochawesome-merge": "^4.2.1",
"mock-fs": "^5.1.2",
"ms-chromium-edge-driver": "^0.5.1",
"multistream": "^4.1.0",
"mutation-observer": "^1.0.3",
"native-hdr-histogram": "^1.0.0",
"nock": "12.0.3",
"node-sass": "^8.0.0",
"null-loader": "^3.0.0",
Expand All @@ -1107,6 +1114,7 @@
"openapi-types": "^10.0.0",
"pbf": "3.2.1",
"peggy": "^1.2.0",
"pidusage": "^3.0.2",
"pirates": "^4.0.1",
"piscina": "^3.2.0",
"pixelmatch": "^5.3.0",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-apm-synthtrace-client/README.md
@@ -0,0 +1 @@
See packages/kbn-apm-synthtrace/README.json
32 changes: 32 additions & 0 deletions packages/kbn-apm-synthtrace-client/index.ts
@@ -0,0 +1,32 @@
/*
* 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.
*/

export { observer } from './src/lib/agent_config';
export type { AgentConfigFields } from './src/lib/agent_config/agent_config_fields';
export { apm } from './src/lib/apm';
export type { ApmFields } from './src/lib/apm/apm_fields';
export type { Instance } from './src/lib/apm/instance';
export { MobileDevice } from './src/lib/apm/mobile_device';
export type {
DeviceInfo,
GeoInfo,
NetworkConnectionInfo,
OSInfo,
} from './src/lib/apm/mobile_device';
export { httpExitSpan } from './src/lib/apm/span';
export { DistributedTrace } from './src/lib/dsl/distributed_trace_client';
export type { Fields } from './src/lib/entity';
export type { Serializable } from './src/lib/serializable';
export { timerange } from './src/lib/timerange';
export type { Timerange } from './src/lib/timerange';
export { generateLongId, generateShortId } from './src/lib/utils/generate_id';
export { appendHash, hashKeysOf } from './src/lib/utils/hash';
export { dedot } from './src/lib/utils/dedot';
export type { ESDocumentWithOperation, SynthtraceESAction, SynthtraceGenerator } from './src/types';

export { parseInterval } from './src/lib/interval';
Expand Up @@ -6,7 +6,10 @@
* Side Public License, v 1.
*/

export enum VIEW_MODE {
DOCUMENT_LEVEL = 'documents',
AGGREGATED_LEVEL = 'aggregated',
}
module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-apm-synthtrace-client'],
setupFiles: [],
setupFilesAfterEnv: [],
};
6 changes: 6 additions & 0 deletions packages/kbn-apm-synthtrace-client/kibana.jsonc
@@ -0,0 +1,6 @@
{
"type": "shared-common",
"id": "@kbn/apm-synthtrace-client",
"devOnly": true,
"owner": "@elastic/apm-ui"
}
7 changes: 7 additions & 0 deletions packages/kbn-apm-synthtrace-client/package.json
@@ -0,0 +1,7 @@
{
"name": "@kbn/apm-synthtrace-client",
"version": "0.1.0",
"description": "Elastic APM trace data generator",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true
}
Expand Up @@ -5,8 +5,9 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { cluster } from './cluster';

export const stackMonitoring = {
cluster,
module.exports = {
rules: {
'import/no-default-export': 'off',
},
};
Expand Up @@ -14,7 +14,9 @@ export type AgentConfigFields = Pick<
| 'processor.event'
| 'processor.name'
| 'metricset.name'
| 'observer'
| 'observer.version'
| 'observer.type'
| 'observer.version_major'
| 'ecs.version'
| 'event.ingested'
> &
Expand Down
Expand Up @@ -46,109 +46,131 @@ export interface GeoLocation {
type: string;
}

export type ApmFields = Fields &
type ExperimentalFields = Partial<{
'metricset.interval': string;
'transaction.duration.summary': string;
}>;

export type ApmFields = Fields<{
'metricset.id': string;
}> &
Partial<{
'timestamp.us'?: number;

'agent.name': string;
'agent.version': string;
'client.geo.city_name': string;
'client.geo.continent_name': string;
'client.geo.country_iso_code': string;
'client.geo.country_name': string;
'client.geo.location': GeoLocation;
'client.geo.region_iso_code': string;
'client.geo.region_name': string;
'client.geo.location': GeoLocation;
'client.ip': string;
'cloud.provider': string;
'cloud.project.name': string;
'cloud.service.name': string;
'cloud.account.id': string;
'cloud.account.name': string;
'cloud.availability_zone': string;
'cloud.machine.type': string;
'cloud.project.id': string;
'cloud.project.name': string;
'cloud.provider': string;
'cloud.region': string;
'cloud.service.name': string;
'container.id': string;
'destination.address': string;
'destination.port': number;
'device.id': string;
'device.manufacturer': string;
'device.model.identifier': string;
'device.model.name': string;
'device.manufacturer': string;
'ecs.version': string;
'event.outcome': string;
'event.name': string;
'event.ingested': number;
'error.id': string;
'error.exception': ApmException[];
'error.grouping_name': string;
'error.grouping_key': string;
'faas.id': string;
'faas.name': string;
'error.grouping_name': string;
'error.id': string;
'event.ingested': number;
'event.name': string;
'event.outcome': string;
'event.outcome_numeric':
| number
| {
sum: number;
value_count: number;
};
'faas.coldstart': boolean;
'faas.execution': string;
'faas.id': string;
'faas.name': string;
'faas.trigger.type': string;
'faas.trigger.request_id': string;
'host.name': string;
'faas.version': string;
'host.architecture': string;
'host.hostname': string;
'host.name': string;
'host.os.full': string;
'host.os.name': string;
'host.os.platform': string;
'host.os.type': string;
'host.os.version': string;
'http.request.method': string;
'http.response.status_code': number;
'kubernetes.pod.uid': string;
'kubernetes.pod.name': string;
'kubernetes.pod.uid': string;
'metricset.name': string;
observer: Observer;
'network.connection.type': string;
'network.connection.subtype': string;
'network.carrier.name': string;
'network.carrier.icc': string;
'network.carrier.mcc': string;
'network.carrier.mnc': string;
'network.carrier.icc': string;
'network.carrier.name': string;
'network.connection.subtype': string;
'network.connection.type': string;
'observer.type': string;
'observer.version_major': number;
'observer.version': string;
'parent.id': string;
'processor.event': string;
'processor.name': string;
'session.id': string;
'trace.id': string;
'transaction.duration.us': number;
'transaction.id': string;
'transaction.name': string;
'transaction.type': string;
'transaction.id': string;
'transaction.duration.us': number;
'transaction.duration.histogram': {
values: number[];
counts: number[];
};
'transaction.sampled': true;
'service.name': string;
'service.version': string;
'service.environment': string;
'service.framework.name': string;
'service.framework.version': string;
'service.language.name': string;
'service.language.version': string;
'service.name': string;
'service.node.name': string;
'service.runtime.name': string;
'service.runtime.version': string;
'service.framework.name': string;
'service.framework.version': string;
'service.target.name': string;
'service.target.type': string;
'service.version': string;
'span.action': string;
'span.id': string;
'span.name': string;
'span.type': string;
'span.subtype': string;
'span.duration.us': number;
'span.destination.service.resource': string;
'span.destination.service.response_time.sum.us': number;
'span.destination.service.response_time.count': number;
'span.destination.service.response_time.sum.us': number;
'span.duration.us': number;
'span.id': string;
'span.name': string;
'span.self_time.count': number;
'span.self_time.sum.us': number;
'span.subtype': string;
'span.type': string;
'transaction.result': string;
'transaction.sampled': true;
'span.links': Array<{
trace: { id: string };
span: { id: string };
}>;
'url.original': string;
}> &
ApmApplicationMetricFields;
ApmApplicationMetricFields &
ExperimentalFields;

export type SpanParams = {
spanName: string;
Expand Down
Expand Up @@ -9,28 +9,16 @@ import { service } from './service';
import { mobileApp } from './mobile_app';
import { browser } from './browser';
import { serverlessFunction } from './serverless_function';
import { getTransactionMetrics } from './processors/get_transaction_metrics';
import { getSpanDestinationMetrics } from './processors/get_span_destination_metrics';
import { getChromeUserAgentDefaults } from './defaults/get_chrome_user_agent_defaults';
import { getBreakdownMetrics } from './processors/get_breakdown_metrics';
import { getApmWriteTargets } from './utils/get_apm_write_targets';
import { ApmSynthtraceEsClient } from './client/apm_synthtrace_es_client';
import { ApmSynthtraceKibanaClient } from './client/apm_synthtrace_kibana_client';

import type { ApmException } from './apm_fields';

export const apm = {
service,
mobileApp,
browser,
getTransactionMetrics,
getSpanDestinationMetrics,
getChromeUserAgentDefaults,
getBreakdownMetrics,
getApmWriteTargets,
ApmSynthtraceEsClient,
ApmSynthtraceKibanaClient,
serverlessFunction,
};

export type { ApmSynthtraceEsClient, ApmException };
export type { ApmException };

0 comments on commit de7b2ea

Please sign in to comment.