@Test public void shouldAddBreadCrumbFromMessage() { raygunClient.recordBreadcrumb("hello there"); RaygunMessage raygunMessage = fromJson(); RaygunBreadcrumbMessage breadcrumb = raygunMessage.getDetails().getBreadcrumbs().get(0); assertThat(breadcrumb.getLevel(), is(RaygunBreadcrumbLevel.INFO)); assertThat(breadcrumb.getMessage(), is("hello there")); assertNotNull(breadcrumb.getTimestamp()); }
public RaygunBreadcrumbMessage recordBreadcrumb(String message) { RaygunBreadcrumbMessage breadcrumbMessage = new RaygunBreadcrumbMessage().withMessage(message); breadcrumbs.add(processBreadCrumbCodeLocation(shouldProcessBreadcrumbLocation, breadcrumbMessage, 3)); return breadcrumbMessage; }
RaygunClient { public RaygunBreadcrumbMessage recordBreadcrumb(String message) { RaygunBreadcrumbMessage breadcrumbMessage = new RaygunBreadcrumbMessage().withMessage(message); breadcrumbs.add(processBreadCrumbCodeLocation(shouldProcessBreadcrumbLocation, breadcrumbMessage, 3)); return breadcrumbMessage; } }
RaygunClient { public RaygunBreadcrumbMessage recordBreadcrumb(String message) { RaygunBreadcrumbMessage breadcrumbMessage = new RaygunBreadcrumbMessage().withMessage(message); breadcrumbs.add(processBreadCrumbCodeLocation(shouldProcessBreadcrumbLocation, breadcrumbMessage, 3)); return breadcrumbMessage; } RaygunClient(String apiKey); }
RaygunClient { public RaygunBreadcrumbMessage recordBreadcrumb(String message) { RaygunBreadcrumbMessage breadcrumbMessage = new RaygunBreadcrumbMessage().withMessage(message); breadcrumbs.add(processBreadCrumbCodeLocation(shouldProcessBreadcrumbLocation, breadcrumbMessage, 3)); return breadcrumbMessage; } RaygunClient(String apiKey); void setRaygunConnection(RaygunConnection raygunConnection); void setUser(RaygunIdentifier userIdentity); void setVersion(String version); void setVersionFrom(Class getVersionFrom); int send(Throwable throwable); int send(Throwable throwable, Set<String> tags); int send(Throwable throwable, Map data); int send(Throwable throwable, Set<String> tags, Map data); int sendUnhandled(Throwable throwable); int sendUnhandled(Throwable throwable, Map data); int sendUnhandled(Throwable throwable, Set<String> tags); int sendUnhandled(Throwable throwable, Set<String> tags, Map data); RaygunMessage buildMessage(Throwable throwable, Set<String> errorTags, Map errorData); int send(RaygunMessage raygunMessage); int send(String payload); String toJson(Object o); void setOnBeforeSend(IRaygunOnBeforeSend onBeforeSend); void setOnAfterSend(IRaygunOnAfterSend onAfterSend); void setOnFailedSend(IRaygunOnFailedSend onFailedSend); IRaygunOnBeforeSend getOnBeforeSend(); IRaygunOnAfterSend getOnAfterSend(); boolean shouldProcessBreadcrumbLocation(); void shouldProcessBreadcrumbLocation(boolean shouldProcessBreadcrumbLocation); RaygunBreadcrumbMessage recordBreadcrumb(String message); RaygunBreadcrumbMessage recordBreadcrumb(RaygunBreadcrumbMessage breadcrumb); RaygunClient withTag(String tag); Set<String> getTags(); void setTags(Set<String> tags); Map<?, ?> getData(); void setData(Map<?, ?> data); RaygunClient withData(Object key, Object value); void ClearBreadcrumbs(); static RaygunBreadcrumbMessage processBreadCrumbCodeLocation(boolean process, RaygunBreadcrumbMessage breadcrumbMessage, int stackFrame); }
RaygunClient { public RaygunBreadcrumbMessage recordBreadcrumb(String message) { RaygunBreadcrumbMessage breadcrumbMessage = new RaygunBreadcrumbMessage().withMessage(message); breadcrumbs.add(processBreadCrumbCodeLocation(shouldProcessBreadcrumbLocation, breadcrumbMessage, 3)); return breadcrumbMessage; } RaygunClient(String apiKey); void setRaygunConnection(RaygunConnection raygunConnection); void setUser(RaygunIdentifier userIdentity); void setVersion(String version); void setVersionFrom(Class getVersionFrom); int send(Throwable throwable); int send(Throwable throwable, Set<String> tags); int send(Throwable throwable, Map data); int send(Throwable throwable, Set<String> tags, Map data); int sendUnhandled(Throwable throwable); int sendUnhandled(Throwable throwable, Map data); int sendUnhandled(Throwable throwable, Set<String> tags); int sendUnhandled(Throwable throwable, Set<String> tags, Map data); RaygunMessage buildMessage(Throwable throwable, Set<String> errorTags, Map errorData); int send(RaygunMessage raygunMessage); int send(String payload); String toJson(Object o); void setOnBeforeSend(IRaygunOnBeforeSend onBeforeSend); void setOnAfterSend(IRaygunOnAfterSend onAfterSend); void setOnFailedSend(IRaygunOnFailedSend onFailedSend); IRaygunOnBeforeSend getOnBeforeSend(); IRaygunOnAfterSend getOnAfterSend(); boolean shouldProcessBreadcrumbLocation(); void shouldProcessBreadcrumbLocation(boolean shouldProcessBreadcrumbLocation); RaygunBreadcrumbMessage recordBreadcrumb(String message); RaygunBreadcrumbMessage recordBreadcrumb(RaygunBreadcrumbMessage breadcrumb); RaygunClient withTag(String tag); Set<String> getTags(); void setTags(Set<String> tags); Map<?, ?> getData(); void setData(Map<?, ?> data); RaygunClient withData(Object key, Object value); void ClearBreadcrumbs(); static RaygunBreadcrumbMessage processBreadCrumbCodeLocation(boolean process, RaygunBreadcrumbMessage breadcrumbMessage, int stackFrame);  }