Skip to content

Commit

Permalink
Instrument Node.js part of Kibana with Elastic APM
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Aug 19, 2019
1 parent d216659 commit 462ed94
Show file tree
Hide file tree
Showing 4 changed files with 373 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ disabledPlugins
webpackstats.json
/config/*
!/config/kibana.yml
!/config/apm.js
coverage
selenium
.babel_register_cache.json
Expand Down
46 changes: 46 additions & 0 deletions config/apm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

// This file contains the configuration for the Elastic APM instrumentaion of
// Kibana itself.
//
// For an overview over the available configuration files, see:
// https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html
//
// For general information about Elastic APM, see:
// https://www.elastic.co/guide/en/apm/get-started/current/index.html

module.exports = {
// Set to `true` to instrument Kibana with Elastic APM (requires separate APM Server instance)
active: false,

// Override service name from package.json (kibana)
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
serviceName: '',

// Use if APM Server requires a token
secretToken: '',

// Set custom APM Server URL (default: http://localhost:8200)
serverUrl: '',

// You usually don't need to worry about the following config options
logLevel: 'info',
centralConfig: false
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"typespec": "typings-tester --config x-pack/legacy/plugins/canvas/public/lib/aeroelastic/tsconfig.json x-pack/legacy/plugins/canvas/public/lib/aeroelastic/__fixtures__/typescript/typespec_tests.ts",
"checkLicenses": "node scripts/check_licenses --dev",
"build": "node scripts/build --all-platforms",
"start": "node --trace-warnings --trace-deprecation scripts/kibana --dev ",
"start": "ELASTIC_APM_CONFIG_FILE=config/apm.js node --trace-warnings --trace-deprecation -r elastic-apm-node/start scripts/kibana --dev ",
"debug": "node --nolazy --inspect scripts/kibana --dev",
"debug-break": "node --nolazy --inspect-brk scripts/kibana --dev",
"karma": "karma start",
Expand Down Expand Up @@ -149,6 +149,7 @@
"d3": "3.5.17",
"d3-cloud": "1.2.5",
"del": "^4.0.0",
"elastic-apm-node": "^2.15.0",
"elasticsearch": "^16.2.0",
"elasticsearch-browser": "^16.2.0",
"encode-uri-query": "1.0.1",
Expand Down
Loading

0 comments on commit 462ed94

Please sign in to comment.