-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Awscloudwatchtags #41388
Awscloudwatchtags #41388
Conversation
Co-authored-by: kaiyan-sheng <[email protected]>
fixing chagelog deleting unneeded manifest Changes to be committed: deleted: metricbeat/module/kubernetes/_meta/test/docs/01_playground/metricbeat2.yaml
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
@elastic/beats-tech-leads can I have an approval please? |
go.mod
Outdated
@@ -177,8 +177,11 @@ require ( | |||
github.com/Azure/azure-storage-blob-go v0.15.0 | |||
github.com/Azure/go-autorest/autorest/adal v0.9.24 | |||
github.com/apache/arrow/go/v14 v14.0.2 | |||
github.com/aws/aws-sdk-go v1.54.19 |
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.
This is deprecated and goes EOL in July 2025, when you'll be forced to remove it because it won't get security updates (or I guess you could wait until there is a CVE reported in it and then urgently remove it): https://github.com/aws/aws-sdk-go
This PR also makes agentbeat 5% larger. Do we really need both versions of the AWS SDK?
~/go/src/github.com/elastic/beats/x-pack/agentbeat main
❯ du -h agentbeat
216M agentbeat
~/go/src/github.com/elastic/beats/x-pack/agentbeat awscloudwatchtags
❯ du -h agentbeat
227M agentbeat
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.
The whole idea of this fix was that we needed to query both Rest APIs (that were included in old sdk) and WebSocket and HTTP APIs (that are included in the v2 sdk) in case user needed the metadata
(See code for check)
Let me doublecheck again and let you know. I am not still merging this
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.
@cmacknz I was not accurate, the https://github.com/aws/aws-sdk-go
was not needed. Now it is removed!
Long explanation:
I was wrongly using aws.StringValue (See old commit) from old sdk, in order to be safe with nill pointer exception
I found a replacer with aws.Tostring from new sdk (see new code)
Just to clarify for the following code, both functions use aws-sdk-go-v2
but:
- GetAPIGatewayRestAPIOutput : Uses package apigateway ("github.com/aws/aws-sdk-go-v2/service/apigateway")
- GetAPIGatewayAPIOutput: Uses package apigatewayv2 ("github.com/aws/aws-sdk-go-v2/service/apigatewayv2")
* adding fix for aws tags of cloudwatch * updating docs * Update x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_test.go Co-authored-by: kaiyan-sheng <[email protected]> * Update x-pack/metricbeat/module/aws/cloudwatch/cloudwatch.go Co-authored-by: kaiyan-sheng <[email protected]> * adding a validation for the LimitRestAPI * setting to max limit to 500 * setting to max limit to 500 * removing uneeded sdk --------- Co-authored-by: kaiyan-sheng <[email protected]> (cherry picked from commit a547473)
* adding fix for aws tags of cloudwatch * updating docs * Update x-pack/metricbeat/module/aws/cloudwatch/cloudwatch_test.go Co-authored-by: kaiyan-sheng <[email protected]> * Update x-pack/metricbeat/module/aws/cloudwatch/cloudwatch.go Co-authored-by: kaiyan-sheng <[email protected]> * adding a validation for the LimitRestAPI * setting to max limit to 500 * setting to max limit to 500 * removing uneeded sdk --------- Co-authored-by: kaiyan-sheng <[email protected]> (cherry picked from commit a547473) Co-authored-by: Andrew Gizas <[email protected]>
Proposed commit message
Reopening the PR in order to merge #40755
Due to building errors (#33913 (comment)) the initial PR had been reverted
Related issues
resource_type:restapis
#33913