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

{profiler,ddtrace/tracer}: add UDS client options #788

Merged
merged 6 commits into from
Dec 16, 2020
Merged

Conversation

pmbauer
Copy link
Member

@pmbauer pmbauer commented Dec 14, 2020

Background

Some customers need to override networking over which the profiler sends data.

Description

  • Allow overriding the HTTP client and transport similar to facilities provided by the trace client
  • As a convenience, provide an option to create a custom client and transport that accesses a Unix Domain Socket.
  • Modified upload tests to exercise both default and custom HTTP clients.

Allow the overriding the HTTP client and transport.
As a convenience, provide an option to create a custom client and
transport that accesses a Unix Domain Socket.

Modified upload tests to exercise both default and custom HTTP clients.
profiler/options.go Outdated Show resolved Hide resolved
@pmbauer pmbauer requested a review from gbbr December 14, 2020 19:17
@gbbr gbbr changed the title [profiler] add UDS and HTTP client options profiler: add UDS and HTTP client options Dec 14, 2020
@gbbr gbbr added this to the 1.29.0 milestone Dec 14, 2020
@pmbauer pmbauer changed the title profiler: add UDS and HTTP client options profiler|tracer: add UDS client options Dec 14, 2020
Copy link
Contributor

@gbbr gbbr left a comment

Choose a reason for hiding this comment

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

This looks good to me, left a few nits.

ddtrace/tracer/option.go Outdated Show resolved Hide resolved
profiler/options.go Outdated Show resolved Hide resolved
@gbbr gbbr changed the title profiler|tracer: add UDS client options {profiler,ddtrace/tracer}: add UDS client options Dec 15, 2020
Copy link
Contributor

@gbbr gbbr left a comment

Choose a reason for hiding this comment

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

This LGTM, but I'd love it if we could clean up / sort out the tests a bit to make them easier to figure out.

None of the functions are clear on what they do and the multiple return values (e.g. io.Closer, string, testServerWaiter) are not clarified. Perhaps named return variables will help here.

profiler/upload_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gbbr gbbr left a comment

Choose a reason for hiding this comment

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

It's all good but I find the test complexity and abstraction a bit overkill. We need to severely simplify this.

profiler/upload_test.go Outdated Show resolved Hide resolved
profiler/upload_test.go Outdated Show resolved Hide resolved
profiler/upload_test.go Outdated Show resolved Hide resolved
gbbr
gbbr previously approved these changes Dec 16, 2020
This was referenced Mar 15, 2021
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