OpenTelemetryΒΆ
About
OpenTelemetry (OTel) is an open-source observability framework and toolkit designed to facilitate the export and collection of telemetry data such as traces, metrics, and logs.
OpenTelemetry provides a unified framework and the APIs/SDKs to instrument applications, allowing for the use of a single standard across different observability tools.
The OpenTelemetry Collector and its Prometheus Remote Write Exporter can be used to submit and store metrics data into CrateDB. Alternatively, you can use Telegraf.
Synopsis
Configure OpenTelemetry Collector to send metrics data to the
CrateDB Prometheus Adapter by configuring the prometheusremotewrite
exporter endpoint.
exporters:
prometheusremotewrite:
endpoint: "http://cratedb-prometheus-adapter:9268/write"
remote_write_queue:
enabled: false
external_labels:
subsystem: "otel-testdrive"
debug:
verbosity: detailed
service:
pipelines:
metrics:
receivers: [otlp, carbon]
processors: [batch]
exporters: [debug, prometheusremotewrite]
Configure Telegraf to store OpenTelemetry metrics data into CrateDB.
# OpenTelemetry Input Plugin
# https://github.com/influxdata/telegraf/blob/release-1.36/plugins/inputs/opentelemetry/README.md
[[inputs.opentelemetry]]
# CrateDB Output Plugin
# https://github.com/influxdata/telegraf/tree/master/plugins/outputs/cratedb
[[outputs.cratedb]]
## Connection parameters for accessing the database.
## See https://pkg.go.dev/github.com/jackc/pgx/v4#ParseConfig for available options.
url = "postgres://crate:crate@cratedb/?sslmode=disable"
## Timeout for all CrateDB queries.
# timeout = "5s"
## Name of the table to store metrics in.
table = "metrics"
## If true, and the metrics table does not exist, create it automatically.
table_create = true
## The character(s) to replace any '.' in an object key with
# key_separator = "_"
Learn
How to configure OpenTelemetry Collector to submit metrics to CrateDB.
How to configure Telegraf to submit OpenTelemetry metrics to CrateDB.