You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -374,6 +375,29 @@ macOS users on a machine with a discrete graphics card may see significant speed
374
375
### Debugging Server Code
375
376
`yarn debug` will start the server with Node's inspect flag. Kibana's development mode will start three processes on ports `9229`, `9230`, and `9231`. Chrome's developer tools need to be configured to connect to all three connections. Add `localhost:<port>` for each Kibana process in Chrome's developer tools connection tab.
376
377
378
+
### Instrumenting with Elastic APM
379
+
Kibana ships with the [Elastic APM Node.js Agent](https://github.com/elastic/apm-agent-nodejs) built-in for debugging purposes.
380
+
381
+
Its default configuration is meant to be used by core Kibana developers only, but it can easily be re-configured to your needs.
382
+
In its default configuration it's disabled and will, once enabled, send APM data to a centrally managed Elasticsearch cluster accessible only to Elastic employees.
383
+
384
+
To change the location where data is sent, use the [`serverUrl`](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#server-url) APM config option.
385
+
To activate the APM agent, use the [`active`](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#active) APM config option.
386
+
387
+
All config options can be set either via environment variables, or by creating an appropriate config file under `config/apm.dev.js`.
388
+
For more information about configuring the APM agent, please refer to [the documentation](https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuring-the-agent.html).
389
+
390
+
Example `config/apm.dev.js` file:
391
+
392
+
```js
393
+
module.exports= {
394
+
active:true,
395
+
};
396
+
```
397
+
398
+
Once the agent is active, it will trace all incoming HTTP requests to Kibana, monitor for errors, and collect process-level metrics.
399
+
The collected data will be sent to the APM Server and is viewable in the APM UI in Kibana.
400
+
377
401
### Unit testing frameworks
378
402
Kibana is migrating unit testing from Mocha to Jest. Legacy unit tests still
379
403
exist in Mocha but all new unit tests should be written in Jest. Mocha tests
@@ -389,7 +413,7 @@ The following table outlines possible test file locations and how to invoke them
389
413
| Jest |`src/**/*.test.js`<br>`src/**/*.test.ts`|`node scripts/jest -t regexp [test path]`|
390
414
| Jest (integration) |`**/integration_tests/**/*.test.js`|`node scripts/jest_integration -t regexp [test path]`|
0 commit comments