---
title: New Relic
slug: telemetry-pipeline/new-relic
docTags: 
createdAt: 2025-04-21T01:01:52.321Z
---

# New Relic Sink&#x20;

The **New Relic** sink delivers **logs and metrics** from worker into New Relic using New Relic’s ingest APIs. This guide explains **what each parameter does** and how it affects reliability, performance, and operations.

## Core Identification and Routing

### account\_id (required)

The New Relic account identifier that receives the data.

Operational impact:

- Wrong account ID routes data to the wrong tenant or causes ingest rejection.&#x20;
- Treat as a controlled value and ensure it aligns with the target environment (dev vs prod).&#x20;

### region (optional)

Selects the New Relic region for ingestion.

Options typically include:

- **us:** US region&#x20;
- **eu:** EU region&#x20;

Operational impact:

- Region controls which ingest endpoint is used.&#x20;
- Wrong region commonly results in authentication failures or data not appearing where expected.&#x20;

## API Selection

### api (required)

Chooses which New Relic API is used for ingestion.

Options:

- **events:** Events API (general event ingestion)&#x20;
- **logs:** Logs API (log-specific ingestion pipeline)&#x20;
- **metrics:** Metrics API (metric ingestion pipeline)&#x20;

Operational impact:

- This setting determines:&#x20;
  - Which data model New Relic expects&#x20;
  - How events are interpreted and indexed&#x20;
  - Which features are available downstream (log search vs metric charts vs event queries)&#x20;

Important note:

- Sending logs to a metrics API (or vice versa) will typically result in partial loss, rejection, or incorrect representation.&#x20;

## Authentication

### license\_key (required)

New Relic license key used to authenticate ingestion requests.

Operational impact:

- Invalid/revoked keys lead to sustained ingestion failures and buffer growth.&#x20;
- Keys are sensitive secrets: ensure they are protected and rotated according to policy.&#x20;

##

## Batching

### batch (optional)

Controls how events are grouped into outgoing requests.

Why it matters:

- Batch settings directly trade off throughput, latency, memory usage, and “blast radius” of retries.&#x20;

batch.max\_bytes (optional, default: 1,000,000 bytes)

Maximum uncompressed payload size before a batch is flushed.

Operational impact:

- Larger values reduce HTTP overhead but can increase failure impact and retry payload size.&#x20;
- Very large payloads may hit gateway limits and get rejected.&#x20;

batch.max\_events (optional, default: 100)

Maximum number of events per batch.

Operational impact:

- Higher values improve throughput efficiency.&#x20;
- Lower values reduce latency and reduce the amount of data retried if a request fails.&#x20;

batch.timeout\_secs (optional, default: 1 second)

Maximum batch age before flushing.

Operational impact:

- Lower values reduce latency (faster visibility in New Relic).&#x20;
- Higher values increase batching efficiency at low event rates.&#x20;

## Buffering and Backpressure

### buffer (optional)

Controls how worker queues events while New Relic is slow/unreachable.

buffer.type (optional, default: memory)

- **memory:** faster, but data is lost on crash/restart&#x20;
- **disk:** more durable across restarts, but slower and requires disk sizing&#x20;

buffer.max\_size (required)

Hard cap on buffer usage.

Operational impact:

- Too small → frequent backpressure/drops during outages&#x20;
- Too large → long recovery bursts and higher resource usage&#x20;

buffer.max\_events (optional; memory only, default: 500)

Limits buffered event count (memory mode).

Operational impact:

- Protects against unbounded event accumulation when event sizes vary.&#x20;

buffer.when\_full (optional, default: block)

Behavior when the buffer is full:

- **block:** backpressure upstream (best for lossless pipelines)&#x20;
- **drop\_newest:** drop incoming events (best when continuity > completeness)&#x20;

## Compression

### compression (optional, default: gzip)

Controls request payload compression.

Supported values include:

- gzip, snappy, zlib, zstd, or none&#x20;

Operational impact:

- Compression reduces bandwidth and can improve ingestion reliability over constrained links.&#x20;
- Compression increases CPU usage; the trade-off becomes visible at very high throughput.&#x20;

## Event Preparation Controls (Field Inclusion/Exclusion)

### encoding (optional)

Controls which fields are included in outbound payloads and how timestamps are formatted.

encoding.only\_fields (optional)

- Sends only the specified fields.&#x20;
- Useful to reduce payload size, limit sensitive data, and enforce a stable schema.&#x20;

encoding.except\_fields (optional)

- Excludes specified fields.&#x20;
- Useful for redacting secrets, PII, or noisy fields.&#x20;

encoding.timestamp\_format (optional)

Controls how timestamp fields are rendered:

- RFC3339 or various Unix timestamp precisions (seconds, ms, us, ns)&#x20;

Operational impact:

- Incorrect timestamp formatting can cause:&#x20;
  - ingestion rejection&#x20;
  - incorrect event ordering&#x20;
  - misleading dashboards (events appear “in the future” or far in the past)&#x20;

## Proxy

### proxy (optional)

Routes outbound HTTP requests through HTTP(S) proxies.

proxy.enabled (optional, default: true)

Enables proxy support.

proxy.http / proxy.https (optional)

Proxy endpoints for HTTP and HTTPS traffic.

Operational impact:

- Required in restricted egress environments.&#x20;
- Proxy misconfiguration often looks like timeouts and persistent retries.&#x20;

proxy.no\_proxy (optional)

List of hosts that should bypass the proxy.

Operational impact:

- Useful when New Relic endpoints should be direct while other traffic is proxied, or vice versa.&#x20;
- Misconfigured no\_proxy can cause inconsistent behavior across environments.&#x20;

## Request Behavior (Concurrency, Rate Limits, Retries, Timeouts)

### request (optional)

Controls reliability and performance of outbound HTTP calls. Backoff follows a Fibonacci pattern.

request.concurrency (optional, default: adaptive)

- **none:** concurrency fixed at 1 (predictable, lower throughput)&#x20;
- **adaptive:** automatically adjusts concurrency based on observed latency&#x20;

Operational impact:

- Adaptive increases throughput and can recover faster, but may oscillate if the endpoint is unstable.&#x20;

request.rate\_limit\_num / request.rate\_limit\_duration\_secs

Rate limiting for outbound requests.

Operational impact:

- Protects the upstream ingest endpoint and your own egress bandwidth.&#x20;
- If too restrictive, backlog increases and end-to-end latency grows.&#x20;

request.retry\_attempts (optional)

Maximum retries for failed requests.

Operational impact:

- High values improve survivability during outages but increase duplicate risk (at-least-once).&#x20;
- Very high values can create long retry tails and sustained backlog.&#x20;

request.retry\_initial\_backoff\_secs (default: 1)request.retry\_max\_duration\_secs (default: 30)request.retry\_jitter\_mode (default: Full)

Controls retry backoff timing and randomization.

Operational impact:

- Jitter reduces synchronized retry bursts across many agents.&#x20;

request.timeout\_secs (default: 60)

Maximum time an HTTP request can run.

Operational impact:

- Too low can create “orphaned requests” and increase duplicates due to retries.&#x20;
- Too high can tie up concurrency slots and slow recovery.&#x20;

### Adaptive Concurrency Fine Tuning (Advanced)

Parameters under request.adaptive\_concurrency (decrease\_ratio, ewma\_alpha, initial\_concurrency, max\_concurrency\_limit, rtt\_deviation\_scale) rarely need changes.

Operational warning:

- Incorrect tuning can cause unstable throughput and meta-stable behavior.
