diff --git a/x-pack/plugins/apm/public/components/app/onboarding/commands/get_apm_agent_commands.test.ts b/x-pack/plugins/apm/public/components/app/onboarding/commands/get_apm_agent_commands.test.ts index b26c8da82d916..1938cf7722cb0 100644 --- a/x-pack/plugins/apm/public/components/app/onboarding/commands/get_apm_agent_commands.test.ts +++ b/x-pack/plugins/apm/public/components/app/onboarding/commands/get_apm_agent_commands.test.ts @@ -25,10 +25,10 @@ describe('getCommands', () => { }); expect(commands).toMatchInlineSnapshot(` "java -javaagent:/path/to/elastic-apm-agent-.jar \\\\ - -Delastic.apm.service_name= \\\\\\\\ + -Delastic.apm.service_name= \\\\ -Delastic.apm.api_key= \\\\ -Delastic.apm.server_url= \\\\ - -Delastic.apm.environment= \\\\\\\\ + -Delastic.apm.environment= \\\\ -Delastic.apm.application_packages=org.example \\\\ -jar my-service-name.jar" `); @@ -42,10 +42,10 @@ describe('getCommands', () => { expect(commands).not.toBe(''); expect(commands).toMatchInlineSnapshot(` "java -javaagent:/path/to/elastic-apm-agent-.jar \\\\ - -Delastic.apm.service_name= \\\\\\\\ + -Delastic.apm.service_name= \\\\ -Delastic.apm.secret_token=foobar \\\\ -Delastic.apm.server_url=localhost:8220 \\\\ - -Delastic.apm.environment= \\\\\\\\ + -Delastic.apm.environment= \\\\ -Delastic.apm.application_packages=org.example \\\\ -jar my-service-name.jar" `); @@ -60,10 +60,10 @@ describe('getCommands', () => { expect(commands).not.toBe(''); expect(commands).toMatchInlineSnapshot(` "java -javaagent:/path/to/elastic-apm-agent-.jar \\\\ - -Delastic.apm.service_name= \\\\\\\\ + -Delastic.apm.service_name= \\\\ -Delastic.apm.secret_token=foobar \\\\ -Delastic.apm.server_url=localhost:8220 \\\\ - -Delastic.apm.environment= \\\\\\\\ + -Delastic.apm.environment= \\\\ -Delastic.apm.application_packages=org.example \\\\ -jar my-service-name.jar" `); diff --git a/x-pack/plugins/apm/public/components/app/onboarding/commands/java.ts b/x-pack/plugins/apm/public/components/app/onboarding/commands/java.ts index fd8ffec78e29d..590e62b42d68d 100644 --- a/x-pack/plugins/apm/public/components/app/onboarding/commands/java.ts +++ b/x-pack/plugins/apm/public/components/app/onboarding/commands/java.ts @@ -6,17 +6,17 @@ */ import { - serviceNameHint, + apiKeyHint, secretTokenHint, serverUrlHint, serviceEnvironmentHint, - apiKeyHint, + serviceNameHint, } from './shared_hints'; export const javaVariables = (secretToken?: string) => ({ - ...(secretToken && { secretToken: 'Delastic.apm.secret_token' }), - ...(!secretToken && { apiKey: 'Delastic.apm.api_key' }), - apmServerUrl: 'Delastic.apm.server_url', + ...(secretToken && { secretToken: 'elastic.apm.secret_token' }), + ...(!secretToken && { apiKey: 'elastic.apm.api_key' }), + apmServerUrl: 'elastic.apm.server_url', }); export const javaHighlightLang = 'java'; @@ -32,7 +32,7 @@ export const javaLineNumbers = (apiKey?: string | null) => ({ }, }); export const java = `java -javaagent:/path/to/elastic-apm-agent-.jar \\ --Delastic.apm.service_name= \\\\ +-Delastic.apm.service_name= \\ {{^secretToken}} -Delastic.apm.api_key={{{apiKey}}} \\ {{/secretToken}} @@ -40,6 +40,6 @@ export const java = `java -javaagent:/path/to/elastic-apm-agent-.jar \\ -Delastic.apm.secret_token={{{secretToken}}} \\ {{/secretToken}} -Delastic.apm.server_url={{{apmServerUrl}}} \\ --Delastic.apm.environment= \\\\ +-Delastic.apm.environment= \\ -Delastic.apm.application_packages=org.example \\ -jar my-service-name.jar`;