-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/exploratory-view-chart-creation-context' of htt…
…ps://github.com/dominiqueclarke/kibana into feature/exploratory-view-chart-creation-context
- Loading branch information
Showing
778 changed files
with
15,515 additions
and
21,988 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
steps: | ||
- block: ":gear: Performance Tests Configuration" | ||
prompt: "Fill out the details for performance test" | ||
fields: | ||
- text: ":arrows_counterclockwise: Iterations" | ||
key: "performance-test-iteration-count" | ||
hint: "How many times you want to run tests? " | ||
required: true | ||
if: build.env('ITERATION_COUNT_ENV') == null | ||
|
||
- label: ":male-mechanic::skin-tone-2: Pre-Build" | ||
command: .buildkite/scripts/lifecycle/pre_build.sh | ||
|
||
- wait | ||
|
||
- label: ":factory_worker: Build Kibana Distribution and Plugins" | ||
command: .buildkite/scripts/steps/build_kibana.sh | ||
agents: | ||
queue: c2-16 | ||
key: build | ||
|
||
- label: ":muscle: Performance Tests" | ||
command: .buildkite/scripts/steps/functional/performance.sh | ||
agents: | ||
queue: ci-group-6 | ||
depends_on: build | ||
concurrency: 50 | ||
concurrency_group: 'performance-test-group' | ||
|
||
- wait: ~ | ||
continue_on_failure: true | ||
|
||
- label: ":male_superhero::skin-tone-2: Post-Build" | ||
command: .buildkite/scripts/lifecycle/post_build.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
set -uo pipefail | ||
|
||
if [ -z "${ITERATION_COUNT_ENV+x}" ]; then | ||
ITERATION_COUNT="$(buildkite-agent meta-data get performance-test-iteration-count)" | ||
else | ||
ITERATION_COUNT=$ITERATION_COUNT_ENV | ||
fi | ||
|
||
tput setab 2; tput setaf 0; echo "Performance test will be run at ${BUILDKITE_BRANCH} ${ITERATION_COUNT} times" | ||
|
||
cat << EOF | buildkite-agent pipeline upload | ||
steps: | ||
- command: .buildkite/scripts/steps/functional/performance_sub.sh | ||
parallelism: "$ITERATION_COUNT" | ||
EOF | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/common/util.sh | ||
|
||
.buildkite/scripts/bootstrap.sh | ||
.buildkite/scripts/download_build_artifacts.sh | ||
|
||
cd "$XPACK_DIR" | ||
|
||
echo --- Run Performance Tests | ||
checks-reporter-with-killswitch "Run Performance Tests" \ | ||
node scripts/functional_tests \ | ||
--debug --bail \ | ||
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \ | ||
--config test/performance/config.ts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+144 KB
(420%)
docs/management/connectors/images/servicenow-sir-params-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# @elastic/apm-generator | ||
|
||
`@elastic/apm-generator` is an experimental tool to generate synthetic APM data. It is intended to be used for development and testing of the Elastic APM app in Kibana. | ||
|
||
At a high-level, the module works by modeling APM events/metricsets with [a fluent API](https://en.wikipedia.org/wiki/Fluent_interface). The models can then be serialized and converted to Elasticsearch documents. In the future we might support APM Server as an output as well. | ||
|
||
## Usage | ||
|
||
This section assumes that you've installed Kibana's dependencies by running `yarn kbn bootstrap` in the repository's root folder. | ||
|
||
This library can currently be used in two ways: | ||
|
||
- Imported as a Node.js module, for instance to be used in Kibana's functional test suite. | ||
- With a command line interface, to index data based on some example scenarios. | ||
|
||
### Using the Node.js module | ||
|
||
#### Concepts | ||
|
||
- `Service`: a logical grouping for a monitored service. A `Service` object contains fields like `service.name`, `service.environment` and `agent.name`. | ||
- `Instance`: a single instance of a monitored service. E.g., the workload for a monitored service might be spread across multiple containers. An `Instance` object contains fields like `service.node.name` and `container.id`. | ||
- `Timerange`: an object that will return an array of timestamps based on an interval and a rate. These timestamps can be used to generate events/metricsets. | ||
- `Transaction`, `Span`, `APMError` and `Metricset`: events/metricsets that occur on an instance. For more background, see the [explanation of the APM data model](https://www.elastic.co/guide/en/apm/get-started/7.15/apm-data-model.html) | ||
|
||
|
||
#### Example | ||
|
||
```ts | ||
import { service, timerange, toElasticsearchOutput } from '@elastic/apm-generator'; | ||
|
||
const instance = service('synth-go', 'production', 'go') | ||
.instance('instance-a'); | ||
|
||
const from = new Date('2021-01-01T12:00:00.000Z').getTime(); | ||
const to = new Date('2021-01-01T12:00:00.000Z').getTime() - 1; | ||
|
||
const traceEvents = timerange(from, to) | ||
.interval('1m') | ||
.rate(10) | ||
.flatMap(timestamp => instance.transaction('GET /api/product/list') | ||
.timestamp(timestamp) | ||
.duration(1000) | ||
.success() | ||
.children( | ||
instance.span('GET apm-*/_search', 'db', 'elasticsearch') | ||
.timestamp(timestamp + 50) | ||
.duration(900) | ||
.destination('elasticsearch') | ||
.success() | ||
).serialize() | ||
); | ||
|
||
const metricsets = timerange(from, to) | ||
.interval('30s') | ||
.rate(1) | ||
.flatMap(timestamp => instance.appMetrics({ | ||
'system.memory.actual.free': 800, | ||
'system.memory.total': 1000, | ||
'system.cpu.total.norm.pct': 0.6, | ||
'system.process.cpu.total.norm.pct': 0.7, | ||
}).timestamp(timestamp) | ||
.serialize() | ||
); | ||
|
||
const esEvents = toElasticsearchOutput(traceEvents.concat(metricsets)); | ||
``` | ||
|
||
#### Generating metricsets | ||
|
||
`@elastic/apm-generator` can also automatically generate transaction metrics, span destination metrics and transaction breakdown metrics based on the generated trace events. If we expand on the previous example: | ||
|
||
```ts | ||
import { getTransactionMetrics, getSpanDestinationMetrics, getBreakdownMetrics } from '@elastic/apm-generator'; | ||
|
||
const esEvents = toElasticsearchOutput([ | ||
...traceEvents, | ||
...getTransactionMetrics(traceEvents), | ||
...getSpanDestinationMetrics(traceEvents), | ||
...getBreakdownMetrics(traceEvents) | ||
]); | ||
``` | ||
|
||
### CLI | ||
|
||
Via the CLI, you can upload examples. The supported examples are listed in `src/lib/es.ts`. A `--target` option that specifies the Elasticsearch URL should be defined when running the `example` command. Here's an example: | ||
|
||
`$ node packages/elastic-apm-generator/src/scripts/es.js example simple-trace --target=http://admin:changeme@localhost:9200` | ||
|
||
The following options are supported: | ||
- `to`: the end of the time range, in ISO format. By default, the current time will be used. | ||
- `from`: the start of the time range, in ISO format. By default, `to` minus 15 minutes will be used. | ||
- `apm-server-version`: the version used in the index names bootstrapped by APM Server, e.g. `7.16.0`. __If these indices do not exist, the script will exit with an error. It will not bootstrap the indices itself.__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.