Repository navigation
Conversation
atelet will ask an image provider plugin to prepare image layers and fall back to the image cache when the plugin declines or fails, and will refresh the registry credentials of plugin leases. Add the ate.imageprovider.requests counter and the ate.imageprovider.duration histogram, labeled by provider and outcome, and the ate.imageprovider.auth_refresh.failures counter, labeled by provider, to the registry, ateattr, atelet's instruments and the observability guide.
| } | ||
|
|
||
| // recordImageProviderAuthRefreshFailure records one failed RefreshAuth call. | ||
| func (i *Instruments) recordImageProviderAuthRefreshFailure(ctx context.Context, provider string) { |
There was a problem hiding this comment.
Moved the auth refresh failures counter to #4030, next to its caller, with a test.
| } | ||
|
|
||
| // recordImageProvider records one request to the image provider plugin. | ||
| func (i *Instruments) recordImageProvider(ctx context.Context, provider, outcome string, d time.Duration) { |
| imageProviderDuration, err := meter.Float64Histogram( | ||
| imageProviderDurationMetric, | ||
| metric.WithUnit("s"), | ||
| metric.WithDescription("Time the image provider plugin takes to prepare an image's layers on the node."), |
There was a problem hiding this comment.
In #4028 the fallback and error samples include the cache pull, so this isn't only plugin time. Should the description say so, or should only the plugin call be timed? Also, will 60s buckets cover a fallback pull?
There was a problem hiding this comment.
The duration now covers only the plugin calls, CanProvide plus PrepareImage, and the description says so. ate.imagecache.requests already measures the cache pull. The plugin calls are bounded at 65s by the timeouts in #4028, so the 60s top bucket plus +Inf covers them.
| brief: > | ||
| The plugin declined the image or failed. atelet used the image | ||
| cache instead. |
There was a problem hiding this comment.
A decline is expected but a plugin error is an outage, and both count as fallback. Could declined be its own outcome, or the plugin failure carry error.type like imagecache does?
There was a problem hiding this comment.
Split it. Outcomes are now success, declined and error, all about the plugin. error carries error.type: the gRPC status code, or invalid_result when atelet rejects the plugin's answer. Whether the cache pull then worked is on ate.imagecache.requests.
| brief: The plugin and the image cache both failed. | ||
| - id: ate.imageprovider.provider | ||
| stability: development | ||
| brief: The name of the image provider plugin. |
There was a problem hiding this comment.
This comes from the plugin's reported name, which is image-provider until the first reply. Is a series split at startup ok, or should atelet set the label from config?
There was a problem hiding this comment.
atelet no longer asks or counts when the plugin socket is missing, so nodes without a plugin record nothing here. Until the plugin first answers, the label is unknown, which now only shows up for a plugin that never answered.
Part of #4023.
Adds
ate.imageprovider.requests,ate.imageprovider.durationandate.imageprovider.auth_refresh.failures, with theate.imageprovider.outcomeand
ate.imageprovider.providerattributes, to the metric registry.Testing:
hack/verify/metrics.sh;go test -race ./cmd/atelet/....I used an AI agent to port these commits from our fork and draft this description. I reviewed the code and commit messages.