mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Tracing: sample always in hack/local-up-cluster.sh
If the feature gate `KubeletTracing` is enabled, then we should default to a sample rate of 1 million per million, which will sample everything: https://github.com/open-telemetry/opentelemetry-go/blob/aa868d5/sdk/trace/sampling.go#L107-L110 This helps to easier spin-up a cluster with tracing enabled by exporting `FEATURE_GATES="KubeletTracing=true"`. Related docs: https://k8s.io/docs/concepts/cluster-administration/system-traces/#kubelet-traces Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
parent
7061704297
commit
f04bb71878
@ -753,6 +753,15 @@ runtimeRequestTimeout: "${RUNTIME_REQUEST_TIMEOUT}"
|
|||||||
staticPodPath: "${POD_MANIFEST_PATH}"
|
staticPodPath: "${POD_MANIFEST_PATH}"
|
||||||
resolvConf: "${KUBELET_RESOLV_CONF}"
|
resolvConf: "${KUBELET_RESOLV_CONF}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
if [[ "$FEATURE_GATES" == *KubeletTracing=true* ]]; then
|
||||||
|
cat <<EOF >> /tmp/kubelet.yaml
|
||||||
|
tracing:
|
||||||
|
endpoint: localhost:4317 # the default value
|
||||||
|
samplingRatePerMillion: 1000000 # sample always
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
{
|
{
|
||||||
# authentication
|
# authentication
|
||||||
echo "authentication:"
|
echo "authentication:"
|
||||||
|
Loading…
Reference in New Issue
Block a user