@Test public void testWeaselBeaconXhrBeacon_withSampledFlag() throws ServletException, IOException { MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest(); mockHttpServletRequest.setParameter("t", "2d371455215c504"); mockHttpServletRequest.setParameter("s", "2d371455215c504"); mockHttpServletRequest.setParameter("ty", "xhr"); mockHttpServletRequest.setParameter("sp", "0"); mockHttpServletRequest.setParameter(METADATA_BACKEND_SPAN_ID, "1"); servlet.doGet(mockHttpServletRequest, new MockHttpServletResponse()); assertSoftly(softly -> { final List<MockSpan> finishedSpans = mockTracer.finishedSpans(); softly.assertThat(finishedSpans).hasSize(1); MockSpan span = finishedSpans.get(0); softly.assertThat(span.tags()) .containsEntry("id", "2d371455215c504") .containsEntry("trace_id", "2d371455215c504") .containsEntry(Tags.SAMPLING_PRIORITY.getKey(), 0); }); }
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { handleRequest(req, resp); }
ClientSpanServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { handleRequest(req, resp); } }
ClientSpanServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { handleRequest(req, resp); } ClientSpanServlet();   ClientSpanServlet(TracingPlugin tracingPlugin, ServletPlugin servletPlugin); }
ClientSpanServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { handleRequest(req, resp); } ClientSpanServlet();   ClientSpanServlet(TracingPlugin tracingPlugin, ServletPlugin servletPlugin);  }
ClientSpanServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { handleRequest(req, resp); } ClientSpanServlet();   ClientSpanServlet(TracingPlugin tracingPlugin, ServletPlugin servletPlugin);   }