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/opentelemetry.rst
+34-39Lines changed: 34 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Integrating OpenTelemetry
4
4
What is OpenTelemetry?
5
5
----------------------
6
6
7
-
`OpenTelemetry <https://opentelemetry.io>`_ is an open-source observability framework for traces, metrics, and logs.
7
+
`OpenTelemetry <https://opentelemetry.io>`_ is an open-source observability framework for traces, metrics, and logs. It is a merger of OpenCensus and OpenTracing projects hosted by Cloud Native Computing Foundation.
8
8
9
9
OpenTelemetry allows developers to collect and export telemetry data in a vendor agnostic way. With OpenTelemetry, you can instrument your application once and then add or change vendors without changing the instrumentation, for example, here is a list of `popular DataDog competitors <https://uptrace.dev/get/compare/datadog-competitors.html>`_ that support OpenTelemetry.
10
10
@@ -97,7 +97,7 @@ See `OpenTelemetry Python Tracing API <https://uptrace.dev/opentelemetry/python-
97
97
Uptrace
98
98
-------
99
99
100
-
Uptrace is an `open-source APM <https://uptrace.dev/get/open-source-apm.html>`_ that supports distributed tracing, metrics, and logs. You can use it to monitor applications and set up automatic alerts to receive notifications via email, Slack, Telegram, and more.
100
+
Uptrace is an `opensource APM <https://uptrace.dev/get/open-source-apm.html>`_ that supports distributed tracing, metrics, and logs. You can use it to monitor applications and set up automatic alerts to receive notifications via email, Slack, Telegram, and more.
101
101
102
102
You can use Uptrace to monitor redis-py using this `GitHub example <https://github.com/redis/redis-py/tree/master/docs/examples/opentelemetry>`_ as a starting point.
103
103
@@ -111,9 +111,9 @@ Monitoring Redis Server performance
111
111
112
112
In addition to monitoring redis-py client, you can also monitor Redis Server performance using OpenTelemetry Collector Agent.
113
113
114
-
OpenTelemetry Collector is a proxy/middleman between your application and a `distributed tracing tool <https://uptrace.dev/get/compare/distributed-tracing-tools.html>`_ such as Uptrace or Jaeger. Collector receives telemetry data, processes it, and then exports the data to APM tools that can store it permanently.
114
+
OpenTelemetry Collector is a proxy/middleman between your application and a `distributed tracing tool <https://uptrace.dev/blog/distributed-tracing-tools.html>`_ such as Uptrace or Jaeger. Collector receives telemetry data, processes it, and then exports the data to APM tools that can store it permanently.
115
115
116
-
For example, you can use the Redis receiver provided by Otel Collector to `monitor Redis performance<https://uptrace.dev/opentelemetry/redis-monitoring.html>`_:
116
+
For example, you can use the `OpenTelemetry Redis receiver <https://uptrace.dev/get/monitor/opentelemetry-redis.html>` provided by Otel Collector to monitor Redis performance:
117
117
118
118
.. image:: images/opentelemetry/redis-metrics.png
119
119
:alt:Redis metrics
@@ -123,55 +123,50 @@ See introduction to `OpenTelemetry Collector <https://uptrace.dev/opentelemetry/
123
123
Alerting and notifications
124
124
--------------------------
125
125
126
-
Uptrace also allows you to monitor `OpenTelemetry metrics <https://uptrace.dev/opentelemetry/metrics.html>`_ using alerting rules. For example, the following rule uses the group by node expression to create an alert whenever an individual Redis shard is down:
126
+
Uptrace also allows you to monitor `OpenTelemetry metrics <https://uptrace.dev/opentelemetry/metrics.html>`_ using alerting rules. For example, the following monitor uses the group by node expression to create an alert whenever an individual Redis shard is down:
127
127
128
128
.. code-block:: python
129
129
130
-
# /etc/uptrace/uptrace.yml
131
-
132
-
alerting:
133
-
rules:
134
-
- name: Redis shard is down
135
-
metrics:
136
-
- redis_up as$redis_up
137
-
query:
138
-
- group by cluster # monitor each cluster,
139
-
- group by bdb # each database,
140
-
- group by node # and each shard
141
-
-$redis_up ==0
142
-
# shard should be down for 5 minutes to trigger an alert
143
-
for: 5m
130
+
monitors:
131
+
- name: Redis shard is down
132
+
metrics:
133
+
- redis_up as$redis_up
134
+
query:
135
+
- group by cluster # monitor each cluster,
136
+
- group by bdb # each database,
137
+
- group by node # and each shard
138
+
-$redis_up
139
+
min_allowed_value: 1
140
+
# shard should be down for 5 minutes to trigger an alert
141
+
for_duration: 5m
144
142
145
143
You can also create queries with more complex expressions. For example, the following rule creates an alert when the keyspace hit rate is lower than 75%:
146
144
147
145
.. code-block:: python
148
146
149
-
# /etc/uptrace/uptrace.yml
150
-
151
-
alerting:
152
-
rules:
153
-
- name: Redis read hit rate <75%
154
-
metrics:
155
-
- redis_keyspace_read_hits as$hits
156
-
- redis_keyspace_read_misses as$misses
157
-
query:
158
-
- group by cluster
159
-
- group by bdb
160
-
- group by node
161
-
-$hits / ($hits +$misses) <0.75
162
-
for: 5m
147
+
monitors:
148
+
- name: Redis read hit rate <75%
149
+
metrics:
150
+
- redis_keyspace_read_hits as$hits
151
+
- redis_keyspace_read_misses as$misses
152
+
query:
153
+
- group by cluster
154
+
- group by bdb
155
+
- group by node
156
+
-$hits / ($hits +$misses) as hit_rate
157
+
min_allowed_value: 0.75
158
+
for_duration: 5m
163
159
164
160
See `Alerting and Notifications <https://uptrace.dev/get/alerting.html>`_ for details.
165
161
166
162
What's next?
167
163
------------
168
164
169
-
Next, you can learn how to configure `uptrace-python <https://uptrace.dev/get/uptrace-python.html>`_ to export spans, metrics, and logs to Uptrace.
165
+
Next, you can learn how to configure `uptrace-python <https://uptrace.dev/get/opentelemetry-python.html>`_ to export spans, metrics, and logs to Uptrace.
170
166
171
167
You may also be interested in the following guides:
0 commit comments