Skip to content

Commit

Permalink
Replace APM agent "Active" setting with "Recording" (elastic#61538)
Browse files Browse the repository at this point in the history
Also change "APM server" to "APM Server"

Fixes elastic#61179.
  • Loading branch information
smith authored Mar 27, 2020
1 parent d1214f8 commit a9a9776
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function NoServicesMessage({ historicalDataFound, status }: Props) {
<p>
{i18n.translate('xpack.apm.servicesTable.7xUpgradeServerMessage', {
defaultMessage: `Upgrading from a pre-7.x version? Make sure you've also upgraded
your APM server instance(s) to at least 7.0.`
your APM Server instance(s) to at least 7.0.`
})}
</p>
<p>
Expand Down

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

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

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 @@ -13,21 +13,6 @@ import { RawSettingDefinition } from './types';
* Settings added here will show up in the UI and will be validated on the client and server
*/
export const generalSettings: RawSettingDefinition[] = [
// Active
{
key: 'active',
type: 'boolean',
defaultValue: 'true',
label: i18n.translate('xpack.apm.agentConfig.active.label', {
defaultMessage: 'Active'
}),
description: i18n.translate('xpack.apm.agentConfig.active.description', {
defaultMessage:
'A boolean specifying if the agent should be active or not.\nWhen active, the agent instruments incoming HTTP requests, tracks errors and collects and sends metrics.\nWhen inactive, the agent works as a noop, not collecting data and not communicating with the APM Server.\nAs this is a reversible switch, agent threads are not being killed when inactivated, but they will be \nmostly idle in this state, so the overhead should be negligible.\n\nYou can use this setting to dynamically disable Elastic APM at runtime.'
}),
excludeAgents: ['js-base', 'rum-js', 'python', 'dotnet']
},

// API Request Size
{
key: 'api_request_size',
Expand All @@ -40,7 +25,7 @@ export const generalSettings: RawSettingDefinition[] = [
'xpack.apm.agentConfig.apiRequestSize.description',
{
defaultMessage:
'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`.'
'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']
Expand Down Expand Up @@ -121,6 +106,20 @@ export const generalSettings: RawSettingDefinition[] = [
excludeAgents: ['js-base', 'rum-js', 'python']
},

// Recording
{
key: 'recording',
type: 'boolean',
defaultValue: 'true',
label: i18n.translate('xpack.apm.agentConfig.recording.label', {
defaultMessage: 'Recording'
}),
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.'
})
},

// SERVER_TIMEOUT
{
key: 'server_timeout',
Expand All @@ -133,7 +132,7 @@ export const generalSettings: RawSettingDefinition[] = [
'xpack.apm.agentConfig.serverTimeout.description',
{
defaultMessage:
'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.'
'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']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ describe('filterByAgent', () => {
describe('options per agent', () => {
it('go', () => {
expect(getSettingKeysForAgent('go')).toEqual([
'active',
'api_request_size',
'api_request_time',
'capture_body',
'capture_headers',
'log_level',
'recording',
'server_timeout',
'span_frames_min_duration',
'stack_trace_limit',
Expand All @@ -59,7 +59,6 @@ describe('filterByAgent', () => {

it('java', () => {
expect(getSettingKeysForAgent('java')).toEqual([
'active',
'api_request_size',
'api_request_time',
'capture_body',
Expand All @@ -72,6 +71,7 @@ describe('filterByAgent', () => {
'profiling_inferred_spans_included_classes',
'profiling_inferred_spans_min_duration',
'profiling_inferred_spans_sampling_interval',
'recording',
'server_timeout',
'span_frames_min_duration',
'stack_trace_limit',
Expand All @@ -88,24 +88,26 @@ describe('filterByAgent', () => {

it('js-base', () => {
expect(getSettingKeysForAgent('js-base')).toEqual([
'recording',
'transaction_sample_rate'
]);
});

it('rum-js', () => {
expect(getSettingKeysForAgent('rum-js')).toEqual([
'recording',
'transaction_sample_rate'
]);
});

it('nodejs', () => {
expect(getSettingKeysForAgent('nodejs')).toEqual([
'active',
'api_request_size',
'api_request_time',
'capture_body',
'capture_headers',
'log_level',
'recording',
'server_timeout',
'stack_trace_limit',
'transaction_max_spans',
Expand All @@ -119,6 +121,7 @@ describe('filterByAgent', () => {
'api_request_time',
'capture_body',
'capture_headers',
'recording',
'span_frames_min_duration',
'transaction_max_spans',
'transaction_sample_rate'
Expand All @@ -130,6 +133,7 @@ describe('filterByAgent', () => {
'capture_body',
'capture_headers',
'log_level',
'recording',
'span_frames_min_duration',
'stack_trace_limit',
'transaction_max_spans',
Expand All @@ -139,12 +143,12 @@ describe('filterByAgent', () => {

it('ruby', () => {
expect(getSettingKeysForAgent('ruby')).toEqual([
'active',
'api_request_size',
'api_request_time',
'capture_body',
'capture_headers',
'log_level',
'recording',
'span_frames_min_duration',
'transaction_max_spans',
'transaction_sample_rate'
Expand All @@ -155,6 +159,7 @@ describe('filterByAgent', () => {
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 @@ -437,7 +437,7 @@ export const createJsAgentInstructions = (apmServerUrl = '') => [
title: i18n.translate(
'xpack.apm.tutorial.jsClient.enableRealUserMonitoring.title',
{
defaultMessage: 'Enable Real User Monitoring support in APM server'
defaultMessage: 'Enable Real User Monitoring support in APM Server'
}
),
textPre: i18n.translate(
Expand Down

0 comments on commit a9a9776

Please sign in to comment.