Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetry Middleware Proposal #937

Open
jwafle opened this issue Jul 22, 2024 · 2 comments
Open

OpenTelemetry Middleware Proposal #937

jwafle opened this issue Jul 22, 2024 · 2 comments

Comments

@jwafle
Copy link

jwafle commented Jul 22, 2024

OpenTelemetry is becoming a popular open-source solution for monitoring application performance. Well-defined semantic conventions are supplied for HTTP metrics and traces. See here: https://opentelemetry.io/docs/specs/semconv/http/

In following with their guidance on instrumentation, they recommend implementing instrumentation code in the library for which it is written: https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation#new-instrumentation

If interested, I would be willing to contribute instrumentation code that implements OpenTelemetry metrics and tracing as a middleware for chi. Please let me know if you would like me to proceed with opening a PR.

Thanks.

p.s. thank you for chi, using it is a great experience

@VojtechVitek
Copy link
Contributor

We don't have official go-chi package for OTEL yet, but we might add it to https://github.com/go-chi/telemetry.

However, check out https://github.com/riandyrn/otelchi, which looks very decent.

@jwafle
Copy link
Author

jwafle commented Jul 22, 2024

go-chi/telemetry seems like a proper place to put this, but would we want to split out separate packages for prometheus instrumentation and OTEL instrumentation?

otelchi does support tracing. In my personal experience, I've found that metrics can be just as, if not more useful in a production setting. I would also argue that bringing the instrumentation into an official repository would help give the package some validity for use in production (as a developer, I would have a hard time arguing to use a small package from a single maintainer in my day job).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants