Commit Graph

5 Commits

Author SHA1 Message Date
988e07ade5 fix(tracing): treat resource detector errors as non-fatal
processOwnerDetector calls os/user.Current(), which fails in non-cgo
builds when the running UID has no /etc/passwd entry and $USER is unset
(common on hardened/distroless containers). It returns a plain error,
not ErrPartialResource, so the previous gate let the error escape and
SetupSDK aborted process startup.

Resource detection is documented as best-effort; downgrade any detector
error to a warning and fall back to an empty resource if the SDK returns
nil. The signature is preserved.
2026-05-02 22:00:09 -07:00
79ccf33774 feat(logger,tracing): share OTel resource for logs and traces
Factor the resource detector list into internal/otlpresource so
the logger's OTLP provider and the trace provider describe the
same process with the same attributes.

OTLP log records now carry the full resource (process.pid,
service.name, service.version, host.*, os.*, etc.) instead of
no resource attributes at all.
2026-04-13 21:14:54 -07:00
1df4b0d4b4 feat(tracing): add bearer token authentication for OTLP exporters
Add BearerTokenFunc to support dynamic bearer token authentication
for OTLP exporters. Tokens are injected per-request via gRPC
PerRPCCredentials and HTTP custom RoundTripper.

- Add BearerTokenFunc type and Config field in tracerconfig
- Implement bearerCredentials (gRPC) and bearerRoundTripper (HTTP)
- Wire bearer auth into all exporter creation functions
- Add getHTTPClient helper for DRY HTTP client configuration
- Upgrade OpenTelemetry SDK to v1.39.0 for WithHTTPClient support
2026-01-01 03:39:01 -08:00
c6230be91e feat(metrics): add OTLP metrics support with centralized config
- Create new metrics/ package for OpenTelemetry-native metrics with OTLP export
- Refactor OTLP configuration to internal/tracerconfig/ to eliminate code duplication
- Add consistent retry configuration across all HTTP OTLP exporters
- Add configuration validation and improved error messages
- Include test coverage for all new functionality
- Make OpenTelemetry metrics dependencies explicit in go.mod

Designed for new applications requiring structured metrics export to
observability backends via OTLP protocol.
2025-08-02 09:29:27 -07:00
6a3bc7bab3 feat(logger): add buffering exporter with TLS support for OTLP logs
Add buffering exporter to queue OTLP logs until tracing is configured.
Support TLS configuration for OpenTelemetry log export with client
certificate authentication. Improve logfmt formatting and tracing setup.
2025-07-27 16:36:18 -07:00