13
13
# # foo: $$FOO_BAR
14
14
# #
15
15
16
+ # #
17
+ # # ClickHouse database credentials.
18
+ # #
19
+ ch :
20
+ # Connection string for ClickHouse database. For example:
21
+ # clickhouse://<user>:<password>@<host>:<port>/<database>?sslmode=disable
22
+ #
23
+ # See https://clickhouse.uptrace.dev/guide/golang-clickhouse.html#options
24
+ dsn : ' clickhouse://default:@clickhouse:9000/uptrace?sslmode=disable'
25
+
16
26
# #
17
27
# # A list of pre-configured projects. Each project is fully isolated.
18
28
# #
@@ -26,6 +36,10 @@ projects:
26
36
- service.name
27
37
- host.name
28
38
- deployment.environment
39
+ # Group spans by deployment.environment attribute.
40
+ group_by_env : false
41
+ # Group funcs spans by service.name attribute.
42
+ group_funcs_by_service : false
29
43
30
44
# Other projects can be used to monitor your applications.
31
45
# To monitor micro-services or multiple related services, use a single project.
@@ -36,6 +50,49 @@ projects:
36
50
- service.name
37
51
- host.name
38
52
- deployment.environment
53
+ # Group spans by deployment.environment attribute.
54
+ group_by_env : false
55
+ # Group funcs spans by service.name attribute.
56
+ group_funcs_by_service : false
57
+
58
+ # #
59
+ # # Create metrics from spans and events.
60
+ # #
61
+ metrics_from_spans :
62
+ - name : uptrace.tracing.spans_duration
63
+ description : Spans duration (excluding events)
64
+ instrument : histogram
65
+ unit : microseconds
66
+ value : span.duration / 1000
67
+ attrs :
68
+ - span.system as system
69
+ - service.name as service
70
+ - host.name as host
71
+ - span.status_code as status
72
+ where : not span.is_event
73
+
74
+ - name : uptrace.tracing.spans
75
+ description : Spans count (excluding events)
76
+ instrument : counter
77
+ unit : 1
78
+ value : span.count
79
+ attrs :
80
+ - span.system as system
81
+ - service.name as service
82
+ - host.name as host
83
+ - span.status_code as status
84
+ where : not span.is_event
85
+
86
+ - name : uptrace.tracing.events
87
+ description : Events count (excluding spans)
88
+ instrument : counter
89
+ unit : 1
90
+ value : span.count
91
+ attrs :
92
+ - span.system as system
93
+ - service.name as service
94
+ - host.name as host
95
+ where : span.is_event
39
96
40
97
# #
41
98
# # To require authentication, uncomment the following section.
@@ -78,16 +135,6 @@ auth:
78
135
# # Defaults to 'preferred_username'.
79
136
# claim: preferred_username
80
137
81
- # #
82
- # # ClickHouse database credentials.
83
- # #
84
- ch :
85
- # Connection string for ClickHouse database. For example:
86
- # clickhouse://<user>:<password>@<host>:<port>/<database>?sslmode=disable
87
- #
88
- # See https://clickhouse.uptrace.dev/guide/golang-clickhouse.html#options
89
- dsn : ' clickhouse://default:@clickhouse:9000/uptrace?sslmode=disable'
90
-
91
138
# #
92
139
# # Alerting rules for monitoring metrics.
93
140
# #
@@ -102,8 +149,8 @@ alerting:
102
149
- $net_errors > 0 group by host.name
103
150
# for the last 5 minutes
104
151
for : 5m
105
- # in the project id=1
106
- projects : [1]
152
+ annotations :
153
+ summary : ' {{ $labels.host_name }} has high number of net errors: {{ $values.net_errors }} '
107
154
108
155
- name : Filesystem usage >= 90%
109
156
metrics :
@@ -114,15 +161,26 @@ alerting:
114
161
- where device !~ "loop"
115
162
- $fs_usage{state="used"} / $fs_usage >= 0.9
116
163
for : 5m
117
- projects : [1]
164
+ annotations :
165
+ summary : ' {{ $labels.host_name }} has high FS usage: {{ $values.fs_usage }}'
118
166
119
167
- name : Uptrace is dropping spans
120
168
metrics :
121
169
- uptrace.projects.spans as $spans
122
170
query :
123
171
- $spans{type=dropped} > 0
124
172
for : 1m
125
- projects : [1]
173
+ annotations :
174
+ summary : ' Uptrace has dropped {{ $values.spans }} spans'
175
+
176
+ - name : Always firing (for fun and testing)
177
+ metrics :
178
+ - process.runtime.go.goroutines as $goroutines
179
+ query :
180
+ - $goroutines >= 0 group by host.name
181
+ for : 1m
182
+ annotations :
183
+ summary : ' {{ $labels.host_name }} has high number of goroutines: {{ $values.goroutines }}'
126
184
127
185
# Create alerts from error logs and span events.
128
186
create_alerts_from_spans :
@@ -139,8 +197,8 @@ alerting:
139
197
# #
140
198
alertmanager_client :
141
199
# AlertManager API endpoints that Uptrace uses to manage alerts.
142
- # urls:
143
- # - 'http://alertmanager:9093/api/v2/alerts'
200
+ urls :
201
+ - ' http://alertmanager:9093/api/v2/alerts'
144
202
145
203
# #
146
204
# # Various options to tweak ClickHouse schema.
0 commit comments