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

Implement /health Endpoint for Health Check in Rust Server #56

Open
stephane-segning opened this issue Mar 5, 2024 · 1 comment
Open
Assignees

Comments

@stephane-segning
Copy link
Contributor

Description:

This task involves adding a /health endpoint to our Rust-based server, which is crucial for monitoring the application's health and availability. The endpoint will respond with a simple JSON object that indicates the server's current status. This is a fundamental feature for deployment environments and ensures that our application can be easily monitored by external systems or services.

Objectives:

  • /health Endpoint Creation: Develop an endpoint that returns a standard response indicating the server is operational.
  • Response Format: The endpoint should return a JSON response with a status field indicating success.

Acceptance Criteria:

  1. The Rust server has a /health endpoint accessible via HTTP GET request.
  2. Accessing the /health endpoint returns a JSON response with a structure like: {"status": "ok"}.
  3. The endpoint responds with an appropriate HTTP status code 200 (OK) when the server is running normally.
  4. The implementation follows Rust and Rocket coding standards and best practices for API development.
  5. Documentation is updated to include information about the new endpoint, including its purpose and response format.

Resources:

Implementation Steps:

  1. Endpoint Definition: Define a new route in the Rocket application for the /health endpoint. This should be a GET request that requires no parameters.
  2. Handler Function: Implement a handler function for the /health endpoint. This function should construct and return a JSON response indicating that the server's status is "ok".
  3. Testing: Write unit and integration tests to verify that the /health endpoint behaves as expected under various conditions, including server start-up and running states.
  4. Documentation: Update the project documentation to include details about the /health endpoint, explaining its purpose, the expected response format, and any relevant information for developers or system administrators.

Milestones:

  1. Endpoint Development
  2. Testing and Verification
  3. Documentation Update

Blocker:

@Tekum-Emmanuella
Copy link
Collaborator

@stephane-segning please can you give more details of this ticket because I still can't get it right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

2 participants