Skip to content

Commit

Permalink
docs: Update the Telemetry page to match the new behaviour in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
alco committed Oct 3, 2024
1 parent c886f86 commit aa54995
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions website/docs/reference/telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
```
```

0 comments on commit aa54995

Please sign in to comment.