Skip to content

Commit f60876c

Browse files
authored
chore: explicit scrape duration to be less than the interval (#49)
* chore: explicit scrape duration to be less than the interval * fix readme
1 parent f80dc66 commit f60876c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,13 @@ values which are defined [here](https://github.com/grafana/helm-charts/tree/main
261261
| global.externalZone | string | `"svc.cluster.local"` | |
262262
| global.postgres | object | `{"alerts":{"groups":{"Basic":{"delay":"1m","enabled":true},"Connections":{"delay":"5m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}},"Notifications":{"delay":"15m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}}}},"database":"coder","exporter":{"image":"quay.io/prometheuscommunity/postgres-exporter"},"hostname":"localhost","mountSecret":"secret-postgres","password":null,"port":5432,"sslmode":"disable","sslrootcert":null,"username":"coder","volumeMounts":[],"volumes":[]}` | postgres connection information NOTE: these settings are global so we can parameterise some values which get rendered by subcharts |
263263
| global.postgres.alerts | object | `{"groups":{"Basic":{"delay":"1m","enabled":true},"Connections":{"delay":"5m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}},"Notifications":{"delay":"15m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}}}}` | alerts for postgres |
264-
| global.telemetry | object | `{"metrics":{"scrape_interval":"15s","scrape_timeout":"12s"},"profiling":{"scrape_interval":"60s","scrape_timeout":"70s"}}` | control telemetry collection |
264+
| global.telemetry | object | `{"metrics":{"scrape_interval":"15s","scrape_timeout":"12s"},"profiling":{"delta_profiling_duration":"30s","scrape_interval":"60s","scrape_timeout":"70s"}}` | control telemetry collection |
265265
| global.telemetry.metrics | object | `{"scrape_interval":"15s","scrape_timeout":"12s"}` | control metric collection |
266266
| global.telemetry.metrics.scrape_interval | string | `"15s"` | how often the collector will scrape discovered pods |
267267
| global.telemetry.metrics.scrape_timeout | string | `"12s"` | how long a request will be allowed to wait before being canceled |
268+
| global.telemetry.profiling.delta_profiling_duration | string | `"30s"` | duration of each pprof profiling capture, must be less than scrape_interval |
268269
| global.telemetry.profiling.scrape_interval | string | `"60s"` | how often the collector will scrape pprof endpoints |
269-
| global.telemetry.profiling.scrape_timeout | string | `"70s"` | how long a request will be allowed to wait before being canceled, must be larger than scrape_interval |
270+
| global.telemetry.profiling.scrape_timeout | string | `"70s"` | how long a request will be allowed to wait before being canceled |
270271
| global.zone | string | `"svc"` | |
271272
| grafana-agent.agent.clustering.enabled | bool | `true` | |
272273
| grafana-agent.agent.configMap.create | bool | `false` | |

coder-observability/templates/_collector-config.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ pyroscope.scrape "pods" {
210210
211211
scrape_interval = "{{ .Values.global.telemetry.profiling.scrape_interval }}"
212212
scrape_timeout = "{{ .Values.global.telemetry.profiling.scrape_timeout }}"
213+
delta_profiling_duration = "{{ .Values.global.telemetry.profiling.delta_profiling_duration }}"
213214
214215
clustering {
215216
enabled = true

coder-observability/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ global:
116116
profiling:
117117
# global.telemetry.profiling.scrape_interval -- how often the collector will scrape pprof endpoints
118118
scrape_interval: 60s
119-
# global.telemetry.profiling.scrape_timeout -- how long a request will be allowed to wait before being canceled, must be larger than scrape_interval
119+
# global.telemetry.profiling.scrape_timeout -- how long a request will be allowed to wait before being canceled
120120
scrape_timeout: 70s
121+
# global.telemetry.profiling.delta_profiling_duration -- duration of each pprof profiling capture, must be less than scrape_interval
122+
delta_profiling_duration: 30s
121123

122124
# global.postgres -- postgres connection information
123125
# NOTE: these settings are global so we can parameterise some values which get rendered by subcharts

0 commit comments

Comments
 (0)