• /
  • Log in
  • Free account

Disable automatic logging

This information applies to agents using APM logs in context as of April 2022, including:

Impact of automatic logging

By default, New Relic's agents listed above automatically forward APM agent log data with APM logs in context. You may want to disable this at the account level; for example, when this automatic functionality:

  • Breaks your security or compliance expectations.
  • Increases your bill too much.
  • Increases your systems' overhead to an unacceptable degree.

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.

Screenshot of log settings in data management hub UI
  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 and will take precedence. 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

Create issueEdit page
Copyright © 2022 New Relic Inc.