Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.

add prometheus metrics for DRA and NRI functions#217

Merged
gauravkghildiyal merged 1 commit into
google:mainfrom
aman0408:add-metrics
Sep 3, 2025
Merged

add prometheus metrics for DRA and NRI functions#217
gauravkghildiyal merged 1 commit into
google:mainfrom
aman0408:add-metrics

Conversation

@aman0408
Copy link
Copy Markdown
Contributor

Adds metrics for DRA and NRI functions - latency and success/failure as discussed in #90

Comment thread go.mod
Comment thread pkg/driver/nri_hooks.go Outdated
Comment thread pkg/driver/nri_hooks.go Outdated
Comment thread pkg/driver/nri_hooks.go Outdated
Copy link
Copy Markdown
Member

@gauravkghildiyal gauravkghildiyal left a comment

Choose a reason for hiding this comment

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

Still pending review of other stuff, but the general direction I'd recommend us to go here is that we have public wrapper function which handles tasks like metrics and error logging, while an internal function focuses solely on the core business logic. This separation ensures metrics are captured consistently and makes the code more readable and maintainable over time. For example, PrepareResourceClaims() could call an internal prepareResourceClaims().

@gauravkghildiyal gauravkghildiyal self-assigned this Aug 29, 2025
@aman0408 aman0408 marked this pull request as ready for review September 3, 2025 00:02
Comment thread pkg/driver/dra_hooks.go Outdated
Comment thread pkg/driver/nri_hooks.go
Comment thread pkg/driver/dra_hooks.go Outdated
Comment thread pkg/driver/dra_hooks.go Outdated
Comment thread pkg/driver/dra_hooks.go Outdated
Comment thread pkg/driver/dra_hooks.go
Copy link
Copy Markdown
Member

@gauravkghildiyal gauravkghildiyal left a comment

Choose a reason for hiding this comment

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

Just a minor suggestion, looking good. Thanks @aman0408

Comment thread pkg/driver/dra_hooks.go Outdated
Comment thread pkg/driver/dra_hooks.go
Copy link
Copy Markdown
Member

@gauravkghildiyal gauravkghildiyal left a comment

Choose a reason for hiding this comment

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

Thanks!

@gauravkghildiyal gauravkghildiyal merged commit b15df09 into google:main Sep 3, 2025
6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants