This is another follow-up from #7616. This makes the test options class
immutable and uses `@AutoValue` and `@AutoValue.Builder`. As a result, a
bunch of the configuration/setup code for these said options now flings
around a builder instance. This isn't great, but I think it's an
incremental improvement that can be seen in the `@BeforeAll
AbstractHttpClientTest.setupOptions()` method, where the immutable
options are (finally) instantiated.
As part of discussions #7616, the idea of trying to do a more piecemeal
approach came up. A reasonable ask.
This is the first step in refactoring the http client tests. It factors
out the `HttpClientResult` inner class of the `AbstractHttpClientTest`
so that this can be reused by new test framework later. It also factors
the relevant abstract methods in the abstract class to a new type
adapter, which will also be reused.
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
* New net conventions: option a
* Feedback + sock.family + sock.peer.name
* peer.service + tests
* server net attributes attempt 1
* server net attributes attempt 2
* Javadoc
* Revisions
* Apply to instrumentations
* Feedback
* One more default method
* Spotless
* Fix javadoc
* Merge javaagent-instrumentation-api into javaagent-extension-api
* remove some leftover references to javaagent-instrumentation-api
* add missing instrumentation-api to distro example
* Copies code for httpasyncclient-4.1 and creates instrumentation for 5.0
* Makes import changes for http client 5
* Decorate request channel and changes type in tests
* Corrects test cases
* Corrects most of the test cases
* Forces http1 protocol to pass the test cases
* Merge supported libraries for async client
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
* Remove http.sceme and http.target attr from test
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
* Removes not needed null check for status code
* Replaces slf4j loggers with JUL
* Inlined flavor extraction in attributes getter
* Uses parameter placeholders for logging
* Uses success endpoint to test flavor
* Merges httpasyncclient and httpclient modules
* Merges http client 5 modules
* Update java-8 compatible changes
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
* Change instrumentation name
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
* Adds missing import statement
* Rename packages
* Java 8
* Reverts adding 5.0+ support from supporting libraries
* Deleted hanging module
* Uses seconds instead of ms in http test
* Merges both classic and async client implementations
* Moves http client all test cases to java tests
* Uses abstract apache test class and moves boilerplate
* Uses connection and read timeouts from ApacheHttpClientTest
* Refactors remaining classes, shifts logic to HttpUtils
* Renames HttpUtils to ApacheHttpClientUtils
* Corrects failing code style error
* Corrects build errors
* Renames package to have http client version
* Corrects package name
* Uses instrumenter as static import
* Inline utility methods
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>