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

feature: use axum #138

Merged
merged 9 commits into from
Feb 29, 2024
Merged

feature: use axum #138

merged 9 commits into from
Feb 29, 2024

Conversation

bc-micah
Copy link
Collaborator

@bc-micah bc-micah commented Feb 28, 2024

What?

  • use axum framework
  • working open telemetry tracing configuration and instructions
  • simplified state extraction using axum extractor
  • graceful shutdown of the server and tracing subscriber
  • use async drop trait to shutdown tracing subscriber in tests

Why?

  • take advantage of tower middleware
  • allows us to debug easier
  • to make sure spans are not discarded after test run or if server is shutdown

Testing/Proof

tracing:
Screenshot 2024-02-28 at 5 10 35 PM
Screenshot 2024-02-28 at 5 10 46 PM

all tests pass
Screenshot 2024-02-28 at 4 54 23 PM

- add graceful shutdown signal and close the tracing subscriber safetly on server shutdown
- add drop trait for the `TestApp` so we can shutdown subscriber safetly
@bc-micah bc-micah force-pushed the feature/axum branch 6 times, most recently from e8b3888 to d3f6fe4 Compare February 29, 2024 06:31
@bc-micah bc-micah merged commit 026eb79 into main Feb 29, 2024
5 checks passed
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