mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[APM] Add Java agent tutorial (#20453)
This commit is contained in:
parent
0dff5c9b90
commit
1002aed3c3
4 changed files with 37 additions and 0 deletions
|
@ -30,6 +30,7 @@ export const INSTRUCTION_VARIANT = {
|
|||
RACK: 'rack',
|
||||
JS: 'js',
|
||||
GO: 'go',
|
||||
JAVA: 'java',
|
||||
};
|
||||
|
||||
const DISPLAY_MAP = {
|
||||
|
@ -45,6 +46,7 @@ const DISPLAY_MAP = {
|
|||
[INSTRUCTION_VARIANT.RACK]: 'Rack',
|
||||
[INSTRUCTION_VARIANT.JS]: 'JS',
|
||||
[INSTRUCTION_VARIANT.GO]: 'Go',
|
||||
[INSTRUCTION_VARIANT.JAVA]: 'Java',
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -287,3 +287,28 @@ func main() {curlyOpen}
|
|||
'**Warning: The Go agent is currently in Beta and not meant for production use.**',
|
||||
},
|
||||
];
|
||||
|
||||
export const JAVA_CLIENT_INSTRUCTIONS = [
|
||||
{
|
||||
title: 'Download the APM agent',
|
||||
textPre: 'Download the agent jar from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Ca%3Aelastic-apm-agent). ' +
|
||||
'Do **not** add the agent as a dependency to your application.'
|
||||
},
|
||||
{
|
||||
title: 'Start your application with the javaagent flag',
|
||||
textPre: 'Add the `-javaagent` flag and configure the agent with system properties.\n' +
|
||||
'\n' +
|
||||
' * Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)\n' +
|
||||
' * Set custom APM Server URL (default: http://localhost:8200)\n' +
|
||||
' * Set the base package of your application',
|
||||
commands: `java -javaagent:/path/to/elastic-apm-agent-<version>.jar \\
|
||||
-Delastic.apm.service_name=my-application \\
|
||||
-Delastic.apm.server_url=http://localhost:8200 \\
|
||||
-Delastic.apm.application_packages=org.example \\
|
||||
-jar my-application.jar`.split('\n'),
|
||||
textPost:
|
||||
'See the [documentation]' +
|
||||
'({config.docs.base_url}guide/en/apm/agent/java/current/index.html) for configuration options and advanced usage.\n\n' +
|
||||
'**Warning: The Java agent is currently in Beta and not meant for production use.**',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -27,6 +27,7 @@ import {
|
|||
RACK_CLIENT_INSTRUCTIONS,
|
||||
JS_CLIENT_INSTRUCTIONS,
|
||||
GO_CLIENT_INSTRUCTIONS,
|
||||
JAVA_CLIENT_INSTRUCTIONS,
|
||||
} from './apm_client_instructions';
|
||||
|
||||
const SERVER_URL_INSTRUCTION = {
|
||||
|
@ -69,6 +70,10 @@ export const ELASTIC_CLOUD_INSTRUCTIONS = {
|
|||
id: INSTRUCTION_VARIANT.GO,
|
||||
instructions: [SERVER_URL_INSTRUCTION, ...GO_CLIENT_INSTRUCTIONS],
|
||||
},
|
||||
{
|
||||
id: INSTRUCTION_VARIANT.JAVA,
|
||||
instructions: [SERVER_URL_INSTRUCTION, ...JAVA_CLIENT_INSTRUCTIONS],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -35,6 +35,7 @@ import {
|
|||
RACK_CLIENT_INSTRUCTIONS,
|
||||
JS_CLIENT_INSTRUCTIONS,
|
||||
GO_CLIENT_INSTRUCTIONS,
|
||||
JAVA_CLIENT_INSTRUCTIONS,
|
||||
} from './apm_client_instructions';
|
||||
|
||||
export function onPremInstructions(server) {
|
||||
|
@ -135,6 +136,10 @@ export function onPremInstructions(server) {
|
|||
id: INSTRUCTION_VARIANT.GO,
|
||||
instructions: GO_CLIENT_INSTRUCTIONS,
|
||||
},
|
||||
{
|
||||
id: INSTRUCTION_VARIANT.JAVA,
|
||||
instructions: JAVA_CLIENT_INSTRUCTIONS,
|
||||
},
|
||||
],
|
||||
statusCheck: {
|
||||
title: 'Agent status',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue