We've expanded our range of third-party logging plugins yet again—this time with
the addition of [New Relic](https://newrelic.com/).

Full details can be found in the
[documentation](https://zuplo.com/docs/articles/log-plugin-new-relic), but usage
follows the same pattern as
[all](https://zuplo.com/docs/articles/log-plugin-gcp)
[the](https://zuplo.com/docs/articles/log-plugin-aws-cloudwatch)
[other](https://zuplo.com/docs/articles/log-plugin-datadog)
[loggers](https://zuplo.com/docs/articles/log-plugin-dynatrace).

Add the plugin to the Zuplo runtime and configure your options.

```javascript
import {
  RuntimeExtensions,
  NewRelicLoggingPlugin,
  environment,
} from "@zuplo/runtime";

export function runtimeInit(runtime: RuntimeExtensions) {
  runtime.addPlugin(
    new NewRelicLoggingPlugin({
      // Optional, defaults to "https://log-api.newrelic.com/log/v1"
      url: "https://log-api.newrelic.com/log/v1",
      apiKey: environment.NEW_RELIC_API_KEY,
      service: "MyAPI", // Optional, defaults to "Zuplo"
      fields: {
        field1: "value1",
        field2: "value2",
      },
    }),
  );
}
```

As with all our loggers, the New Relic Plugin supports custom fields in addition
to the
[standard fields](https://zuplo.com/docs/articles/log-plugin-new-relic#standard-fields).