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

Implement logic for awsxrayproxy extension #4625

Merged
merged 13 commits into from
Sep 29, 2021

Conversation

anuraaga
Copy link
Contributor

Description:

Implements awsxrayproxy extension by calling into internal/aws/proxy

Link to tracking Issue:

Testing: Unit tests

Documentation:

@anuraaga
Copy link
Contributor Author

@bhautikpip Please check out, small PR since real logic is already there, just need to initialize

Copy link
Contributor

@willarmiros willarmiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nifty! Didn't realize there was already an AWS Proxy.

Comment on lines 35 to 36
go x.server.ListenAndServe()
x.logger.Info("X-Ray proxy server started")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a bit more parity on logging?

https://github.com/aws/aws-xray-daemon/blob/90a5344676b88c1a867ceee3cbce33b07600a946/pkg/proxy/server.go#L133-L136

Or is this taken care of by extension interface?

@anuraaga
Copy link
Contributor Author

@Aneurysm9 @mxiamxia If you get a chance would be good to get a review. Thanks

Copy link
Member

@mxiamxia mxiamxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@bhautikpip bhautikpip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition! Thanks!

@bogdandrutu
Copy link
Member

@Aneurysm9 please review

@anuraaga
Copy link
Contributor Author

@Aneurysm9 Merged main and build's green again

@anuraaga
Copy link
Contributor Author

@Aneurysm9 @alolita I understand there's a lot of churn in the repo right now but wondering if it's possible to merge this PR to unblock the launch of xray remote sampling. It's not a big one

@anuraaga
Copy link
Contributor Author

I've rebased go.mod about six times by now so am going to hold off until things settle down enough to have a chance of merging. @Aneurysm9 let me know when will be good to wrap this up.

return nil
}

func (x xrayProxy) Shutdown(ctx context.Context) error {
// TODO(anuraaga): Implement me
return nil
return x.server.Close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we ensure this honors a timeout if one is set on ctx?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to shutting down with context

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2021

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 7, 2021
@willarmiros
Copy link
Contributor

@anuraaga I think this may need a second look for Anthony's comments

@github-actions github-actions bot removed the Stale label Sep 8, 2021
@anuraaga
Copy link
Contributor Author

@Aneurysm9 Sorry for the delay - I have rebased to latest.

@anuraaga
Copy link
Contributor Author

anuraaga commented Sep 15, 2021

@Aneurysm9 Can you take another look? Or @dmitryax? I've merged go.mod 10 times or so by now so hoping for an approval before next merge

@anuraaga
Copy link
Contributor Author

@Aneurysm9 @dmitryax @alolita Would appreciate another look at this. Thanks

@anuraaga
Copy link
Contributor Author

@open-telemetry/collector-contrib-maintainer Any tips on how to move forward on this PR? Presumably I shouldn't need to rebase this every week forever? :P

@awsiv
Copy link

awsiv commented Sep 22, 2021

Waiting for this - centralized sampling config would really help with cost reduction for us.

Happy to share usecases if desired

Copy link
Member

@Aneurysm9 Aneurysm9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor nit regarding struct initialization.

Comment on lines 52 to 59
ProxyAddress: "",
TLSSetting: configtls.TLSClientSetting{
Insecure: false,
ServerName: "",
},
Region: "",
RoleARN: "",
AWSEndpoint: "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these all the zero value for their type? Do they need to be included explicitly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, cleaned that up

@anuraaga
Copy link
Contributor Author

@bogdandrutu @tigrannajaryan This is now approved so should be good to merge. Thanks!

@tigrannajaryan tigrannajaryan merged commit 1326bb5 into open-telemetry:main Sep 29, 2021
luckyj5 pushed a commit to luckyj5/opentelemetry-collector-contrib that referenced this pull request Oct 1, 2021
Implements awsxrayproxy extension by calling into internal/aws/proxy
luckyj5 pushed a commit to luckyj5/opentelemetry-collector-contrib that referenced this pull request Oct 1, 2021
Update description for Span Processor (open-telemetry#5474)

 Implement logic for awsxrayproxy extension (open-telemetry#4625)

Implements awsxrayproxy extension by calling into internal/aws/proxy

Fix main branch, PRs merge race condition (open-telemetry#5506)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants