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

feat: Healthcheck endpoint #1751

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

godexsoft
Copy link
Collaborator

This implement a simple endpoint for system healthcheck.

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 71.71%. Comparing base (9dc322f) to head (9a90b59).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/app/ClioApplication.cpp 0.00% 3 Missing ⚠️
src/etlng/impl/GrpcSource.cpp 0.00% 0 Missing and 1 partial ⚠️
src/web/impl/HttpBase.hpp 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1751      +/-   ##
===========================================
- Coverage    71.71%   71.71%   -0.01%     
===========================================
  Files          292      295       +3     
  Lines        12487    12652     +165     
  Branches      6359     6473     +114     
===========================================
+ Hits          8955     9073     +118     
- Misses        1848     1871      +23     
- Partials      1684     1708      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@@ -49,10 +48,8 @@ resolve(std::string const& ip, std::string const& port)
{
web::Resolver resolver;

if (auto const results = resolver.resolve(ip, port); not results.empty()) {
std::cout << "resolved ip: '" << results.at(0) << '\n';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😨

@@ -178,6 +186,16 @@ ClioApplication::run(bool const useNgWebServer)
}
);

httpServer->onGet(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a nuisance when merging back into release/2.3.0

@godexsoft godexsoft marked this pull request as ready for review November 23, 2024 03:27
@@ -178,6 +186,16 @@ ClioApplication::run(bool const useNgWebServer)
}
);

httpServer->onGet(
"/health",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe /ping? Or /healthcheck?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe /ping will be confusing. Because we have ping API

@@ -58,7 +59,7 @@ using tcp = boost::asio::ip::tcp;

namespace {

std::string
std::pair<boost::beast::http::status, std::string>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a structure would be better?

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.

3 participants