-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: cloud integrations: agent check-in api #7004
Conversation
…r enabled services
There was a problem hiding this 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 e6027b1 in 1 minute and 21 seconds
More details
- Looked at
804
lines of code in8
files - Skipped
1
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. pkg/query-service/app/cloudintegrations/model.go:141
- Draft comment:
Consider usinginterface{}
instead ofany
for theScan
method parameter to adhere to Go's idiomatic style. This applies to other similar instances in the code as well. - Reason this comment was not posted:
Confidence changes required:30%
The code usesany
as a type, which is not idiomatic in Go. The idiomatic way is to useinterface{}
for empty interfaces. This is a minor issue but should be corrected for consistency and readability.
2. pkg/query-service/app/cloudintegrations/model.go:229
- Draft comment:
Consider usinginterface{}
instead ofany
for theScan
method parameter to adhere to Go's idiomatic style. This applies to other similar instances in the code as well. - Reason this comment was not posted:
Confidence changes required:30%
The code usesany
as a type, which is not idiomatic in Go. The idiomatic way is to useinterface{}
for empty interfaces. This is a minor issue but should be corrected for consistency and readability.
3. pkg/query-service/app/cloudintegrations/model.go:297
- Draft comment:
Consider usinginterface{}
instead ofany
for theScan
method parameter to adhere to Go's idiomatic style. This applies to other similar instances in the code as well. - Reason this comment was not posted:
Confidence changes required:30%
The code usesany
as a type, which is not idiomatic in Go. The idiomatic way is to useinterface{}
for empty interfaces. This is a minor issue but should be corrected for consistency and readability.
4. pkg/query-service/app/cloudintegrations/model.go:315
- Draft comment:
Consider usinginterface{}
instead ofany
for theScan
method parameter to adhere to Go's idiomatic style. This applies to other similar instances in the code as well. - Reason this comment was not posted:
Confidence changes required:30%
The code usesany
as a type, which is not idiomatic in Go. The idiomatic way is to useinterface{}
for empty interfaces. This is a minor issue but should be corrected for consistency and readability.
5. pkg/query-service/app/cloudintegrations/serviceDefinitions/aws/rds/integration.json:4
- Draft comment:
Avoid using inline styles in JSON configurations. Consider using external stylesheets or CSS classes for styling. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_X2oxKruFg0XmcdoK
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this 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 15d37cc in 46 seconds
More details
- Looked at
234
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
11
drafted comments based on config settings.
1. pkg/query-service/app/cloudintegrations/controller.go:265
- Draft comment:
Good job renaming MetricsCollectionConfig to MetricsCollectionStrategy for consistency. Verify that the error message now matches the new naming (e.g., 'couldn't accumulate metrics collection strategy for svc %s: %w'). - Reason this comment was not posted:
Comment did not seem useful.
2. pkg/query-service/app/cloudintegrations/controller.go:275
- Draft comment:
The renaming for logs from LogsCollectionConfig to LogsCollectionStrategy is clear and consistent. Confirm that the error message now reflects the new naming as intended. - Reason this comment was not posted:
Marked as duplicate.
3. pkg/query-service/app/cloudintegrations/model.go:240
- Draft comment:
Renaming struct fields from '*Config' to '*Strategy' is implemented consistently, including JSON tags. Double-check that these changes do not break any external integrations that rely on the field names. - Reason this comment was not posted:
Marked as duplicate.
4. pkg/query-service/app/cloudintegrations/model.go:327
- Draft comment:
The UpdateWithServiceStrategy method in AWSMetricsCollectionStrategy properly uses append to merge stream filters. The nil check and type assertion look correct. - Reason this comment was not posted:
Comment did not seem useful.
5. pkg/query-service/tests/integration/signoz_cloud_integrations_test.go:232
- Draft comment:
Test cases have been updated to reflect new field names (e.g., MetricsCollectionStrategy). Ensure that the deserialization of telemetryCollectionStrategy in tests remains robust and covers edge cases. - Reason this comment was not posted:
Comment did not seem useful.
6. pkg/query-service/app/cloudintegrations/controller.go:265
- Draft comment:
Renamed field: 'MetricsCollectionConfig' is now 'MetricsCollectionStrategy' in the update call. Ensure all consumers are updated accordingly. - Reason this comment was not posted:
Confidence changes required:0%
None
7. pkg/query-service/app/cloudintegrations/controller.go:275
- Draft comment:
Renamed field: 'LogsCollectionConfig' is now 'LogsCollectionStrategy'. The logs update call reflects this change consistently. - Reason this comment was not posted:
Confidence changes required:0%
None
8. pkg/query-service/app/cloudintegrations/model.go:237
- Draft comment:
Renamed struct fields in CloudTelemetryCollectionStrategy: both 'MetricsCollectionConfig' and 'LogsCollectionConfig' have been updated to 'MetricsCollectionStrategy' and 'LogsCollectionStrategy' respectively for consistency. - Reason this comment was not posted:
Confidence changes required:0%
None
9. pkg/query-service/app/cloudintegrations/model.go:315
- Draft comment:
In AWSMetricsCollectionStrategy.UpdateWithServiceStrategy, variable names were updated (e.g. 'svcConfig' → 'svcStrategy', 'metricsConf' → 'metricsStrategy') to match the new naming conventions. Looks consistent. - Reason this comment was not posted:
Confidence changes required:0%
None
10. pkg/query-service/app/cloudintegrations/model.go:359
- Draft comment:
Similarly, AWSLogsCollectionStrategy.UpdateWithServiceStrategy has been updated to use the new naming ('svcStrategy' and 'logsStrategy'). This ensures consistency across both metrics and logs strategies. - Reason this comment was not posted:
Confidence changes required:0%
None
11. pkg/query-service/tests/integration/signoz_cloud_integrations_test.go:230
- Draft comment:
Tests have been updated to use the new telemetry collection strategy field names. Verify that these changes correctly assert the expected behavior, especially in scenarios where service configs modify the telemetry strategy. - Reason this comment was not posted:
Confidence changes required:0%
None
Workflow ID: wflow_CgglhrOgNBUDB5BQ
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There is an extra boilerplate around, custom unmarshaling/marshaling and type‐switch code. How about using the concrete types instead of interface?
Or if you prefer to keep it same keys regardless of the provider, we could store it in raw message and then unmarshal based on provider?
I think this is easier to follow than interface with custom ser/de-ser around. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on ef50e6d in 1 minute and 19 seconds
More details
- Looked at
483
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. pkg/query-service/app/cloudintegrations/controller.go:267
- Draft comment:
REVIEW: The error returned by AddServiceStrategy is ignored. Once fixed to return nil on success, consider handling the error to avoid silent failures. - Reason this comment was not posted:
Marked as duplicate.
2. pkg/query-service/app/cloudintegrations/model.go:266
- Draft comment:
The function AddServiceStrategy always returns an error—even for supported providers (e.g. 'aws'). If the intention is to successfully accumulate strategies when the provider is supported, it should return nil instead of an error. - Reason this comment was not posted:
Marked as duplicate.
3. pkg/query-service/app/cloudintegrations/controller.go:267
- Draft comment:
The call to AddServiceStrategy in CheckInAsAgent ignores its error return. If AddServiceStrategy can fail, its error should be handled rather than silently discarded. - Reason this comment was not posted:
Marked as duplicate.
4. pkg/query-service/app/cloudintegrations/availableServices.go:170
- Draft comment:
Removal of the specialized JSON parsing logic for 'telemetry_collection_strategy' now relies on ParseStructWithJsonTagsFromMap with DisallowUnknownFields. Ensure that the JSON schema in service definitions exactly matches the CloudTelemetryCollectionStrategy struct to avoid unmarshalling errors. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_t1nahrlu1yjZmonj
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.
There was a problem hiding this 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 b6b7112 in 31 seconds
More details
- Looked at
32
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. pkg/query-service/app/cloudintegrations/controller.go:267
- Draft comment:
Good error check: assigning and handling the error from AddServiceStrategy appropriately. - Reason this comment was not posted:
Confidence changes required:0%
None
2. pkg/query-service/app/cloudintegrations/model.go:262
- Draft comment:
Explicitly returning nil in the AWS branch is a clear improvement to avoid unintended fallthrough. - Reason this comment was not posted:
Confidence changes required:0%
None
3. pkg/query-service/app/cloudintegrations/controller.go:267
- Draft comment:
Good improvement handling the error from AddServiceStrategy. Consider confirming that svcDetails.TelemetryCollectionStrategy is guaranteed non-nil before calling it to prevent any potential nil dereference. - Reason this comment was not posted:
Confidence changes required:33%
None
4. pkg/query-service/app/cloudintegrations/model.go:246
- Draft comment:
Consider adding a nil-check for svcStrategy at the beginning of AddServiceStrategy (e.g., if svcStrategy == nil { return nil }) to avoid a potential nil pointer panic when accessing svcStrategy.Provider. - 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.
Workflow ID: wflow_vCeDgPogMDom461W
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Summary
Details out the QS API to be consumed by AWS integration agent
Related Issues / PR's
Contributes to #6544
Important
Add AWS integration agent check-in API with telemetry collection strategy and update tests for service configurations.
CheckInAsAgent
function incontroller.go
to handle agent check-ins and return integration config.GenerateConnectionUrl
incontroller.go
to support AWS cloud provider.CloudTelemetryCollectionStrategy
inmodel.go
to manage telemetry collection for AWS.AddServiceStrategy
method to accumulate service strategies.integration.json
forec2
andrds
to include telemetry collection strategies.controller_test.go
for agent check-in and service configuration.signoz_cloud_integrations_test.go
to test AWS integration lifecycle and service configurations.This description was created by for b6b7112. It will automatically update as commits are pushed.