Prerequisites
- Erlang/OTP 24 or later, or Elixir 1.13 or later
- Rebar3 (Erlang) or Mix (Elixir)
- A running OTel Collector configured to forward logs to Bronto — see Connect Open Telemetry to Bronto
- OpenTelemetry Erlang/Elixir SDK documentation
Install dependencies
| Package | Purpose |
|---|---|
opentelemetry_api | Core OTel API |
opentelemetry | SDK — LoggerProvider, processors, kernel log handler |
opentelemetry_exporter | OTLP/HTTP exporter |
Configure the log bridge
The OTel SDK ships an Erlang kernel logger handler (otel_log_handler) that captures all log events emitted via :logger (Erlang) or Logger (Elixir). Configure it in your application config.
opentelemetry application starts.
Set resource attributes
Resource attributes are attached to every log record exported from this process. Two attributes drive how Bronto organises incoming logs:| OTel attribute | Bronto concept | Description |
|---|---|---|
service.name | Dataset | Groups logs from one service |
service.namespace | Collection | Groups related services or a team’s services |
resource config key in the setup above.
Complete example
Logger / :logger calls require no changes. The OTel handler runs alongside any existing handlers (console, file) configured in your kernel logger setup.
Verify log collection
After running your application, open the Search page in Bronto. Filter by the dataset name you set inservice.name — your log records should appear within a few seconds.
If no logs appear, check:
- The OTel Collector is running and reachable at the configured endpoint.
- The Collector’s pipeline includes a
logspipeline with anotlpreceiver and the Bronto exporter — see Connect Open Telemetry to Bronto. - The
opentelemetryapplication is started before your application (listed inextra_applicationsorapplicationsin your.app.src/mix.exs).
Traces
Configure tracing
Tracing is included in the sameopentelemetry and opentelemetry_exporter packages — no additional dependencies are needed. Add the traces endpoint to your config:
Creating spans
trace_id and span_id attached.
Direct export to Bronto
If you are not using an OTel Collector, export directly to Bronto by replacing the exporter endpoints and adding your API key:| Region | Logs endpoint | Traces endpoint |
|---|---|---|
| EU | https://ingestion.eu.bronto.io/v1/logs | https://ingestion.eu.bronto.io/v1/traces |
| US | https://ingestion.us.bronto.io/v1/logs | https://ingestion.us.bronto.io/v1/traces |

