From 78eab7611cf3342bdea1538a4e436e4453c39f00 Mon Sep 17 00:00:00 2001 From: Oleksii Sholik Date: Tue, 8 Oct 2024 19:36:53 +0300 Subject: [PATCH] docs: Update the Telemetry page to match the new behaviour in the code (#1795) This doc change is to be merged after https://github.com/electric-sql/electric/pull/1765 has been included in a published release. --- website/docs/reference/telemetry.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/website/docs/reference/telemetry.md b/website/docs/reference/telemetry.md index 36f2c5ce32..c6ebce11c0 100644 --- a/website/docs/reference/telemetry.md +++ b/website/docs/reference/telemetry.md @@ -21,10 +21,18 @@ You can get the current status of the service by calling the `http://electric-ho Metrics, traces and logs are exported using the OpenTelemetry Protocol (OTLP). You can configure the OpenTelemetry Exporter for Electric using the following environment variables. -| VARIABLE | Description | -|---------------|------------| -| OTEL_EXPORT | `debug` outputs telemetry data to stdout. `otlp` sends the telemetry data to an OTLP endpoint | -| OTLP_ENDPOINT | The exporter endpoint url | +| VARIABLE | Type | Description | +|---------------|-----------|-----------------| +| OTLP_ENDPOINT | `URL` | An OpenTelemetry collector endpoint url. | +| HNY_API_KEY | `string` | API key for exporting to Honeycomb.io. | +| HNY_DATASET | `string` | Dataset name for Honeycomb.io. | +| OTEL_DEBUG | `boolean` | Enable or disable debug logging of telemetry data to stdout. | + +Electric enables export of telemetry data when it is configured with an `OTLP_ENDPOINT`. + +There is builtin support for [Honeycomb.io](https://www.honeycomb.io/): telemetry data can be exported directly to it by specifying `OTLP_ENDPOINT=https://api.honeycomb.io` and adding at least the `HNY_API_KEY` configuration option. + +In order to use other telemetry data collectors, you'll need to run the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) and include the exporter of choice in its configuration file along with any required credentials, then use Collector's URL as the value for `OTLP_ENDPOINT`. Electric always adds the following resource attributes to events: @@ -40,8 +48,8 @@ Electric will also load additional resource attributes from `OTEL_RESOURCE_ATTRI You can find an example of a docker compose that runs Electric with an OpenTelemetry Collector agent that sends telemetry data to Honeycomb under `packages/sync-service/dev`. -Set `HNY_DATASET` and `HNY_API_KEY` with your Honeycomb information and start the compose file like: +Set `HNY_DATASET` and `HNY_API_KEY` environment variables in a terminal session and run docker compose in it like so: ```shell docker compose -f docker-compose-otel.yml up -``` \ No newline at end of file +```