Skip to content

Commit

Permalink
Merge branch 'main' into issue_170656
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Nov 20, 2023
2 parents c43ec60 + 029b3ba commit c442fed
Show file tree
Hide file tree
Showing 152 changed files with 1,815 additions and 950 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/artifacts.yml
Expand Up @@ -88,7 +88,7 @@ steps:
- exit_status: -1
agents:
queue: n2-2
timeout_in_minutes: 30
timeout_in_minutes: 60
if: "build.env('RELEASE_BUILD') == null || build.env('RELEASE_BUILD') == '' || build.env('RELEASE_BUILD') == 'false'"
retry:
automatic:
Expand Down
2 changes: 1 addition & 1 deletion .ci/Dockerfile
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=18.18.2
ARG NODE_VERSION=20.9.0

FROM node:${NODE_VERSION} AS base

Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -302,6 +302,7 @@ x-pack/plugins/cross_cluster_replication @elastic/platform-deployment-management
packages/kbn-crypto @elastic/kibana-security
packages/kbn-crypto-browser @elastic/kibana-core
x-pack/plugins/custom_branding @elastic/appex-sharedux
packages/kbn-custom-icons @elastic/obs-ux-logs-team
packages/kbn-custom-integrations @elastic/obs-ux-logs-team
src/plugins/custom_integrations @elastic/fleet
packages/kbn-cypress-config @elastic/kibana-operations
Expand Down Expand Up @@ -345,6 +346,7 @@ packages/kbn-ebt-tools @elastic/kibana-core
packages/kbn-ecs @elastic/kibana-core @elastic/security-threat-hunting-investigations
x-pack/packages/security-solution/ecs_data_quality_dashboard @elastic/security-threat-hunting-investigations
x-pack/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-investigations
packages/kbn-elastic-agent-utils @elastic/obs-ux-logs-team
x-pack/packages/kbn-elastic-assistant @elastic/security-solution
x-pack/plugins/elastic_assistant @elastic/security-solution
test/plugin_functional/plugins/elasticsearch_client_plugin @elastic/kibana-core
Expand Down
2 changes: 1 addition & 1 deletion .node-version
@@ -1 +1 @@
18.18.2
20.9.0
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
18.18.2
20.9.0
12 changes: 6 additions & 6 deletions WORKSPACE.bazel
Expand Up @@ -22,13 +22,13 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install
# Setup the Node.js toolchain for the architectures we want to support
node_repositories(
node_repositories = {
"18.18.2-darwin_amd64": ("node-v18.18.2-darwin-x64.tar.gz", "node-v18.18.2-darwin-x64", "5bb8da908ed590e256a69bf2862238c8a67bc4600119f2f7721ca18a7c810c0f"),
"18.18.2-darwin_arm64": ("node-v18.18.2-darwin-arm64.tar.gz", "node-v18.18.2-darwin-arm64", "9f982cc91b28778dd8638e4f94563b0c2a1da7aba62beb72bd427721035ab553"),
"18.18.2-linux_arm64": ("node-v18.18.2-linux-arm64.tar.xz", "node-v18.18.2-linux-arm64", "8a5a03f6a742159c9aa0ae3a99b368cd938cf62f3a5522a2e5acbe6313710efe"),
"18.18.2-linux_amd64": ("node-v18.18.2-linux-x64.tar.xz", "node-v18.18.2-linux-x64", "f7cf590bc7153f3beaa9e1138d00e50d74df223f0bec61f63e7df65f7315b76a"),
"18.18.2-windows_amd64": ("node-v18.18.2-win-x64.zip", "node-v18.18.2-win-x64", "3bb0e51e579a41a22b3bf6cb2f3e79c03801aa17acbe0ca00fc555d1282e7acd"),
"20.9.0-darwin_amd64": ("node-v20.9.0-darwin-x64.tar.gz", "node-v20.9.0-darwin-x64", "fc5b73f2a78c17bbe926cdb1447d652f9f094c79582f1be6471b4b38a2e1ccc8"),
"20.9.0-darwin_arm64": ("node-v20.9.0-darwin-arm64.tar.gz", "node-v20.9.0-darwin-arm64", "31d2d46ae8d8a3982f54e2ff1e60c2e4a8e80bf78a3e8b46dcaac95ac5d7ce6a"),
"20.9.0-linux_arm64": ("node-v20.9.0-linux-arm64.tar.xz", "node-v20.9.0-linux-arm64", "79c07c41c9f2410e35fd8dec61491ba63762e428bffa2ee0ff3aec1afe05d4b1"),
"20.9.0-linux_amd64": ("node-v20.9.0-linux-x64.tar.xz", "node-v20.9.0-linux-x64", "d11a5e06d6fda8d0cb1a759365d2b5e33c609f3c9f333fdc63e0522475dc0c89"),
"20.9.0-windows_amd64": ("node-v20.9.0-win-x64.zip", "node-v20.9.0-win-x64", "70d87dad2378c63216ff83d5a754c61d2886fc39d32ce0d2ea6de763a22d3780"),
},
node_version = "18.18.2",
node_version = "20.9.0",
node_urls = [
"https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}",
],
Expand Down
Binary file modified docs/user/dashboard/images/dashboard_links_panel.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions package.json
Expand Up @@ -74,12 +74,12 @@
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "18.18.2",
"node": "20.9.0",
"yarn": "^1.22.19"
},
"resolutions": {
"**/@hello-pangea/dnd": "16.2.0",
"**/@types/node": "18.18.5",
"**/@types/node": "20.9.0",
"**/@typescript-eslint/utils": "5.62.0",
"**/chokidar": "^3.5.3",
"**/globule/minimatch": "^3.1.2",
Expand Down Expand Up @@ -353,6 +353,7 @@
"@kbn/crypto": "link:packages/kbn-crypto",
"@kbn/crypto-browser": "link:packages/kbn-crypto-browser",
"@kbn/custom-branding-plugin": "link:x-pack/plugins/custom_branding",
"@kbn/custom-icons": "link:packages/kbn-custom-icons",
"@kbn/custom-integrations": "link:packages/kbn-custom-integrations",
"@kbn/custom-integrations-plugin": "link:src/plugins/custom_integrations",
"@kbn/dashboard-enhanced-plugin": "link:x-pack/plugins/dashboard_enhanced",
Expand Down Expand Up @@ -390,6 +391,7 @@
"@kbn/ecs": "link:packages/kbn-ecs",
"@kbn/ecs-data-quality-dashboard": "link:x-pack/packages/security-solution/ecs_data_quality_dashboard",
"@kbn/ecs-data-quality-dashboard-plugin": "link:x-pack/plugins/ecs_data_quality_dashboard",
"@kbn/elastic-agent-utils": "link:packages/kbn-elastic-agent-utils",
"@kbn/elastic-assistant": "link:x-pack/packages/kbn-elastic-assistant",
"@kbn/elastic-assistant-plugin": "link:x-pack/plugins/elastic_assistant",
"@kbn/elasticsearch-client-plugin": "link:test/plugin_functional/plugins/elasticsearch_client_plugin",
Expand Down Expand Up @@ -1377,7 +1379,7 @@
"@types/multistream": "^4.1.0",
"@types/mustache": "^0.8.31",
"@types/nock": "^10.0.3",
"@types/node": "18.18.5",
"@types/node": "20.9.0",
"@types/node-fetch": "2.6.4",
"@types/node-forge": "^1.3.1",
"@types/nodemailer": "^6.4.0",
Expand Down
Expand Up @@ -59,7 +59,7 @@ test('return error when manifest content is not a valid JSON', async () => {
});

await expect(parseManifest(pluginPath, packageInfo)).rejects.toMatchObject({
message: `Unexpected token o in JSON at position 1 (invalid-manifest, ${pluginManifestPath})`,
message: `Unexpected token 'o', "not-json" is not valid JSON (invalid-manifest, ${pluginManifestPath})`,
type: PluginDiscoveryErrorType.InvalidManifest,
path: pluginManifestPath,
});
Expand Down
Expand Up @@ -278,7 +278,7 @@ describe('plugins discovery system', () => {
.toPromise();

expect(errors).toContain(
`Error: Unexpected token o in JSON at position 1 (invalid-manifest, ${manifestPath(
`Error: Unexpected token 'o', "not-json" is not valid JSON (invalid-manifest, ${manifestPath(
'plugin_a'
)})`
);
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts
Expand Up @@ -22,6 +22,7 @@ export type LogDocument = Fields &
'log.level'?: string;
'host.name'?: string;
'trace.id'?: string;
'agent.id'?: string;
'agent.name'?: string;
'orchestrator.cluster.name'?: string;
'orchestrator.cluster.id'?: string;
Expand Down
153 changes: 153 additions & 0 deletions packages/kbn-apm-synthtrace/src/scenarios/trace_with_orphan_items.ts
@@ -0,0 +1,153 @@
/*
* 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 { apm, ApmFields, httpExitSpan, Serializable } from '@kbn/apm-synthtrace-client';
import { Readable } from 'stream';
import { Scenario } from '../cli/scenario';

import { RunOptions } from '../cli/utils/parse_run_cli_flags';
import { getSynthtraceEnvironment } from '../lib/utils/get_synthtrace_environment';
import { withClient } from '../lib/utils/with_client';

const ENVIRONMENT = getSynthtraceEnvironment(__filename);

const scenario: Scenario<ApmFields> = async (runOptions: RunOptions) => {
return {
generate: ({ range, clients: { apmEsClient } }) => {
const transactionName = 'trace with orphans';
const successfulTimestamps = range.interval('1s').rate(3);

const synthRum = apm
.service({ name: 'synth-rum', environment: ENVIRONMENT, agentName: 'rum-js' })
.instance('my-instance');
const synthNode = apm
.service({ name: 'synth-node', environment: ENVIRONMENT, agentName: 'nodejs' })
.instance('my-instance');
const synthGo = apm
.service({ name: 'synth-go', environment: ENVIRONMENT, agentName: 'go' })
.instance('my-instance');

const traces = successfulTimestamps.generator((timestamp) => {
// synth-rum
return synthGo
.transaction({ transactionName })
.duration(400)
.timestamp(timestamp)
.children(
// synth-rum -> synth-node
synthRum
.span(
httpExitSpan({
spanName: 'GET /api/products/top',
destinationUrl: 'http://synth-node:3000',
})
)
.duration(300)
.timestamp(timestamp)
.children(
synthRum
.transaction({ transactionName: 'Child Transaction' })
.timestamp(timestamp)
.duration(200)
.children(
synthGo
.span({ spanName: 'custom_operation', spanType: 'custom' })
.timestamp(timestamp)
.duration(100)
.success()
),
// synth-node
synthNode
.transaction({ transactionName: 'Initial transaction in synth-node' })
.duration(300)
.timestamp(timestamp)
.children(
synthNode
// synth-node -> synth-go
.span(
httpExitSpan({
spanName: 'GET synth-go:3000',
destinationUrl: 'http://synth-go:3000',
})
)
.timestamp(timestamp)
.duration(400)

.children(
// synth-go
synthGo
.transaction({ transactionName: 'Child Transaction' })
.timestamp(timestamp)
.duration(200)
.children(
synthGo
.span({ spanName: 'custom_operation', spanType: 'custom' })
.timestamp(timestamp)
.duration(100)
.success(),
synthGo
.span({ spanName: 'custom_new_operation', spanType: 'custom' })
.timestamp(timestamp)
.duration(100)
.success()
)
)
)
)
);
});

const successfulTraceEvents = Array.from(
successfulTimestamps.generator((timestamp) =>
synthNode
.transaction({ transactionName: 'successful trace' })
.timestamp(timestamp)
.duration(1000)
.success()
.children(
synthNode
.span({
spanName: 'GET apm-*/_search',
spanType: 'db',
spanSubtype: 'elasticsearch',
})
.duration(1000)
.success()
.destination('elasticsearch')
.timestamp(timestamp),
synthNode
.span({ spanName: 'custom_operation', spanType: 'custom' })
.duration(100)
.success()
.timestamp(timestamp)
)
)
);

const unserialized = Array.from(traces);

const serialized = unserialized
.flatMap((event) => event.serialize())
.filter((trace) => trace['transaction.name'] !== 'Child Transaction');

const unserializedChanged = serialized.map((event) => ({
fields: event,
serialize: () => {
return [event];
},
})) as Array<Serializable<ApmFields>>;

return withClient(
apmEsClient,
Readable.from([...unserializedChanged, ...successfulTraceEvents])
);
},
};
};

export default scenario;
9 changes: 9 additions & 0 deletions packages/kbn-custom-icons/.storybook/main.js
@@ -0,0 +1,9 @@
/*
* 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.
*/

module.exports = require('@kbn/storybook').defaultConfig;
29 changes: 29 additions & 0 deletions packages/kbn-custom-icons/README.md
@@ -0,0 +1,29 @@
# @kbn/custom-icons

A utility package, `@kbn/custom-icons`, that provides components for rendering icons related to Elastic Agents, Cloud Providers and more.

## Components

### `<AgentIcon />`

```jsx
<AgentIcon agentName={agentName} />
```

This component renders an icon corresponding to the specified Elastic Agent name (`agentName`).

#### Props

- **`agentName`**: The name of the Elastic Agent for which the icon should be rendered.

### `<CloudProviderIcon />`

```jsx
<CloudProviderIcon cloudProvider={cloudProvider} />
```

This component renders an icon associated with the specified Cloud Provider (`cloudProvider`).

#### Props

- **`cloudProvider`**: The name of the Cloud Provider for which the icon should be rendered.
File renamed without changes
3 changes: 3 additions & 0 deletions packages/kbn-custom-icons/assets/default.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
16 changes: 16 additions & 0 deletions packages/kbn-custom-icons/index.ts
@@ -0,0 +1,16 @@
/*
* 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 { getAgentIcon } from './src/components/agent_icon/get_agent_icon';
export { getServerlessIcon } from './src/components/agent_icon/get_serverless_icon';
export { AgentIcon } from './src/components/agent_icon';
export type { AgentIconProps } from './src/components/agent_icon';

export { getCloudProviderIcon } from './src/components/cloud_provider_icon/get_cloud_provider_icon';
export type { CloudProvider } from './src/components/cloud_provider_icon/get_cloud_provider_icon';
export { CloudProviderIcon } from './src/components/cloud_provider_icon';
export type { CloudProviderIconProps } from './src/components/cloud_provider_icon';
13 changes: 13 additions & 0 deletions packages/kbn-custom-icons/jest.config.js
@@ -0,0 +1,13 @@
/*
* 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.
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-custom-icons'],
};
5 changes: 5 additions & 0 deletions packages/kbn-custom-icons/kibana.jsonc
@@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/custom-icons",
"owner": "@elastic/obs-ux-logs-team"
}
7 changes: 7 additions & 0 deletions packages/kbn-custom-icons/package.json
@@ -0,0 +1,7 @@
{
"name": "@kbn/custom-icons",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"sideEffects": false
}

0 comments on commit c442fed

Please sign in to comment.