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

Update Prometheus implementation in go-enforcer #2857

Closed
sgayangi opened this issue Feb 19, 2025 · 2 comments
Closed

Update Prometheus implementation in go-enforcer #2857

sgayangi opened this issue Feb 19, 2025 · 2 comments
Assignees
Milestone

Comments

@sgayangi
Copy link
Contributor

Problem

The new go enforcer needs updated Prometheus implementation.

Solution

Implement logic for pushing metrics to Prometheus from go enforcer
Update template files with the correct values

Affected Component

Enforcer

Version

No response

Implementation

No response

Related Issues

No response

Suggested Labels

No response

@sgayangi sgayangi self-assigned this Feb 19, 2025
@sgayangi
Copy link
Contributor Author

The previous Java enforcer required the JMX of Prometheus in order for Prometheus metrics to be published.
In addition to OS level metrics, custom metrics for token issuer count and subscription count were also created.

Since the current enforcer is now in Golang, the following changes need to be made to support Prometheus in the enforcer

  • Update the template files for the gateway deployment and jmx config map since that logic is now unnecessary
  • Add custom metrics for token_issuer_count and subscription_count
  • Use the common-go-libs prometheus collector to arrange for Prometheus metrics collection

Additionally, the Grafana dashboard for the enforcer will also need to be updated since it currently scrapes data from the ext_authz keys. Therefore the relevant Prometheus queries need to be updated, along with updating the OS level metric keys from JVM to the go runtime.

@sgayangi
Copy link
Contributor Author

Fixed with PR #2856
Documentation PR: wso2/docs-apk#698

@CrowleyRajapakse CrowleyRajapakse added this to the 1.3.0-rc milestone Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants