-
Notifications
You must be signed in to change notification settings - Fork 244
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: agent and broker expose OTEL metrics #10264
base: master
Are you sure you want to change the base?
Conversation
814cbf4
to
a4d28f0
Compare
const storeSizes = this.store.estimateSize(); | ||
this.instrumentation.recordDBMetrics(storeSizes); |
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.
These stats are now automatically captured using observables.
} | ||
const metrics = this.getStats(); | ||
observable.observe(this.dbMapSize, metrics.mappingSize); | ||
observable.observe(this.dbNumItems, metrics.actualSize); |
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 this is a typo on my part. That should be metrics.numItems
.
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.
Fixed! Totally missed it haha, nice catch
) { | ||
this.dbMapSize = meter.createGauge(dbMapSizeDescriptor.name, { | ||
this.dbMapSize = meter.createObservableGauge(dbMapSizeDescriptor.name, { |
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 observable approach is much better!
a4d28f0
to
6b73bcd
Compare
This PR adds instrumentation to both the proving broker and agent.