Deprecate v1.0.0 HTTP and log helpers in favour of the toolkit API
CI / test (push) Successful in 1m12s

LogHandler and HTTPTransport now delegate to NewTraceHandler and
NewHTTPTransport. HTTPMiddleware keeps its v1.0.0 metric names but
shares responseWriter and normalizeMethod with NewHTTPMiddleware.
The package example shows obsx.New.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
M.ShakhmatovandClaude Fable 5.2 committed 2026-11-15 16:43:33 +03:00
1 parent b53a6a6c30
commit 8837e8d316
8 files changed
+40 -149

No files matched your search

+7 -1
View File
@@ -10,12 +10,18 @@
- Resource carries `service.instance.id` and host attributes.
- `New` / `Observer` — one call wires logger, tracer, metrics, health checks and the admin server; `Config.WithEnv` applies `OBSX_*` overrides.
- `NewLogger`, `NewTraceHandler`; `NewHealth` (liveness/readiness, HTTP and `grpc.health.v1`).
- `NewHTTPMiddleware`, `NewHTTPTransport`, `NewGRPCInterceptors` — config-based instrumentation with fixed metric names (`http_server_*`, `http_client_*`, `grpc_*`). `HTTPMiddleware`, `HTTPTransport` and `LogHandler` are unchanged.
- `NewHTTPMiddleware`, `NewHTTPTransport`, `NewGRPCInterceptors` — config-based instrumentation with fixed metric names (`http_server_*`, `http_client_*`, `grpc_*`).
- `deploy/` — Grafana dashboard and Prometheus alerts; `examples/service`.
- Metrics: idempotent registration, `Sub`, `GaugeFunc`, `CounterFunc`, `RegisterDBStats`, OpenMetrics handler with trace exemplars.
### Deprecated
- `HTTPMiddleware` → `NewHTTPMiddleware` / `Observer.HTTPMiddleware`. It keeps working with its v1.0.0 metric names (`<ns>_http_requests_total`, `<ns>_http_request_duration_seconds`).
- `HTTPTransport` → `NewHTTPTransport`; `LogHandler` → `NewTraceHandler`. Both now delegate to the new implementations.
### Changed
- `HTTPTransport` client spans carry `server.address` without the port and add `url.full` (credentials stripped).
- Without `Endpoint` and `OTEL_EXPORTER_OTLP_*ENDPOINT`, spans are created and propagated but not exported (previously the exporter tried `localhost:4317`).
## v1.0.0