diff --git a/go.mod b/go.mod index 47ff25f542..009dd9ead5 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/pkg/xattr v0.4.12 github.com/prometheus/client_golang v1.23.2 github.com/r3labs/sse/v2 v2.10.0 - github.com/riandyrn/otelchi v0.12.2 + github.com/riandyrn/otelchi v0.12.3 github.com/rogpeppe/go-internal v1.14.1 github.com/rs/cors v1.11.1 github.com/rs/zerolog v1.35.0 diff --git a/go.sum b/go.sum index 337f189dc0..4ba6d8aa18 100644 --- a/go.sum +++ b/go.sum @@ -1065,8 +1065,8 @@ github.com/rainycape/memcache v0.0.0-20150622160815-1031fa0ce2f2/go.mod h1:7tZKc github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 h1:bsUq1dX0N8AOIL7EB/X911+m4EHsnWEHeJ0c+3TTBrg= github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/riandyrn/otelchi v0.12.2 h1:6QhGv0LVw/dwjtPd12mnNrl0oEQF4ZAlmHcnlTYbeAg= -github.com/riandyrn/otelchi v0.12.2/go.mod h1:weZZeUJURvtCcbWsdb7Y6F8KFZGedJlSrgUjq9VirV8= +github.com/riandyrn/otelchi v0.12.3 h1:KW9gA+97d6mExk8vbh0FRwb2biUvpyYlc8YuxP1Oap0= +github.com/riandyrn/otelchi v0.12.3/go.mod h1:weZZeUJURvtCcbWsdb7Y6F8KFZGedJlSrgUjq9VirV8= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= diff --git a/vendor/github.com/riandyrn/otelchi/CHANGELOG.md b/vendor/github.com/riandyrn/otelchi/CHANGELOG.md index d189ed6009..4ff6fdd33e 100644 --- a/vendor/github.com/riandyrn/otelchi/CHANGELOG.md +++ b/vendor/github.com/riandyrn/otelchi/CHANGELOG.md @@ -8,6 +8,16 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [0.12.3] - 2026-05-03 + +### Added + +- Add OpenTelemetry semantic-convention compliant HTTP server metric middleware for `http.server.request.duration`, `http.server.active_requests`, `http.server.request.body.size`, and `http.server.response.body.size`. + +### Deprecated + +- Deprecate legacy metric middleware for `request_duration_millis`, `requests_inflight`, and `response_size_bytes`. These remain available for backward compatibility. + ## [0.12.2] - 2025-09-02 ### Fixed @@ -269,7 +279,8 @@ It contains instrumentation for trace and depends on: [#2]: https://github.com/riandyrn/otelchi/pull/2 [#1]: https://github.com/riandyrn/otelchi/pull/1 -[Unreleased]: https://github.com/riandyrn/otelchi/compare/v0.12.2...HEAD +[Unreleased]: https://github.com/riandyrn/otelchi/compare/v0.12.3...HEAD +[0.12.3]: https://github.com/riandyrn/otelchi/releases/tag/v0.12.3 [0.12.2]: https://github.com/riandyrn/otelchi/releases/tag/v0.12.2 [0.12.1]: https://github.com/riandyrn/otelchi/releases/tag/v0.12.1 [0.12.0]: https://github.com/riandyrn/otelchi/releases/tag/v0.12.0 diff --git a/vendor/github.com/riandyrn/otelchi/README.md b/vendor/github.com/riandyrn/otelchi/README.md index 17bf922ab7..ab07b9289c 100644 --- a/vendor/github.com/riandyrn/otelchi/README.md +++ b/vendor/github.com/riandyrn/otelchi/README.md @@ -22,6 +22,17 @@ $ go get github.com/riandyrn/otelchi See [examples](./examples) for details. +## Metrics + +The `metric` package provides OpenTelemetry semantic-convention compliant HTTP server metric middleware: + +- `http.server.request.duration` +- `http.server.active_requests` +- `http.server.request.body.size` +- `http.server.response.body.size` + +Legacy metric middleware for `request_duration_millis`, `requests_inflight`, and `response_size_bytes` is still available but deprecated. + ## Why Port This? I was planning to make this project as part of the Open Telemetry Go instrumentation project. However, based on [this comment](https://github.com/open-telemetry/opentelemetry-go-contrib/pull/986#issuecomment-941280855) they no longer accept new instrumentation. This is why I maintain this project here. diff --git a/vendor/github.com/riandyrn/otelchi/version/version.go b/vendor/github.com/riandyrn/otelchi/version/version.go index fe3d5cac26..4423000286 100644 --- a/vendor/github.com/riandyrn/otelchi/version/version.go +++ b/vendor/github.com/riandyrn/otelchi/version/version.go @@ -2,5 +2,5 @@ package version // Version is the current release version of otelchi in use. func Version() string { - return "0.12.2" + return "0.12.3" } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5513c96374..e28c2ce3f1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1854,7 +1854,7 @@ github.com/r3labs/sse/v2 # github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 ## explicit github.com/rcrowley/go-metrics -# github.com/riandyrn/otelchi v0.12.2 +# github.com/riandyrn/otelchi v0.12.3 ## explicit; go 1.22.0 github.com/riandyrn/otelchi github.com/riandyrn/otelchi/version