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] add request count to /health endpoint #326

Open
2 tasks
BeauBouchard opened this issue May 23, 2023 · 0 comments
Open
2 tasks

[feat] add request count to /health endpoint #326

BeauBouchard opened this issue May 23, 2023 · 0 comments

Comments

@BeauBouchard
Copy link
Member

BeauBouchard commented May 23, 2023

Description

Other endpoints on the dashboard have the number of requests as a memory item that increments for every request as long as the API is active. This may require the controller to have a shared count variable that is incremented by all controllers and endpoints on request. This can be accomplished as a middleware item that is added to request. We want the request count variable to be readable in the /health endpoint.

Example - New Response Shape

{
  "data":{
  "message":"ok"
  },
  "meta": {
    "date": "2023-05-23T14:42:57.888Z",
    "requests": 863
    "uptime": "00:00:04:36",
    "version": "0.1.1"
  }
}

See above for requests added to the meta object

Tasks

  • add request count field to /health endpoint response
  • update tests
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

No branches or pull requests

1 participant