-
Notifications
You must be signed in to change notification settings - Fork 211
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
Update cloudwatch exporter dependency #839
Update cloudwatch exporter dependency #839
Conversation
…porter-dependency- # Conflicts: # CHANGELOG.md
Doc changes look OK. Should this be backported? Or only in |
…porter-dependency- # Conflicts: # go.mod # go.sum
@clayton-cornell It would be nice to backport it. The same change is in the Agent repository: |
Added backports to Alloy v1.0 and v1.1 There's a parallel Agent PR already in process, so added the label |
@@ -37,6 +40,7 @@ type Arguments struct { | |||
Discovery []DiscoveryJob `alloy:"discovery,block,optional"` | |||
Static []StaticJob `alloy:"static,block,optional"` | |||
DecoupledScrape DecoupledScrapeConfig `alloy:"decoupled_scraping,block,optional"` | |||
AWSSDKVersion string `alloy:"aws_sdk_version,attr,optional"` |
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.
Given there's only two options v1 and v2 with v1 being deprecated with an EOL date I think this should really be a boolean to enable or disable sdk v2 vs a string like this. We aren't anticipating the need to support a v3 anytime soon.
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.
Changed
@@ -26,6 +28,7 @@ var defaults = Arguments{ | |||
Enabled: false, | |||
ScrapeInterval: 5 * time.Minute, | |||
}, | |||
AWSSDKVersion: "v2", |
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.
I think we should default to v1 for now to prevent breaking anyone on upgrade. We can make v2 the default following YACE changing.
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.
Let's do it 👍
…porter-dependency- # Conflicts: # docs/sources/reference/components/prometheus.exporter.cloudwatch.md
sts_region = "us-east-2" | ||
|
||
sts_region = "us-east-2" | ||
aws_sdk_version_v2 = "false" | ||
discovery { | ||
type = "sqs" |
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.
type=sqs is deprecated now - we need to search for all the examples everywhere and remove the usage of aliases
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.
I will update doc and the tests. 👍
We kept it to test and show the backward compatibility.
A few commits ago, based on the discussion above, we added a compatibility layer to keep support for the aliases.
The idea was to generate warnings but keep the support.
@thampiotr, shall we use this approach or drop the support completely?
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.
I'm aware that there is compatibility and the old configs will work, my comment was more about using in our examples the official, correct names, not the aliases which are deprecated :)
internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go
Outdated
Show resolved
Hide resolved
I believe your concerns are addressed now! Please comment if not :)
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-839-to-release/v1.0 origin/release/v1.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 08573dfe866c1ef16f911479f69c3a9e62de4e4b
# Push it to GitHub
git push --set-upstream origin backport-839-to-release/v1.0
git switch main
# Remove the local backport branch
git branch -D backport-839-to-release/v1.0 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-839-to-release/v1.1 origin/release/v1.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 08573dfe866c1ef16f911479f69c3a9e62de4e4b
# Push it to GitHub
git push --set-upstream origin backport-839-to-release/v1.1
git switch main
# Remove the local backport branch
git branch -D backport-839-to-release/v1.1 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-839-to-release/v1.2 origin/release/v1.2
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 08573dfe866c1ef16f911479f69c3a9e62de4e4b
# Push it to GitHub
git push --set-upstream origin backport-839-to-release/v1.2
git switch main
# Remove the local backport branch
git branch -D backport-839-to-release/v1.2 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-839-to-release/v1.3 origin/release/v1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 08573dfe866c1ef16f911479f69c3a9e62de4e4b
# Push it to GitHub
git push --set-upstream origin backport-839-to-release/v1.3
git switch main
# Remove the local backport branch
git branch -D backport-839-to-release/v1.3 Then, create a pull request where the |
Removed backport labels. |
PR Description
This PR adds a new configuration parameter for the Cloudwatch exporter. It allows to specify the AWS SDK version to use.
v1
is the default version.It was achieved by updating and integrating the version of the
github.com/nerdswords/yet-another-cloudwatch-exporter
package and all dependencies that it depends on.According to the https://github.com/nerdswords/yet-another-cloudwatch-exporter/blob/a275f94e5d33b3b5330ecfced86c290e1db05928/pkg/config/feature_flags.go#L10 , using the AWS SDK v2, should improve performance.
After this change, using aliases for the AWS service names will produce warnings.
Which issue(s) this PR fixes
N.A.
A related change in the Agent project:
Notes to the Reviewer
PR Checklist