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/examples/exemplars/README.rst
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
OpenTelemetry Exemplars Example
2
2
===============================
3
3
4
+
.. _Exemplars:
5
+
4
6
Exemplars are example measurements for aggregations. While they are simple conceptually, exemplars can estimate any statistic about the input distribution, can provide links to sample traces for high latency requests, and much more.
5
7
For more information about exemplars and how they work in OpenTelemetry, see the `spec <https://github.com/open-telemetry/oteps/pull/113>`_
6
8
@@ -24,7 +26,7 @@ Statistical exemplars
24
26
The opentelemetry SDK provides a way to sample exemplars statistically:
25
27
26
28
- Exemplars will be picked to represent the input distribution, without unquantifiable bias
27
-
- A "sample_count" attribute will be set on each exemplar to quantify how many measurements each exemplar represents
29
+
- A "sample_count" attribute will be set on each exemplar to quantify how many measurements each exemplar represents (for randomly sampled exemplars, this value will be N (total measurements) / num_samples. For histogram exemplars, this value will be specific to each bucket).
28
30
29
31
See 'statistical_exemplars.ipynb' for the example (TODO: how do I link this?)
"# Save our top 5 customers and sum all of the rest into \"Others\".\n",
211
211
"top_3_customers = [(\"Customer {}\".format(dict(val[0])[\"customer_id\"]), val[1]) for val in customer_bytes_list[:3]] + [(\"Other Customers\", sum([val[1] for val in customer_bytes_list[3:]]))]\n",
Copy file name to clipboardExpand all lines: opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/exemplars.py
+62-59Lines changed: 62 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
1. A "trace" exemplar sampler, which only samples exemplars if they have a sampled trace context (and can pick exemplars with other biases, ie min + max).
20
20
2. A "statistical" exemplar sampler, which samples exemplars without bias (ie no preferenced for traced exemplars)
21
21
22
-
To use an exemplar recorder, pass in two arguments to the aggregator config in views (see the "Exemplars" example for an example):
22
+
To use an exemplar recorder, pass in two arguments to the aggregator config in views (see the :ref:`Exemplars` example for an example):
23
23
"num_exemplars": The number of exemplars to record (if applicable, in each bucket). Note that in non-statistical mode the recorder may not use "num_exemplars"
24
24
"statistical_exemplars": If exemplars should be recorded statistically
0 commit comments