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
1. A Python program that creates 5 instruments with 5 unique aggregators
100
+
and a randomized load generator
101
+
2. An instance of `Cortex`_ to recieve the metrics data
102
+
3. An instance of `Grafana`_ to visualizse the exported data
103
+
104
+
Requirements
105
+
~~~~~~~~~~~~
106
+
107
+
- Have Docker Compose `installed`_
108
+
109
+
*Users do not need to install Python as the app will be run in the
110
+
Docker Container*
111
+
112
+
Instructions
113
+
~~~~~~~~~~~~
114
+
115
+
1. Run ``docker-compose up -d`` in the the ``examples/`` directory
116
+
117
+
The ``-d`` flag causes all services to run in detached mode and frees up
118
+
your terminal session. This also causes no logs to show up. Users can
119
+
attach themselves to the service’s logs manually using
120
+
``docker logs ${CONTAINER_ID} --follow``
121
+
122
+
2. Log into the Grafana instance at http://localhost:3000
123
+
124
+
- login credentials are ``username: admin`` and ``password: admin``
125
+
- There may be an additional screen on setting a new password. This
126
+
can be skipped and is optional
127
+
128
+
3. Navigate to the ``Data Sources`` page
129
+
130
+
- Look for a gear icon on the left sidebar and select
131
+
``Data Sources``
132
+
133
+
4. Add a new Prometheus Data Source
134
+
135
+
- Use ``http://cortex:9009/api/prom`` as the URL
136
+
- Set the scrape interval to ``2s`` to make updates
137
+
appear quickly **(Optional)**
138
+
- click ``Save & Test``
139
+
140
+
5. Go to ``Metrics Explore`` to query metrics
141
+
142
+
- Look for a compass icon on the left sidebar
143
+
- click ``Metrics`` for a dropdown list of all the available metrics
144
+
- Adjust time range by clicking the ``Last 6 hours``
145
+
button on the upper right side of the graph **(Optional)**
146
+
- Set up auto-refresh by selecting an option under the
147
+
dropdown next to the refresh button on the upper right side of the
148
+
graph **(Optional)**
149
+
- Click the refresh button and data should show up on hte graph
150
+
151
+
6. Shutdown the services when finished
152
+
153
+
- Run ``docker-compose down`` in the examples directory
154
+
89
155
Configuring the Exporter
90
156
------------------------
91
157
@@ -170,17 +236,24 @@ and key files in the ``tls_config`` parameter.
170
236
Supported Aggregators
171
237
---------------------
172
238
Behaviour of these aggregators is outlined in the `OpenTelemetry Specification <https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/metrics/api.md#aggregations>`_.
173
-
174
-
- Sum
175
-
- MinMaxSumCount
176
-
- Histogram
177
-
- LastValue
178
-
- ValueObserver
179
-
180
239
All aggregators are converted into the `timeseries`_ data format. However, method in
181
240
which they are converted `differs <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>`_ from aggregator to aggregator. A
182
241
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>`_.
0 commit comments