Skip to content

Commit ffd2d6b

Browse files
committed
remove inst
1 parent 4932990 commit ffd2d6b

File tree

3 files changed

+1
-128
lines changed

3 files changed

+1
-128
lines changed

instrumentation/spring/spring-webmvc/spring-webmvc-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/webmvc/v6_0/DeferredResultInstrumentation.java

Lines changed: 0 additions & 99 deletions
This file was deleted.

instrumentation/spring/spring-webmvc/spring-webmvc-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/webmvc/v6_0/HandlerAdapterInstrumentation.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -74,31 +74,6 @@ public static AdviceScope enter(HttpServletRequest request, Object handler) {
7474

7575
Context parentContext = Context.current();
7676

77-
// During async redispatches (e.g., after DeferredResult completes), we want to use
78-
// the context stored in the request attribute (which includes async work spans)
79-
// instead of the current context. We detect async redispatches using the servlet
80-
// DispatcherType.
81-
if (request.getDispatcherType() == jakarta.servlet.DispatcherType.ASYNC) {
82-
Object storedContext =
83-
request.getAttribute(
84-
"io.opentelemetry.javaagent.instrumentation.servlet.ServletHelper.Context");
85-
if (storedContext instanceof Context context) {
86-
parentContext = context;
87-
// The stored context was created in a different thread/phase, so we need to
88-
// re-initialize the ServletContextPath for this request to ensure the span
89-
// name includes the correct context path.
90-
// parentContext =
91-
// io.opentelemetry.javaagent.bootstrap.servlet.ServletContextPath.init(
92-
// parentContext,
93-
// req -> {
94-
// String contextPath = req.getContextPath();
95-
// return (contextPath == null || contextPath.isEmpty()) ? null :
96-
// contextPath;
97-
// },
98-
// request);
99-
}
100-
}
101-
10277
// don't start a new top-level span
10378
if (!Span.fromContext(parentContext).getSpanContext().isValid()) {
10479
return null;

instrumentation/spring/spring-webmvc/spring-webmvc-6.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/webmvc/v6_0/SpringWebMvcInstrumentationModule.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ public String getModuleGroup() {
5151

5252
@Override
5353
public List<TypeInstrumentation> typeInstrumentations() {
54-
return asList(
55-
new DispatcherServletInstrumentation(),
56-
new HandlerAdapterInstrumentation(),
57-
new DeferredResultInstrumentation());
54+
return asList(new DispatcherServletInstrumentation(), new HandlerAdapterInstrumentation());
5855
}
5956

6057
@Override

0 commit comments

Comments
 (0)