Class RaygunClientFactory

  • All Implemented Interfaces:
    IRaygunClientFactory

    public class RaygunClientFactory
    extends Object
    implements IRaygunClientFactory
    An out-of-the-box RaygunClient factory. Developers are encouraged to hold this as a singleton and inject it into their main classes .newClient() should be called at the start of a process/request/thread. The instance could be stored as a static ThreadLocal<RaygunClient> so that it can be used statically throughout the process. Don't forget to remove the instance at the end of your process. RaygunClientFactory factory = new RaygunClientFactory(myApiKey).withBeforeSend(myRaygunOnBeforeSend); ... RaygunClient client = factory.getClient();