-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[internal/aws] migrate to AWS v2 SDK #40123
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1c3493c
Migrate internal/aws/awsutils to use aws-sdk-for-go-v2
seongpil0948 03a4baa
fix reflect mjlshen review
seongpil0948 b0263cf
enhancement(awsutil): conn partition
seongpil0948 f45312e
feat: reflect the awsutil module to the component in use
seongpil0948 750e990
feat(awscontainerinsightreceiver): reflect the awsutil module to the …
seongpil0948 1612108
fix(awsxray): reflect the awsutil module to the component in use
seongpil0948 44a8303
Merge branch 'main' into 37728_internal-aws
seongpil0948 f465b53
fix(aws): resolve lint issues in AWS SDK v2 migration
seongpil0948 7cd18b6
Merge branch '37728_internal-aws' of github.com:seongpil0948/opentele…
seongpil0948 ce37d3b
Merge branch 'main' into 37728_internal-aws
seongpil0948 736bce9
fix(awsxrayexporter): awsxray_test fail
seongpil0948 9f58585
Merge branch 'main' into 37728_internal-aws
seongpil0948 5df4d44
Merge branch 'main' into 37728_internal-aws
seongpil0948 08f834f
Merge branch 'main' into 37728_internal-aws
seongpil0948 d0ae760
propagate contexts through when possible instead of defining a new one.
seongpil0948 e162e7a
feat(awsutil) fix: remove it for the purpose of the issue, feat: rep…
seongpil0948 69fac41
Merge branch 'main' into 37728_internal-aws
seongpil0948 9eceb80
chore: gotidy
seongpil0948 f384547
fix: resolve lint, fmt errors
seongpil0948 be5cba7
chore: Remove unused code
seongpil0948 ed2450b
Remove unnecessary code
seongpil0948 6eb2f85
Apply suggestions from code review
seongpil0948 d8d7673
Apply suggestions from code review
seongpil0948 8dd87ef
Merge branch 'main' into 37728_internal-aws
atoulme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,8 @@ func TestTelemetryEnabled(t *testing.T) { | |
assert.EqualValues(t, 1, sink.StopCount.Load()) | ||
assert.True(t, sink.HasRecording()) | ||
got := sink.Rotate() | ||
assert.EqualValues(t, 0, *got.BackendConnectionErrors.HTTPCode4XXCount) | ||
assert.EqualValues(t, 1, *got.BackendConnectionErrors.HTTPCode4XXCount) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BackendConnectionErrors.OtherCount was 1 in version 1, but HTTPCode4XXCount was 1 more after v2 conversion |
||
assert.EqualValues(t, 0, *got.BackendConnectionErrors.OtherCount) | ||
} | ||
|
||
func BenchmarkForTracesExporter(b *testing.B) { | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We should propagate contexts through when possible instead of defining a new one. E.g. for this exporter
opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter/factory.go
Lines 42 to 48 in 08f834f
_ context.Context
. We can update it toctx context.Context
and pipe it through.We can then change this function signature to:
Something similar can be done for awsemfexporter
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 newCwLogsExporter will receive a factor like..
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.
Yeah exactly, basically w/e context is passed into
createLogsExporter
will be propagated through. I think you're right that currently it's justcontext.Background()
right now, but if it ever changes it'll only need to be changed in one spot.