Interface AnalyticsManager

    • Method Detail

      • trace

        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.
        Parameters:
        category - the category of the process
        name - the name of the process
        consumer - the function to execute within the tracer
      • traceWithReturn

        <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.
        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
      • getHealthChecks

        List<HealthCheck> getHealthChecks()
        Returns:
        the list of health checks
      • aggregate

        HealthStatus aggregate​(List<HealthCheck> healthChecks)
        Generates an aggregated status from a list of health checks.
        Parameters:
        healthChecks - the list of halth checks.
        Returns:
        the global health status
      • getMetrics

        List<Metric> getMetrics()
        Returns:
        the list of metrics
      • addProcess

        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)
        Parameters:
        process - the built process