Skip to content

Commit e8a98c6

Browse files
author
Azfaar Qureshi
committed
addressing readme comments
1 parent 5358eb6 commit e8a98c6

File tree

1 file changed

+21
-22
lines changed
  • exporter/opentelemetry-exporter-prometheus-remote-write

1 file changed

+21
-22
lines changed

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

+21-22
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
OpenTelemetry Python SDK Prometheus Remote Write Exporter
1+
OpenTelemetry Prometheus Remote Write Exporter
22
=========================================================
33

44
This package contains an exporter to send `OTLP`_ metrics from the
5-
Python SDK directly to a Prometheus Remote Write integrated backend
5+
`OpenTelemetry Python SDK`_ directly to a `Prometheus Remote Write integrated backend`_
66
(such as Cortex or Thanos) without having to run an instance of the
7-
Prometheus server. The image below shows the two Prometheus exporters in
8-
the OpenTelemetry Python SDK.
7+
Prometheus server. The latest `types.proto`_ and `remote.proto`_
8+
protocol buffers are used to create the WriteRequest. The image below shows the
9+
two Prometheus exporters in the OpenTelemetry Python SDK.
910

10-
Pipeline 1 illustrates the setup required for a Prometheus "pull"
11-
exporter.
11+
Pipeline 1 illustrates the setup required for a `Prometheus "pull" exporter`_.
1212

1313
Pipeline 2 illustrates the setup required for the Prometheus Remote
1414
Write exporter.
@@ -24,7 +24,7 @@ collection datapath is shown below:
2424

2525
|controller_datapath_final|
2626

27-
See the ``example`` folder for a demo usage of this exporter
27+
See the ``examples`` folder for a demo usage of this exporter
2828

2929
Table of Contents
3030
=================
@@ -55,6 +55,7 @@ Prerequisite
5555
**DEB**: `sudo apt-get install libsnappy-dev`
5656
**RPM**: `sudo yum install libsnappy-devel`
5757
**OSX/Brew**: `brew install snappy`
58+
**Windows**: `pip install python_snappy-0.5-cp36-cp36m-win_amd64.whl`
5859
2. Install python-snappy
5960
`pip install python-snappy`
6061

@@ -63,9 +64,7 @@ Exporter
6364

6465
- To install from the latest PyPi release, run
6566
``pip install opentelemetry-exporter-prometheus-remote-write``
66-
- To install from the local repository, run
67-
``pip install -e exporter/opentelemetry-exporter-prometheus-remote-write/``
68-
in the project root
67+
6968

7069
Quickstart
7170
----------
@@ -186,8 +185,8 @@ for failed requests where any error status code is logged as a warning
186185
instead.
187186

188187
This is because the exporter does not implement any retry logic as it
189-
sends cumulative metrics data. This means that data will be preserved
190-
even if some exports fail.
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.
191190

192191
For example, consider a situation where a user increments a Counter
193192
instrument 5 times and an export happens between each increment. If the
@@ -198,21 +197,17 @@ exports happen like so:
198197
SUCCESS FAIL FAIL SUCCESS SUCCESS
199198
1 2 3 4 5
200199

201-
Then the recieved data will be:
200+
Then the received data will be:
202201

203202
::
204203

205204
1 4 5
206205

207-
The end result is the same since the aggregations are cumulative
206+
The end result (metric value 5) is the same since the aggregations are cumulative
207+
208208
Contributing
209209
------------
210210

211-
This exporter's datapath is as follows:
212-
213-
|Exporter datapath| *Entites with ``*`` after their name are not actual
214-
classes but rather logical groupings of functions within the exporter.*
215-
216211
If you would like to learn more about the exporter's structure and
217212
design decisions please view the design document below
218213

@@ -224,10 +219,14 @@ Design Doc
224219
This document is stored elsewhere as it contains large images which will
225220
significantly increase the size of this repo.
226221

227-
.. _Design Document: https://github.com/open-o11y/docs/tree/master/python-prometheus-remote-write
228-
.. |Exporter datapath| image:: https://user-images.githubusercontent.com/20804975/100285717-604c7280-2f3f-11eb-9b73-bdf70afce9dd.png
222+
.. _Design Document: https://github.com/open-o11y/docs/blob/master/python-prometheus-remote-write/design-doc.md
229223
.. _OTLP: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/otlp.md
230-
.. _push controller: https://github.com/open-telemetry/opentelemetry-python/blob/master/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py
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
231230
.. _`timeseries`: https://prometheus.io/docs/concepts/data_model/
232231
.. _Summary: #opentelemetry-python-sdk-prometheus-remote-write-exporter
233232
.. _Table of Contents: #table-of-contents

0 commit comments

Comments
 (0)