Open sachin-walia opened 5 years ago
Hey Sachin-walia,
It looks like if we want to add support for Undertow, we'd have to implement an additional middleware for that framework. Looking at their APIs, I think that writing an instrumentor for it would be similar to some of our existing instrumentors.
I can see that Undertow provides an API to add handlers, where you can extract information about a particular request/response.
Please refer to this source code to see the similarities. Namely, the HttpServerExchange
object in Undertow's handler class contains HTTP information about the request. This could be added into a segment that's generated during the request processing stage done in Undertow. And in the response phase, the segment could be closed.
Same issue, using Play Framework. If X-Ray supported Opentracing API then this would be straightforward, but https://github.com/opentracing-contrib/java-xray-tracer doesn't support cross process propagation.
Hi @will-sargent-eero - just to be clear, the opentracing-contrib/java-xray-tracer is an unofficial (non-AWS) library designed to plug exactly this hole.
But yes, I'd love to see the official SDK natively support OpenTracing (or better yet, its successor OpenTelemetry removing the need to maintain a separate library at all :)
@ashleymercer the issue is that java-xray-tracer doesn't support cross process propagation.
Last thing we want is to get Servlet API or Spring as a transitive dependencies
This is also an issue, in that the Servlet API is included in AWS X-Ray core and so must be specifically excluded in the build system.
@will-sargent-eero We are actively working on a solution to support OpenTelemetry(starting with Java) so that you will have official support.
Our microservice stack is built atop Undertow without Spring or Servlet API. I am wondering how can we leverage AWS X-ray Java SDK. Last thing we want is to get Servlet API or Spring as a transitive dependencies. Are there any examples available?