aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/resources/reference.conf
blob: b9039b7350d1ee65ef20bcd6c654d73fc59870d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# ================================== #
# Kamon-Core Reference Configuration #
# ================================== #

kamon {

  # Default dispatcher for all Kamon components, unless a more specific one is configured.
  default-dispatcher = "kamon.kamon-dispatcher"

  metrics {

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

    # Time interval for recording values on all registered gauges.
    gauge-recording-interval = 100 milliseconds


    # 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


    dispatchers {

      # Dispatcher for periodical gauge value recordings.
      gauge-recordings = ${kamon.default-dispatcher}

      # Dispatcher for subscriptions and metrics collection actors.
      metric-subscriptions = ${kamon.default-dispatcher}
    }


    filters = [
      {
        actor {
          includes = []
          excludes = [ "system/*", "user/IO-*" ]
        }
      },
      {
        router {
          includes = []
          excludes = [ "system/*", "user/IO-*" ]
        }
      },
      {
        trace {
          includes = [ "*" ]
          excludes = []
        }
      },
      {
        dispatcher {
          includes = [ "default-dispatcher" ]
          excludes = []
        }
      }
    ]

    precision {
      default-histogram-precision {
        highest-trackable-value = 3600000000000
        significant-value-digits = 2
      }

      default-min-max-counter-precision {
        refresh-interval = 100 milliseconds
        highest-trackable-value = 999999999
        significant-value-digits = 2
      }

      default-gauge-precision {
        refresh-interval = 100 milliseconds
        highest-trackable-value = 999999999
        significant-value-digits = 2
      }


      actor {
        processing-time = ${kamon.metrics.precision.default-histogram-precision}
        time-in-mailbox = ${kamon.metrics.precision.default-histogram-precision}
        mailbox-size = ${kamon.metrics.precision.default-min-max-counter-precision}
      }

      router {
        processing-time = ${kamon.metrics.precision.default-histogram-precision}
        time-in-mailbox = ${kamon.metrics.precision.default-histogram-precision}
      }

      trace {
        elapsed-time = ${kamon.metrics.precision.default-histogram-precision}
        segment = ${kamon.metrics.precision.default-histogram-precision}
      }

      dispatcher {
        maximum-pool-size {
          highest-trackable-value = 999999999
          significant-value-digits = 2
        }
        running-thread-count {
          highest-trackable-value = 999999999
          significant-value-digits = 2
        }
        queued-task-count {
          highest-trackable-value = 999999999
          significant-value-digits = 2
        }
        pool-size {
          highest-trackable-value = 999999999
          significant-value-digits = 2
        }
      }
    }
  }

  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 = 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
    }

    # If ask-pattern-tracing is enabled, a WARN level log message will be generated if a future generated by the `ask`
    # pattern fails with a `AskTimeoutException` and the log message will contain a stack trace captured at the moment
    # the future was created.
    ask-pattern-tracing = off
  }

  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
  }
}