githubEdit

Grafana Forwarder (via OTel)

To build a forwarder from Apica to Grafana Labs using OpenTelemetry (OTel), you are essentially configuring Apica's Flow or Pipeline engine to act as a routing and transformation layer that exports data via the OTLP protocol. Since Grafana Cloud provides a native OTLP intake, this is a clean, standard-based integration.

1. Prerequisites from Grafana Labs

Before configuring Apica, you must obtain your OTLP connection details from your Grafana Cloud portal:

  1. Log in to your Grafana Cloud Portal.

  2. Navigate to OpenTelemetry or look for the OTLP Endpoint tile.

  3. Note the following values:

    1. OTLP Endpoint: (e.g., https://otlp-gateway-prod-us-central-0.grafana.net/otlp)

    2. Username/Instance ID: Found on the "OpenTelemetry" or "Details" page.

    3. Cloud Access API Token/Password: Your generated Cloud Access Policy token with metrics:write, logs:write, and traces:write permissions.

2. Apica Configuration Strategy: The OTLP Forwarder

In the Apica UI (Ascent/Flow), you will create a Forwarder (or Target Destination) that uses the OpenTelemetry (OTLP) exporter.

Step A: Define the Target

In the Apica Pipeline configuration, you define the Grafana endpoint. Because Grafana Cloud requires Basic Authentication, your OTLP headers must be encoded.

  • Endpoint: https://<otlp-endpoint>

  • Protocol: http/protobuf (recommended over gRPC for standard web-hook style forwarding)

  • Headers: Your encoded cloud access policy token. Example:

Step B: Pipeline Setup (The "Forwarder")

In the Apica "Flow" or "Pipeline" section, you will create a rule to route specific filtered data to this new destination.

  1. Select Source: Choose the incoming OTel data or system logs you want to forward.

  2. Apply Filters: (Optional) Use Apica's filtering to drop noisy metrics or sensitive log data to save on Grafana Cloud costs.

  3. Select Destination: Choose the OTLP/Grafana Labs target created in Step A.

Field

Value / Setting

Exporter Type

OpenTelemetry (OTLP)

Protocol

http/protobuf

Endpoint URL

https://<your-otlp-endpoint-url> (e.g., .../otlp)

Custom Header Key

Authorization

Custom Header Value

Basic <Your-Base64-String>

Encoding

JSON (for logs/traces) or Protobuf (for metrics)

Compression

gzip (recommended for cost/bandwidth reduction)

Otel Forwarder:

Advanced: Mapping Labels and Jobs

Grafana Cloud (via Loki and Prometheus) relies heavily on labels like job and instance. You can use Apica's Transformation Layer to ensure these are set correctly before the data leaves:

SQL

Critical Ingestion Limits

When forwarding to Grafana Cloud, stay within these OTLP constraints to avoid "429 Too Many Requests" or dropped spans:

  • Metric Name Length: Max 2048 bytes.

  • Resource Attributes: Max 40 per signal.

  • Log Line Size: Max 256 KB.

  • Trace Volume: Max 5 MB per individual trace.

Last updated

Was this helpful?