Class AnalyticsManagerImpl

    • Constructor Detail

      • AnalyticsManagerImpl

        @Inject
        public AnalyticsManagerImpl​(List<AnalyticsConnectorPlugin> processConnectorPlugins)
        Constructor.
        Parameters:
        processConnectorPlugins - list of connectors to trace processes
    • Method Detail

      • trace

        public void trace​(String category,
                          String name,
                          Consumer<ProcessAnalyticsTracer> consumer)
        Traces a process and collects metrics during its execution. A traced process is stored by categories.
        Specified by:
        trace in interface AnalyticsManager
        Parameters:
        category - the category of the process
        name - the name of the process
        consumer - the function to execute within the tracer
      • traceWithReturn

        public <O> O traceWithReturn​(String category,
                                     String name,
                                     Function<ProcessAnalyticsTracer,​O> function)
        Traces a process that has a return value (and collects metrics during its execution). A traced process is stored by categories.
        Specified by:
        traceWithReturn in interface AnalyticsManager
        Parameters:
        category - the category of the process
        name - the name of the process
        function - the function to execute within the tracer
        Returns:
        the result of the traced function
      • addProcess

        public void addProcess​(AProcess process)
        Adds an already built AProcess (via the builder) for tracking process that are not executed in a single thread environnement. Prefer the use of method trace and traceWithReturn for commons cases (easier)
        Specified by:
        addProcess in interface AnalyticsManager
        Parameters:
        process - the built process
      • sendHealthChecks

        public void sendHealthChecks()
        Daemon to retrieve healthChecks and add them to the connectors
      • sendMetrics

        public void sendMetrics()
        Daemon to retrieve metrics and add them to the connectors