-
Notifications
You must be signed in to change notification settings - Fork 40
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
Alpha support for metrics #55
base: master
Are you sure you want to change the base?
Conversation
} | ||
} | ||
var err error | ||
nonblockingMetric.metricImpl, err = nonblockingMetricVec.metricVecImpl.GetMetricWith(nonblockingMetric.labels) |
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.
This can segfault if nbmw.metricsImpl
is nil. Should we add a nil check, so it's backward compatible with PeerConfig structs that don't have Metrics field explicitly filled in?
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.
Yeah, we should def. do that. Note that this is just an alpha branch with the goal of aligning on the updated libocr interface and being able to do some very rough testing of whether things work.
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.
Do you refer to line 122?
If yes, do I understand correctly that the nil check you refer to is for the constructor?
I.e. function "NewNonblockingMetricsWrapper"
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.
Yes, line 122. I just mean adding:
if nbmw.metricsImpl == nil {
}
IIRC, when I left this comment I did a couple edits within the first minute or two... you might have seen an earlier version in an email that wasn't right.
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.
Oh, I may have misunderstood the question: I was actually thinking the check should go here, but yes putting in the constructor might work better? I'd need more context to have a strong opinion on that.
i have a WIP implementation. at minimum, it does not segfault during ocr tests and it implements the interfaces smartcontractkit/chainlink#8454 |
No description provided.