aboutsummaryrefslogblamecommitdiff
path: root/kamon-core/src/main/resources/reference.conf
blob: 2bc217b0e6648a5890e799dc627f0c0b56a82c36 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                      
       
          
 
                                                                                               
                              
 









                                                                                                   




                                                                                                   

                                                                                         
 



                           
       
     
 











                                                                                                                   
                                               

       


                                    
                                           
                                           

       



                                               
                                           

       



























                                                                                                                           


     


 
         
 




                                                                                                                        
                                  













                                                                                                                        

                            




                                                                                                                   
                                     

     














                                                                                                                         
                                                        
                                                

   























                                                                              
 
# ================================== #
# Kamon-Core Reference Configuration #
# ================================== #

kamon {
  metric {

    # Time interval for collecting all metrics and send the snapshots to all subscribed actors.
    tick-interval = 10 seconds

    # Default size for the LongBuffer that gets allocated for metrics collection and merge. The
    # value should correspond to the highest number of different buckets with values that might
    # exist in a single histogram during a metrics collection. The default value of 33792 is a
    # very conservative value and its equal to the total number of buckets required to cover values
    # from 1 nanosecond to 1 hour with 0.1% precision (3 significant value digits). That means
    # that would need to have at least one measurement on every bucket of a single histogram to
    # fully utilize this buffer, which is *really* unlikely to ever happen. Since the buffer should
    # be allocated once and reused it shouldn't impose a memory footprint issue.
    default-collection-context-buffer-size = 33792

    # Disables a big error message that will be typically logged if your application wasn't started
    # with the -javaagent:/path-to-aspectj-weaver.jar option. If you are only using KamonStandalone
    # it might be ok for you to turn this error off.
    disable-aspectj-weaver-missing-error = false

    # Specify if entities that do not match any include/exclude filter should be tracked.
    track-unmatched-entities = yes

    filters {
      trace {
        includes = [ "**" ]
        excludes = [ ]
      }
    }

    # Default instrument settings for histograms, min max counters and gaugues. The actual settings to be used when
    # creating a instrument is determined by merging the default settings, code settings and specific instrument
    # settings using the following priorities (top wins):

    #   - any setting in `kamon.metric.instrument-settings` for the given category/instrument.
    #   - code settings provided when creating the instrument.
    #   - `default-instrument-settings`.
    #
    default-instrument-settings {
      histogram {
        precision = normal
        lowest-discernible-value = 1
        highest-trackable-value = 3600000000000
      }

      min-max-counter {
        precision = normal
        lowest-discernible-value = 1
        highest-trackable-value = 999999999
        refresh-interval = 100 milliseconds
      }

      gauge {
        precision = normal
        lowest-discernible-value = 1
        highest-trackable-value = 3600000000000
        refresh-interval = 100 milliseconds
      }

    }

    # Custom configurations for category instruments. The settings provided in this section will override the default
    # and code instrument settings as explained in the `default-instrument-settings` key. There is no need to provide
    # full instrument settings in this section, only the settings that should be overriden must be included. Example:
    # if you wish to change the precision and lowest discernible value of the `elapsed-time` instrument for the `trace`
    # category, you should include the following configuration in your application.conf file:
    #
    #   kamon.metric.instrument-settings.trace {
    #     elapsed-time {
    #       precision = fine
    #       lowest-discernible-value = 1000
    #     }
    #   }
    #
    # In this example, the value for the `highest-trackable-value` setting will be either the code setting or the default
    # setting, depending on how the `elapsed-time` metric is created.
    instrument-settings {

    }

    dispatchers {

      # Dispatcher for the actor that will collect all recorded metrics on every tick and dispatch them to all subscribers.
      metric-collection = akka.actor.default-dispatcher

      # Dispatcher for the Kamon refresh scheduler, used by all MinMaxCounters and Gaugues to update their values.
      refresh-scheduler = akka.actor.default-dispatcher
    }
  }




  trace {

    # Level of detail used when recording trace information. The posible values are:
    #  - metrics-only: metrics for all included traces and all segments are recorded, but no Trace messages will be sent
    #    to the subscriptors of trace data.
    #  - simple-trace: metrics for all included traces and all segments are recorded and additionally a Trace message
    #    containing the trace and segments details and metadata.
    level-of-detail = metrics-only

    # Sampling strategy to apply when the tracing level is set to `simple-trace`. The options are: all, random, ordered
    # and threshold. The details of each sampler are bellow.
    sampling = random

    # Use a ThreadLocalRandom to generate numbers between 1 and 100, if the random number is less or equal to .chance
    # then tracing information will be gathered and reported for the current trace.
    random-sampler {
      chance = 10
    }

    # Use a AtomicLong to ensure that every .sample-interval number of requests tracing information will be gathered and
    # reported.
    ordered-sampler {
      # must be power of two
      sample-interval = 8
    }

    # Gather tracing information for all traces but only report those whose elapsed-time is equal or greated to the
    # .minimum-elapsed-time setting.
    threshold-sampler {
      minimum-elapsed-time = 1 second
    }

    incubator {
      # Minimum time to stay in the trace incubator before checking if the trace should not be incubated anymore. No
      # checks are made at least until this period has passed.
      min-incubation-time = 5 seconds

      # Time to wait between incubation checks. After min-incubation-time, a trace is checked using this interval and if
      # if shouldn't be incubated anymore, the TraceInfo is collected and reported for it.
      check-interval = 1 second

      # Max amount of time that a trace can be in the incubator. If this time is reached for a given trace then it will
      # be reported with whatever information is available at the moment, logging a warning for each segment that remains
      # open after this point.
      max-incubation-time = 20 seconds
    }

    # Default dispatcher for all trace module operations
    dispatcher = "akka.actor.default-dispatcher"
  }

  kamon-dispatcher {
    # Dispatcher is the name of the event-based dispatcher
    type = Dispatcher
    # What kind of ExecutionService to use
    executor = "fork-join-executor"
    # Configuration for the fork join pool
    fork-join-executor {
      # Min number of threads to cap factor-based parallelism number to
      parallelism-min = 2

      # The parallelism factor is used to determine thread pool size using the
      # following formula: ceil(available processors * factor). Resulting size
      # is then bounded by the parallelism-min and parallelism-max values.
      parallelism-factor = 2.0

      # Max number of threads to cap factor-based parallelism number to
      parallelism-max = 10
    }

    # Throughput defines the maximum number of messages to be
    # processed per actor before the thread jumps to the next actor.
    # Set to 1 for as fair as possible.
    throughput = 3
  }
}