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

WIP: health/ endpoint #402

Closed
wants to merge 2 commits into from
Closed

WIP: health/ endpoint #402

wants to merge 2 commits into from

Conversation

suchapalaver
Copy link
Contributor

@suchapalaver suchapalaver commented Jul 25, 2023

WIP: CHRON-450

  • Wraps our Prometheus metrics listener as another poem Route::at alongside other --offer-endpoints (currently data and graphql) so it listens alongside them on a /metrics path off API_LISTEN_SOCKET - takes care of CHRON-450
  • Adds health/ endpoint that check current metrics from depth charge and returns 500
  • Improve response by including JSON with current round trip time
  • Review the need to parse String from rendered metrics
  • Figure out defaults - coupling of health endpoint with health metrics and the latter's configuration
  • Update Helm Chart

PR Checklist

Please complete this checklist after opening your PR

  • I have updated documentation as necessary
  • I have updated helm chart(s) if needed
  • I have added tests if needed
  • All new and existing tests are passing
  • Any breaking changes are clearly flagged and documented
  • I’ve included a link to any relevant ticket(s)

@vercel vercel bot temporarily deployed to Preview July 25, 2023 21:41 Inactive
@suchapalaver suchapalaver changed the title health/ endpoint WIP: health/ endpoint Jul 25, 2023
@@ -522,6 +524,29 @@ impl SecurityConf {
}
}

pub struct Endpoints {
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps a set of enum values?

Copy link
Contributor

Choose a reason for hiding this comment

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

(That's just me thinking aloud, it's fine if you prefer it as it is, feel free to resolve this.)

Copy link
Contributor

Choose a reason for hiding this comment

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

They are not all mutually exclusive or related, but I agree seeing more than 2 bools at once is a worry. We may be pushing complexity up to configuration here. Simple data / graphql are always reasonable to assume. As they have known base urls, infrastructure can be used to exclude.

It's only health / metrics thats a choice here. Our current requirement is health, we can deal with exposing a prometheus endpoint properly later.

This is my fault, as I thought a prometheus endpoint would be basically free if we based health on metrics - apparently not the case but we will be able to figure it out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Though, I'm happy for none of this to be figured out in this PR if we'd prefer a separate ticket for endpoint conf (or not), at least it's just simple on-off configuration for separable things.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was simply because the compiler was complaining about too many args in a function so I put them in a struct together.

@@ -522,6 +524,29 @@ impl SecurityConf {
}
}

pub struct Endpoints {
Copy link
Contributor

Choose a reason for hiding this comment

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

They are not all mutually exclusive or related, but I agree seeing more than 2 bools at once is a worry. We may be pushing complexity up to configuration here. Simple data / graphql are always reasonable to assume. As they have known base urls, infrastructure can be used to exclude.

It's only health / metrics thats a choice here. Our current requirement is health, we can deal with exposing a prometheus endpoint properly later.

This is my fault, as I thought a prometheus endpoint would be basically free if we based health on metrics - apparently not the case but we will be able to figure it out.

@suchapalaver suchapalaver deleted the feature/health-endpoint branch October 10, 2023 00:43
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