Skip to content

Commit

Permalink
fix: broken link, reformat some code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
brnhensley committed May 6, 2024
1 parent f525f54 commit f19e2fb
Showing 1 changed file with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ In this and the following examples, `config` represents your New Relic config st
</tbody>
</table>

When `true`, the agent sends data from your app to the [New Relic collector](//docs/new-relic-solutions/get-started/glossary/#collector).
When `true`, the agent sends data from your app to the [New Relic collector](/docs/new-relic-solutions/get-started/glossary/#collector).

To turn off New Relic monitoring, set this to `false`.

Expand All @@ -260,10 +260,10 @@ In this and the following examples, `config` represents your New Relic config st

You may make use of the `ConfigEnabled` option to make this easier:
```go
app, err := newrelic.NewApplication(
app, err: = newrelic.NewApplication(
newrelic.ConfigAppName("Your Application Name"),
newrelic.ConfigLicense(os.Getenv("NEW_RELIC_LICENSE_KEY")),
newrelic.ConfigEnabled(false),
newrelic.ConfigEnabled(false),
)
```

Expand Down Expand Up @@ -1796,7 +1796,7 @@ The following settings are used to configure the error collector:
```go
app, err := newrelic.NewApplication(
newrelic.ConfigAppName("Your Application Name"),
newrelic.ConfigLicense(os.Getenv("NEW_RELIC_LICENSE_KEY")),
newrelic.ConfigLicense(os.Getenv("NEW_RELIC_LICENSE_KEY")),
func(config *newrelic.Config) {
config.ErrorCollector.IgnoreStatusCodes = []int{0, 5, 404, 418}
},
Expand Down Expand Up @@ -3265,13 +3265,13 @@ Next initialize and enable the security agent.
title="Enable with option functions"
>
```go
err := nrsecurityagent.InitSecurityAgent(
app,
nrsecurityagent.ConfigSecurityMode("IAST"),
nrsecurityagent.ConfigSecurityValidatorServiceEndPointUrl("wss://csec.nr-data.net"),
nrsecurityagent.ConfigSecurityEnable(true),
)
```
err: = nrsecurityagent.InitSecurityAgent(
app,
nrsecurityagent.ConfigSecurityMode("IAST"),
nrsecurityagent.ConfigSecurityValidatorServiceEndPointUrl("wss://csec.nr-data.net"),
nrsecurityagent.ConfigSecurityEnable(true),
)
```

</Collapser>
<Collapser
Expand All @@ -3281,10 +3281,10 @@ Next initialize and enable the security agent.
ConfigSecurityFromEnvironment directs the nrsecurityagent integration to obtain all of its configuration information from environment variables.

```go
err := nrsecurityagent.InitSecurityAgent(
app,
ConfigSecurityFromEnvironment(),
)
err: = nrsecurityagent.InitSecurityAgent(
app,
ConfigSecurityFromEnvironment(),
)
```
</Collapser>
<Collapser
Expand All @@ -3295,26 +3295,26 @@ ConfigSecurityFromEnvironment directs the nrsecurityagent integration to obtain
ConfigSecurityFromYaml directs the nrsecurityagent integration to read an external YAML-formatted file to obtain its configuration values. The path to this file must be provided by setting the environment variable NEW_RELIC_SECURITY_CONFIG_PATH.

```go
err := nrsecurityagent.InitSecurityAgent(
app,
ConfigSecurityFromYaml(),
)
err: = nrsecurityagent.InitSecurityAgent(
app,
ConfigSecurityFromYaml(),
)
```

The default YAML file looks like this.

```yaml
enabled: true

# NR security provides two modes IAST and RASP
# Default is IAST
# NR security provides two modes IAST and RASP
# Default is IAST
mode: IAST

# New Relic’s SaaS connection URLs
# New Relic’s SaaS connection URLs
validator_service_url: wss://csec.nr-data.net

# Following category of security events
# can be disabled from generating.
# Following category of security events
# can be disabled from generating.
detection:
rxss:
enabled: true
Expand Down Expand Up @@ -3354,7 +3354,7 @@ The security agent can be configured with the following options.
<td>
```go
func(cfg *SecurityConfig) {
cfg.Security.Agent.Enabled = true
cfg.Security.Agent.Enabled = true
}
```
</td>
Expand Down

0 comments on commit f19e2fb

Please sign in to comment.