Skip to content

Conversation

@steverao
Copy link
Contributor

No description provided.

@steverao steverao marked this pull request as ready for review November 1, 2025 12:03
@steverao steverao requested a review from a team as a code owner November 1, 2025 12:03
@laurit
Copy link
Contributor

laurit commented Nov 3, 2025

I believe that some code could be shared between 1.8 and 1.9 instrumentations.

@steverao
Copy link
Contributor Author

steverao commented Nov 4, 2025

I believe that some code could be shared between 1.8 and 1.9 instrumentations.

Yes, but the code isn't extensive. There are a few differences in AsyncHttpClientHttpAttributesGetter and HttpHeaderSetter between them. It seems that we can simply extract AsyncHandlerData and ResponseInstrumentation.
BTW, if we create a new module named async-http-client-common to contain common codes, but it isn't used by async-http-client-2.0, is it acceptable?

@laurit
Copy link
Contributor

laurit commented Nov 4, 2025

BTW, if we create a new module named async-http-client-common to contain common codes, but it isn't used by async-http-client-2.0, is it acceptable?

you could name the common module async-http-client-1-common

There are a few differences in AsyncHttpClientHttpAttributesGetter and HttpHeaderSetter between them.

You could pass a helper class to these that abstracts away the part that is different between async http client versions.

@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

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