Skip to content

Commit

Permalink
removing configuration from agents (#62290)
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes authored Apr 3, 2020
1 parent 408baf2 commit 60901b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 48 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const generalSettings: RawSettingDefinition[] = [
'The maximum total compressed size of the request body which is sent to the APM Server intake api via a chunked encoding (HTTP streaming).\nNote that a small overshoot is possible.\n\nAllowed byte units are `b`, `kb` and `mb`. `1kb` is equal to `1024b`.'
}
),
excludeAgents: ['js-base', 'rum-js', 'dotnet']
excludeAgents: ['js-base', 'rum-js', 'dotnet', 'go', 'nodejs']
},

// API Request Time
Expand All @@ -46,7 +46,7 @@ export const generalSettings: RawSettingDefinition[] = [
"Maximum time to keep an HTTP request to the APM Server open for.\n\nNOTE: This value has to be lower than the APM Server's `read_timeout` setting."
}
),
excludeAgents: ['js-base', 'rum-js', 'dotnet']
excludeAgents: ['js-base', 'rum-js', 'dotnet', 'go', 'nodejs']
},

// Capture body
Expand Down Expand Up @@ -89,7 +89,7 @@ export const generalSettings: RawSettingDefinition[] = [
'If set to `true`, the agent will capture request and response headers, including cookies.\n\nNOTE: Setting this to `false` reduces network bandwidth, disk space and object allocations.'
}
),
excludeAgents: ['js-base', 'rum-js']
excludeAgents: ['js-base', 'rum-js', 'nodejs']
},

// LOG_LEVEL
Expand All @@ -103,7 +103,7 @@ export const generalSettings: RawSettingDefinition[] = [
description: i18n.translate('xpack.apm.agentConfig.logLevel.description', {
defaultMessage: 'Sets the logging level for the agent'
}),
excludeAgents: ['js-base', 'rum-js', 'python']
includeAgents: ['dotnet', 'ruby']
},

// Recording
Expand All @@ -117,7 +117,8 @@ export const generalSettings: RawSettingDefinition[] = [
description: i18n.translate('xpack.apm.agentConfig.recording.description', {
defaultMessage:
'When recording, the agent instruments incoming HTTP requests, tracks errors, and collects and sends metrics. When inactive, the agent works as a noop, not collecting data and not communicating with the APM Server except for polling for updated configuration. As this is a reversible switch, agent threads are not being killed when inactivated, but they will be mostly idle in this state, so the overhead should be negligible. You can use this setting to dynamically control whether Elastic APM is enabled or disabled.'
})
}),
excludeAgents: ['nodejs']
},

// SERVER_TIMEOUT
Expand All @@ -135,7 +136,7 @@ export const generalSettings: RawSettingDefinition[] = [
'If a request to the APM Server takes longer than the configured timeout,\nthe request is cancelled and the event (exception or transaction) is discarded.\nSet to 0 to disable timeouts.\n\nWARNING: If timeouts are disabled or set to a high value, your app could experience memory issues if the APM Server times out.'
}
),
includeAgents: ['nodejs', 'java', 'go']
includeAgents: ['java']
},

// SPAN_FRAMES_MIN_DURATION
Expand Down Expand Up @@ -171,7 +172,7 @@ export const generalSettings: RawSettingDefinition[] = [
'Setting it to 0 will disable stack trace collection. Any positive integer value will be used as the maximum number of frames to collect. Setting it -1 means that all frames will be collected.'
}
),
includeAgents: ['nodejs', 'java', 'dotnet', 'go']
includeAgents: ['java', 'dotnet', 'go']
},

// Transaction max spans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,9 @@ describe('filterByAgent', () => {
describe('options per agent', () => {
it('go', () => {
expect(getSettingKeysForAgent('go')).toEqual([
'api_request_size',
'api_request_time',
'capture_body',
'capture_headers',
'log_level',
'recording',
'server_timeout',
'span_frames_min_duration',
'stack_trace_limit',
'transaction_max_spans',
Expand All @@ -65,7 +61,6 @@ describe('filterByAgent', () => {
'capture_headers',
'circuit_breaker_enabled',
'enable_log_correlation',
'log_level',
'profiling_inferred_spans_enabled',
'profiling_inferred_spans_excluded_classes',
'profiling_inferred_spans_included_classes',
Expand All @@ -80,7 +75,6 @@ describe('filterByAgent', () => {
'stress_monitor_gc_stress_threshold',
'stress_monitor_system_cpu_relief_threshold',
'stress_monitor_system_cpu_stress_threshold',
'trace_methods_duration_threshold',
'transaction_max_spans',
'transaction_sample_rate'
]);
Expand All @@ -102,14 +96,7 @@ describe('filterByAgent', () => {

it('nodejs', () => {
expect(getSettingKeysForAgent('nodejs')).toEqual([
'api_request_size',
'api_request_time',
'capture_body',
'capture_headers',
'log_level',
'recording',
'server_timeout',
'stack_trace_limit',
'transaction_max_spans',
'transaction_sample_rate'
]);
Expand Down Expand Up @@ -158,8 +145,6 @@ describe('filterByAgent', () => {
it('"All" services (no agent name)', () => {
expect(getSettingKeysForAgent(undefined)).toEqual([
'capture_body',
'capture_headers',
'recording',
'transaction_max_spans',
'transaction_sample_rate'
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,6 @@ export const javaSettings: RawSettingDefinition[] = [
includeAgents: ['java']
},

// TRACE_METHODS_DURATION_THRESHOLD
{
key: 'trace_methods_duration_threshold',
type: 'integer',
label: i18n.translate(
'xpack.apm.agentConfig.traceMethodsDurationThreshold.label',
{
defaultMessage: 'Trace methods duration threshold'
}
),
description: i18n.translate(
'xpack.apm.agentConfig.traceMethodsDurationThreshold.description',
{
defaultMessage:
'If trace_methods config option is set, provides a threshold to limit spans based on duration. When set to a value greater than 0, spans representing methods traced based on trace_methods will be discarded by default.'
}
),
includeAgents: ['java']
},

/*
* Circuit-Breaker
**/
Expand Down

0 comments on commit 60901b3

Please sign in to comment.