Skip to content

Commit

Permalink
[APM] Add APM agent config options
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalkoren committed Dec 1, 2020
1 parent a2b71f8 commit 7f0d95b
Showing 1 changed file with 49 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,24 @@ export const generalSettings: RawSettingDefinition[] = [
// LOG_LEVEL
{
key: 'log_level',
type: 'text',
type: 'select',
defaultValue: 'info',
label: i18n.translate('xpack.apm.agentConfig.logLevel.label', {
defaultMessage: 'Log level',
}),
description: i18n.translate('xpack.apm.agentConfig.logLevel.description', {
defaultMessage: 'Sets the logging level for the agent',
}),
includeAgents: ['dotnet', 'ruby'],
options: [
{ text: 'trace', value: 'trace' },
{ text: 'debug', value: 'debug' },
{ text: 'info', value: 'info' },
{ text: 'warning', value: 'warning' },
{ text: 'error', value: 'error' },
{ text: 'critical', value: 'critical' },
{ text: 'off', value: 'off' },
],
includeAgents: ['dotnet', 'ruby', 'java'],
},

// Recording
Expand Down Expand Up @@ -207,4 +216,42 @@ export const generalSettings: RawSettingDefinition[] = [
}
),
},

// Sanitize field names
{
key: 'sanitize_field_names',
type: 'text',
defaultValue:
'password, passwd, pwd, secret, *key, *token*, *session*, *credit*, *card*, authorization, set-cookie',
label: i18n.translate('xpack.apm.agentConfig.transactionSampleRate.label', {
defaultMessage: 'Sanitize field names',
}),
description: i18n.translate(
'xpack.apm.agentConfig.transactionSampleRate.description',
{
defaultMessage:
'Sometimes it is necessary to sanitize, i.e., remove, sensitive data sent to Elastic APM. This config accepts a list of wildcard patterns of field names which should be sanitized. These apply to HTTP headers (including cookies) and `application/x-www-form-urlencoded` data (POST form fields). The query string and the captured request body (such as `application/json` data) will not get sanitized.',
}
),
includeAgents: ['java'],
},

// Ignore transactions based on URLs
{
key: 'transaction_ignore_urls',
type: 'text',
defaultValue:
'Agent specific - check out the documentation of this config option in the corresponding agent documentation.',
label: i18n.translate('xpack.apm.agentConfig.transactionSampleRate.label', {
defaultMessage: 'Ignore transactions based on URLs',
}),
description: i18n.translate(
'xpack.apm.agentConfig.transactionSampleRate.description',
{
defaultMessage:
'Used to restrict requests to certain URLs from being instrumented. This config accepts a comma-separated list of wildcard patterns of URL paths that should be ignored. When an incoming HTTP request is detected, its request path will be tested against each element in this list. For example, adding `/home/index` to this list would match and remove instrumentation from `http://localhost/home/index` as well as `http://whatever.com/home/index?value1=123`',
}
),
includeAgents: ['java'],
},
];

0 comments on commit 7f0d95b

Please sign in to comment.