-
Notifications
You must be signed in to change notification settings - Fork 180
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: RED metrics #7994
Merged
Merged
feat: RED metrics #7994
Conversation
This file contains 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
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
micbar
force-pushed
the
proxy-metrics
branch
from
December 15, 2023 22:29
8dbfced
to
1aa669d
Compare
butonic
reviewed
Dec 18, 2023
butonic
reviewed
Dec 18, 2023
micbar
force-pushed
the
proxy-metrics
branch
from
December 20, 2023 13:25
1aa669d
to
d9c8fef
Compare
micbar
force-pushed
the
proxy-metrics
branch
from
December 20, 2023 13:53
d9c8fef
to
14553dd
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
butonic
approved these changes
Dec 21, 2023
This was referenced Dec 21, 2023
Closed
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.
Description
Metrics
The proxy service in ocis has the ability to expose metrics in the prometheus format. The metrics are exposed on the
/metrics
endpoint. There are two ways to run the ocis proxy service which has an impact on the number of metrics exposed.1) Single Process Mode
In the single process mode, all ocis services are running inside a single process. This is the default mode when using the
ocis server
command to start the services. In this mode, the proxy service exposes metrics about the proxy service itself and about the ocis services it is proxying. This is due to the nature of the prometheus registry which is a singleton. The metrics exposed by the proxy service itself are prefixed withocis_proxy_
and the metrics exposed by other ocis services are prefixed withocis_<service-name>_
.2) Standalone Mode
In this mode, the proxy service only exposes its own metrics. The metrics of the other ocis services are exposed on their own metrics endpoints.
Available Metrics
The following metrics are exposed by the proxy service:
ocis_proxy_requests_total
method
: HTTP method of the requestocis_proxy_errors_total
method
: HTTP method of the requestocis_proxy_duration_seconds
method
: HTTP method of the requestocis_proxy_build_info{version}
1
value labeled by version, exposing the version of the ocis proxy service.version
: Build version of the proxyPrometheus Configuration
The following is an example prometheus configuration for the single process mode. It assumes that the proxy service is configured to bind on all interfaces
PROXY_HTTP_ADDR=0.0.0.0:9205
and that the proxy is available via theocis
service name (typically in docker-compose). The prometheus service detects the/metrics
endpoint automatically and scrapes it every 15 seconds.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: