hypertrace/javaagent

Remove wrapping from servlet instrumentation

Closed this issue · 0 comments

Wrapping request/response types in servlet can cause issues with casting to specific types.
We haven't seen any issue in this repo, which can be a result of not wide exposure and lack of tests on different servlet containers.

OTEL had a wrapping in place for a short period of time and it resulted in issues open-telemetry/opentelemetry-java-instrumentation#1096. Therefore we should consider removing wrapping and directly instrument streams associated with the request like we do in other instrumentations.

Part of this task should be performance testing if the stream instrumentation does not add latency/CPU cycles.