feat: Add logging and tracing middleware and slight reorg #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds logging and tracing middleware to be able to track faults. The middlewares is copied from the staking API service, with the only difference that I removed the
WrapWithSpan
tracing method as it is not used.Also, replaced slog with zerolog as it seemed easier to maintain with the logging middleware.
This PR also does a slight re-org of the files into directories, similar to what the staking API service does. While it should have been a separate PR, the changes were intertwined during my local development, but I can split them if you feel the PR context is too wide.
Partially resolves #9 . Did not add CORS middleware in this PR though.