Skip to content

Commit a7de32d

Browse files
authored
[grafana-sampling] add batch config options and k8s.pod.name to metrics dimensions (#3324)
* [grafana-sampling] add batch config optoins and k8s.pod.name to metrics gen dimensions Signed-off-by: Robbie Lankford <robert.lankford@grafana.com> * bump version Signed-off-by: Robbie Lankford <robert.lankford@grafana.com> --------- Signed-off-by: Robbie Lankford <robert.lankford@grafana.com>
1 parent d3bd3cd commit a7de32d

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

charts/grafana-sampling/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: grafana-sampling
33
description: A Helm chart for a layered OTLP tail sampling and metrics generation pipeline.
44
type: application
5-
version: 1.0.1
5+
version: 1.1.0
66
appVersion: "v1.3.0"
77
sources:
88
- https://github.com/grafana/alloy

charts/grafana-sampling/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# grafana-sampling
22

3-
![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.0](https://img.shields.io/badge/AppVersion-v1.3.0-informational?style=flat-square)
3+
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.3.0](https://img.shields.io/badge/AppVersion-v1.3.0-informational?style=flat-square)
44

55
A Helm chart for a layered OTLP tail sampling and metrics generation pipeline.
66

@@ -139,7 +139,11 @@ A major chart version change indicates that there is an incompatible breaking ch
139139
| alloy-statefulset.rbac.create | bool | `false` | |
140140
| alloy-statefulset.service.clusterIP | string | `"None"` | |
141141
| alloy-statefulset.serviceAccount.create | bool | `false` | |
142-
| metricsGeneration.dimensions | list | `["service.namespace","service.version","deployment.environment","k8s.cluster.name"]` | Additional dimensions to add to generated metrics. |
142+
| batch.deployment | object | `{"send_batch_max_size":0,"send_batch_size":8192,"timeout":"200ms"}` | Configure batch processing options. |
143+
| batch.statefulset.send_batch_max_size | int | `0` | |
144+
| batch.statefulset.send_batch_size | int | `8192` | |
145+
| batch.statefulset.timeout | string | `"200ms"` | |
146+
| metricsGeneration.dimensions | list | `["service.namespace","service.version","deployment.environment","k8s.cluster.name","k8s.pod.name"]` | Additional dimensions to add to generated metrics. |
143147
| metricsGeneration.enabled | bool | `true` | Toggle generation of spanmetrics and servicegraph metrics. |
144148
| metricsGeneration.legacy | bool | `true` | Use legacy metric names that match those used by the Tempo metrics generator. |
145149
| sampling.decisionWait | string | `"15s"` | Wait time since the first span of a trace before making a sampling decision. |

charts/grafana-sampling/templates/_otelcol_processor_batch.alloy.txt

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{{- define "deployment.processor.batch" -}}
22
otelcol.processor.batch "default" {
33
// https://grafana.com/docs/alloy/latest/reference/components/otelcol.processor.batch/
4+
timeout = {{ .Values.batch.deployment.timeout | quote }}
5+
send_batch_size = {{ .Values.batch.deployment.send_batch_size }}
6+
send_batch_max_size = {{ .Values.batch.deployment.send_batch_max_size }}
7+
48
output {
59
traces = [otelcol.exporter.loadbalancing.default.input]
610
}
@@ -11,6 +15,10 @@ otelcol.processor.batch "default" {
1115
{{- define "statefulset.processor.batch" -}}
1216
otelcol.processor.batch "default" {
1317
// https://grafana.com/docs/alloy/latest/reference/components/otelcol.processor.batch/
18+
timeout = {{ .Values.batch.statefulset.timeout | quote }}
19+
send_batch_size = {{ .Values.batch.statefulset.send_batch_size }}
20+
send_batch_max_size = {{ .Values.batch.statefulset.send_batch_max_size }}
21+
1422
output {
1523
{{ if .Values.metricsGeneration.enabled }}
1624
metrics = [otelcol.exporter.prometheus.grafana_cloud_prometheus.input]

charts/grafana-sampling/values.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metricsGeneration:
99
- service.version
1010
- deployment.environment
1111
- k8s.cluster.name
12+
- k8s.pod.name
1213

1314
sampling:
1415
# -- Toggle tail sampling.
@@ -49,6 +50,17 @@ sampling:
4950
}
5051
}
5152
53+
batch:
54+
# -- Configure batch processing options.
55+
deployment:
56+
timeout: 200ms
57+
send_batch_size: 8192
58+
send_batch_max_size: 0
59+
statefulset:
60+
timeout: 200ms
61+
send_batch_size: 8192
62+
send_batch_max_size: 0
63+
5264
# @ignored Ignore alloy deployment
5365
alloy-deployment:
5466
# -- Do not change this.

0 commit comments

Comments
 (0)