-
Notifications
You must be signed in to change notification settings - Fork 376
Enable native OPA Prometheus metrics #3631
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
base: master
Are you sure you want to change the base?
Conversation
|
👍 |
Signed-off-by: Magnus Jungsbluth <[email protected]>
Signed-off-by: Magnus Jungsbluth <[email protected]>
Signed-off-by: Magnus Jungsbluth <[email protected]>
Signed-off-by: Magnus Jungsbluth <[email protected]>
Signed-off-by: Magnus Jungsbluth <[email protected]>
b312fc6 to
e5f79ef
Compare
|
@torwunder could you also have a look? |
|
|
||
| found := false | ||
| for _, mf := range metricsFamilies { | ||
| if mf.GetName() == "plugin_status_gauge" && len(mf.Metric) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also verify the labels for the metrics as this is also part of the interface to the outside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
|
|
||
| func (p *Prometheus) Close() {} | ||
|
|
||
| // Implements the PrometheusMetrics interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godoc should start by the func name
| } | ||
|
|
||
| opaRegistry, err = openpolicyagent.NewOpenPolicyAgentRegistry( | ||
| registryOpts := []func(*openpolicyagent.OpenPolicyAgentRegistry) error{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe opaRegistryOpts
This PR passes through existing Prometheus metrics from Open Policy Agent by prefixing them to fit with remainging Skipper metrics and labeling them per virtual OPA instance.
This can only be supported for the Prometheus metrics flavour and is breaking the metrics abstraction as it pulls the Prometheus
Registererto the outside but avoids maintaining and copying existing work that has happened upstream in Open Policy Agent.Should only be merged after #3562 is merged