Commit Graph

23 Commits

Author SHA1 Message Date
Marc Schäfer
9f5832d788 Merge branch 'main' of https://github.com/marcschaeferger/newt
Former-commit-id: cf611fe849
2025-10-10 19:19:19 +02:00
Marc Schäfer
cb0f15a315 refactor(telemetry): update OpenTelemetry SDK imports and types for metrics and tracing
Former-commit-id: 186b51e000
2025-10-10 19:17:02 +02:00
Marc Schäfer
f455db0f73 Add WebSocket and proxy lifecycle metrics
Former-commit-id: d21f4951e9
2025-10-10 19:15:33 +02:00
Marc Schäfer
ede06c9e22 Enhance telemetry metrics and context propagation
Former-commit-id: 52e4a57cc1
2025-10-10 18:17:59 +02:00
Marc Schäfer
0b729e6d8c fix(telemetry): enhance session observation logic for tunnel IDs and site-level aggregation
Former-commit-id: b6f5458ad9
2025-10-10 15:30:06 +02:00
Marc Schäfer
495ff18366 fix(docker-compose, prometheus, telemetry, proxy): standardize collector naming and improve error handling
Former-commit-id: bd62da4cc9
2025-10-10 14:42:05 +02:00
Marc Schäfer
d09ae97d67 fix(sonar-telemetry): update observeSessionsFor function to include siteID and improve attribute handling
Former-commit-id: ae5129a7c7
2025-10-08 08:13:35 +02:00
Marc Schäfer
20fa84208d fix(telemetry): update proxyStopper to be a no-op function when registration fails
Former-commit-id: 20ddbb5382
2025-10-08 08:12:20 +02:00
Marc Schäfer
afe687c781 fix(telemetry): improve error handling and formatting in telemetry setup functions
Former-commit-id: 60196455d1
2025-10-08 07:33:11 +02:00
Marc Schäfer
9d62e2d110 fix(sonar): SetObservableCallback uses unregister stopper instead of empty function to satisfy S1186
Former-commit-id: e16881b7c8
2025-10-08 01:09:18 +02:00
Marc Schäfer
221db4709b fix(build): use Registration.Unregister() without context; return tracer shutdown func from setupTracing
Former-commit-id: 587e829e42
2025-10-08 01:07:08 +02:00
Marc Schäfer
166335b30d refactor(telemetry): reduce cognitive complexity by splitting registerInstruments and Init; add unregister stoppers; extract state_view helpers
Former-commit-id: ee2f8899ff
2025-10-08 01:06:13 +02:00
Marc Schäfer
9db7da4426 feat(metrics): NEWT_METRICS_INCLUDE_TUNNEL_ID toggle; conditionally drop tunnel_id across bytes/sessions/proxy/reconnect; docs and smoke test updated; examples/prometheus.yml with relabels; docker-compose defaults avoid double-scrape
Former-commit-id: b20f7a02b2
2025-10-08 00:53:40 +02:00
Marc Schäfer
9f682c3a5f fix(telemetry): adapt to RegisterCallback returning (Registration, error)
Former-commit-id: f28d90595b
2025-10-08 00:46:41 +02:00
Marc Schäfer
eb87b24d13 fix(metrics): direction=ingress|egress for bytes; remove transport on tunnel_sessions; extend allow-list (msg_type, phase); add units for histograms and bytes; handle callback errors; normalize error_type taxonomy; HTTP error mapping to enums
Former-commit-id: 9ace45e71f
2025-10-08 00:43:53 +02:00
Marc Schäfer
61489d46cd feat(phase2): websocket connect latency and message counters; proxy active/buffer/drops gauges and counters; config apply histogram; reconnect initiator label; update call-sites
Former-commit-id: d74065a71b
2025-10-08 00:30:07 +02:00
Marc Schäfer
0c51a6d498 test(telemetry): assert allowed attribute site_id appears in metrics exposition
Former-commit-id: 31f70e5032
2025-10-08 00:10:17 +02:00
Marc Schäfer
cbc7931bc4 feat(telemetry/state_view): add site_id label to gauges and set tunnel_sessions transport=wireguard (no hardcoded tcp)
Former-commit-id: 83c3ae5cf9
2025-10-08 00:09:30 +02:00
Marc Schäfer
3461fe2e09 feat(telemetry,metrics): allow site_id/region in attribute filter; read site_id from NEWT_SITE_ID/NEWT_ID or OTEL_RESOURCE_ATTRIBUTES; propagate site_id/region labels across metrics; include site labels in build_info; seed global site info
Former-commit-id: 1e88fb86b4
2025-10-08 00:09:17 +02:00
Marc Schäfer
2a80d1fd45 refactor: Simplify telemetry metrics by removing site_id and enhancing tunnel_id usage
Former-commit-id: a86b14d97d
2025-10-07 18:43:09 +02:00
Marc Schäfer
172b2816db feat: Implement telemetry for reconnect reasons and RTT reporting
- Added telemetry hooks to track reconnect reasons for WireGuard connections, including server requests and authentication errors.
- Introduced RTT reporting to telemetry for better latency monitoring.
- Enhanced metrics configuration with flags for Prometheus and OTLP exporters.
- Implemented graceful shutdown and signal handling in the main application.
- Updated WebSocket client to classify connection errors and report them to telemetry.
- Added support for async byte counting in metrics.
- Improved handling of reconnect scenarios in the WireGuard service.
- Added documentation for applying patches and rollback procedures.


Former-commit-id: b53fb70778
2025-10-07 09:17:05 +02:00
Marc Schäfer
984320dc27 Implement TelemetryView for thread-safe session management and observability
Former-commit-id: 09e9bd9493
2025-10-07 09:16:17 +02:00
Marc Schäfer
5fba5a110c Add telemetry metrics and constants for improved observability
Former-commit-id: 2d4f656852
2025-10-07 09:15:36 +02:00