|
| 1 | +# grafana-sampling |
| 2 | + |
| 3 | +   |
| 4 | + |
| 5 | +A Helm chart for a layered OTLP tail sampling and metrics generation pipeline. |
| 6 | + |
| 7 | +This chart deploys the following architecture to your environment: |
| 8 | + |
| 9 | + |
| 10 | +Note: by default, only OTLP traces are accepted at the load balancing layer. |
| 11 | + |
| 12 | +## Chart Repo |
| 13 | + |
| 14 | +Add the following repo to use the chart: |
| 15 | + |
| 16 | +```console |
| 17 | +helm repo add grafana https://grafana.github.io/helm-charts |
| 18 | +``` |
| 19 | +## Installing the Chart |
| 20 | + |
| 21 | +Use the following command to install the chart with the release name `my-release`. Make sure to populate the required values. |
| 22 | + |
| 23 | +```console |
| 24 | +helm install my-release grafana/grafana-sampling --values - <<EOF | less |
| 25 | +grafana-agent-statefulset: |
| 26 | + agent: |
| 27 | + extraEnv: |
| 28 | + - name: GRAFANA_CLOUD_API_KEY |
| 29 | + value: <REQUIRED> |
| 30 | + - name: GRAFANA_CLOUD_PROMETHEUS_URL |
| 31 | + value: <REQUIRED> |
| 32 | + - name: GRAFANA_CLOUD_PROMETHEUS_USERNAME |
| 33 | + value: <REQUIRED> |
| 34 | + - name: GRAFANA_CLOUD_TEMPO_ENDPOINT |
| 35 | + value: <REQUIRED> |
| 36 | + - name: GRAFANA_CLOUD_TEMPO_USERNAME |
| 37 | + value: <REQUIRED> |
| 38 | + # This is required for adaptive metric deduplication in Grafana Cloud |
| 39 | + - name: POD_UID |
| 40 | + valueFrom: |
| 41 | + fieldRef: |
| 42 | + apiVersion: v1 |
| 43 | + fieldPath: metadata.uid |
| 44 | +EOF |
| 45 | +``` |
| 46 | + |
| 47 | +## Uninstalling the Chart |
| 48 | + |
| 49 | +To uninstall/delete the my-release deployment: |
| 50 | + |
| 51 | +```console |
| 52 | +helm delete my-release |
| 53 | +``` |
| 54 | + |
| 55 | +The command removes all the Kubernetes components associated with the chart and deletes the release. |
| 56 | + |
| 57 | +## Upgrading |
| 58 | + |
| 59 | +A major chart version change indicates that there is an incompatible breaking change needing manual actions. |
| 60 | + |
| 61 | +## Values |
| 62 | + |
| 63 | +| Key | Type | Default | Description | |
| 64 | +|-----|------|---------|-------------| |
| 65 | +| grafana-agent-deployment.agent.configMap.create | bool | `false` | | |
| 66 | +| grafana-agent-deployment.agent.extraPorts[0].name | string | `"otlp-grpc"` | | |
| 67 | +| grafana-agent-deployment.agent.extraPorts[0].port | int | `4317` | | |
| 68 | +| grafana-agent-deployment.agent.extraPorts[0].protocol | string | `"TCP"` | | |
| 69 | +| grafana-agent-deployment.agent.extraPorts[0].targetPort | int | `4317` | | |
| 70 | +| grafana-agent-deployment.agent.extraPorts[1].name | string | `"otlp-http"` | | |
| 71 | +| grafana-agent-deployment.agent.extraPorts[1].port | int | `4318` | | |
| 72 | +| grafana-agent-deployment.agent.extraPorts[1].protocol | string | `"TCP"` | | |
| 73 | +| grafana-agent-deployment.agent.extraPorts[1].targetPort | int | `4318` | | |
| 74 | +| grafana-agent-deployment.agent.resources.requests.cpu | string | `"1"` | | |
| 75 | +| grafana-agent-deployment.agent.resources.requests.memory | string | `"2G"` | | |
| 76 | +| grafana-agent-deployment.controller.autoscaling.enabled | bool | `false` | Creates a HorizontalPodAutoscaler for controller type deployment. | |
| 77 | +| grafana-agent-deployment.controller.autoscaling.maxReplicas | int | `5` | The upper limit for the number of replicas to which the autoscaler can scale up. | |
| 78 | +| grafana-agent-deployment.controller.autoscaling.minReplicas | int | `2` | The lower limit for the number of replicas to which the autoscaler can scale down. | |
| 79 | +| grafana-agent-deployment.controller.autoscaling.targetCPUUtilizationPercentage | int | `0` | Average CPU utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting `targetCPUUtilizationPercentage` to 0 will disable CPU scaling. | |
| 80 | +| grafana-agent-deployment.controller.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Average Memory utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting `targetMemoryUtilizationPercentage` to 0 will disable Memory scaling. | |
| 81 | +| grafana-agent-deployment.controller.replicas | int | `1` | | |
| 82 | +| grafana-agent-deployment.controller.type | string | `"deployment"` | | |
| 83 | +| grafana-agent-deployment.nameOverride | string | `"deployment"` | Do not change this. | |
| 84 | +| grafana-agent-statefulset.agent.configMap.create | bool | `false` | | |
| 85 | +| grafana-agent-statefulset.agent.extraEnv[0].name | string | `"GRAFANA_CLOUD_API_KEY"` | | |
| 86 | +| grafana-agent-statefulset.agent.extraEnv[0].value | string | `"<REQUIRED>"` | | |
| 87 | +| grafana-agent-statefulset.agent.extraEnv[1].name | string | `"GRAFANA_CLOUD_PROMETHEUS_URL"` | | |
| 88 | +| grafana-agent-statefulset.agent.extraEnv[1].value | string | `"<REQUIRED>"` | | |
| 89 | +| grafana-agent-statefulset.agent.extraEnv[2].name | string | `"GRAFANA_CLOUD_PROMETHEUS_USERNAME"` | | |
| 90 | +| grafana-agent-statefulset.agent.extraEnv[2].value | string | `"<REQUIRED>"` | | |
| 91 | +| grafana-agent-statefulset.agent.extraEnv[3].name | string | `"GRAFANA_CLOUD_TEMPO_ENDPOINT"` | | |
| 92 | +| grafana-agent-statefulset.agent.extraEnv[3].value | string | `"<REQUIRED>"` | | |
| 93 | +| grafana-agent-statefulset.agent.extraEnv[4].name | string | `"GRAFANA_CLOUD_TEMPO_USERNAME"` | | |
| 94 | +| grafana-agent-statefulset.agent.extraEnv[4].value | string | `"<REQUIRED>"` | | |
| 95 | +| grafana-agent-statefulset.agent.extraEnv[5].name | string | `"POD_UID"` | | |
| 96 | +| grafana-agent-statefulset.agent.extraEnv[5].valueFrom.fieldRef.apiVersion | string | `"v1"` | | |
| 97 | +| grafana-agent-statefulset.agent.extraEnv[5].valueFrom.fieldRef.fieldPath | string | `"metadata.uid"` | | |
| 98 | +| grafana-agent-statefulset.agent.extraPorts[0].name | string | `"otlp-grpc"` | | |
| 99 | +| grafana-agent-statefulset.agent.extraPorts[0].port | int | `4317` | | |
| 100 | +| grafana-agent-statefulset.agent.extraPorts[0].protocol | string | `"TCP"` | | |
| 101 | +| grafana-agent-statefulset.agent.extraPorts[0].targetPort | int | `4317` | | |
| 102 | +| grafana-agent-statefulset.agent.resources.requests.cpu | string | `"1"` | | |
| 103 | +| grafana-agent-statefulset.agent.resources.requests.memory | string | `"2G"` | | |
| 104 | +| grafana-agent-statefulset.controller.autoscaling.enabled | bool | `false` | Creates a HorizontalPodAutoscaler for controller type deployment. | |
| 105 | +| grafana-agent-statefulset.controller.autoscaling.maxReplicas | int | `5` | The upper limit for the number of replicas to which the autoscaler can scale up. | |
| 106 | +| grafana-agent-statefulset.controller.autoscaling.minReplicas | int | `2` | The lower limit for the number of replicas to which the autoscaler can scale down. | |
| 107 | +| grafana-agent-statefulset.controller.autoscaling.targetCPUUtilizationPercentage | int | `0` | Average CPU utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting `targetCPUUtilizationPercentage` to 0 will disable CPU scaling. | |
| 108 | +| grafana-agent-statefulset.controller.autoscaling.targetMemoryUtilizationPercentage | int | `80` | Average Memory utilization across all relevant pods, a percentage of the requested value of the resource for the pods. Setting `targetMemoryUtilizationPercentage` to 0 will disable Memory scaling. | |
| 109 | +| grafana-agent-statefulset.controller.replicas | int | `1` | | |
| 110 | +| grafana-agent-statefulset.controller.type | string | `"statefulset"` | | |
| 111 | +| grafana-agent-statefulset.nameOverride | string | `"statefulset"` | Do not change this. | |
| 112 | +| grafana-agent-statefulset.rbac.create | bool | `false` | | |
| 113 | +| grafana-agent-statefulset.service.clusterIP | string | `"None"` | | |
| 114 | +| grafana-agent-statefulset.serviceAccount.create | bool | `false` | | |
| 115 | +| metricsGeneration.dimensions | list | `["service.namespace","service.version","deployment.environment","k8s.cluster.name"]` | Additional dimensions to add to generated metrics. | |
| 116 | +| metricsGeneration.enabled | bool | `true` | Toggle generation of spanmetrics and servicegraph metrics. | |
| 117 | +| sampling.decisionWait | string | `"15s"` | Wait time since the first span of a trace before making a sampling decision. | |
| 118 | +| sampling.enabled | bool | `true` | Toggle tail sampling. | |
| 119 | +| sampling.extraPolicies | string | A policy to sample long requests is added by default. | User-defined policies in river format. | |
| 120 | +| sampling.failedRequests.percentage | int | `50` | Percentage of failed requests to sample. | |
| 121 | +| sampling.failedRequests.sample | bool | `false` | Toggle sampling failed requests. | |
| 122 | +| sampling.successfulRequests.percentage | int | `10` | Percentage of successful requests to sample. | |
| 123 | +| sampling.successfulRequests.sample | bool | `true` | Toggle sampling successful requests. | |
| 124 | + |
0 commit comments