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

Prom counters #211

Merged
merged 3 commits into from
Jun 13, 2022
Merged

Prom counters #211

merged 3 commits into from
Jun 13, 2022

Conversation

adilfulara
Copy link
Collaborator

@adilfulara adilfulara commented May 3, 2022

  • Add counter support.
  • Add support for labels to metrics.
  • Move metrics into common package and global scope.
  • Add MonitoredDelegator to capture event metrics.

@adilfulara adilfulara marked this pull request as ready for review May 3, 2022 18:13
@adilfulara adilfulara marked this pull request as draft May 3, 2022 18:13
@adilfulara adilfulara requested a review from aattuluri May 3, 2022 19:23
@adilfulara adilfulara marked this pull request as ready for review May 14, 2022 06:55
- add counter. rework tests
- add support for labels
- move metrics to metrics.go
- update metrics tests with labels
- use a dedicated delegator to capture metrics
- renamed to MonitoredDelegator

Signed-off-by: Adil Fulara <adil.fulara@gmail.com>
Signed-off-by: Adil Fulara <adil.fulara@gmail.com>
@adilfulara
Copy link
Collaborator Author

adilfulara commented Jun 12, 2022

Example of output from metrics endpoint with 3 cluster setup

# HELP events_processed_total Counter for the events processed by Admiral
# TYPE events_processed_total counter
events_processed_total{cluster="admiral-1",event_type="add",object_type="deployment"} 3
events_processed_total{cluster="admiral-1",event_type="add",object_type="destinationrule"} 4
events_processed_total{cluster="admiral-1",event_type="add",object_type="node"} 1
events_processed_total{cluster="admiral-1",event_type="add",object_type="service"} 7
events_processed_total{cluster="admiral-1",event_type="add",object_type="serviceentry"} 4
events_processed_total{cluster="admiral-1",event_type="add",object_type="virtualservice"} 1
events_processed_total{cluster="admiral-2",event_type="add",object_type="deployment"} 5
events_processed_total{cluster="admiral-2",event_type="add",object_type="destinationrule"} 4
events_processed_total{cluster="admiral-2",event_type="add",object_type="node"} 1
events_processed_total{cluster="admiral-2",event_type="add",object_type="service"} 7
events_processed_total{cluster="admiral-2",event_type="add",object_type="serviceentry"} 4
events_processed_total{cluster="admiral-2",event_type="add",object_type="virtualservice"} 1
events_processed_total{cluster="minikube",event_type="add",object_type="deployment"} 5
events_processed_total{cluster="minikube",event_type="add",object_type="destinationrule"} 5
events_processed_total{cluster="minikube",event_type="add",object_type="globaltrafficpolicy"} 1
events_processed_total{cluster="minikube",event_type="add",object_type="node"} 1
events_processed_total{cluster="minikube",event_type="add",object_type="service"} 19
events_processed_total{cluster="minikube",event_type="add",object_type="serviceentry"} 5
events_processed_total{cluster="minikube",event_type="add",object_type="virtualservice"} 1
events_processed_total{cluster="primary",event_type="add",object_type="dependency"} 2

Notice the cluster="primary", this cluster is same as minikube in this case. DependencyController does not have a cluster name.

@aattuluri
Copy link
Contributor

lgtm

Copy link
Contributor

@aattuluri aattuluri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

admiral/pkg/controller/admiral/rollouts.go Outdated Show resolved Hide resolved
Signed-off-by: Adil Fulara <adil.fulara@gmail.com>
@adilfulara adilfulara merged commit cfe0860 into istio-ecosystem:master Jun 13, 2022
@adilfulara adilfulara deleted the prom-counters branch June 13, 2022 18:35
psikka1 pushed a commit to psikka1/admiral that referenced this pull request Jun 15, 2022
* Prometheus Counters

- add counter. rework tests
- add support for labels
- move metrics to metrics.go
- update metrics tests with labels
- use a dedicated delegator to capture metrics
- renamed to MonitoredDelegator

Signed-off-by: Adil Fulara <adil.fulara@gmail.com>
Signed-off-by: psikka1 <pankaj_sikka@intuit.com>
asushanthk pushed a commit that referenced this pull request Jul 21, 2022
* Prometheus Counters

- add counter. rework tests
- add support for labels
- move metrics to metrics.go
- update metrics tests with labels
- use a dedicated delegator to capture metrics
- renamed to MonitoredDelegator

Signed-off-by: Adil Fulara <adil.fulara@gmail.com>
Signed-off-by: sa <sushanth_a@intuit.com>
asushanthk pushed a commit that referenced this pull request Jul 21, 2022
* Prometheus Counters

- add counter. rework tests
- add support for labels
- move metrics to metrics.go
- update metrics tests with labels
- use a dedicated delegator to capture metrics
- renamed to MonitoredDelegator

Signed-off-by: Adil Fulara <adil.fulara@gmail.com>
Signed-off-by: sa <sushanth_a@intuit.com>
itsLucario pushed a commit to itsLucario/admiral that referenced this pull request Aug 9, 2022
…osystem#124)

* Prometheus Counters

- add counter. rework tests
- add support for labels
- move metrics to metrics.go
- update metrics tests with labels
- use a dedicated delegator to capture metrics
- renamed to MonitoredDelegator

Signed-off-by: Adil Fulara <adil.fulara@gmail.com>
Signed-off-by: Adil Fulara <adil_fulara@intuit.com>

Co-authored-by: Adil Fulara <adil.fulara@gmail.com>
itsLucario pushed a commit to itsLucario/admiral that referenced this pull request Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants