mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[APM] Agent tokens UI improvements (#144018)
* Fix indentation in code examples * Add link for Profiler auto instrumentation quick start link * Fix syntax highlighting for java * Fix tests * Fix translations
This commit is contained in:
parent
d0bea55fdf
commit
6c9e9ac392
11 changed files with 209 additions and 206 deletions
|
@ -519,10 +519,12 @@ export const createDotNetAgentInstructions = (
|
|||
defaultMessage:
|
||||
'In case you don’t pass an `IConfiguration` instance to the agent (e.g. in case of non ASP.NET Core applications) \
|
||||
you can also configure the agent through environment variables. \n \
|
||||
See [the documentation]({documentationLink}) for advanced usage.',
|
||||
See [the documentation]({documentationLink}) for advanced usage, including the [Profiler Auto instrumentation]({profilerLink}) quick start.',
|
||||
values: {
|
||||
documentationLink:
|
||||
'{config.docs.base_url}guide/en/apm/agent/dotnet/current/configuration.html',
|
||||
profilerLink:
|
||||
'{config.docs.base_url}guide/en/apm/agent/dotnet/current/setup-auto-instrumentation.html#setup-auto-instrumentation',
|
||||
},
|
||||
}
|
||||
),
|
||||
|
|
|
@ -25,7 +25,7 @@ export function AgentConfigInstructions({
|
|||
}) {
|
||||
const defaultValues = {
|
||||
apmServiceName: 'my-service-name',
|
||||
apmEnvironment: 'production',
|
||||
apmEnvironment: 'my-environment',
|
||||
};
|
||||
|
||||
if (variantId === 'openTelemetry') {
|
||||
|
@ -60,7 +60,11 @@ export function AgentConfigInstructions({
|
|||
/>
|
||||
<EuiSpacer />
|
||||
|
||||
<EuiCodeBlock isCopyable language="bash" data-test-subj="commands">
|
||||
<EuiCodeBlock
|
||||
isCopyable
|
||||
language={variantId === 'java' ? variantId : 'bash'}
|
||||
data-test-subj="commands"
|
||||
>
|
||||
{commands}
|
||||
</EuiCodeBlock>
|
||||
</>
|
||||
|
|
|
@ -9,8 +9,8 @@ import { i18n } from '@kbn/i18n';
|
|||
|
||||
export const djangoVariables = {
|
||||
apmServiceName: 'SERVICE_NAME',
|
||||
apmServerUrl: 'SERVER_URL',
|
||||
secretToken: 'SECRET_TOKEN',
|
||||
apmServerUrl: 'SERVER_URL',
|
||||
apmEnvironment: 'ENVIRONMENT',
|
||||
};
|
||||
|
||||
|
@ -21,50 +21,50 @@ export const django = `# ${i18n.translate(
|
|||
}
|
||||
)}
|
||||
INSTALLED_APPS = (
|
||||
'elasticapm.contrib.django',
|
||||
# ...
|
||||
'elasticapm.contrib.django',
|
||||
# ...
|
||||
)
|
||||
|
||||
ELASTIC_APM = {
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.setRequiredServiceNameComment',
|
||||
{
|
||||
defaultMessage: 'Set the required service name. Allowed characters:',
|
||||
}
|
||||
)}
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.allowedCharactersComment',
|
||||
{
|
||||
defaultMessage: 'a-z, A-Z, 0-9, -, _, and space',
|
||||
}
|
||||
)}
|
||||
#'${djangoVariables.apmServiceName}': '{{{apmServiceName}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.setRequiredServiceNameComment',
|
||||
{
|
||||
defaultMessage: 'Set the required service name. Allowed characters:',
|
||||
}
|
||||
)}
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.allowedCharactersComment',
|
||||
{
|
||||
defaultMessage: 'a-z, A-Z, 0-9, -, _, and space',
|
||||
}
|
||||
)}
|
||||
#'${djangoVariables.apmServiceName}': '{{{apmServiceName}}}',
|
||||
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.useIfApmServerRequiresTokenComment',
|
||||
{
|
||||
defaultMessage: 'Use if APM Server requires a secret token',
|
||||
}
|
||||
)}
|
||||
'${djangoVariables.secretToken}': '{{{secretToken}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.useIfApmServerRequiresTokenComment',
|
||||
{
|
||||
defaultMessage: 'Use if APM Server requires a secret token',
|
||||
}
|
||||
)}
|
||||
'${djangoVariables.secretToken}': '{{{secretToken}}}',
|
||||
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.setCustomApmServerUrlComment',
|
||||
{
|
||||
defaultMessage:
|
||||
'Set the custom APM Server URL (default: {defaultApmServerUrl})',
|
||||
values: { defaultApmServerUrl: 'http://localhost:8200' },
|
||||
}
|
||||
)}
|
||||
'${djangoVariables.apmServerUrl}': '{{{apmServerUrl}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.setCustomApmServerUrlComment',
|
||||
{
|
||||
defaultMessage:
|
||||
'Set the custom APM Server URL (default: {defaultApmServerUrl})',
|
||||
values: { defaultApmServerUrl: 'http://localhost:8200' },
|
||||
}
|
||||
)}
|
||||
'${djangoVariables.apmServerUrl}': '{{{apmServerUrl}}}',
|
||||
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.setServiceEnvironmentComment',
|
||||
{
|
||||
defaultMessage: 'Set the service environment',
|
||||
}
|
||||
)}
|
||||
'${djangoVariables.apmEnvironment}': '{{{apmEnvironment}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.djangoClient.configure.commands.setServiceEnvironmentComment',
|
||||
{
|
||||
defaultMessage: 'Set the service environment',
|
||||
}
|
||||
)}
|
||||
'${djangoVariables.apmEnvironment}': '{{{apmEnvironment}}}',
|
||||
}
|
||||
|
||||
# ${i18n.translate(
|
||||
|
@ -74,6 +74,6 @@ ELASTIC_APM = {
|
|||
}
|
||||
)}
|
||||
MIDDLEWARE = (
|
||||
'elasticapm.contrib.django.middleware.TracingMiddleware',
|
||||
#...
|
||||
'elasticapm.contrib.django.middleware.TracingMiddleware',
|
||||
#...
|
||||
)`;
|
||||
|
|
|
@ -33,45 +33,45 @@ apm = ElasticAPM(app)
|
|||
)}
|
||||
from elasticapm.contrib.flask import ElasticAPM
|
||||
app.config['ELASTIC_APM'] = {
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.setRequiredServiceNameComment',
|
||||
{
|
||||
defaultMessage: 'Set the required service name. Allowed characters:',
|
||||
}
|
||||
)}
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.allowedCharactersComment',
|
||||
{
|
||||
defaultMessage: 'a-z, A-Z, 0-9, -, _, and space',
|
||||
}
|
||||
)}
|
||||
#'${flaskVariables.apmServiceName}': '{{{apmServiceName}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.setRequiredServiceNameComment',
|
||||
{
|
||||
defaultMessage: 'Set the required service name. Allowed characters:',
|
||||
}
|
||||
)}
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.allowedCharactersComment',
|
||||
{
|
||||
defaultMessage: 'a-z, A-Z, 0-9, -, _, and space',
|
||||
}
|
||||
)}
|
||||
#'${flaskVariables.apmServiceName}': '{{{apmServiceName}}}',
|
||||
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.useIfApmServerRequiresTokenComment',
|
||||
{
|
||||
defaultMessage: 'Use if APM Server requires a secret token',
|
||||
}
|
||||
)}
|
||||
'${flaskVariables.secretToken}': '{{{secretToken}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.useIfApmServerRequiresTokenComment',
|
||||
{
|
||||
defaultMessage: 'Use if APM Server requires a secret token',
|
||||
}
|
||||
)}
|
||||
'${flaskVariables.secretToken}': '{{{secretToken}}}',
|
||||
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.setCustomApmServerUrlComment',
|
||||
{
|
||||
defaultMessage:
|
||||
'Set the custom APM Server URL (default: {defaultApmServerUrl})',
|
||||
values: { defaultApmServerUrl: 'http://localhost:8200' },
|
||||
}
|
||||
)}
|
||||
'${flaskVariables.apmServerUrl}': '{{{apmServerUrl}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.setCustomApmServerUrlComment',
|
||||
{
|
||||
defaultMessage:
|
||||
'Set the custom APM Server URL (default: {defaultApmServerUrl})',
|
||||
values: { defaultApmServerUrl: 'http://localhost:8200' },
|
||||
}
|
||||
)}
|
||||
'${flaskVariables.apmServerUrl}': '{{{apmServerUrl}}}',
|
||||
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.setServiceEnvironmentComment',
|
||||
{
|
||||
defaultMessage: 'Set the service environment',
|
||||
}
|
||||
)}
|
||||
'${flaskVariables.apmEnvironment}': '{{{apmEnvironment}}}',
|
||||
# ${i18n.translate(
|
||||
'xpack.apm.tutorial.flaskClient.configure.commands.setServiceEnvironmentComment',
|
||||
{
|
||||
defaultMessage: 'Set the service environment',
|
||||
}
|
||||
)}
|
||||
'${flaskVariables.apmEnvironment}': '{{{apmEnvironment}}}',
|
||||
}
|
||||
|
||||
apm = ElasticAPM(app)`;
|
||||
|
|
|
@ -10,7 +10,7 @@ import { getApmAgentCommands } from './get_apm_agent_commands';
|
|||
describe('getCommands', () => {
|
||||
const defaultValues = {
|
||||
apmServiceName: 'my-service-name',
|
||||
apmEnvironment: 'production',
|
||||
apmEnvironment: 'my-environment',
|
||||
};
|
||||
describe('unknown agent', () => {
|
||||
it('renders empty command', () => {
|
||||
|
@ -37,7 +37,7 @@ describe('getCommands', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token= \\\\
|
||||
-Delastic.apm.server_url= \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -57,7 +57,7 @@ describe('getCommands', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token=foobar \\\\
|
||||
-Delastic.apm.server_url=localhost:8220 \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -85,7 +85,7 @@ describe('getCommands', () => {
|
|||
serviceVersion: '',
|
||||
|
||||
// Set the service environment
|
||||
environment: 'production'
|
||||
environment: 'my-environment'
|
||||
})"
|
||||
`);
|
||||
});
|
||||
|
@ -113,7 +113,7 @@ describe('getCommands', () => {
|
|||
serviceVersion: '',
|
||||
|
||||
// Set the service environment
|
||||
environment: 'production'
|
||||
environment: 'my-environment'
|
||||
})"
|
||||
`);
|
||||
});
|
||||
|
@ -130,18 +130,18 @@ describe('getCommands', () => {
|
|||
"// Add this to the VERY top of the first file loaded in your app
|
||||
var apm = require('elastic-apm-node').start({
|
||||
|
||||
// Override the service name from package.json
|
||||
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
|
||||
serviceName: 'my-service-name',
|
||||
// Override the service name from package.json
|
||||
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
|
||||
serviceName: 'my-service-name',
|
||||
|
||||
// Use if APM Server requires a secret token
|
||||
secretToken: '',
|
||||
// Use if APM Server requires a secret token
|
||||
secretToken: '',
|
||||
|
||||
// Set the custom APM Server URL (default: http://localhost:8200)
|
||||
serverUrl: '',
|
||||
// Set the custom APM Server URL (default: http://localhost:8200)
|
||||
serverUrl: '',
|
||||
|
||||
// Set the service environment
|
||||
environment: 'production'
|
||||
// Set the service environment
|
||||
environment: 'my-environment'
|
||||
})"
|
||||
`);
|
||||
});
|
||||
|
@ -159,18 +159,18 @@ describe('getCommands', () => {
|
|||
"// Add this to the VERY top of the first file loaded in your app
|
||||
var apm = require('elastic-apm-node').start({
|
||||
|
||||
// Override the service name from package.json
|
||||
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
|
||||
serviceName: 'my-service-name',
|
||||
// Override the service name from package.json
|
||||
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
|
||||
serviceName: 'my-service-name',
|
||||
|
||||
// Use if APM Server requires a secret token
|
||||
secretToken: 'foobar',
|
||||
// Use if APM Server requires a secret token
|
||||
secretToken: 'foobar',
|
||||
|
||||
// Set the custom APM Server URL (default: http://localhost:8200)
|
||||
serverUrl: 'localhost:8220',
|
||||
// Set the custom APM Server URL (default: http://localhost:8200)
|
||||
serverUrl: 'localhost:8220',
|
||||
|
||||
// Set the service environment
|
||||
environment: 'production'
|
||||
// Set the service environment
|
||||
environment: 'my-environment'
|
||||
})"
|
||||
`);
|
||||
});
|
||||
|
@ -186,29 +186,29 @@ describe('getCommands', () => {
|
|||
expect(commands).toMatchInlineSnapshot(`
|
||||
"# Add the agent to the installed apps
|
||||
INSTALLED_APPS = (
|
||||
'elasticapm.contrib.django',
|
||||
# ...
|
||||
'elasticapm.contrib.django',
|
||||
# ...
|
||||
)
|
||||
|
||||
ELASTIC_APM = {
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': '',
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': '',
|
||||
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': '',
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': '',
|
||||
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'production',
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'my-environment',
|
||||
}
|
||||
|
||||
# To send performance metrics, add our tracing middleware:
|
||||
MIDDLEWARE = (
|
||||
'elasticapm.contrib.django.middleware.TracingMiddleware',
|
||||
#...
|
||||
'elasticapm.contrib.django.middleware.TracingMiddleware',
|
||||
#...
|
||||
)"
|
||||
`);
|
||||
});
|
||||
|
@ -225,29 +225,29 @@ describe('getCommands', () => {
|
|||
expect(commands).toMatchInlineSnapshot(`
|
||||
"# Add the agent to the installed apps
|
||||
INSTALLED_APPS = (
|
||||
'elasticapm.contrib.django',
|
||||
# ...
|
||||
'elasticapm.contrib.django',
|
||||
# ...
|
||||
)
|
||||
|
||||
ELASTIC_APM = {
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': 'foobar',
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': 'foobar',
|
||||
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': 'localhost:8220',
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': 'localhost:8220',
|
||||
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'production',
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'my-environment',
|
||||
}
|
||||
|
||||
# To send performance metrics, add our tracing middleware:
|
||||
MIDDLEWARE = (
|
||||
'elasticapm.contrib.django.middleware.TracingMiddleware',
|
||||
#...
|
||||
'elasticapm.contrib.django.middleware.TracingMiddleware',
|
||||
#...
|
||||
)"
|
||||
`);
|
||||
});
|
||||
|
@ -269,18 +269,18 @@ describe('getCommands', () => {
|
|||
# or configure to use ELASTIC_APM in your application's settings
|
||||
from elasticapm.contrib.flask import ElasticAPM
|
||||
app.config['ELASTIC_APM'] = {
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': '',
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': '',
|
||||
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': '',
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': '',
|
||||
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'production',
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'my-environment',
|
||||
}
|
||||
|
||||
apm = ElasticAPM(app)"
|
||||
|
@ -305,18 +305,18 @@ describe('getCommands', () => {
|
|||
# or configure to use ELASTIC_APM in your application's settings
|
||||
from elasticapm.contrib.flask import ElasticAPM
|
||||
app.config['ELASTIC_APM'] = {
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
# Set the required service name. Allowed characters:
|
||||
# a-z, A-Z, 0-9, -, _, and space
|
||||
#'SERVICE_NAME': 'my-service-name',
|
||||
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': 'foobar',
|
||||
# Use if APM Server requires a secret token
|
||||
'SECRET_TOKEN': 'foobar',
|
||||
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': 'localhost:8220',
|
||||
# Set the custom APM Server URL (default: http://localhost:8200)
|
||||
'SERVER_URL': 'localhost:8220',
|
||||
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'production',
|
||||
# Set the service environment
|
||||
'ENVIRONMENT': 'my-environment',
|
||||
}
|
||||
|
||||
apm = ElasticAPM(app)"
|
||||
|
@ -345,7 +345,7 @@ describe('getCommands', () => {
|
|||
server_url: ''
|
||||
|
||||
# Set the service environment
|
||||
environment: 'production'"
|
||||
environment: 'my-environment'"
|
||||
`);
|
||||
});
|
||||
it('renders with secret token and url', () => {
|
||||
|
@ -372,7 +372,7 @@ describe('getCommands', () => {
|
|||
server_url: 'localhost:8220'
|
||||
|
||||
# Set the service environment
|
||||
environment: 'production'"
|
||||
environment: 'my-environment'"
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
@ -398,7 +398,7 @@ describe('getCommands', () => {
|
|||
server_url: '',
|
||||
|
||||
# Set the service environment
|
||||
environment: 'production'"
|
||||
environment: 'my-environment'"
|
||||
`);
|
||||
});
|
||||
it('renders with secret token and url', () => {
|
||||
|
@ -425,7 +425,7 @@ describe('getCommands', () => {
|
|||
server_url: 'localhost:8220',
|
||||
|
||||
# Set the service environment
|
||||
environment: 'production'"
|
||||
environment: 'my-environment'"
|
||||
`);
|
||||
});
|
||||
});
|
||||
|
@ -451,7 +451,7 @@ describe('getCommands', () => {
|
|||
export ELASTIC_APM_SERVER_URL=
|
||||
|
||||
# Set the service environment
|
||||
export ELASTIC_APM_ENVIRONMENT=production
|
||||
export ELASTIC_APM_ENVIRONMENT=my-environment
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
@ -479,7 +479,7 @@ describe('getCommands', () => {
|
|||
export ELASTIC_APM_SERVER_URL=localhost:8220
|
||||
|
||||
# Set the service environment
|
||||
export ELASTIC_APM_ENVIRONMENT=production
|
||||
export ELASTIC_APM_ENVIRONMENT=my-environment
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
@ -498,7 +498,7 @@ describe('getCommands', () => {
|
|||
\\"ServiceName\\": \\"my-service-name\\", //allowed characters: a-z, A-Z, 0-9, -, _, and space. Default is the entry assembly of the application
|
||||
\\"SecretToken\\": \\"\\",
|
||||
\\"ServerUrl\\": \\"\\", //Set custom APM Server URL (default: http://localhost:8200)
|
||||
\\"Environment\\": \\"production\\", // Set the service environment
|
||||
\\"Environment\\": \\"my-environment\\", // Set the service environment
|
||||
}
|
||||
}"
|
||||
`);
|
||||
|
@ -519,7 +519,7 @@ describe('getCommands', () => {
|
|||
\\"ServiceName\\": \\"my-service-name\\", //allowed characters: a-z, A-Z, 0-9, -, _, and space. Default is the entry assembly of the application
|
||||
\\"SecretToken\\": \\"foobar\\",
|
||||
\\"ServerUrl\\": \\"localhost:8220\\", //Set custom APM Server URL (default: http://localhost:8200)
|
||||
\\"Environment\\": \\"production\\", // Set the service environment
|
||||
\\"Environment\\": \\"my-environment\\", // Set the service environment
|
||||
}
|
||||
}"
|
||||
`);
|
||||
|
@ -537,7 +537,7 @@ describe('getCommands', () => {
|
|||
"elastic_apm.service_name=\\"my-service-name\\"
|
||||
elastic_apm.secret_token=\\"\\"
|
||||
elastic_apm.server_url=\\"\\"
|
||||
elastic_apm.environment=\\"production\\"
|
||||
elastic_apm.environment=\\"my-environment\\"
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
@ -555,7 +555,7 @@ describe('getCommands', () => {
|
|||
"elastic_apm.service_name=\\"my-service-name\\"
|
||||
elastic_apm.secret_token=\\"foobar\\"
|
||||
elastic_apm.server_url=\\"localhost:8220\\"
|
||||
elastic_apm.environment=\\"production\\"
|
||||
elastic_apm.environment=\\"my-environment\\"
|
||||
"
|
||||
`);
|
||||
});
|
||||
|
|
|
@ -16,6 +16,6 @@ export const java = `java -javaagent:/path/to/elastic-apm-agent-<version>.jar \\
|
|||
-${javaVariables.apmServiceName}={{{apmServiceName}}} \\
|
||||
-${javaVariables.secretToken}={{{secretToken}}} \\
|
||||
-${javaVariables.apmServerUrl}={{{apmServerUrl}}} \\
|
||||
-${javaVariables.apmEnvironment}=production \\
|
||||
-${javaVariables.apmEnvironment}={{{apmEnvironment}}} \\
|
||||
-Delastic.apm.application_packages=org.example \\
|
||||
-jar {{{apmServiceName}}}.jar`;
|
||||
|
|
|
@ -22,43 +22,43 @@ export const node = `// ${i18n.translate(
|
|||
)}
|
||||
var apm = require('elastic-apm-node').start({
|
||||
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.setRequiredServiceNameComment',
|
||||
{
|
||||
defaultMessage: 'Override the service name from package.json',
|
||||
}
|
||||
)}
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.allowedCharactersComment',
|
||||
{
|
||||
defaultMessage: 'Allowed characters: a-z, A-Z, 0-9, -, _, and space',
|
||||
}
|
||||
)}
|
||||
${nodeVariables.apmServiceName}: '{{{apmServiceName}}}',
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.setRequiredServiceNameComment',
|
||||
{
|
||||
defaultMessage: 'Override the service name from package.json',
|
||||
}
|
||||
)}
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.allowedCharactersComment',
|
||||
{
|
||||
defaultMessage: 'Allowed characters: a-z, A-Z, 0-9, -, _, and space',
|
||||
}
|
||||
)}
|
||||
${nodeVariables.apmServiceName}: '{{{apmServiceName}}}',
|
||||
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.useIfApmRequiresTokenComment',
|
||||
{
|
||||
defaultMessage: 'Use if APM Server requires a secret token',
|
||||
}
|
||||
)}
|
||||
${nodeVariables.secretToken}: '{{{secretToken}}}',
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.useIfApmRequiresTokenComment',
|
||||
{
|
||||
defaultMessage: 'Use if APM Server requires a secret token',
|
||||
}
|
||||
)}
|
||||
${nodeVariables.secretToken}: '{{{secretToken}}}',
|
||||
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.setCustomApmServerUrlComment',
|
||||
{
|
||||
defaultMessage:
|
||||
'Set the custom APM Server URL (default: {defaultApmServerUrl})',
|
||||
values: { defaultApmServerUrl: 'http://localhost:8200' },
|
||||
}
|
||||
)}
|
||||
${nodeVariables.apmServerUrl}: '{{{apmServerUrl}}}',
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.setCustomApmServerUrlComment',
|
||||
{
|
||||
defaultMessage:
|
||||
'Set the custom APM Server URL (default: {defaultApmServerUrl})',
|
||||
values: { defaultApmServerUrl: 'http://localhost:8200' },
|
||||
}
|
||||
)}
|
||||
${nodeVariables.apmServerUrl}: '{{{apmServerUrl}}}',
|
||||
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.setCustomServiceEnvironmentComment',
|
||||
{
|
||||
defaultMessage: 'Set the service environment',
|
||||
}
|
||||
)}
|
||||
${nodeVariables.apmEnvironment}: '{{{apmEnvironment}}}'
|
||||
// ${i18n.translate(
|
||||
'xpack.apm.tutorial.nodeClient.configure.commands.setCustomServiceEnvironmentComment',
|
||||
{
|
||||
defaultMessage: 'Set the service environment',
|
||||
}
|
||||
)}
|
||||
${nodeVariables.apmEnvironment}: '{{{apmEnvironment}}}'
|
||||
})`;
|
||||
|
|
|
@ -90,7 +90,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token= \\\\
|
||||
-Delastic.apm.server_url=http://localhost:8200 \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -104,7 +104,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token=foo token \\\\
|
||||
-Delastic.apm.server_url=foo url \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -141,7 +141,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token= \\\\
|
||||
-Delastic.apm.server_url=http://localhost:8200 \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -177,7 +177,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token= \\\\
|
||||
-Delastic.apm.server_url=http://localhost:8200 \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -219,7 +219,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token=cloud_token \\\\
|
||||
-Delastic.apm.server_url=cloud_url \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -258,7 +258,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token=apm_cloud_token \\\\
|
||||
-Delastic.apm.server_url=apm_cloud_url \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -290,7 +290,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token= \\\\
|
||||
-Delastic.apm.server_url=http://localhost:8200 \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -353,7 +353,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token= \\\\
|
||||
-Delastic.apm.server_url=http://localhost:8200 \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
@ -390,7 +390,7 @@ describe('TutorialConfigAgent', () => {
|
|||
-Delastic.apm.service_name=my-service-name \\\\
|
||||
-Delastic.apm.secret_token=cloud_token \\\\
|
||||
-Delastic.apm.server_url=cloud_url \\\\
|
||||
-Delastic.apm.environment=production \\\\
|
||||
-Delastic.apm.environment=my-environment \\\\
|
||||
-Delastic.apm.application_packages=org.example \\\\
|
||||
-jar my-service-name.jar"
|
||||
`);
|
||||
|
|
|
@ -6860,7 +6860,6 @@
|
|||
"xpack.apm.tutorial.config_otel.description3": "La liste exhaustive des variables d'environnement, les paramètres de ligne de commande et les extraits de code de configuration (conformes à la spécification OpenTelemetry) se trouvent dans le {otelInstrumentationGuide}. Certains clients OpenTelemetry instables peuvent ne pas prendre en charge toutes les fonctionnalités et nécessitent peut-être d'autres mécanismes de configuration.",
|
||||
"xpack.apm.tutorial.djangoClient.configure.commands.setCustomApmServerUrlComment": "Définir l'URL personnalisée du serveur APM (par défaut : {defaultApmServerUrl})",
|
||||
"xpack.apm.tutorial.djangoClient.configure.textPost": "Consultez la [documentation]({documentationLink}) pour une utilisation avancée.",
|
||||
"xpack.apm.tutorial.dotNetClient.configureAgent.textPost": "Si vous ne transférez pas une instance \"IConfiguration\" à l'agent (par ex., pour les applications non ASP.NET Core) vous pouvez également configurer l'agent par le biais de variables d'environnement. \n Consultez [the documentation]({documentationLink}) pour une utilisation avancée.",
|
||||
"xpack.apm.tutorial.dotNetClient.download.textPre": "Ajoutez le(s) package(s) d'agent depuis [NuGet]({allNuGetPackagesLink}) à votre application .NET. Plusieurs packages NuGet sont disponibles pour différents cas d'utilisation. \n\nPour une application ASP.NET Core avec Entity Framework Core, téléchargez le package [Elastic.Apm.NetCoreAll]({netCoreAllApmPackageLink}). Ce package ajoutera automatiquement chaque composant d'agent à votre application. \n\n Si vous souhaitez minimiser les dépendances, vous pouvez utiliser le package [Elastic.Apm.AspNetCore]({aspNetCorePackageLink}) uniquement pour le monitoring d'ASP.NET Core ou le package [Elastic.Apm.EfCore]({efCorePackageLink}) uniquement pour le monitoring d'Entity Framework Core. \n\n Si vous souhaitez seulement utiliser l'API d'agent publique pour l'instrumentation manuelle, utilisez le package [Elastic.Apm]({elasticApmPackageLink}).",
|
||||
"xpack.apm.tutorial.downloadServerRpm": "Vous cherchez les packages 32 bits ? Consultez la [Download page]({downloadPageLink}).",
|
||||
"xpack.apm.tutorial.downloadServerTitle": "Vous cherchez les packages 32 bits ? Consultez la [Download page]({downloadPageLink}).",
|
||||
|
|
|
@ -6848,7 +6848,6 @@
|
|||
"xpack.apm.tutorial.config_otel.description3": "環境変数、コマンドラインパラメーター、構成コードスニペット(OpenTelemetry仕様に準拠)の網羅的な一覧は、{otelInstrumentationGuide}をご覧ください。一部の不安定なOpenTelemetryクライアントでは、一部の機能がサポートされておらず、別の構成メカニズムが必要になる場合があります。",
|
||||
"xpack.apm.tutorial.djangoClient.configure.commands.setCustomApmServerUrlComment": "カスタム APM Server URL(デフォルト:{defaultApmServerUrl})を設定します",
|
||||
"xpack.apm.tutorial.djangoClient.configure.textPost": "高度な用途に関しては [ドキュメンテーション]({documentationLink})をご覧ください。",
|
||||
"xpack.apm.tutorial.dotNetClient.configureAgent.textPost": "エージェントに「IConfiguration」インスタンスが渡されていない場合、(例:非 ASP.NET Core アプリケーションの場合)、エージェントを環境変数で構成することもできます。\n 高度な用途に関しては [ドキュメンテーション]({documentationLink})をご覧ください。",
|
||||
"xpack.apm.tutorial.dotNetClient.download.textPre": "[NuGet]({allNuGetPackagesLink})から .NET アプリケーションにエージェントパッケージを追加してください。用途の異なる複数の NuGet パッケージがあります。\n\nEntity Framework Core の ASP.NET Core アプリケーションの場合は、[Elastic.Apm.NetCoreAll]({netCoreAllApmPackageLink})パッケージをダウンロードしてください。このパッケージは、自動的にすべてのエージェントコンポーネントをアプリケーションに追加します。\n\n 依存性を最低限に抑えたい場合、ASP.NET Coreの監視のみに[Elastic.Apm.AspNetCore]({aspNetCorePackageLink})パッケージ、またはEntity Framework Coreの監視のみに[Elastic.Apm.EfCore]({efCorePackageLink})パッケージを使用することができます。\n\n 手動インストルメンテーションのみにパブリック Agent API を使用する場合は、[Elastic.Apm]({elasticApmPackageLink})パッケージを使用してください。",
|
||||
"xpack.apm.tutorial.downloadServerRpm": "32 ビットパッケージをお探しですか?[ダウンロードページ]({downloadPageLink})をご覧ください。",
|
||||
"xpack.apm.tutorial.downloadServerTitle": "32 ビットパッケージをお探しですか?[ダウンロードページ]({downloadPageLink})をご覧ください。",
|
||||
|
|
|
@ -6864,7 +6864,6 @@
|
|||
"xpack.apm.tutorial.config_otel.description3": "{otelInstrumentationGuide}中提供了环境变量、命令行参数和配置代码片段(根据 OpenTelemetry 规范)的详细列表。某些不稳定的 OpenTelemetry 客户端可能不支持所有功能,并可能需要备选配置机制。",
|
||||
"xpack.apm.tutorial.djangoClient.configure.commands.setCustomApmServerUrlComment": "设置定制 APM Server URL(默认值:{defaultApmServerUrl})",
|
||||
"xpack.apm.tutorial.djangoClient.configure.textPost": "有关高级用法,请参阅[文档]({documentationLink})。",
|
||||
"xpack.apm.tutorial.dotNetClient.configureAgent.textPost": "如果您未将 `IConfiguration` 实例传递给代理(例如非 ASP.NET Core 应用程序), 您还可以通过环境变量配置代理。\n 有关高级用法,请参阅[文档]({documentationLink})。",
|
||||
"xpack.apm.tutorial.dotNetClient.download.textPre": "将来自 [NuGet]({allNuGetPackagesLink}) 的代理软件包添加到 .NET 应用程序。有多个 NuGet 软件包可用于不同的用例。\n\n对于具有 Entity Framework Core 的 ASP.NET Core 应用程序,请下载 [Elastic.Apm.NetCoreAll]({netCoreAllApmPackageLink}) 软件包。此软件包将自动将每个 代理组件添加到您的应用程序。\n\n 如果您希望最大程度减少依存关系,您可以将 [Elastic.Apm.AspNetCore]({aspNetCorePackageLink}) 软件包仅用于 ASP.NET Core 监测,或将 [Elastic.Apm.EfCore]({efCorePackageLink}) 软件包仅用于 Entity Framework Core 监测。\n\n 如果 仅希望将公共代理 API 用于手动检测,请使用 [Elastic.Apm]({elasticApmPackageLink}) 软件包。",
|
||||
"xpack.apm.tutorial.downloadServerRpm": "寻找 32 位软件包?请参阅[下载页面]({downloadPageLink})。",
|
||||
"xpack.apm.tutorial.downloadServerTitle": "寻找 32 位软件包?请参阅[下载页面]({downloadPageLink})。",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue