Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions docs/latest/advanced/opentelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,22 @@ Enable it with the `OTEL_DENO` environment variable:
OTEL_DENO=true deno task start
```

This exports traces to an OTLP-compatible collector. Configure the endpoint:
By default, Deno exports telemetry using OTLP over HTTP/protobuf to
`http://localhost:4318`. Set a service name so your application is easy to find
in your observability backend, and configure the endpoint when the collector
runs elsewhere:

```sh Terminal
OTEL_DENO=true \
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 \
OTEL_SERVICE_NAME=my-fresh-app \
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 \
deno task start
```

See Deno's
[OpenTelemetry configuration](https://docs.deno.com/runtime/fundamentals/open_telemetry/#configuration)
for other supported exporter protocols and options.

### With Deno Deploy

[Deno Deploy](/docs/deployment/deno-deploy) collects Fresh traces automatically
Expand Down Expand Up @@ -98,12 +106,14 @@ supports this out of the box - no extra dependencies or services needed:

```sh Terminal
OTEL_DENO=true \
OTEL_TRACES_EXPORTER=console \
OTEL_EXPORTER_OTLP_PROTOCOL=console \
OTEL_SERVICE_NAME=my-fresh-app \
deno task start
```

Each request prints its spans directly to stderr, showing the full breakdown of
middleware, handler, and rendering timings.
The console protocol does not require an endpoint. Each request prints its spans
directly to stderr, showing the full breakdown of middleware, handler, and
rendering timings.

### Jaeger

Expand All @@ -117,10 +127,12 @@ docker run -d --name jaeger \
jaegertracing/all-in-one:latest
```

Then start your Fresh app pointing at the Jaeger collector:
Deno 2.8+ can send directly to Jaeger's OTLP gRPC collector:

```sh Terminal
OTEL_DENO=true \
OTEL_EXPORTER_OTLP_PROTOCOL=grpc \
OTEL_SERVICE_NAME=my-fresh-app \
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 \
deno task start
```
Expand Down