Skip to content

Commit 4cc438a

Browse files
author
Azfaar Qureshi
committed
adding link to spec for details on aggregators
1 parent e294332 commit 4cc438a

File tree

1 file changed

+17
-16
lines changed
  • exporter/opentelemetry-exporter-prometheus-remote-write

1 file changed

+17
-16
lines changed

exporter/opentelemetry-exporter-prometheus-remote-write/README.rst

+17-16
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Table of Contents
4242

4343
- `Supported Aggregators`_
4444
- `Error Handling`_
45-
- `Retry Logic`_
4645
- `Contributing`_
4746

4847
- `Design Doc`_
@@ -170,23 +169,28 @@ and key files in the ``tls_config`` parameter.
170169

171170
Supported Aggregators
172171
---------------------
172+
Behaviour of these aggregators is outlined in the OpenTelemetry Specification `here <https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/metrics/api.md#aggregations>`_.
173173

174174
- Sum
175175
- MinMaxSumCount
176176
- Histogram
177177
- LastValue
178178
- ValueObserver
179179

180+
All aggregators are converted into the `timeseries` data format. However, the
181+
structure in which they are converted differs from aggregator to aggregator. A
182+
map of the conversion methods can be found `here <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/master/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/__init__.py#L75>`_.
183+
Details on how the conversion is being done can be found `here <https://github.com/open-telemetry/opentelemetry-python-contrib/blob/master/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/__init__.py#L196>`_
184+
180185
Error Handling
181186
--------------
182187

183188
In general, errors are raised by the calling function. The exception is
184189
for failed requests where any error status code is logged as a warning
185190
instead.
186191

187-
This is because the exporter does not implement any retry logic as it
188-
sends cumulative metrics data. This means that in the long-term data will be preserved
189-
even if failed exports are dropped in the interim.
192+
This is because the exporter does not implement any retry logic as data that
193+
failed to export will be dropped.
190194

191195
For example, consider a situation where a user increments a Counter
192196
instrument 5 times and an export happens between each increment. If the
@@ -203,8 +207,6 @@ Then the received data will be:
203207

204208
1 4 5
205209

206-
The end result (metric value 5) is the same since the aggregations are cumulative
207-
208210
Contributing
209211
------------
210212

@@ -219,15 +221,6 @@ Design Doc
219221
This document is stored elsewhere as it contains large images which will
220222
significantly increase the size of this repo.
221223

222-
.. _Design Document: https://github.com/open-o11y/docs/blob/master/python-prometheus-remote-write/design-doc.md
223-
.. _OTLP: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/otlp.md
224-
.. _OpenTelemetry Python SDK: https://github.com/open-telemetry/opentelemetry-python
225-
.. _Prometheus "pull" exporter: https://github.com/open-telemetry/opentelemetry-python/tree/master/exporter/opentelemetry-exporter-prometheus
226-
.. _Prometheus Remote Write integrated backend: https://prometheus.io/docs/operating/integrations/
227-
.. _types.proto: https://github.com/prometheus/prometheus/blob/master/prompb/types.proto
228-
.. _remote.proto: https://github.com/prometheus/prometheus/blob/master/prompb/remote.proto
229-
.. _push controller: https://github.com/open-telemetry/opentelemetry-python/blob/master/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py#L22
230-
.. _`timeseries`: https://prometheus.io/docs/concepts/data_model/
231224
.. _Summary: #opentelemetry-python-sdk-prometheus-remote-write-exporter
232225
.. _Table of Contents: #table-of-contents
233226
.. _Installation: #installation
@@ -238,10 +231,18 @@ significantly increase the size of this repo.
238231
.. _TLS: #tls
239232
.. _Supported Aggregators: #supported-aggregators
240233
.. _Error Handling: #error-handling
241-
.. _Retry Logic: #retry-logic
242234
.. _Contributing: #contributing
243235
.. _Design Doc: #design-doc
244236
.. |Prometheus SDK pipelines| image:: https://user-images.githubusercontent.com/20804975/100285430-e320fd80-2f3e-11eb-8217-a562c559153c.png
245237
.. |controller_datapath_final| image:: https://user-images.githubusercontent.com/20804975/100486582-79d1f380-30d2-11eb-8d17-d3e58e5c34e9.png
246238
.. _RFC 7617: https://tools.ietf.org/html/rfc7617
247239
.. _RFC 6750: https://tools.ietf.org/html/rfc6750
240+
.. _Design Document: https://github.com/open-o11y/docs/blob/master/python-prometheus-remote-write/design-doc.md
241+
.. _OTLP: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/otlp.md
242+
.. _OpenTelemetry Python SDK: https://github.com/open-telemetry/opentelemetry-python
243+
.. _Prometheus "pull" exporter: https://github.com/open-telemetry/opentelemetry-python/tree/master/exporter/opentelemetry-exporter-prometheus
244+
.. _Prometheus Remote Write integrated backend: https://prometheus.io/docs/operating/integrations/
245+
.. _types.proto: https://github.com/prometheus/prometheus/blob/master/prompb/types.proto
246+
.. _remote.proto: https://github.com/prometheus/prometheus/blob/master/prompb/remote.proto
247+
.. _push controller: https://github.com/open-telemetry/opentelemetry-python/blob/master/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py#L22
248+
.. _timeseries: https://prometheus.io/docs/concepts/data_model/

0 commit comments

Comments
 (0)