Skip to content
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

Metrics #148

Merged
merged 5 commits into from
Oct 19, 2022
Merged

Metrics #148

merged 5 commits into from
Oct 19, 2022

Conversation

roivaz
Copy link
Member

@roivaz roivaz commented Oct 17, 2022

Expose some of the internal stats of the discovery service server as prometheus metrics:

❯ curl -s localhost:8080/metrics | grep marin3r
# HELP marin3r_xdss_discovery_ack_total Number of discovery ACK responses
# TYPE marin3r_xdss_discovery_ack_total counter
marin3r_xdss_discovery_ack_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.cluster.v3.Cluster"} 1
marin3r_xdss_discovery_ack_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.core.v3.TypedExtensionConfig"} 1
marin3r_xdss_discovery_ack_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.listener.v3.Listener"} 1
marin3r_xdss_discovery_ack_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.route.v3.RouteConfiguration"} 1
# HELP marin3r_xdss_discovery_info Number of discovery NACK responses
# TYPE marin3r_xdss_discovery_info untyped
marin3r_xdss_discovery_info{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.cluster.v3.Cluster",version="d58c797b7"} 0
marin3r_xdss_discovery_info{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.core.v3.TypedExtensionConfig",version="584d665fdc"} 0
marin3r_xdss_discovery_info{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.listener.v3.Listener",version="5d6b855897"} 0
marin3r_xdss_discovery_info{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.route.v3.RouteConfiguration",version="5c848bc54c"} 0
# HELP marin3r_xdss_discovery_nack_total Number of discovery NACK responses
# TYPE marin3r_xdss_discovery_nack_total counter
marin3r_xdss_discovery_nack_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.listener.v3.Listener"} 3
# HELP marin3r_xdss_discovery_requests_total Number of discovery requests
# TYPE marin3r_xdss_discovery_requests_total counter
marin3r_xdss_discovery_requests_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.cluster.v3.Cluster"} 1
marin3r_xdss_discovery_requests_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.core.v3.TypedExtensionConfig"} 1
marin3r_xdss_discovery_requests_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.listener.v3.Listener"} 1
marin3r_xdss_discovery_requests_total{node_id="envoy1",pod_name="local",resource_type="type.googleapis.com/envoy.config.route.v3.RouteConfiguration"} 1

There seems to be a lot of changes in the stats package but it's mostly moving code around and renaming things as the code was confusing at some points due to poor naming.

I intend to deploy this in our staging environment and develop some alerts there that I can then add as examples in this repo.

/kind feature
/priority important-longterm
/assign

@3scale-robot 3scale-robot added kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple sprints to complete. needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Oct 17, 2022
@roivaz
Copy link
Member Author

roivaz commented Oct 17, 2022

/ok-to-test

@3scale-robot 3scale-robot added size/L Requires few days to complete the PR or the issue. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-size Indicates a PR or issue lacks a `size/foo` label and requires one. labels Oct 17, 2022
@slopezz
Copy link
Member

slopezz commented Oct 18, 2022

/lgtm

@3scale-robot 3scale-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 18, 2022
@3scale-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 4954e2c4bbb6e788dfa13390cac1c00caa070cd4

@roivaz
Copy link
Member Author

roivaz commented Oct 19, 2022

/approve

@3scale-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roivaz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@3scale-robot 3scale-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 19, 2022
@3scale-robot 3scale-robot merged commit 5defb61 into main Oct 19, 2022
@3scale-robot 3scale-robot deleted the metrics branch October 19, 2022 07:57
@roivaz roivaz mentioned this pull request Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple sprints to complete. size/L Requires few days to complete the PR or the issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants