---
title: APM agent security: Go
source: https://docs.newrelic.com/docs/apm/agents/go-agent/get-started/apm-agent-security-go
---

The New Relic Go agent default security settings automatically provide [security for your APM data](https://docs.newrelic.com/docs/using-new-relic/new-relic-security/security/apm-agent-data-security) to ensure data privacy and to limit the kind of information New Relic receives. You may have business reasons to change these settings.

If you want to restrict the information that New Relic receives, you can enable [high-security mode](#restricted). If high-security mode or the default settings do not work for your business needs, you can apply [custom](#custom) settings.

For more information about New Relic's security measures, see our [security and privacy documentation](https://docs.newrelic.com/docs/using-new-relic/new-relic-security/security/security-matters-data-privacy-new-relic), or visit the [New Relic security website](https://newrelic.com/security).

## Default security settings [#default]

By default, here is how the New Relic Go agent handles the following potentially sensitive data:

-   Request parameters: The agent does not capture HTTP request parameters.
-   [HTTPS](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-configuration#use-tls): The agent communicates with New Relic using HTTPS.

## High-security mode settings [#restricted]

When you [enable high-security mode](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-configuration#high_security), the [default security settings](#default) are locked so that users cannot change them. In addition:

-   You cannot create [custom events](https://docs.newrelic.com/docs/agents/go-agent/features/create-custom-events-insights-go).
-   The agent strips [exception messages from errors](https://github.com/newrelic/go-agent/blob/master/GUIDE.md#error-reporting).
-   The agent strips `QueryParameters` from database segments.

## Custom security settings [#custom]

> #### ⚠️ CAUTION
>
> If you customize security settings, it may impact the security of your application.

If you need different security settings than default or high-security mode, you can customize these settings:

| **Setting**                                                                                                                                                      | **Effects on data security**                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`HighSecurity`](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-configuration#high_security) _boolean_                                  | Default: `false` To enable [high-security mode](#restricted), set this to `true` and [enable high security (V2)](https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/high-security-mode#version2enabled). This restricts the information you can send to New Relic.                                                                                                                                                          |
| [`Attributes.Enabled`](https://github.com/newrelic/go-agent/blob/master/config.go#L220) _boolean_                                                                | Default: `true` By default, you are sending [some attributes](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-attributes#attributes) to New Relic. If you do not want to send these default attributes to New Relic, set `Attributes.Enabled` to `false`.                                                                                                                                                              |
| [`Attributes.Exclude`](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-attributes#turn-attributes-on-off) _string_                       | Default: (none) If there are specific attribute keys that you do **not** want to send to New Relic in transaction traces, identify them using `Attributes.Exclude`. This restricts the information sent to New Relic. For examples of how to disable the recording of each attribute, see their descriptions on the [Go agent attributes page](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-attributes#attributes). |
| [`CustomInsightsEvents.Enabled`](https://docs.newrelic.com/docs/agents/go-agent/instrumentation/go-agent-configuration#custom-insights-events-enabled) _boolean_ | Default: `true` By default, the agent records events sent to the Event API using [`RecordCustomEvent`](https://docs.newrelic.com/docs/agents/go-agent/features/create-custom-events-insights-go). If you enable [high-security mode](#restricted), this is automatically set to `false`.                                                                                                                                                       |
