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

chore: add k8s metrics receiving status #6977

Merged
merged 3 commits into from
Jan 31, 2025
Merged

chore: add k8s metrics receiving status #6977

merged 3 commits into from
Jan 31, 2025

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Jan 30, 2025

Summary

This change adds the following information for handling empty data screens

  1. DidSendPodMetrics - Whether they ever sent any k8s pod metrics, if they never did, we show the main onboarding docs
  2. DidSendNodeMetrics - Whether they ever sent any k8s node metrics, if they never did, we show the main onboarding docs
  3. DidSendClusterMetrics - Whether they ever send metrics from the k8scluster receiver, if they never did, we show the main onboarding docs
  4. IsSendingOptionalPodMetrics - Whether they are sending the optional pod metrics? If they don't we tell them to update the configuration to send to them
  5. IsSendingRequiredMetadata - Whether they are sending additional metadata such as deployment name, daemon set name, stateful set name, etc. If they don't, we tell them to update the configuration to add k8s attributes processor

Corresponding docs PR SigNoz/signoz-web#1141

Part of #6890


Important

Add API endpoint to check Kubernetes metrics onboarding status, with supporting functions and models.

  • API Changes:
    • Add /api/v1/infra_onboarding/k8s/status endpoint in http_handler.go to get Kubernetes metrics onboarding status.
  • Repository Functions:
    • Add DidSendPodMetrics(), DidSendClusterMetrics(), IsSendingOptionalPodMetrics(), and SendingRequiredMetadata() to PodsRepo in pods.go.
    • Add DidSendNodeMetrics() to NodesRepo in nodes.go.
  • Queries:
    • Define queries for checking sent metrics and metadata in common.go.
  • Models:
    • Add OnboardingStatus and PodOnboardingStatus structs in infra.go to represent onboarding status.

This description was created by Ellipsis for cb6db04. It will automatically update as commits are pushed.

@github-actions github-actions bot added the chore label Jan 30, 2025
@srikanthccv srikanthccv marked this pull request as ready for review January 30, 2025 09:18
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to cb6db04 in 1 minute and 36 seconds

More details
  • Looked at 388 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. pkg/query-service/app/inframetrics/nodes.go:72
  • Draft comment:
    Consider using a constant or configuration for the metric table name instead of hardcoding it. This will make future changes easier and reduce the risk of errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code uses a hardcoded metric table name for querying metrics. This can lead to issues if the table name changes in the future. It's better to use a constant or configuration for such values.
2. pkg/query-service/app/inframetrics/pods.go:115
  • Draft comment:
    Consider using a constant or configuration for the metric table name instead of hardcoding it. This will make future changes easier and reduce the risk of errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code uses a hardcoded metric table name for querying metrics. This can lead to issues if the table name changes in the future. It's better to use a constant or configuration for such values.
3. pkg/query-service/app/inframetrics/pods.go:129
  • Draft comment:
    Consider using a constant or configuration for the metric table name instead of hardcoding it. This will make future changes easier and reduce the risk of errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code uses a hardcoded metric table name for querying metrics. This can lead to issues if the table name changes in the future. It's better to use a constant or configuration for such values.
4. pkg/query-service/app/inframetrics/pods.go:143
  • Draft comment:
    Consider using a constant or configuration for the metric table name instead of hardcoding it. This will make future changes easier and reduce the risk of errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code uses a hardcoded metric table name for querying metrics. This can lead to issues if the table name changes in the future. It's better to use a constant or configuration for such values.
5. pkg/query-service/app/inframetrics/common.go:13
  • Draft comment:
    Avoid hardcoding color values. Use design tokens or predefined color constants instead. This applies to other hardcoded color values in this file as well.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_qNfU2Uwr0mK1qd4F


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@srikanthccv srikanthccv enabled auto-merge (squash) January 31, 2025 14:58
@srikanthccv srikanthccv merged commit c8032f7 into main Jan 31, 2025
16 checks passed
@srikanthccv srikanthccv deleted the missing-data-k8s branch January 31, 2025 15:07
hudsongeovane pushed a commit to hudsongeovane/signoz that referenced this pull request Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants