• Log in

Disable automatic logging

This information applies to agents using APM logs in context, including:

Impact of automatic logging

By default, the above New Relic agents automatically forward log data from APM agents in the context of APM logs. However, you can disable this feature at the account level:

  • To comply with your organization's policy.
  • For security and compliance reasons, we want to control which logs are forwarded.
  • When there are severe cost constraints and you do not want to increase TDP usage.
  • The design of system resources doesn't allow for the increased overhead of the logs transfer function.

Automatic logs collection is not applicable if your agent has high security mode enabled.

Options to disable automatic logging

If you want to disable (or re-enable) automatic log forwarding for all APM agents on your account so that no logs will be forwarded, use either of these options:

If you want to disable automatic log forwarding for some agents and enable it for other agents, update their configuration file. This also lowers overhead.

If you need assistance with updating multiple accounts (for example, a parent account with multiple child accounts), contact your New Relic account representative. If you do not have an account rep, get support at support.newrelic.com.

Disable via UI

Repeat this procedure for each account you want to disable or enable automatic logging.

  1. From the account dropdown in the New Relic UI, click Manage your data > Log settings.
  2. Click the ellipsis ... menu at the right side of the account's row.
  3. Click the confirmation button to enable or disable automatic logging.

After you disable via the New Relic UI, it may take several minutes for the agent to restart and stop automatic log forwarding.

Disable via API

Use the dataManagementUpdateFeatureSettings in api.newrelic.com/graphiql. Refer to the populated example and related documentation in the GraphiQL UI.

After you disable via the NerdGraph API, automatic log forwarding should stop instantly.

Query example:

{
actor {
account(id: <ACCOUNT_ID_HERE>) {
dataManagement {
featureSettings {
enabled
key
name
}
}
}
}
}

Mutation example:

Use this mutation to update each account individually.

mutation {
dataManagementUpdateFeatureSettings(accountId: <ACCOUNT_ID_HERE>, setting: {enabled: false, featureSetting: {key: "apm_log_forwarding"}}) {
enabled
key
name
}
}

Disable for some agents

If you want to disable automatic log forwarding for some agents and enable it for other agents, you can adjust each agent's client-side configuration settings. The agents will never instrument the log data in the first place; instead, they will completely remove the logs. You will need to use client-side configuration if you need to lower overhead.

Client-side configuration settings work completely independently of server-side configuration. The config setting to disable auto logging takes precedence even if the server-side configuration takes precedence for the agent (like Ruby) in other situations. Only the agents that read the changed config file will be impacted.

For more information, see the procedures for the specific agent:

Frequently asked questions

Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.