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

feat: allow to get the network address server is listening on #217

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

haoqixu
Copy link
Member

@haoqixu haoqixu commented Dec 14, 2023

Add an Addr() method to fetch the network address Server is listening on. I think this may be useful for the supervisor to start a server with 0 port to allocate an ephemeral port and get the allocated port for rendering an agent config.

@haoqixu haoqixu requested a review from a team December 14, 2023 07:36
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 129 lines in your changes are missing coverage. Please review.

Comparison is base (efddaa2) 76.11% compared to head (6d08f1f) 72.50%.
Report is 31 commits behind head on main.

Files Patch % Lines
internal/certs.go 0.00% 118 Missing ⚠️
client/internal/httpsender.go 88.00% 2 Missing and 1 partial ⚠️
client/internal/mockserver.go 85.71% 2 Missing and 1 partial ⚠️
server/httpconnection.go 0.00% 2 Missing ⚠️
client/internal/clientcommon.go 90.90% 1 Missing ⚠️
client/internal/packagessyncer.go 0.00% 1 Missing ⚠️
server/serverimpl.go 95.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #217      +/-   ##
==========================================
- Coverage   76.11%   72.50%   -3.62%     
==========================================
  Files          24       25       +1     
  Lines        1834     2022     +188     
==========================================
+ Hits         1396     1466      +70     
- Misses        326      446     +120     
+ Partials      112      110       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

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

I think this is a good idea.

server/serverimpl_test.go Outdated Show resolved Hide resolved
@tigrannajaryan tigrannajaryan merged commit ca0e1e6 into open-telemetry:main Dec 14, 2023
4 of 6 checks passed
@tigrannajaryan
Copy link
Member

Thank you @haoqixu !

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.

2 participants