[kbn-journeys] add synthtrace support (#178599)

## Summary

Moving synthtrace clients init inside kbn-journeys:

esArchiver does not always solve the issue with data generation. We
already have afew journeys using Synthtrace instead and expect more to
come.

In order to simplify the process of creating new journeys, this PR moves
Synthtrace client initialisation into kbn-journey package and exposes a
way to define client type, generator function & its input arguments:

 ```
import { Journey, SynthtraceOptions } from '@kbn/journeys';
import { subj } from '@kbn/test-subj-selector';
import { generateApmData } from '../synthtrace_data/apm_data';

export const journey = new Journey({
  synthtrace: {
    type: 'apm',
    generator: generateApmData,
    options: {
      from: new Date(Date.now() - 1000 * 60 * 15),
      to: new Date(Date.now() + 1000 * 60 * 15),
    },
  },
})
```

PR also needs review from teams who use Synthtrace to understand if the implementation is matching expectations.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Dzmitry Lemechko 2024-03-19 00:42:45 +01:00 committed by GitHub
parent 45dbfae666
commit aa45c2aee3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 297 additions and 171 deletions

View file

@ -1,5 +1,5 @@
{
"type": "shared-common",
"type": "test-helper",
"id": "@kbn/performance-testing-dataset-extractor",
"devOnly": true,
"owner": "@elastic/kibana-performance-testing"