Skip to main content
We provide metrics in the OpenTelemetry (OTel) format and additionally support the following vendor backends:
  • Prometheus (native scrape and via OTel Collector)

Why Metrics & OTel

Observability enables:
  1. Incident detection (latency spikes, reconnect storms)
  2. Capacity planning (bytes, active sessions)
  3. User‑experience SLAs (p95 tunnel latency, auth latency)
  4. Faster RCA (dimensions like error_type, result)
OpenTelemetry provides a vendor‑neutral pipeline so you can change backends without retouching instrumented code.

Availability

Newt exposes metrics starting from specific releases, but metrics are disabled in their default configuration.
  • Newt: metrics implemented since Newt 1.6.0 (disabled by default)

Open Telemetry

Push metrics and traces to an OTel Collector or any backend that accepts OTLP.
If you only enable Prometheus scrape, leave *_METRICS_OTLP_ENABLED=false and omit OTLP vars.
The OTel Collector commonly uses port 4317 for gRPC and 4318 for HTTP. Set OTEL_EXPORTER_OTLP_PROTOCOL to http/protobuf for HTTP or grpc for gRPC, and point OTEL_EXPORTER_OTLP_ENDPOINT accordingly. For further customization, see the OTel Collector documentation.
  • Environment Variables
  • CLI Args
NEWT_METRICS_OTLP_ENABLED=true         # enable OTLP exporter
OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:4317
OTEL_EXPORTER_OTLP_INSECURE=true       # or false + TLS vars
OTEL_METRIC_EXPORT_INTERVAL=15s
# Optional auth / TLS
OTEL_EXPORTER_OTLP_HEADERS=authorization=Bearer%20XYZ
OTEL_EXPORTER_OTLP_CERTIFICATE=/etc/otel/ca.pem
  • CLI (gRPC)
  • Docker Compose
# Enable OTLP exporters and point to your Collector's gRPC receiver.
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317"
export OTEL_EXPORTER_OTLP_PROTOCOL="grpc"

newt \
--otlp=true
--id saz281jfa8z37zg
--secret ssfdfsder33rrerrwe
--endpoint http://pangolin.example.com

Prometheus (without OTel Collector)

Each service listens on an admin HTTP address (example Newt default :2112).
  • Environment Variables
  • CLI Args
NEWT_METRICS_PROMETHEUS_ENABLED=true   # /metrics endpoint
NEWT_ADMIN_ADDR=:2112                  # admin HTTP address
  • CLI
  • Docker Compose
  • Prometheus Scrape Config
newt \
	--metrics-prometheus-enabled=true \
	--admin-addr=:2112 \
	--id saz281jfa8z37zg \
	--secret ssfdfsder33rrerrwe \
	--endpoint https://pangolin.example.com

Full Metric Reference

Version 1.0.0 from 2025-10-28 Below are currently implemented metrics for Newt.
  • Metric: exact metric name
  • Instrument & unit: OTel instrument type and canonical unit
  • Purpose: what the metric conveys / recommended use
  • Emission path: subsystem responsible (for troubleshooting missing data)
  • Example series: representative sample including labels
Names/labels can change between major versions. Avoid hard‑coding full label sets in alerts; prefer existence checks and aggregate functions.

Newt metrics

  • OpenTelemetry (OTel)
  • Prometheus
newt
OpenTelemetry metric instruments exposed by Newt. Expand each section to see individual metrics with labels, units, emission points, and examples.

References

Have improvements or a missing metric? Open an issue or PR referencing this page.