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

feat: Add deploymentID to telemetry object collector #1597

Merged
merged 16 commits into from
Feb 22, 2024

Conversation

salonichf5
Copy link
Contributor

@salonichf5 salonichf5 commented Feb 20, 2024

Proposed changes

Write a clear and concise description that helps reviewers understand the purpose and impact of your changes. Use the
following format:

Problem: As a user, I want to collect deployment identifier from NGF installations to correlate telemetry data with every unique installation of NGF.

Solution: Add a field deploymentID to telemetry object collector which reflects the UID of the replicaSet owner reference.

Testing: Added & updated unit tests as needed. Manually tested on active NGF installations, logs below:

{"level":"debug","ts":"2024-02-22T00:25:42Z","logger":"telemetryJob","msg":"Exporting telemetry data"}
{"level":"debug","ts":"2024-02-22T00:25:42Z","logger":"telemetryExporter","msg":"Exporting telemetry","data":{"ProjectMetadata":{"Name":"NGF","Version":"edge"},"ClusterID":"08bf9cfe-bb24-4764-b991-aa74a2ce0c2a","Arch":"amd64","DeploymentID":"049d51c4-5d1f-4567-a00d-85a3130ab761","ImageSource":"local","NGFResourceCounts":{"Gateways":0,"GatewayClasses":1,"HTTPRoutes":0,"Secrets":0,"Services":0,"Endpoints":0},"NodeCount":1,"NGFReplicaCount":1}}

Please focus on (optional): If you any specific areas where you would like reviewers to focus their attention or provide
specific feedback, add them here.

Closes #1304

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

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.


@salonichf5 salonichf5 requested a review from a team as a code owner February 20, 2024 17:16
@github-actions github-actions bot added the helm-chart Relates to helm chart label Feb 20, 2024
@salonichf5 salonichf5 self-assigned this Feb 20, 2024
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
deploy/manifests/nginx-gateway-experimental.yaml 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
deploy/manifests/nginx-gateway-experimental.yaml Outdated Show resolved Hide resolved
internal/mode/static/telemetry/collector.go Outdated Show resolved Hide resolved
@kate-osborn kate-osborn added the enhancement New feature or request label Feb 21, 2024
@salonichf5 salonichf5 requested a review from a team as a code owner February 21, 2024 18:51
@github-actions github-actions bot added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Feb 21, 2024
@github-actions github-actions bot removed documentation Improvements or additions to documentation helm-chart Relates to helm chart labels Feb 21, 2024
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.

LGTM

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.

👍 (the failing unit test needs to be fixed though :) )

@salonichf5 salonichf5 enabled auto-merge (squash) February 22, 2024 00:12
@salonichf5 salonichf5 enabled auto-merge (squash) February 22, 2024 00:29
@salonichf5 salonichf5 merged commit a66255b into nginxinc:main Feb 22, 2024
34 checks passed
@lucacome lucacome added the enhancement New feature or request label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Collect Deployment ID (NGF)
5 participants