38 lines
2.1 KiB
Markdown
38 lines
2.1 KiB
Markdown
# Changelog
|
|
|
|
## Unreleased
|
|
|
|
### Added
|
|
|
|
- `TracerConfig.Protocol` (`ProtocolGRPC` / `ProtocolHTTP`), `TracerConfig.TLS`, `TracerConfig.Environment`, `TracerConfig.Disabled`, `TracerConfig.Exporter`.
|
|
- `Trace`, `RecordError`, `TraceID` helpers.
|
|
- `Endpoint` accepts URLs (`https://collector:4318`).
|
|
- 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.
|
|
- `deploy/` — Grafana dashboard and Prometheus alerts; `examples/service`.
|
|
- Metrics: idempotent registration, `Sub`, `GaugeFunc`, `CounterFunc`, `RegisterDBStats`, OpenMetrics handler with trace exemplars.
|
|
|
|
### Changed
|
|
|
|
- Without `Endpoint` and `OTEL_EXPORTER_OTLP_*ENDPOINT`, spans are created and propagated but not exported (previously the exporter tried `localhost:4317`).
|
|
|
|
## v1.0.0
|
|
|
|
The API is stable from this release on (semantic versioning).
|
|
|
|
### Added
|
|
|
|
- `HTTPMiddleware` — server spans with trace continuation plus `http_requests_total` and `http_request_duration_seconds` metrics.
|
|
- `HTTPTransport` — client spans and trace context propagation for outgoing requests.
|
|
- `LogHandler` — `slog.Handler` wrapper adding `trace_id` / `span_id` to records.
|
|
- `TracerConfig.Insecure`, `TracerConfig.Headers`, `TracerConfig.Attributes`.
|
|
- `SetupTracer` installs W3C TraceContext + Baggage propagators and honours `OTEL_EXPORTER_OTLP_*` / `OTEL_RESOURCE_ATTRIBUTES`.
|
|
|
|
### Changed (breaking since v0.2.0)
|
|
|
|
- **OTLP connection uses TLS by default.** Set `TracerConfig.Insecure: true` for plaintext collectors — previously the connection was always insecure.
|
|
- Sampling is parent-based: `Sampler` applies to root traces, child spans follow the parent's decision.
|
|
- `StartSpan` instrumentation scope is `git.codelab.vc/pkg/obsx` (was `obsx`).
|