# Observability Configuration

Enable observability and configure Cloud DSN and OTLP endpoints in Blnk.

This page lists the flags that control **operational observability** in Blnk Core. For how to think about logs, traces, and metrics, and for setup walkthroughs for Blnk Cloud and self-hosted export, see [Monitoring in Blnk](/operating/monitoring).

These settings are independent from [queue monitoring](/operating/monitoring-port), which exposes a separate HTTP port for queue inspection.

## Observability flags

<CodeGroup>
```bash blnk.env
BLNK_ENABLE_OBSERVABILITY=false
BLNK_CLOUD_DSN=
```

```json blnk.json
{
  "enable_observability": false,
  "cloud_dsn": ""
}
```
</CodeGroup>

<ParamField name="BLNK_ENABLE_OBSERVABILITY" default="false">
Core emits logs, traces, and metrics; `/metrics` is registered on the API port and worker monitoring port.
</ParamField>
<ParamField name="BLNK_CLOUD_DSN">
Blnk Cloud DSN. Forwards logs, traces, and metrics to your Blnk Cloud monitoring project. Requires observability to be on. Format: `https://<write-key>@<host>/<project-id>`
</ParamField>

For `/metrics` bearer authentication, see [Server & security](/operating/configuration/server-security#metrics-endpoint).

<Warning>
`BLNK_CLOUD_DSN` has no effect when `BLNK_ENABLE_OBSERVABILITY` is `false`.
</Warning>

Exported logs have sensitive values redacted before they leave your instance.

## Blnk Cloud DSN

Set the Blnk Cloud DSN when you export logs, traces, and metrics to Blnk Cloud monitoring:

- Environment: `BLNK_CLOUD_DSN`
- JSON: `cloud_dsn`

Requires `enable_observability=true` on the server and workers. See [Quick setup: Blnk Cloud](/operating/monitoring#quick-setup-blnk-cloud) in [Monitoring in Blnk](/operating/monitoring).

## OpenTelemetry endpoints

For self-hosted export, Blnk reads standard OpenTelemetry environment variables. Set them on **both** the server and worker. Observability must be enabled.

Blnk exports traces and metrics over **OTLP HTTP** (port **4318** in typical Jaeger or Collector setups, not gRPC port 4317). Set a separate endpoint per signal on **both** the server and worker. Observability must be enabled.

<CodeGroup>
```bash blnk.env
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://jaeger:4318
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://otel-collector:4318
```
</CodeGroup>

These variables are environment-only. They are not set in `blnk.json`.

<ParamField name="OTEL_EXPORTER_OTLP_TRACES_ENDPOINT">
OTLP HTTP endpoint for trace export.
</ParamField>
<ParamField name="OTEL_EXPORTER_OTLP_METRICS_ENDPOINT">
OTLP HTTP endpoint for metric push export.
</ParamField>

<Note>
Endpoint values accept common formats: `host:port`, `http://host:port`, or a full path such as `http://jaeger:4318/v1/traces`. Blnk normalizes the value before export.
</Note>

Metrics push runs on a 60-second interval. Prometheus-compatible metrics are also available at `/metrics` on the API port and worker monitoring port regardless of OTLP settings. See [Connect to other tools](/operating/monitoring#connect-to-other-tools) in [Monitoring in Blnk](/operating/monitoring).

Logs are not exported through these endpoints. Collect process output with your log shipper, or set the Blnk Cloud DSN for managed log export.

## Product telemetry

<Warning>
`enable_telemetry` is not operational observability. Turn on `enable_observability` for logs, traces, and metrics in Prometheus, Jaeger, or Blnk Cloud. `enable_telemetry` is optional product usage heartbeat telemetry for the Blnk team.
</Warning>

<CodeGroup>
```bash blnk.env
BLNK_ENABLE_TELEMETRY=false
```

```json blnk.json
{
  "enable_telemetry": false
}
```
</CodeGroup>

<ParamField name="BLNK_ENABLE_TELEMETRY" default="false">
When `true`, Blnk sends optional product usage heartbeat telemetry so the Blnk team can understand usage trends.
</ParamField>

<RelatedTopics
  items={[
    { title: "Monitoring", href: "/operating/monitoring" },
    { title: "Metrics reference", href: "/operating/metrics-reference" },
    { title: "Data stores", href: "/operating/configuration/data-stores" },
  ]}
/>