# ================================== # # 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 { } } 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 } } # All settings included under the internal-config key will be used to repleace the akka.* and spray.* settings. By # doing this we avoid applying custom settings that might make sense for the user application to the internal actor # system and Spray facilities used by Kamon. internal-config { akka.actor.default-dispatcher { fork-join-executor { parallelism-min = 2 parallelism-factor = 2.0 parallelism-max = 10 } } spray { } } # Controls whether the AspectJ Weaver missing warning should be displayed if any Kamon module requiring AspectJ is # found in the classpath but the application is started without the AspectJ Weaver. show-aspectj-missing-warning = yes modules { # Just a place holder to ensure that the key is always available. Non-core Kamon modules should provide their # settings in a module-info section. } }