Repository navigation
Add prometheus proxy related metrics - #4047
Merged
milosgajdos merged 2 commits intoOct 26, 2023
Merged
milosgajdos merged 2 commits into
milosgajdos merged 2 commits into
Conversation
96 tasks done
dimitar-kostadinov
force-pushed
the
add/prometheus_proxy_metrics
branch
from
September 6, 2023 08:11
10f0892 to
1a20b1f
Compare
thaJeztah
reviewed
Sep 25, 2023
thaJeztah
reviewed
Sep 25, 2023
dimitar-kostadinov
force-pushed
the
add/prometheus_proxy_metrics
branch
from
September 26, 2023 11:42
a898df7 to
d1c8018
Compare
Contributor
|
@thaJeztah @milosgajdos , a friendly ping. We would like to proceed with the monitoring story on our side. |
Signed-off-by: Dimitar Kostadinov <[email protected]>
Signed-off-by: Dimitar Kostadinov <[email protected]>
dimitar-kostadinov
force-pushed
the
add/prometheus_proxy_metrics
branch
from
October 23, 2023 19:55
d1c8018 to
2ce5c81
Compare
Member
|
Sorry about the delay with this. I've had other priorities to look at. Hopefully this week. |
Collaborator
|
There is no test code here, which is a shame. Looking at the code we're missing lots of tests for the proxy though. I assume there has been a manual test? Can you provide some test results for completeness? |
Contributor
Author
Yes, here are steps for a simple manual test:
# build
% make binaries
# prepare configuration
% mkdir -p ~/registry-test
% export REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=~/registry-test
% export REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io
% export REGISTRY_HTTP_ADDR=":5500"
% export REGISTRY_HTTP_DEBUG_ADDR=":5501"
# start the registry as proxy cache to docker.io
% ./bin/registry serve cmd/registry/config-dev.yml
% curl http://test.registry.mirror:5501/metrics
...
# HELP registry_proxy_hits_total The number of total proxy request hits
# TYPE registry_proxy_hits_total counter
registry_proxy_hits_total{type="blob"} 8
registry_proxy_hits_total{type="manifest"} 3
# HELP registry_proxy_misses_total The number of total proxy request misses
# TYPE registry_proxy_misses_total counter
registry_proxy_misses_total{type="manifest"} 2
# HELP registry_proxy_pulled_bytes_total The size of total bytes pulled from the upstream
# TYPE registry_proxy_pulled_bytes_total counter
registry_proxy_pulled_bytes_total{type="manifest"} 3640
# HELP registry_proxy_pushed_bytes_total The size of total bytes pushed to the client
# TYPE registry_proxy_pushed_bytes_total counter
registry_proxy_pushed_bytes_total{type="blob"} 6.7238076e+07
registry_proxy_pushed_bytes_total{type="manifest"} 5502
# HELP registry_proxy_requests_total The number of total incoming proxy request received
# TYPE registry_proxy_requests_total counter
registry_proxy_requests_total{type="blob"} 8
registry_proxy_requests_total{type="manifest"} 3
...Note: |
Jamstah
approved these changes
Oct 26, 2023
Jamstah
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, having some proof in the PR is better than nothing :)
milosgajdos
approved these changes
Oct 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If registry is configured as pull-through cache the following proxy related prometheus metrics are exposed:
registry_proxy_requests_total- total incoming proxy request received for blob/manifestregistry_proxy_hits_total- total proxy request hits for blob/manifestregistry_proxy_misses_total- total proxy request misses for blob/manifestregistry_proxy_pulled_bytes_total- total bytes pulled from the upstream for blob/manifestregistry_proxy_pushed_bytes_total- total bytes pushed to the client for blob/manifest