How to export telemetry to the OTEL collector
This guide explains how to export Aidbox telemetry in OpenTelemetry format
Aidbox produces three types of signals: logs, metrics and traces in OTEL specification.
Prerequisites
OTEL collector should be deployed and configured to receive logs, metrics and traces.

How to enable export telemetry to the OTEL collector
To enable exporting telemetry to the OTEL collector, set up the following Aidbox settings:
Set OTEL collector receiver endpoint in each of the variables.
How to check the OTEL collector receives telemetry
Set up debug
exporter and logs
, metrics
, traces
pipelines in the OTEL collector configuration:
debug
exporter and logs
, metrics
, traces
pipelines in the OTEL collector configuration:receivers:
otlp:
protocols:
http:
endpoint: <your-collector-resiever-endpoint>
exporters:
debug:
verbosity: detailed
service:
pipelines:
logs:
receivers: [otlp]
exporters: [debug] # OTEL prints logs to the stdout
metrics:
receivers: [otlp]
exporters: [debug] # OTEL prints metrics to the stdout
traces:
receivers: [otlp]
exporters: [debug] # OTEL prints traces to the stdout
Run any request in Aidbox
Use Aidbox REST console to perform a request like this:
GET /fhir/Patient
See Aidbox telemetry in the OTEL collector stdout
Open OTEL collector stdout and see the logs, metrics and traces.
How to enable export telemetry to the OTEL collector with Aidbox configuration project
Aidbox configuration project is deprecated.
To enable exporting telemetry to the OTEL collector:
Import
aidbox.log
,aidbox.telemetry.metrics
,aidbox.telemetry.trace
Define
open-telemetry-appender
,open-telemetry-metrics-exporter
,otel-trace-exporter
Add
otel-appender
to the servicesRestart Aidbox
{:ns main
:import #{aidbox
aidbox.log ; import aidbox.log
aidbox.telemetry.metrics ; import aidbox.telemetry.metrics
aidbox.telemetry.trace ; import aidbox.telemetry.trace
config}
open-telemetry-appender
{:zen/tags #{aidbox/service}
:engine aidbox.log/open-telemetry-appender
:config {:url "http://url-to-otel-collector/v1/logs"}} ; logs consumer endpoint
open-telemetry-metrics-exporter
{:zen/tags #{aidbox.telemetry.metrics/otlp-exporter}
:url "http://url-to-otel-collector/v1/metrics" ; metrics consumer endpoint
:period 5 #_"sec"} ; period in seconds to send metrics
otel-trace-exporter
{:zen/tags #{aidbox.telemetry.trace/exporter}
:engine aidbox.telemetry.trace/otlp-exporter
:url "http://otel-collector-url/v1/traces"} ; traces consumer endpoint
box
{:zen/tags #{aidbox/system}
:config config/zen-config
:services {:otel-appender open-telemetry-appender}}} ; add otel-appender
Last updated
Was this helpful?