Skip to content

Authority from request when HttpHost is null#9990

Merged
laurit merged 2 commits into
open-telemetry:mainfrom
nilsga:httpclient5-authority-fix
Dec 3, 2023
Merged

Authority from request when HttpHost is null#9990
laurit merged 2 commits into
open-telemetry:mainfrom
nilsga:httpclient5-authority-fix

Conversation

@nilsga

@nilsga nilsga commented Dec 1, 2023

Copy link
Copy Markdown
Contributor

Fixes #9987

@nilsga
nilsga requested a review from a team December 1, 2023 17:17
@linux-foundation-easycla

linux-foundation-easycla Bot commented Dec 1, 2023

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

Comment on lines +94 to +113
@Nested
class ApacheClientNullHttpHostRequestTest extends AbstractTest {
@Override
ClassicHttpRequest createRequest(String method, URI uri) {
// also testing with an absolute path below
return new BasicClassicHttpRequest(method, HttpHost.create(uri), fullPathFromUri(uri));
}

@Override
ClassicHttpResponse doExecuteRequest(ClassicHttpRequest request, URI uri) throws Exception {
return getClient(uri).execute(null, request);
}

@Override
void executeRequestWithCallback(ClassicHttpRequest request, URI uri, HttpClientResult result)
throws Exception {
getClient(uri).execute(null, request, new ResponseHandler(result));
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for figuring out how to add a test case for it!

@laurit
laurit merged commit bbfe950 into open-telemetry:main Dec 3, 2023
zeitlinger pushed a commit to zeitlinger/opentelemetry-java-instrumentation that referenced this pull request Dec 12, 2023
laurit pushed a commit to laurit/opentelemetry-java-instrumentation that referenced this pull request Jan 10, 2024
trask pushed a commit that referenced this pull request Jan 10, 2024
Co-authored-by: Nils-Helge Garli Hegvik <[email protected]>
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.

Auto instrumentation of RestTemplate/RestClient/WebClient does not work with Spring Boot 3.2.0

3 participants