* Improve script to setup users and roles
* fix readme
* CI fixes
* add index permissions to roles
* disable welcome screen
* Run es archive once before tests
* Fix ts issues
* Update x-pack/plugins/apm/readme.md
Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
* Add advanced settings for APM
* Register advanced settings in server startup that show in the Kibana advanced settings UI. (Fixes #81396.)
* Format settings pages to be more consistent.
Make some changes to how we deal with data telemetry in APM and reduce the number of fields we're storing in Saved Objects in the .kibana index.
Add a telemetry doc in dev_docs explaining how telemetry is collected and how to make updates. (In this PR the docs only cover data telemetry, but there's a space for the behavioral telemetry docs.)
Stop storing the mapping for the data telemetry in the Saved Object but instead use `{ dynamic: false }`.
This reduces the number of fields used by APM in the .kibana index (as requested in #43673.)
Before:
```bash
> curl -s -X GET "admin:changeme@localhost:9200/.kibana/_field_caps?fields=*&pretty=true" | jq '.fields|length'
653
```
After:
```bash
> curl -s -X GET "admin:changeme@localhost:9200/.kibana/_field_caps?fields=*&pretty=true" | jq '.fields|length'
415
```
We don't need the mapping anymore for storing the saved object, but we still do need to update the telemetry repository when the mapping changes, and the `upload-telemetry-data` script uses that mapping when generating data.
For these purposes the mapping in now defined in TypeScript in a function in common/apm_telemetry.ts.
It's broken down into some variables that and put together as the same mapping object that was there before, but having it in this form should make it easier to update.
A new script, `merge-telemetry-mapping`, takes the telemetry repository's xpack-phone-home.json mapping, merges in the result of our mapping and replaces the file. The result can be committed to the telemetry repo, making it easier to make changes to the mapping.
References #61583Fixes#67032
Update the x-pack `createJestConfig` function to take the `rootDir` as an argument, which allows for easier overriding of the Jest configuration for a specific directory.
Previously we would run Jest in development from the x-pack directory by running something like:
```
node scripts/jest.js --testPathPattern=plugins/apm --watch
```
Currently (for me anyway) this is failing with:
```
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28)
```
and it would sometimes not correctly test only the changed files when a change in APM was made. It was also difficult to configure correctly with the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest).
Add a jest.config.js for APM. This makes running with `--watch` better about which files it chooses to re-run and makes the VSCode extension work (including coverage mapping) with minimal configuration.
* migrate files from legacy path to new plugin path
* update file paths to reflect migrated files
* move minimal legacy client files back to legacy path in order to run kibana
* Completes the full cutover to the new kibana platform removing all shims and legacy adapters.
* Adds APM to ignored list for casing check.
* - moves public/utils/pickKeys.ts to common/utils/pick_keys.ts
- exposes getTraceUrl as a plugin static export of apm/public and updates import in infra
- fixes FeaturesPluginSetup import in apm/public app
- renames get_apm_index_pattern_titles -> get_apm_index_pattern_title
- getApmIndexPatternTitle is now a synchronous getter function
- removes unused comments and xpack.apm.apmForESDescription i18n translations
* Moves automatic index pattern saved object creation from
plugin start to when the Home screen first renders
* removed unnecessary legacy css imports
* fixed ci issues by:
- moving readOnly badge, and help extension setup to occure only
when apm app is mounted
- registering saved object types
- also moved createStaticIndexPattern from a react useEffect on the
APM home screen to when the app is mounted