diff --git a/instrumentation/jetty-12/README.md b/instrumentation/jetty-12/README.md index 3996217c48..40a4871214 100644 --- a/instrumentation/jetty-12/README.md +++ b/instrumentation/jetty-12/README.md @@ -4,26 +4,12 @@ With the introduction of [Jetty 12](https://webtide.com/introducing-jetty-12/), As a result **Jetty** can be used as a core server without any involvement with servlets. In addition, it now supports every **Servlet API** spec starting from Jakarta EE 8 above. -One of the challenges that resulted from this is that while in theory transactions can -be started in a core server, there is no straightforward way to manage transactions -in async servlets. Jetty 12 offers implementation for each Jakarta EE spec so transactions can instead be -managed through the servlet implementations. As a result the Jetty 12 instrumentation was split into 5 new modules. +This means this instrumentation module does not have means to manage servlet based tasks such as handling async servlet operations. -## Instrumentation Modules - -### jetty-12 -The current instrumentation module. This module instruments the core Jetty server that handles tasks that does not require the Servlet AP. Such tasks include: +As a result this instrumentation module handles the following tasks: - Reporting threadpool metrics - Reporting the dispatcher name and version as well as the port number for the server. - Adding outbound CAT headers for outgoing requests. CAT however is deprecated during the time this module is made (i.e. December 2023). - Reporting errors - -### jetty-ee*-servlet-12 -This refers to any module named based on the pattern `jetty-ee*-servlet-12`. -These modules instrument the Servlet API implementations for Jetty. -As a result, the instrumentation works with tasks that require us to work with the Servlet API such as: - -- Start and ending web transactions -- Linking transactions to async activity -- Reporting errors \ No newline at end of file +- Starting and ending web transactions \ No newline at end of file diff --git a/instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12/JettyRequest.java b/instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12/JettyRequest.java new file mode 100644 index 0000000000..3cbb61a05e --- /dev/null +++ b/instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12/JettyRequest.java @@ -0,0 +1,91 @@ +package com.nr.agent.instrumentation.jetty12; + +import com.newrelic.api.agent.ExtendedRequest; +import com.newrelic.api.agent.HeaderType; +import org.eclipse.jetty.http.HttpCookie; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.util.Fields; + +import java.security.Principal; +import java.util.Collections; +import java.util.Enumeration; +import java.util.List; + +public class JettyRequest extends ExtendedRequest { + + private final Request request; + + public JettyRequest(Request request) { + this.request = request; + } + + @Override + public String getMethod() { + return request.getMethod(); + } + + @Override + public HeaderType getHeaderType() { + return HeaderType.HTTP; + } + + @Override + public String getHeader(String name) { + return request.getHeaders().get(name); + } + + @Override + public String getRequestURI() { + return request.getHttpURI().getPath(); + } + + @Override + public String getRemoteUser() { + Request.AuthenticationState state = Request.getAuthenticationState(request); + if (state != null) { + Principal principle = state.getUserPrincipal(); + if (principle != null) { + return principle.getName(); + } + } + return null; + } + + @Override + public Enumeration getParameterNames() { + Fields fields = Request.extractQueryParameters(request); + if (fields == null) { + return null; + } + return Collections.enumeration(fields.getNames()); + } + + @Override + public String[] getParameterValues(String name) { + Fields fields = Request.extractQueryParameters(request); + if (fields == null) { + return new String[0]; + } + + List valueList = fields.getValues(name); + + return valueList.toArray(new String[0]); + } + + @Override + public Object getAttribute(String name) { + return request.getAttribute(name); + } + + @Override + public String getCookieValue(String name) { + List cookies = Request.getCookies(request); + + for (HttpCookie cookie: cookies) { + if (cookie.getName() != null && cookie.getName().equals(cookie.getName())) { + return cookie.getValue(); + } + } + return null; + } +} \ No newline at end of file diff --git a/instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12/JettyResponse.java b/instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12/JettyResponse.java new file mode 100644 index 0000000000..2fd757d6d2 --- /dev/null +++ b/instrumentation/jetty-12/src/main/java/com/nr/agent/instrumentation/jetty12/JettyResponse.java @@ -0,0 +1,39 @@ +package com.nr.agent.instrumentation.jetty12; + +import com.newrelic.api.agent.HeaderType; +import org.eclipse.jetty.server.Response; + +public class JettyResponse implements com.newrelic.api.agent.Response { + + private final Response response; + + public JettyResponse(Response response) { + this.response = response; + } + + + @Override + public HeaderType getHeaderType() { + return HeaderType.HTTP; + } + + @Override + public void setHeader(String name, String value) { + response.getHeaders().add(name, value); + } + + @Override + public int getStatus() throws Exception { + return response.getStatus(); + } + + @Override + public String getStatusMessage() throws Exception { + return null; + } + + @Override + public String getContentType() { + return response.getHeaders().get("content-type"); + } +} diff --git a/instrumentation/jetty-12/src/main/java/org/eclipse/jetty/server/Server_Instrumentation.java b/instrumentation/jetty-12/src/main/java/org/eclipse/jetty/server/Server_Instrumentation.java index 68e23271a4..c0f327c4b2 100644 --- a/instrumentation/jetty-12/src/main/java/org/eclipse/jetty/server/Server_Instrumentation.java +++ b/instrumentation/jetty-12/src/main/java/org/eclipse/jetty/server/Server_Instrumentation.java @@ -11,6 +11,8 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; +import com.nr.agent.instrumentation.jetty12.JettyRequest; +import com.nr.agent.instrumentation.jetty12.JettyResponse; import com.nr.agent.instrumentation.jetty12.JettySampler; import org.eclipse.jetty.util.Callback; import org.eclipse.jetty.util.thread.ThreadPool; @@ -25,9 +27,27 @@ protected void doStart() { Weaver.callOriginal(); } - // Required so that earlier jetty versions do not apply. - // Transactions are managed in the jetty-12-ee* modules. - public abstract boolean handle(Request request, Response response, Callback callback); + public boolean handle(Request request, Response response, Callback callback) { + boolean isStarted = AgentBridge.getAgent().getTransaction().isStarted(); + // if there is a #ContextHolder, then this is not embedded Jetty, so the transaction should start there + boolean startTransaction = request != null && !isStarted; + + if (startTransaction) { + AgentBridge.getAgent().getTransaction(true) + .requestInitialized(new JettyRequest(request), new JettyResponse(response)); + } + + boolean result = false; + try { + result = Weaver.callOriginal(); + } finally { + if (startTransaction) { + AgentBridge.getAgent().getTransaction().requestDestroyed(); + } + } + + return result; + } public static String getVersion() { return Weaver.callOriginal(); diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/README.md b/instrumentation/jetty-ee10-servlet-12.0.1/README.md index 2ceb12a221..6e6c34577d 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/README.md +++ b/instrumentation/jetty-ee10-servlet-12.0.1/README.md @@ -1,30 +1,11 @@ -# Jetty 12 EE 10 Servlet Instrumentation +# Jetty 12 Servlet Instrumentation With the introduction of [Jetty 12](https://webtide.com/introducing-jetty-12/), Jetty is now designed with the philosophy of being *Servlet API independent*. As a result **Jetty** can be used as a core server without any involvement with servlets. In addition, it now supports every **Servlet API** spec starting from Jakarta EE 8 above. -One of the challenges that resulted from this is that while in theory transactions can -be started in a core server, there is no straightforward way to manage transactions -in async servlets. Jetty 12 offers implementation for each Jakarta EE spec so transactions can instead be -managed through the servlet implementations. As a result the Jetty 12 instrumentation was split into 5 new modules. +Much of the instrumentation work is handled in the core Jetty module. This module handles servlet specific work such as: -## Instrumentation Modules - -### jetty-12 -This module instruments the core Jetty server that handles tasks that does not require the Servlet API. -The tasks of this module includes but is not limited to: - -- Reporting threadpool metrics -- Reporting the dispatcher name and version as well as the port number for the server. -- Adding outbound CAT headers for outgoing requests. CAT however is deprecated during the time this module is made (i.e. December 2023). -- Reporting errors - -### jetty-ee*-servlet-12 -This refers to our current module and any module named based on the same pattern, `jetty-ee*-servlet-12`. -These modules instrument the Servlet API implementations for Jetty. -As a result, the instrumentation works with tasks that require us to work with the Servlet API such as: - -- Start and ending web transactions -- Linking transactions to async activity +- Marking the transaction as a servlet based call with a `requestDispatcher` segment +- Suspending, resuming, and ending transactions associated with async servlet operations - Reporting errors \ No newline at end of file diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/AsyncListenerFactory.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/AsyncListenerFactory.java similarity index 95% rename from instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/AsyncListenerFactory.java rename to instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/AsyncListenerFactory.java index a48cfbdaea..134be0f206 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/AsyncListenerFactory.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/AsyncListenerFactory.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.agent.bridge.AgentBridge; import jakarta.servlet.AsyncEvent; diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequest.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequest.java similarity index 97% rename from instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequest.java rename to instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequest.java index a9e184ea27..9b5e60535b 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequest.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequest.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.api.agent.ExtendedRequest; import com.newrelic.api.agent.HeaderType; diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequestListener.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequestListener.java similarity index 97% rename from instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequestListener.java rename to instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequestListener.java index c36ab52a43..0e3de1faf6 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequestListener.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequestListener.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.NewRelic; diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyResponse.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyResponse.java similarity index 94% rename from instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyResponse.java rename to instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyResponse.java index 01a94c26e5..ad6bd79444 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyResponse.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyResponse.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee9.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.api.agent.HeaderType; import com.newrelic.api.agent.Response; diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/ServerHelper.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/ServerHelper.java similarity index 94% rename from instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/ServerHelper.java rename to instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/ServerHelper.java index e362ef7d05..5ebe9d74b0 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/ServerHelper.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/ServerHelper.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import jakarta.servlet.ServletRequest; import org.eclipse.jetty.server.Request; diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java index e8bc686e4a..51476c68fe 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java @@ -8,11 +8,10 @@ package org.eclipse.jetty.ee10.servlet; import com.newrelic.api.agent.NewRelic; -import com.newrelic.api.agent.Token; import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee10.servlet.ServerHelper; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.ServerHelper; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Response; import org.eclipse.jetty.util.Callback; diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java index f91e692c67..96d3924826 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee10.servlet.AsyncListenerFactory; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.AsyncListenerFactory; import jakarta.servlet.AsyncContext; import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java index 12f0c75bb9..67bbf6208a 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java +++ b/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java @@ -11,8 +11,8 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee10.servlet.JettyRequestListener; -import com.nr.agent.instrumentation.jetty.ee10.servlet.ServerHelper; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.JettyRequestListener; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.ServerHelper; import jakarta.servlet.http.HttpServletRequest; import org.eclipse.jetty.server.Request; diff --git a/instrumentation/jetty-ee10-servlet-12/README.md b/instrumentation/jetty-ee10-servlet-12/README.md index 2ceb12a221..6e6c34577d 100644 --- a/instrumentation/jetty-ee10-servlet-12/README.md +++ b/instrumentation/jetty-ee10-servlet-12/README.md @@ -1,30 +1,11 @@ -# Jetty 12 EE 10 Servlet Instrumentation +# Jetty 12 Servlet Instrumentation With the introduction of [Jetty 12](https://webtide.com/introducing-jetty-12/), Jetty is now designed with the philosophy of being *Servlet API independent*. As a result **Jetty** can be used as a core server without any involvement with servlets. In addition, it now supports every **Servlet API** spec starting from Jakarta EE 8 above. -One of the challenges that resulted from this is that while in theory transactions can -be started in a core server, there is no straightforward way to manage transactions -in async servlets. Jetty 12 offers implementation for each Jakarta EE spec so transactions can instead be -managed through the servlet implementations. As a result the Jetty 12 instrumentation was split into 5 new modules. +Much of the instrumentation work is handled in the core Jetty module. This module handles servlet specific work such as: -## Instrumentation Modules - -### jetty-12 -This module instruments the core Jetty server that handles tasks that does not require the Servlet API. -The tasks of this module includes but is not limited to: - -- Reporting threadpool metrics -- Reporting the dispatcher name and version as well as the port number for the server. -- Adding outbound CAT headers for outgoing requests. CAT however is deprecated during the time this module is made (i.e. December 2023). -- Reporting errors - -### jetty-ee*-servlet-12 -This refers to our current module and any module named based on the same pattern, `jetty-ee*-servlet-12`. -These modules instrument the Servlet API implementations for Jetty. -As a result, the instrumentation works with tasks that require us to work with the Servlet API such as: - -- Start and ending web transactions -- Linking transactions to async activity +- Marking the transaction as a servlet based call with a `requestDispatcher` segment +- Suspending, resuming, and ending transactions associated with async servlet operations - Reporting errors \ No newline at end of file diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/AsyncListenerFactory.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/AsyncListenerFactory.java similarity index 95% rename from instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/AsyncListenerFactory.java rename to instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/AsyncListenerFactory.java index e70324c754..134be0f206 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/AsyncListenerFactory.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/AsyncListenerFactory.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee9.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.agent.bridge.AgentBridge; import jakarta.servlet.AsyncEvent; diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyRequest.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequest.java similarity index 97% rename from instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyRequest.java rename to instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequest.java index 5e012a08b8..9b5e60535b 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyRequest.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequest.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee9.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.api.agent.ExtendedRequest; import com.newrelic.api.agent.HeaderType; diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequestListener.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequestListener.java similarity index 97% rename from instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequestListener.java rename to instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequestListener.java index c36ab52a43..0e3de1faf6 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequestListener.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyRequestListener.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.NewRelic; diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyResponse.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyResponse.java similarity index 94% rename from instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyResponse.java rename to instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyResponse.java index 1e9853e736..ad6bd79444 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyResponse.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/JettyResponse.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import com.newrelic.api.agent.HeaderType; import com.newrelic.api.agent.Response; diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/ServerHelper.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/ServerHelper.java similarity index 94% rename from instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/ServerHelper.java rename to instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/ServerHelper.java index 3ce0ad6361..3178f26e90 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/ServerHelper.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee10/servlet/ServerHelper.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee10.servlet; import jakarta.servlet.ServletRequest; import org.eclipse.jetty.server.Request; diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java index e76f6381f5..6ac50cb88f 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ErrorHandler_Instrumentation.java @@ -12,7 +12,7 @@ import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee10.servlet.ServerHelper; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.ServerHelper; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Response; import org.eclipse.jetty.util.Callback; diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java index f91e692c67..96d3924826 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletApiRequest_Instrumentation.java @@ -11,7 +11,7 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee10.servlet.AsyncListenerFactory; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.AsyncListenerFactory; import jakarta.servlet.AsyncContext; import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java b/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java index 12f0c75bb9..67bbf6208a 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java +++ b/instrumentation/jetty-ee10-servlet-12/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler_Instrumentation.java @@ -11,8 +11,8 @@ import com.newrelic.api.agent.weaver.MatchType; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee10.servlet.JettyRequestListener; -import com.nr.agent.instrumentation.jetty.ee10.servlet.ServerHelper; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.JettyRequestListener; +import com.nr.agent.instrumentation.jetty12.ee10.servlet.ServerHelper; import jakarta.servlet.http.HttpServletRequest; import org.eclipse.jetty.server.Request; diff --git a/instrumentation/jetty-ee8-servlet-12/README.md b/instrumentation/jetty-ee8-servlet-12/README.md index 65b256d265..5e25835e7e 100644 --- a/instrumentation/jetty-ee8-servlet-12/README.md +++ b/instrumentation/jetty-ee8-servlet-12/README.md @@ -1,30 +1,11 @@ -# Jetty 12 EE 8 Servlet Instrumentation +# Jetty 12 Servlet Instrumentation With the introduction of [Jetty 12](https://webtide.com/introducing-jetty-12/), Jetty is now designed with the philosophy of being *Servlet API independent*. As a result **Jetty** can be used as a core server without any involvement with servlets. In addition, it now supports every **Servlet API** spec starting from Jakarta EE 8 above. -One of the challenges that resulted from this is that while in theory transactions can -be started in a core server, there is no straightforward way to manage transactions -in async servlets. Jetty 12 offers implementation for each Jakarta EE spec so transactions can instead be -managed through the servlet implementations. As a result the Jetty 12 instrumentation was split into 5 new modules. +Much of the instrumentation work is handled in the core Jetty module. This module handles servlet specific work such as: -## Instrumentation Modules - -### jetty-12 -This module instruments the core Jetty server that handles tasks that does not require the Servlet API. -The tasks of this module includes but is not limited to: - -- Reporting threadpool metrics -- Reporting the dispatcher name and version as well as the port number for the server. -- Adding outbound CAT headers for outgoing requests. CAT however is deprecated during the time this module is made (i.e. December 2023) -- Reporting errors - -### jetty-ee*-servlet-12 -This refers to our current module and any module named based on the same pattern, `jetty-ee*-servlet-12`. -These modules instrument the Servlet API implementations for Jetty. -As a result, the instrumentation works with tasks that require us to work with the Servlet API such as: - -- Start and ending web transactions -- Linking transactions to async activity +- Marking the transaction as a servlet based call with a `requestDispatcher` segment +- Suspending, resuming, and ending transactions associated with async servlet operations - Reporting errors \ No newline at end of file diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/AsyncListenerFactory.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/AsyncListenerFactory.java similarity index 95% rename from instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/AsyncListenerFactory.java rename to instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/AsyncListenerFactory.java index c4d6388290..fe42b11118 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/AsyncListenerFactory.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/AsyncListenerFactory.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee8.servlet; +package com.nr.agent.instrumentation.jetty12.ee8.servlet; import com.newrelic.agent.bridge.AgentBridge; diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyRequest.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyRequest.java similarity index 97% rename from instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyRequest.java rename to instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyRequest.java index c2e2993747..8daeede596 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyRequest.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyRequest.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee8.servlet; +package com.nr.agent.instrumentation.jetty12.ee8.servlet; import com.newrelic.api.agent.ExtendedRequest; import com.newrelic.api.agent.HeaderType; diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyRequestListener.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyRequestListener.java similarity index 97% rename from instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyRequestListener.java rename to instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyRequestListener.java index be6cf408c8..c5b8ff6a76 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyRequestListener.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyRequestListener.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee8.servlet; +package com.nr.agent.instrumentation.jetty12.ee8.servlet; import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.NewRelic; diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyResponse.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyResponse.java similarity index 94% rename from instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyResponse.java rename to instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyResponse.java index 3758f67838..c4603f5125 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/JettyResponse.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/JettyResponse.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee8.servlet; +package com.nr.agent.instrumentation.jetty12.ee8.servlet; import com.newrelic.api.agent.HeaderType; import com.newrelic.api.agent.Response; diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/ServerHelper.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/ServerHelper.java similarity index 94% rename from instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/ServerHelper.java rename to instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/ServerHelper.java index a94aff4b90..c3d6d63ee8 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee8/servlet/ServerHelper.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee8/servlet/ServerHelper.java @@ -1,4 +1,4 @@ -package com.nr.agent.instrumentation.jetty.ee8.servlet; +package com.nr.agent.instrumentation.jetty12.ee8.servlet; import org.eclipse.jetty.ee8.nested.Request; diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/ErrorHandler_Instrumentation.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/ErrorHandler_Instrumentation.java index 82715cf7af..8dabaaac61 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/ErrorHandler_Instrumentation.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/ErrorHandler_Instrumentation.java @@ -9,10 +9,9 @@ import com.newrelic.api.agent.NewRelic; import com.newrelic.api.agent.weaver.MatchType; -import com.newrelic.api.agent.weaver.NewField; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee8.servlet.ServerHelper; +import com.nr.agent.instrumentation.jetty12.ee8.servlet.ServerHelper; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/Request_Instrumentation.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/Request_Instrumentation.java index 9ad863b30e..65f8f23352 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/Request_Instrumentation.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/nested/Request_Instrumentation.java @@ -10,7 +10,7 @@ import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee8.servlet.AsyncListenerFactory; +import com.nr.agent.instrumentation.jetty12.ee8.servlet.AsyncListenerFactory; import javax.servlet.AsyncContext; import javax.servlet.ServletRequest; diff --git a/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/servlet/ServletContextHandler_Instrumentation.java b/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/servlet/ServletContextHandler_Instrumentation.java index f8deee4398..81dd2b6874 100644 --- a/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/servlet/ServletContextHandler_Instrumentation.java +++ b/instrumentation/jetty-ee8-servlet-12/src/main/java/org/eclipse/jetty/ee8/servlet/ServletContextHandler_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee8.servlet.JettyRequestListener; +import com.nr.agent.instrumentation.jetty12.ee8.servlet.JettyRequestListener; import java.util.EventListener; diff --git a/instrumentation/jetty-ee9-servlet-12/README.md b/instrumentation/jetty-ee9-servlet-12/README.md index bc51c1e2a4..6e6c34577d 100644 --- a/instrumentation/jetty-ee9-servlet-12/README.md +++ b/instrumentation/jetty-ee9-servlet-12/README.md @@ -1,30 +1,11 @@ -# Jetty 12 EE 9 Servlet Instrumentation +# Jetty 12 Servlet Instrumentation With the introduction of [Jetty 12](https://webtide.com/introducing-jetty-12/), Jetty is now designed with the philosophy of being *Servlet API independent*. As a result **Jetty** can be used as a core server without any involvement with servlets. In addition, it now supports every **Servlet API** spec starting from Jakarta EE 8 above. -One of the challenges that resulted from this is that while in theory transactions can -be started in a core server, there is no straightforward way to manage transactions -in async servlets. Jetty 12 offers implementation for each Jakarta EE spec so transactions can instead be -managed through the servlet implementations. As a result the Jetty 12 instrumentation was split into 5 new modules. +Much of the instrumentation work is handled in the core Jetty module. This module handles servlet specific work such as: -## Instrumentation Modules - -### jetty-12 -This module instruments the core Jetty server that handles tasks that does not require the Servlet API. -The tasks of this module includes but is not limited to: - -- Reporting threadpool metrics -- Reporting the dispatcher name and version as well as the port number for the server. -- Adding outbound CAT headers for outgoing requests. CAT however is deprecated during the time this module is made (i.e. December 2023). -- Reporting errors - -### jetty-ee*-servlet-12 -This refers to our current module and any module named based on the same pattern, `jetty-ee*-servlet-12`. -These modules instrument the Servlet API implementations for Jetty. -As a result, the instrumentation works with tasks that require us to work with the Servlet API such as: - -- Start and ending web transactions -- Linking transactions to async activity +- Marking the transaction as a servlet based call with a `requestDispatcher` segment +- Suspending, resuming, and ending transactions associated with async servlet operations - Reporting errors \ No newline at end of file diff --git a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/AsyncListenerFactory.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/AsyncListenerFactory.java similarity index 95% rename from instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/AsyncListenerFactory.java rename to instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/AsyncListenerFactory.java index a48cfbdaea..f5a1014b7f 100644 --- a/instrumentation/jetty-ee10-servlet-12.0.1/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/AsyncListenerFactory.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/AsyncListenerFactory.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee9.servlet; import com.newrelic.agent.bridge.AgentBridge; import jakarta.servlet.AsyncEvent; diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequest.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyRequest.java similarity index 97% rename from instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequest.java rename to instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyRequest.java index a9e184ea27..8a6415bc47 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyRequest.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyRequest.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee9.servlet; import com.newrelic.api.agent.ExtendedRequest; import com.newrelic.api.agent.HeaderType; diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyRequestListener.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyRequestListener.java similarity index 97% rename from instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyRequestListener.java rename to instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyRequestListener.java index 1f237b57ed..881ef1fef6 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/JettyRequestListener.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyRequestListener.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee9.servlet; +package com.nr.agent.instrumentation.jetty12.ee9.servlet; import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.NewRelic; diff --git a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyResponse.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyResponse.java similarity index 94% rename from instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyResponse.java rename to instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyResponse.java index 1e9853e736..76e810af99 100644 --- a/instrumentation/jetty-ee10-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee10/servlet/JettyResponse.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/JettyResponse.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee10.servlet; +package com.nr.agent.instrumentation.jetty12.ee9.servlet; import com.newrelic.api.agent.HeaderType; import com.newrelic.api.agent.Response; diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/ServerHelper.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/ServerHelper.java similarity index 94% rename from instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/ServerHelper.java rename to instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/ServerHelper.java index 8358ebc091..eff330553b 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty/ee9/servlet/ServerHelper.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/com/nr/agent/instrumentation/jetty12/ee9/servlet/ServerHelper.java @@ -5,7 +5,7 @@ * */ -package com.nr.agent.instrumentation.jetty.ee9.servlet; +package com.nr.agent.instrumentation.jetty12.ee9.servlet; import jakarta.servlet.ServletRequest; import org.eclipse.jetty.ee9.nested.Request; diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/ErrorHandler_Instrumentation.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/ErrorHandler_Instrumentation.java index 6cc63f646f..52f53417b8 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/ErrorHandler_Instrumentation.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/ErrorHandler_Instrumentation.java @@ -13,7 +13,7 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee9.servlet.ServerHelper; +import com.nr.agent.instrumentation.jetty12.ee9.servlet.ServerHelper; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/Request_Instrumentation.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/Request_Instrumentation.java index 568ed7fe68..b72b425b5a 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/Request_Instrumentation.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/nested/Request_Instrumentation.java @@ -10,7 +10,7 @@ import com.newrelic.agent.bridge.AgentBridge; import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee9.servlet.AsyncListenerFactory; +import com.nr.agent.instrumentation.jetty12.ee9.servlet.AsyncListenerFactory; import jakarta.servlet.AsyncContext; import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; diff --git a/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/servlet/ServletContextHandler_Instrumentation.java b/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/servlet/ServletContextHandler_Instrumentation.java index 5f99bacf52..94b6f17ead 100644 --- a/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/servlet/ServletContextHandler_Instrumentation.java +++ b/instrumentation/jetty-ee9-servlet-12/src/main/java/org/eclipse/jetty/ee9/servlet/ServletContextHandler_Instrumentation.java @@ -9,7 +9,7 @@ import com.newrelic.api.agent.weaver.Weave; import com.newrelic.api.agent.weaver.Weaver; -import com.nr.agent.instrumentation.jetty.ee9.servlet.JettyRequestListener; +import com.nr.agent.instrumentation.jetty12.ee9.servlet.JettyRequestListener; import java.util.EventListener;