A customer exploring Replicated had a smart question today: “How can I show accurate uninstall instructions in my support portal?”
The problem is that install docs show a default release name, but customers may chose to use a different name instead. Showing the default in the uninstall instruction could introduce just a little bit of friction into the process. They asked if we shared the release name as part of our default telemetry.
We don’t, but that’s OK. Many people don’t realize that Custom Metrics don’t have to be numbers. They’re perfect for capturing any details you need, including the actual release name customers used.
Add this Helm job to your chart to automatically capture release details:
apiVersion: batch/v1
kind: Job
metadata:
name: send-release-name
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": post-install
spec:
template:
spec:
containers:
- name: send-release-name
image: nixery.dev/shell/curl
command:
- /bin/bash
- -c
- |
curl -X PATCH \
-H "Content-Type: application/json" \
-d '{"data": {"release-name": "{{ .Release.Name }}", "release-namespace": "{{ .Release.Namespace }}"}}' \
"http://replicated:3000/api/v1/app/custom-metrics"
restartPolicy: OnFailure
The job runs as a post-install hook and sends the release name and namespace to Replicated. You’ll see these values in your custom metrics, which means your support portal can show customers their actual uninstall command instead of generic instructions.
This pattern works for tracking any installation details that we don’t capture by default. Custom metrics give you visibility into how customers actually deploy your software.