/** * Constructs a TracedHttpClient instance using the provided client and global recorder. * * @param wrappedClient * the HTTP client to wrap */ public TracedHttpClient(final CloseableHttpClient wrappedClient) { this(wrappedClient, AWSXRay.getGlobalRecorder()); }
Subsegment subsegment = null; if (process) { subsegment = AWSXRay.beginSubsegment(hostname); AWSXRay.endSubsegment();
@Around("queryExecution()") public Object traceSQL(ProceedingJoinPoint pjp) throws Throwable { try { Subsegment subsegment = AWSXRay.beginSubsegment(pjp.getSignature().getName()); XRayInterceptorUtils.generateMetadata(pjp, subsegment); return XRayInterceptorUtils.conditionalProceed(pjp); } catch (Exception e) { logger.error(e.getMessage()); AWSXRay.getCurrentSegment().addException(e); throw e; } finally { logger.trace("Ending Subsegment"); AWSXRay.endSubsegment(); } }
@Override public T handleResponse(HttpResponse response) throws ClientProtocolException, IOException { T handled = wrappedHandler.handleResponse(response); Subsegment currentSubsegment = AWSXRay.getCurrentSubsegment(); if (null != currentSubsegment) { TracedResponseHandler.addResponseInformation(currentSubsegment, response); } return handled; }
private static Segment getCurrentSegment() { Optional<Segment> segment = getCurrentSegmentOptional(); if (segment.isPresent()) { return segment.get(); } ContextMissingStrategy contextMissingStrategy = getContextMissingStrategy(); contextMissingStrategy.contextMissing("No segment in progress.", SegmentNotFoundException.class); return null; }
Subsegment subsegment = null; if (process) { subsegment = AWSXRay.beginSubsegment(hostname); AWSXRay.endSubsegment();
protected Object processXRayTrace(ProceedingJoinPoint pjp) throws Throwable { try { Subsegment subsegment = AWSXRay.beginSubsegment(pjp.getSignature().getName()); if(subsegment != null) { subsegment.setMetadata(generateMetadata(pjp, subsegment)); } return XRayInterceptorUtils.conditionalProceed(pjp); } catch (Exception e) { AWSXRay.getCurrentSegment().addException(e); throw e; } finally { logger.trace("Ending Subsegment"); AWSXRay.endSubsegment(); } }
@Override public T handleResponse(HttpResponse response) throws ClientProtocolException, IOException { T handled = wrappedHandler.handleResponse(response); Subsegment currentSubsegment = AWSXRay.getCurrentSubsegment(); if (null != currentSubsegment) { TracedResponseHandler.addResponseInformation(currentSubsegment, response); } return handled; }
private AWSXRayRecorder getRecorder() { if (recorder == null) { recorder = AWSXRay.getGlobalRecorder(); } return recorder; }
Subsegment subsegment = null; if (process) { subsegment = AWSXRay.beginSubsegment(hostname); AWSXRay.endSubsegment();
private AWSXRayRecorder getRecorder() { if (recorder == null) { recorder = AWSXRay.getGlobalRecorder(); } return recorder; } }
private void lazyLoadRecorder() { if (recorder != null) { return; } recorder = AWSXRay.getGlobalRecorder(); }
private AWSXRayRecorder getRecorder() { if (recorder == null) { recorder = AWSXRay.getGlobalRecorder(); } return recorder; }
private AWSXRayRecorder getRecorder() { if (recorder == null) { recorder = AWSXRay.getGlobalRecorder(); } return recorder; }
/** * Constructs a TracedHttpClient instance using the provided client and global recorder. * * @param wrappedClient * the HTTP client to wrap */ public TracedHttpClient(final CloseableHttpClient wrappedClient) { this(wrappedClient, AWSXRay.getGlobalRecorder()); }
private AWSXRayRecorder getRecorder() { if (recorder == null) { recorder = AWSXRay.getGlobalRecorder(); } return recorder; } }
private AWSXRayRecorder getRecorder() { if (recorder == null) { recorder = AWSXRay.getGlobalRecorder(); } return recorder; }
public TracingHandler(URL operationParameterWhitelist) { this(AWSXRay.getGlobalRecorder(), null, operationParameterWhitelist); }
private AWSXRayRecorder getRecorder() { return AWSXRay.getGlobalRecorder(); }
public TracingHandler() { this(AWSXRay.getGlobalRecorder(), null, null); }