You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/observability/apm/configure/sampling.asciidoc
+58
Original file line number
Diff line number
Diff line change
@@ -127,3 +127,61 @@ The service environment for events to match a policy. (string)
127
127
128
128
// end::tbs-policy[]
129
129
:!input-type:
130
+
131
+
[float]
132
+
[[sampling-tail-monitoring-ref]]
133
+
== Monitoring tail-based sampling
134
+
135
+
APM Server produces metrics to monitor the performance and estimate the workload being processed by tail-based sampling. In order to use these metrics, you need to [enable monitoring for the APM Server](/solutions/observability/apps/monitor-apm-server.md). The following metrics are produced by the tail-based sampler (note that the metrics might have a different prefix, for example `beat.stats` for ECH deployments, based on how the APM Server is running):
This metric tracks the number of dynamic services that the tail-based sampler is tracking per policy. Dynamic services are created for tail-based sampling policies that are defined without a `service.name`.
142
+
143
+
This is a counter metric so, should be visualized with `counter_rate`.
144
+
145
+
[float]
146
+
[[sampling-tail-monitoring-events-processed-ref]]
147
+
=== `apm-server.sampling.tail.events.processed`
148
+
149
+
This metric tracks the total number of events (including both transaction and span) processed by the tail-based sampler.
150
+
151
+
This is a counter metric so, should be visualized with `counter_rate`.
152
+
153
+
[float]
154
+
[[sampling-tail-monitoring-events-stored-ref]]
155
+
=== `apm-server.sampling.tail.events.stored`
156
+
157
+
This metric tracks the total number of events stored by the tail-based sampler in the database. Events are stored when the full trace is not yet available to make the sampling decision. This value is directly proportional to the storage required by the tail-based sampler to function.
158
+
159
+
This is a counter metric so, should be visualized with `counter_rate`.
160
+
161
+
[float]
162
+
[[sampling-tail-monitoring-events-dropped-ref]]
163
+
=== `apm-server.sampling.tail.events.dropped`
164
+
165
+
This metric tracks the total number of events dropped by the tail-based sampler. Only the events that are actually dropped by the tail-based sampler are reported as dropped. Additionally, any events that were stored by the processor but never indexed will not be counted by this metric.
166
+
167
+
This is a counter metric so, should be visualized with `counter_rate`.
168
+
169
+
[float]
170
+
[[sampling-tail-monitoring-storage-lsm-size-ref]]
171
+
=== `apm-server.sampling.tail.storage.lsm_size`
172
+
173
+
This metric tracks the storage size of the log-structured merge trees used by the tail-based sampling database in bytes. This metric is one part of the total disk space used by the tail-based sampler. See <<sampling-tail-monitoring-storage-total-size-ref>> for details on how to monitor total disk size used by the tail-based sampler.
This metric tracks the storage size for value log files used by the tail-based sampling database in bytes. This metric is one part of the total disk space used by the tail-based sampler. See <<sampling-tail-monitoring-storage-total-size-ref>> for details on how to monitor total disk size used by the tail-based sampler.
Total storage size is the sum of the <<sampling-tail-monitoring-storage-lsm-size-ref>> and <<sampling-tail-monitoring-storage-value-log-size-ref>>. It is the most crucial metric to track storage requirements for tail-based sampler, especially for big deployments with large distributed traces. Deployments using tail-based sampling extensively should set up alerts and monitoring on this metric.
186
+
187
+
This metric can also be used to get an estimate of the storage requirements for tail-based sampler before increasing load by extrapolating the metric based on the current usage. It is important to note that before doing any estimation the tail-based sampler should be allowed to run for at least a few TTL cycles and that the estimate will only be useful for similar load patterns.
0 commit comments