Skip to content

OpenTelemetry Protocol(OTLP)

GreptimeDB is an observability backend to consume OpenTelemetry Metrics natively via OTLP/HTTP protocol.

API

To send OpenTelemetry Metrics to GreptimeDB through OpenTelemetry SDK libraries, use the following information:

  • URL: https://<host>/v1/otlp/v1/metrics
  • Headers:
    • X-Greptime-DB-Name: <dbname>
    • Authorization: Basic authentication, which is a Base64 encoded string of <username>:<password>. For more information, please refer to Authentication and HTTP API

The request uses binary protobuf to encode the payload, so you need to use packages that support HTTP/protobuf. For example, in Node.js, you can use exporter-trace-otlp-proto; in Go, you can use go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp; in Java, you can use io.opentelemetry:opentelemetry-exporter-otlp; and in Python, you can use opentelemetry-exporter-otlp-proto-http.

NOTE

The package names may change according to OpenTelemetry, so we recommend that you refer to the official OpenTelemetry documentation for the most up-to-date information.

For more information about the OpenTelemetry SDK, please refer to the official documentation for your preferred programming language.