add basic metrics for NRI framework#277
Conversation
5c1dcef to
2df634d
Compare
|
Marking as draft per offline conversation with @chrishenzie. Some unstructured thoughts (haven't taken a deep look yet):
|
2df634d to
fd1117c
Compare
ed0c551 to
fe82293
Compare
|
Looking more, I think a |
e18c21a to
eda0942
Compare
|
Refactored to introduce a |
| defer cancel() | ||
|
|
||
| if err = p.impl.StateChange(ctx, evt); err != nil { | ||
| err = p.impl.StateChange(ctx, evt) |
eda0942 to
9a2a1c8
Compare
|
@chrishenzie Thank you for picking this up ! With this updated interface-based approach this looks pretty good to me. |
|
@chrishenzie I think the CDO check gets confused by the |
9a2a1c8 to
7f874b3
Compare
Provides necessary hooks for container runtimes to collect basic runtime metrics regarding NRI plugin activity. This improves observability and helps satisfy v1.0 requirements. Introduces a `Metrics` interface that allows us to collect plugin counts, invocations, adjustments, and latency information. To avoid burying state change events under a generic operation name, `StateChange` invocations append the specific event type using human-readable strings (e.g., "StateChange/CreateContainer"). These hooks are called during plugin invocations and container lifecycle events. Runtimes can provide their own implementation of the `Metrics` interface (e.g. via a `WithMetrics` option) to route these data points into their existing telemetry setups. Ref: containerd#272 Signed-off-by: Chris Henzie <chrishenzie@gmail.com>
7f874b3 to
b31cb47
Compare
|
Updated to also collect latency metrics, and refactored test suite to collect metrics via the |
Provides necessary hooks for container runtimes to collect basic runtime metrics regarding NRI plugin activity. This improves observability and helps satisfy v1.0 requirements.
Introduces a
Metricsinterface that allows us to collect plugin counts, invocations, adjustments, and latency information.To avoid burying state change events under a generic operation name,
StateChangeinvocations append the specific event type using human-readable strings (e.g., "StateChange/CreateContainer").These hooks are called during plugin invocations and container lifecycle events. Runtimes can provide their own implementation of the
Metricsinterface (e.g. via aWithMetricsoption) to route these data points into their existing telemetry setups.Ref: #272
Signed-off-by: Chris Henzie chrishenzie@gmail.com
Assisted-by: gemini-cli