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

refactor: use echo webserver framework #142

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samlaf
Copy link
Collaborator

@samlaf samlaf commented Sep 20, 2024

This is just a suggestion. Not committed to merging this if others oppose.

Current webserver with custom hand-written middlewares has some issues like:

  • inconsistent logging with duplicates
  • harder to extend with some useful features that come for free in webserver frameworks (eg: adding request-ids to every request for easier tracing when debugging failed requests)

TODO:

  • echo enforces that handlers only return an error, and no other values, so had to leave out the commitment metadata that was used for metrics middleware. This will be fixed once fix: custom error wrapped around error and commitment meta #134 is merged and rebase on top though
  • we now have 2 metrics endpoints... one for our metrics and one for echo's metrics. there's def a way to merge them but need to think about this one
  • add the request-id middleware

@samlaf samlaf marked this pull request as draft September 20, 2024 06:11
@samlaf samlaf force-pushed the feat--echo-webserver-framework branch from 3217ebd to 4954b37 Compare September 20, 2024 06:19
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

Successfully merging this pull request may close these issues.

1 participant