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

Add telemetry collection of deployment replica count #1551

Merged

Conversation

bjee19
Copy link
Contributor

@bjee19 bjee19 commented Feb 8, 2024

Problem: Want to collect deployment replica count as a telemetry datapoint.

Solution: Collect deployment replica count.

Testing: E2E testing and additional unit tests.

When at 1 replica:

{"level":"debug","ts":"2024-02-08T00:28:47Z","logger":"telemetryJob","msg":"Gathering telemetry data"}
{"level":"debug","ts":"2024-02-08T00:28:47Z","logger":"telemetryJob","msg":"Exporting telemetry data"}
{"level":"debug","ts":"2024-02-08T00:28:47Z","logger":"telemetryExporter","msg":"Exporting telemetry","data":{"ProjectMetadata":{"Name":"NGF","Version":"edge"},"NodeCount":1,"NGFResourceCounts":{"Gateways":0,"GatewayClasses":1,"HTTPRoutes":0,"Secrets":0,"Services":0,"Endpoints":0},"NGFReplicaCount":1}}

When scaled to 3 replicas:

{"level":"debug","ts":"2024-02-08T00:31:48Z","logger":"telemetryJob","msg":"Gathering telemetry data"}
{"level":"debug","ts":"2024-02-08T00:31:48Z","logger":"telemetryJob","msg":"Exporting telemetry data"}
{"level":"debug","ts":"2024-02-08T00:31:48Z","logger":"telemetryExporter","msg":"Exporting telemetry","data":{"ProjectMetadata":{"Name":"NGF","Version":"edge"},"NodeCount":1,"NGFResourceCounts":{"Gateways":0,"GatewayClasses":1,"HTTPRoutes":0,"Secrets":0,"Services":0,"Endpoints":0},"NGFReplicaCount":3}}

Closes #1307

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@github-actions github-actions bot added enhancement New feature or request helm-chart Relates to helm chart labels Feb 8, 2024
@bjee19 bjee19 force-pushed the enh/telemetry-collect-deployment-replica-count branch from 932eca2 to ae1a21a Compare February 8, 2024 20:13
@bjee19 bjee19 marked this pull request as ready for review February 8, 2024 20:14
@bjee19 bjee19 requested a review from a team as a code owner February 8, 2024 20:14
@bjee19 bjee19 requested a review from kate-osborn February 8, 2024 20:15
deploy/helm-chart/templates/rbac.yaml Outdated Show resolved Hide resolved
deploy/helm-chart/templates/rbac.yaml Outdated Show resolved Hide resolved
deploy/helm-chart/templates/rbac.yaml Outdated Show resolved Hide resolved
internal/mode/static/manager.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector_test.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector_test.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector_test.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector_test.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector_test.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector_test.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector_test.go Outdated Show resolved Hide resolved
@bjee19 bjee19 force-pushed the enh/telemetry-collect-deployment-replica-count branch from b72bfb1 to 416f3f9 Compare February 9, 2024 23:33
Copy link
Contributor

@kate-osborn kate-osborn left a comment

Choose a reason for hiding this comment

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

Left one suggestion that I hope works this time, but I will also approve since the suggestion is not critical.

Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

👍

@bjee19 bjee19 force-pushed the enh/telemetry-collect-deployment-replica-count branch from f53341e to 8406a18 Compare February 13, 2024 19:14
@bjee19 bjee19 merged commit 25ea723 into nginxinc:main Feb 13, 2024
30 checks passed
@bjee19 bjee19 deleted the enh/telemetry-collect-deployment-replica-count branch May 7, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request helm-chart Relates to helm chart
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Collect Deployment Replica Count (NGF)
4 participants