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: aws integrations: dashboards #7058

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

raj-k-singh
Copy link
Collaborator

@raj-k-singh raj-k-singh commented Feb 6, 2025

Summary

  • includes available cloud integrations dashboards in dashboards list API response.
  • ability to get cloud integration dashboard by id
  • adds dashboards, images and data collected details for EC2 and RDS

Related Issues / PR's

Contributes to https://github.com/SigNoz/engineering-pod/issues/2023


Important

Adds AWS cloud integration dashboards for EC2 and RDS, updates API to include these dashboards, and enhances tests for new functionalities.

  • Behavior:
    • Includes cloud integration dashboards in the dashboard list API response in http_handler.go.
    • Adds ability to fetch cloud integration dashboard by ID in controller.go.
    • Adds EC2 and RDS dashboards with images and data collection details in aws/ec2/integration.json and aws/rds/integration.json.
  • Functions:
    • Adds AvailableDashboards and GetDashboardById in controller.go for handling cloud dashboards.
    • Updates validateServiceDefinition in availableServices.go to check for duplicate dashboard IDs.
  • Tests:
    • Updates signoz_integrations_test.go to test new dashboard functionalities.
  • Misc:
    • Adds support for .jpeg, .jpg, and .png files in readFileIfUri() in builtin.go.

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

@github-actions github-actions bot added the enhancement New feature or request label Feb 6, 2025
@raj-k-singh raj-k-singh force-pushed the feat/aws-integrations-dashboards branch from 5f1d965 to 8e0a7af Compare February 6, 2025 15:55
@raj-k-singh raj-k-singh marked this pull request as ready for review February 6, 2025 15:56
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.

❌ Changes requested. Reviewed everything up to 8e0a7af in 1 minute and 48 seconds

More details
  • Looked at 3702 lines of code in 9 files
  • Skipped 2 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. pkg/query-service/app/integrations/builtin.go:212
  • Draft comment:
    Consider sanitizing the relative file path in readFileIfUri to prevent directory traversal, even if embedded FS limits risk.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. pkg/query-service/app/integrations/builtin.go:253
  • Draft comment:
    The toPromMetricName helper cleanly replaces non-alphanumeric characters; consider adding a comment that explains why no length truncation is performed.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50%
    None

Workflow ID: wflow_Qi4O45v5iTXmOMga


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

pkg/query-service/app/integrations/builtin.go Show resolved Hide resolved
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! Incremental review on 7982921 in 1 minute and 14 seconds

More details
  • Looked at 34 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. pkg/query-service/tests/integration/signoz_integrations_test.go:12
  • Draft comment:
    Import for cloudintegrations package added; ensure consistency with naming conventions.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
2. pkg/query-service/tests/integration/signoz_integrations_test.go:558
  • Draft comment:
    New cloudIntegrationsController is initialized with proper error check; verifies that APIHandler now includes CloudIntegrations. Looks good.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
3. pkg/query-service/tests/integration/signoz_integrations_test.go:15
  • Draft comment:
    New import for cloudintegrations added. Ensure you add tests covering cloud integration dashboard endpoints if not done already.
  • Reason this comment was not posted:
    Marked as duplicate.
4. pkg/query-service/tests/integration/signoz_integrations_test.go:561
  • Draft comment:
    CloudIntegrationsController is correctly instantiated and injected. Consider adding dedicated integration tests for cloud dashboards to cover its API routes.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    While adding tests is generally good, this comment violates several rules: 1) It's purely informative rather than pointing out a required code change 2) It's speculative - we don't know if cloud dashboard tests are actually needed 3) It's asking the author to add something rather than fixing an actual issue 4) Understanding whether these tests are needed would require more context about the cloud integrations feature.
    The comment does identify a potential gap in test coverage, which could be important for code quality. Maybe cloud dashboard tests are critical for this feature.
    While test coverage is important, this comment doesn't identify a clear issue that needs fixing. If cloud dashboard tests were truly required, they should have been part of the acceptance criteria or requirements, not suggested as an afterthought in a PR comment.
    Delete this comment. While it makes a reasonable suggestion, it violates our rules about making purely informative comments and speculative suggestions rather than pointing out actual issues that need fixing.

Workflow ID: wflow_cjoGx9Sw07NiFrnd


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

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! Incremental review on 5634951 in 1 minute and 13 seconds

More details
  • Looked at 45 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. pkg/query-service/app/cloudintegrations/controller.go:129
  • Draft comment:
    Consider using net/url’s URL and Values to construct the query string instead of manual string concatenation.
  • Reason this comment was not posted:
    Marked as duplicate.
2. pkg/query-service/app/cloudintegrations/controller.go:134
  • Draft comment:
    Using a map for URL query parameters can lead to non-deterministic ordering. Consider using a sorted list or url.Values for consistent ordering.
  • Reason this comment was not posted:
    Marked as duplicate.
3. pkg/query-service/app/cloudintegrations/controller.go:127
  • Draft comment:
    agentVersion is hardcoded as 'latest'; consider parameterizing via configuration for future flexibility.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
4. pkg/query-service/app/cloudintegrations/controller.go:129
  • Draft comment:
    Consider using url.URL and url.Values to build the connection URL instead of manual string concatenation for better robustness.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
5. pkg/query-service/app/cloudintegrations/controller.go:134
  • Draft comment:
    Building query parameters via map iteration can lead to inconsistent ordering and may inadvertently expose sensitive keys (e.g. API keys) in the URL. Consider using url.Values to properly encode parameters and review the security implications of including credentials in URL query parameters.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
    The map iteration order concern is valid - Go maps have random iteration order. However, this is a CloudFormation URL where parameter order doesn't matter. The security concern about exposing keys in URLs is valid, but this appears to be for AWS CloudFormation which requires parameters to be passed this way. The keys are properly escaped using url.QueryEscape().
    I could be wrong about CloudFormation requirements - maybe there's a more secure way to pass sensitive parameters. The random map iteration, while not impacting functionality, could make debugging harder.
    CloudFormation quick create URLs are designed to work this way - the parameters need to be in the URL. The random iteration order doesn't affect functionality since URL parameter order doesn't matter.
    The comment raises valid concerns but doesn't offer actionable solutions given the constraints of CloudFormation quick create URLs. The current implementation properly escapes parameters and works as intended.

Workflow ID: wflow_80kD6ugzud1vTWIA


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

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
None yet
Development

Successfully merging this pull request may close these issues.

1 participant