fix: Update observability documentation to correct code block syntax and improve clarity

Former-commit-id: d91c6ef1689922799125d25db8ac841f41ff3fd6
This commit is contained in:
Marc Schäfer
2025-10-08 00:00:56 +02:00
parent 27342ddf18
commit 7d62b6ceb3
+7 -6
View File
@@ -1,3 +1,4 @@
<!-- markdownlint-disable MD033 -->
# OpenTelemetry Observability for Newt
This document describes how Newt exposes metrics using the OpenTelemetry (OTel) Go SDK, how to enable Prometheus scraping, and how to send data to an OpenTelemetry Collector for further export.
@@ -92,7 +93,7 @@ OTLP TLS example
- Enable TLS to Collector with a custom CA and headers:
```
```sh
NEWT_METRICS_OTLP_ENABLED=true \
OTEL_EXPORTER_OTLP_ENDPOINT=collector:4317 \
OTEL_EXPORTER_OTLP_INSECURE=false \
@@ -107,7 +108,7 @@ Important: Do not scrape both Newt (2112) and the Collectors Prometheus expor
A) Scrape Newt directly:
```
```yaml
global:
scrape_interval: 15s
scrape_configs:
@@ -118,7 +119,7 @@ scrape_configs:
B) Scrape the Collectors Prometheus exporter:
```
```yaml
global:
scrape_interval: 15s
scrape_configs:
@@ -142,19 +143,19 @@ PromQL snippets
- Throughput in (5m):
```
```sh
sum(rate(newt_tunnel_bytes_total{direction="in"}[5m]))
```
- P95 latency (seconds):
```
```sh
histogram_quantile(0.95, sum(rate(newt_tunnel_latency_seconds_bucket[5m])) by (le))
```
- Active sessions:
```
```sh
sum(newt_tunnel_sessions)
```