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

Add metrics instrumentation to Morty controller #12

Closed
thomasgouveia opened this issue Apr 30, 2023 · 1 comment · Fixed by #13
Closed

Add metrics instrumentation to Morty controller #12

thomasgouveia opened this issue Apr 30, 2023 · 1 comment · Fixed by #13

Comments

@thomasgouveia
Copy link
Member

thomasgouveia commented Apr 30, 2023

Our project is growing in complexity and we're adding new features and functionality on a regular basis. As a result, it's becoming more difficult to keep track of how our platform is performing in production. In order to build a more and more performant platform, we need to be able to identify bottlenecks in our code.

This is why we should consider adding metrics instrumentation in our codebase. This will allow us to collect data on key performance metrics, such as response times, error rates, and throughput. We can then use this data to identify performance bottlenecks and proactively address them before they become major issues.

For the implementation, as we will also add traces in the future, I propose to use Prometheus. It is simple to use, and it doesn't add a lot of complexity to our code. Metrics will be available on a specific port of the application, for example http://localhost:8090/metrics, in the Prometheus format.

Below a non-exhaustive list of what metrics we could add to begin :

Controller:

  • Total number of function invocations
  • Total number of invocation for a given function
  • Time (in ms) of a function invocation
@alexandrebrg
Copy link
Member

@thomasgouveia We should discriminate function invocation time depending if it's a cold or warm start of function

thomasgouveia added a commit that referenced this issue May 2, 2023
- Added metrics to controller component to (Histogram and counter) for function invocations etc.
- Configurable port for metrics server
thomasgouveia added a commit that referenced this issue May 2, 2023
- Added metrics to controller component to (Histogram and counter) for function invocations etc.
- Configurable port for metrics server

Signed-off-by: thomasgouveia <[email protected]>
@thomasgouveia thomasgouveia changed the title Add metrics instrumentation to Morty Add metrics instrumentation to Morty controller May 2, 2023
thomasgouveia added a commit that referenced this issue May 8, 2023
- Added metrics to controller component to (Histogram and counter) for function invocations etc.
- Configurable port for metrics server

Signed-off-by: thomasgouveia <[email protected]>
thomasgouveia added a commit that referenced this issue May 8, 2023
- Added metrics to controller component to (Histogram and counter) for function invocations etc.
- Configurable port for metrics server

Signed-off-by: thomasgouveia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📆 Planned
Development

Successfully merging a pull request may close this issue.

2 participants