Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pkg/server): use hostname for OpenTelemetry tracer name (#154)
### TL;DR Updated OpenTelemetry middleware configuration to use dynamic hostname instead of static tracer name ### What changed? Replaced the static `tracerName` with `s.cache.GetHostname()` in both the OpenTelemetry Chi middleware and metrics base configuration. This change ensures that telemetry data is properly tagged with the actual host identifier. ### How to test? 1. Deploy the application 2. Check OpenTelemetry traces and metrics 3. Verify that the service name in traces and metrics matches the host's hostname 4. Confirm that all middleware functions (heartbeat, RealIP, Recoverer) continue to work as expected ### Why make this change? Using the actual hostname instead of a static tracer name provides better observability by allowing proper identification of the source of telemetry data in distributed environments. This makes it easier to track and debug issues across multiple instances of the service.
- Loading branch information