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: [CHK-3139] Expose http metrics #563

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

petretiandrea
Copy link
Contributor

@petretiandrea petretiandrea commented Aug 8, 2024

This PR enable service monitor (aka prometheus scraping) to collect metrics from expose /actuator/prometheus endpoint. Also enable the endpoint itself by exposing some useful information like HTTP requests count.

List of Changes

  • enabled serviceMonitor section from helm chart
  • added prometheus micrometer registry
  • expose metrics using prometheus format on /actuator/prometheus endpoint

Motivation and Context

How Has This Been Tested?

Tested on Grafana by seeing reported metrics using prometheus as data source
Screenshot 2024-08-08 alle 11 54 34

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@petretiandrea petretiandrea marked this pull request as ready for review August 8, 2024 12:51
@petretiandrea petretiandrea requested a review from a team as a code owner August 8, 2024 12:51
@infantesimone
Copy link
Contributor

This service is the core of eCommerce, the performance is very important.
These metrics shouldn't have (important) impact on the service, but has it been evaluated? tuning frequency and number of metrics collected?

Comment on lines +3 to +8
application: true # reports startup time, useful for future comparison
http.server.requests: true # reports http request counts
resilience4j.circuitbreaker: true # reports circuit breaker status
jvm.memory: true # reports heap status
jvm.gc: true # reports garbage collector metrics, useful to detect too long pauses
mongodb.driver: true # reports useful mongo statistics, like waiting queue
Copy link
Contributor

Choose a reason for hiding this comment

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

I would expose only requests count metrics disabling others. those can be enabled in the future as needed.
What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'm agree, the purpose was to get more data during testing, so now, I will disable useless metrics :)

Copy link

@petretiandrea petretiandrea marked this pull request as draft September 13, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants