Class CaptureCollector

java.lang.Object
io.kubfly.sdk.test.CaptureCollector
All Implemented Interfaces:
Collector

public final class CaptureCollector extends Object implements Collector
The collector of kubfly-sdk-test as ServiceLoader finds it on the class path of the tests: everything of the process goes to the one BucketCollector of the bucket in memory (Recording), whatever else is installed — Collectors.install(Collector) stays free. Every instance writes into the same recording.
  • Constructor Details

    • CaptureCollector

      public CaptureCollector()
      The collector of the recording.
  • Method Details

    • enabled

      public boolean enabled()
      Always on with kubfly-sdk-test on the class path.
      Specified by:
      enabled in interface Collector
      Returns:
      true
    • bridge

      public boolean bridge()
      Not a bridge to another logging system.
      Specified by:
      bridge in interface Collector
      Returns:
      false
    • frames

      public boolean frames(String project, String module, String area, String system, String component)
      Every scope: a capture follows the tree of frames.
      Specified by:
      frames in interface Collector
      Parameters:
      project - the first level of the scope path
      module - the second path level: a module of the build of the project
      area - the third level
      system - the fourth level
      component - the fifth level
      Returns:
      true
    • threshold

      public Level threshold(String project, String module, String area, String system)
      Every level.
      Specified by:
      threshold in interface Collector
      Parameters:
      project - the first level of the path
      module - the second path level: a module of the build of the project
      area - the third level
      system - the fourth level
      Returns:
      Level.TRACE
    • start

      public void start(long id, long time, Environment environment)
      The process starts.
      Specified by:
      start in interface Collector
      Parameters:
      id - the number
      time - the time
      environment - the environment
    • begin

      public void begin(long id, long time, Frame frame)
      A frame begins.
      Specified by:
      begin in interface Collector
      Parameters:
      id - the number of the beginning: that of the frame, frame.id()
      time - the time
      frame - the frame
    • event

      public void event(long id, long time, long threadId, String threadName, Frame frame, Event event, String message, ArgumentKind kind1, long bits1, Object ref1, ArgumentKind kind2, long bits2, Object ref2, Throwable exception)
      An event.
      Specified by:
      event in interface Collector
      Parameters:
      id - the number
      time - the time
      threadId - the thread (Thread.threadId())
      threadName - the name of the thread (Thread.getName())
      frame - the frame or null
      event - the event
      message - the template
      kind1 - the first kind
      bits1 - the first primitive
      ref1 - the first reference
      kind2 - the second kind
      bits2 - the second primitive
      ref2 - the second reference
      exception - the exception or null
    • eventN

      public void eventN(long id, long time, long threadId, String threadName, Frame frame, Event event, String message, Object[] args, int count, Throwable exception)
      An event of three to EventArgs.MAX_ARGUMENTS arguments.
      Specified by:
      eventN in interface Collector
      Parameters:
      id - the number of the event
      time - the time
      threadId - the thread (Thread.threadId())
      threadName - the name of the thread (Thread.getName())
      frame - the frame or null
      event - the event
      message - the template
      args - the arguments as the application passed them
      count - the number of the arguments
      exception - the exception or null
    • end

      public void end(long id, long time, long duration, long threadId, String threadName, Frame frame, Throwable exception)
      A frame ends.
      Specified by:
      end in interface Collector
      Parameters:
      id - the number of the end
      time - the time
      duration - the duration, ns
      threadId - the thread (Thread.threadId())
      threadName - the name of the thread (Thread.getName())
      frame - the frame
      exception - the exception or null
    • usage

      public void usage(long id, long time, Usage usage)
      A usage snapshot.
      Specified by:
      usage in interface Collector
      Parameters:
      id - the number
      time - the time
      usage - the snapshot
    • metrics

      public void metrics(long id, long begin, long end, Snapshot[] snapshots)
      An interval of metrics.
      Specified by:
      metrics in interface Collector
      Parameters:
      id - the number of the interval
      begin - the beginning
      end - the end
      snapshots - the snapshots
    • alert

      public void alert(long id, long begin, long end, Metric metric, Severity severity, long warnings, long criticals, long unassessed)
      The state of a metric with thresholds.
      Specified by:
      alert in interface Collector
      Parameters:
      id - the number of the alert
      begin - the beginning
      end - the end
      metric - the metric
      severity - the state
      warnings - beyond the warning threshold
      criticals - beyond the critical threshold
      unassessed - not assessed
    • traffic

      public void traffic(long id, long begin, long end, Edge[] edges)
      The edges of an interval of traffic.
      Specified by:
      traffic in interface Collector
      Parameters:
      id - the number of the interval of the traffic
      begin - the beginning of the interval
      end - the interval end
      edges - the edges
    • profile

      public void profile(long id, long begin, long end, Profile profile)
      A profile of an interval.
      Specified by:
      profile in interface Collector
      Parameters:
      id - the number of the profile
      begin - the beginning of the interval
      end - the interval end
      profile - the profile
    • track

      public void track(long id, long time, KubFly kubfly, TrackPoint point)
      A point of a track.
      Specified by:
      track in interface Collector
      Parameters:
      id - the number of the point
      time - the time of the call
      kubfly - the KubFly that tracks
      point - the point
    • health

      public void health(long id, long time, long duration, HealthCheck check, Health health)
      A run of a check.
      Specified by:
      health in interface Collector
      Parameters:
      id - the number of the result
      time - the time
      duration - the duration, ns
      check - the check
      health - the result
    • finish

      public void finish(long id, long time, Environment environment)
      The process finishes.
      Specified by:
      finish in interface Collector
      Parameters:
      id - the number
      time - the time
      environment - the environment