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 Prometheus Support for Choreo Connect #3428

Merged
merged 30 commits into from
Oct 2, 2023

Conversation

Avishka-Shamendra
Copy link
Contributor

@Avishka-Shamendra Avishka-Shamendra commented Aug 29, 2023

Purpose

Approach

  • Expose metrics endpoints of router, enforcer and adapter to Prometheus.

Documentation

Related PRs

@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (43b5ce0) 27.58% compared to head (8b366c4) 27.56%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3428      +/-   ##
============================================
- Coverage     27.58%   27.56%   -0.03%     
+ Complexity     3373     3370       -3     
============================================
  Files           484      484              
  Lines         52044    52048       +4     
  Branches       6350     6350              
============================================
- Hits          14356    14346      -10     
- Misses        36283    36295      +12     
- Partials       1405     1407       +2     
Files Coverage Δ
...nect/enforcer/metrics/jmx/impl/ExtAuthMetrics.java 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes

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

@Avishka-Shamendra Avishka-Shamendra marked this pull request as ready for review September 14, 2023 04:36
slahirucd7
slahirucd7 previously approved these changes Sep 25, 2023
Co-authored-by: SLahiruC <40932779+slahirucd7@users.noreply.github.com>
adapter/internal/adapter/adapter.go Outdated Show resolved Hide resolved
adapter/pkg/metrics/metrics.go Outdated Show resolved Hide resolved
@dushaniw dushaniw merged commit 958a1cd into wso2:main Oct 2, 2023
3 of 4 checks passed
@@ -196,7 +197,16 @@ func Run(conf *config.Config) {
})
}

logger.LoggerMgw.Info("Starting adapter ....")
logger.LoggerMgw.Info("Starting adapter ....")

Choose a reason for hiding this comment

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

Proper indentation can be added


for {
// Start the recordMetrics goroutine
go func() {

Choose a reason for hiding this comment

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

Better to add a doc comment explaining the pattern usage of go to create the goroutine and the done <- struct{}{} and <-done signal for parallel(to main thread) but sequential(to each call for recordMetrics) execution of recordMetrics function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed through PR #3498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants