Skip to content

riandyrn/otelchi

Repository files navigation

otelchi

compatibility-test Go Report Card Documentation

OpenTelemetry instrumentation for go-chi/chi.

Essentially this is an adaptation from otelmux but instead of using gorilla/mux, we use go-chi/chi.

Currently, this library can only instrument traces and metrics.

Contributions are welcomed!

Install

$ go get github.com/riandyrn/otelchi

Examples

See 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 they no longer accept new instrumentation. This is why I maintain this project here.

About

OpenTelemetry instrumentation for go-chi/chi

Topics

Resources

License

Stars

172 stars

Watchers

4 watching

Forks

Packages

 
 
 

Contributors

Languages