Monitoring with Grafana Cloud
The platform sends OTLP to Grafana Alloy, which runs in your cluster (namespace idv-monitoring) and forwards everything to the Grafana Cloud OTLP endpoint. Metrics land in Mimir, logs in Loki and traces in Tempo, all read from the Grafana of your stack.
Alloy is the receiver because it does what the platform cannot do on its own:
- it adds the Grafana Cloud credential, so the platform needs none;
- it accepts OTLP/gRPC from DIS and the Temporal server and forwards everything over OTLP/HTTP, which Grafana recommends for Grafana Cloud;
- it authenticates for Keycloak and DIS, which send no OTLP headers.
Follow the steps in order: Grafana Cloud first, then Alloy, then the platform. The platform starts exporting as soon as its upgrade finishes, so Alloy must already be running.
Before you start
- A Grafana Cloud stack, in a region that meets your data-residency requirements, and an account allowed to create access policies in it.
- The nodes reach the stack's OTLP host on port 443 (through a NAT gateway or proxy), or an AWS PrivateLink endpoint to Grafana Cloud. Take the host from the stack itself: newer regions use longer host names than
otlp-gateway-<region>.grafana.net. - With a private registry: the Alloy images mirrored to it (step 3).
The values this page uses:
| Reference | What | Where in Grafana Cloud |
|---|---|---|
<GC_OTLP_ENDPOINT> | OTLP endpoint, ending in /otlp | My Account → your stack → OpenTelemetry → Configure |
<GC_INSTANCE_ID> | Instance ID of the stack (the OTLP user name) | Same page |
<GC_OTLP_TOKEN> | Access policy token with metrics:write, logs:write and traces:write | Same page (Generate now), or Administration → Access policies |
The token goes only into your secret store, never into a values file.
Step 1. Prepare Grafana Cloud
- Read the OTLP endpoint and the instance ID on the stack's OpenTelemetry page.
- Create the token. Generate now creates an access policy token with the write scopes. A dedicated policy (for example
idv-<environment>-otlp-write) can be revoked without affecting other senders. Copy the token now; Grafana Cloud does not show it again. - Data sources: the Grafana of the stack already has
grafanacloud-<stack>-prom(Mimir),grafanacloud-<stack>-logs(Loki) andgrafanacloud-<stack>-traces(Tempo). A self-hosted Grafana that reads the same data needs its own data sources, authenticated with a separate token that has only the read scopes — never the write token of Alloy. - Private network (optional): for AWS PrivateLink, create the interface VPC endpoint to the service name shown on the service's Details page, and use its private DNS name as the host of
<GC_OTLP_ENDPOINT>.
Step 2. Store the token and sync it into the cluster
With AWS Secrets Manager, in the region your External Secrets store reads:
read -rs -p 'Grafana Cloud OTLP token: ' T; echo
printf '%s' "$T" | aws secretsmanager create-secret --region <region> --name <prefix>/grafana-cloud-otlp-token \
--secret-string file:///dev/stdin --query Name --output text; unset T
Then sync it into idv-monitoring, using the store named in global.secrets.secretStore of your platform values (or a store for monitoring only — see Secure the telemetry path):
kubectl create namespace idv-monitoring --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -f - <<'EOF'
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: grafana-cloud-otlp
namespace: idv-monitoring
spec:
refreshInterval: 1h
secretStoreRef: {kind: ClusterSecretStore, name: <store-name>}
target: {name: grafana-cloud-otlp}
data:
- secretKey: token
remoteRef: {key: <prefix>/grafana-cloud-otlp-token}
EOF
kubectl -n idv-monitoring get externalsecret grafana-cloud-otlp
Done when STATUS is SecretSynced and READY is True. If not, kubectl -n idv-monitoring describe externalsecret grafana-cloud-otlp shows why (usually the entry name, the region or the store).
Step 3. Write the Alloy values file
Write alloy-values.yaml, with <GC_INSTANCE_ID> and <GC_OTLP_ENDPOINT> filled in:
controller:
type: deployment
replicas: 1
alloy:
configMap:
content: |
otelcol.receiver.otlp "default" {
grpc { endpoint = "0.0.0.0:4317" }
http { endpoint = "0.0.0.0:4318" }
output {
traces = [otelcol.processor.memory_limiter.default.input]
metrics = [otelcol.processor.memory_limiter.default.input]
logs = [otelcol.processor.memory_limiter.default.input]
}
}
otelcol.processor.memory_limiter "default" {
check_interval = "5s"
limit_percentage = 80
spike_limit_percentage = 25
output {
traces = [otelcol.processor.batch.default.input]
metrics = [otelcol.processor.batch.default.input]
logs = [otelcol.processor.batch.default.input]
}
}
otelcol.processor.batch "default" {
output {
traces = [otelcol.exporter.otlphttp.grafana_cloud.input]
metrics = [otelcol.exporter.otlphttp.grafana_cloud.input]
logs = [otelcol.exporter.otlphttp.grafana_cloud.input]
}
}
otelcol.auth.basic "grafana_cloud" {
client_auth {
username = "<GC_INSTANCE_ID>"
password = sys.env("GRAFANA_CLOUD_TOKEN")
}
}
otelcol.exporter.otlphttp "grafana_cloud" {
client {
endpoint = "<GC_OTLP_ENDPOINT>" // ends in /otlp, without /v1/...
auth = otelcol.auth.basic.grafana_cloud.handler
}
}
extraEnv:
- name: GRAFANA_CLOUD_TOKEN
valueFrom:
secretKeyRef: {name: grafana-cloud-otlp, key: token}
extraPorts:
- {name: otlp-grpc, port: 4317, targetPort: 4317, protocol: TCP}
- {name: otlp-http, port: 4318, targetPort: 4318, protocol: TCP}
resources:
requests: {cpu: 200m, memory: 256Mi}
limits: {cpu: "1", memory: 1Gi}
| Setting | Why |
|---|---|
controller.type: deployment, one replica | Alloy only relays the OTLP pushed to it; it needs no pod per node. One replica keeps every series on one sender. |
memory_limiter, batch | Protects Alloy from memory spikes and batches the exports. |
otelcol.auth.basic | Grafana Cloud authenticates OTLP with HTTP Basic: the instance ID and the token. |
sys.env("GRAFANA_CLOUD_TOKEN") | The token comes from the Secret of step 2, never from the values file. |
extraPorts | Adds 4317 and 4318 to the Service alloy, next to the Alloy UI on 12345. |
With a private registry, mirror the chart's images (Alloy and its config reloader) like the platform images, then point the chart at them. List the images of the chart version you install:
helm template alloy grafana/alloy --version <alloy-chart-version> -n idv-monitoring -f alloy-values.yaml \
| grep -oE 'image: *"?[^" ]+' | sed -E 's/image: *"?//' | sort -u
Copy each image with a tool that keeps the digest (for example crane copy), then add to alloy-values.yaml and run the helm template line again — every image must now come from your registry:
image:
registry: <your-registry>
repository: <path>/grafana/alloy
configReloader:
image:
registry: <your-registry>
repository: <path>/prometheus-operator/prometheus-config-reloader
Step 4. Install Alloy
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm search repo grafana/alloy # pin the version shown
helm install alloy grafana/alloy --version <alloy-chart-version> -n idv-monitoring -f alloy-values.yaml --wait
kubectl -n idv-monitoring get pods -l app.kubernetes.io/instance=alloy
kubectl -n idv-monitoring get svc alloy
kubectl -n idv-monitoring logs deploy/alloy --tail=100 | grep -i -E 'error|401|403' || echo "no errors"
Done when the pod is Running, the Service alloy lists ports 12345, 4317 and 4318, and the log shows no error.
Add the NetworkPolicy of Secure the telemetry path, so only the platform namespace can send to Alloy. The Alloy UI shows the pipeline and the health of each component: kubectl -n idv-monitoring port-forward svc/alloy 12345:12345, then open http://localhost:12345.
Step 5. Send the platform's telemetry to Alloy
In observability-values.yaml (Configure the platform's OTLP settings):
global:
observability:
otlpEndpoint: http://alloy.idv-monitoring.svc.cluster.local:4318
otlpGrpcEndpoint: http://alloy.idv-monitoring.svc.cluster.local:4317
collector:
logs:
enabled: false # true: pod logs to Loki (read "The optional log collector" first)
Leave otlpHeaders unset: Alloy adds the credential. Then run the upgrade, restart the Temporal server and run the checks of Apply the change.
Step 6. Check the data in Grafana Cloud
Wait 2 to 5 minutes, then open Explore in the Grafana of the stack:
| Signal | Data source | What to look for |
|---|---|---|
| Traces | grafanacloud-<stack>-traces | Search by service name: bff, config-service, dashboard-service, onboarding-service, keycloak, dot-digital-identity-service, and temporal-workflows (shared by all four Temporal workers). |
| Metrics | grafanacloud-<stack>-prom | dis_license_expiration_remaining_days, target_info |
| Logs | grafanacloud-<stack>-logs | The label k8s_namespace_name="<idv-namespace>" |
Grafana Cloud converts OTLP names into Prometheus names (dots become underscores, units and _total may be added) and keeps most resource attributes on target_info; the namespace becomes the label k8s_namespace_name. Find each metric and label once in Explore before you build a panel or a rule.
The Application Observability app lists the traced services with their rate, errors and duration.
Step 7. Alerts
The chart's alert rules are Prometheus rules. Two ways to use them in Grafana Cloud:
-
Load them into Mimir with
mimirtooland an access policy token withrules:readandrules:write. Wrap the rule files under onegroups:list and adapt the namespace filter: scraped metrics carryk8s_namespace_nameinstead ofnamespace, and the metrics the Temporal workers push carry no namespace label at all, so drop the filter there. Check that each expression returns data in Explore before loading it.read -rs -p 'Grafana Cloud rules token: ' MIMIR_API_KEY; echo; export MIMIR_API_KEYmimirtool rules load idv-alerts.yaml --address=<GC_PROM_URL> --user=<GC_PROM_USER>unset MIMIR_API_KEYThe pod-restart rule needs kube-state-metrics, which arrives with the Grafana Cloud Kubernetes Monitoring integration. Revoke the rules token when you no longer need it.
-
Recreate them in Grafana Alerting (Alerting → Alert rules) from the table in Alert Rules.
Then add a contact point (e-mail, Microsoft Teams, Slack, PagerDuty…) and a notification policy in Alerting, or the alerts fire without notifying anyone.
If something fails
| Symptom | Check | Fix |
|---|---|---|
ExternalSecret shows SecretSyncedError | kubectl -n idv-monitoring describe externalsecret grafana-cloud-otlp | Wrong entry name, region or store, or the entry is scheduled for deletion. |
Alloy log shows 401 or 403 | kubectl -n idv-monitoring logs deploy/alloy | grep -E '401|403' | Wrong <GC_INSTANCE_ID>, or the token lacks a write scope or was revoked. Create a new token, update the secret-store entry, then kubectl -n idv-monitoring rollout restart deploy/alloy. |
Alloy log shows 404 | Same | <GC_OTLP_ENDPOINT> must end in /otlp, without /v1/.... |
connection refused from the platform | The Service alloy and the NetworkPolicy | The platform endpoints do not match the Service in idv-monitoring, the ports are missing from extraPorts, or the NetworkPolicy does not admit the platform namespace. |
| Traces arrive, metrics do not | kubectl -n <idv-namespace> logs deploy/idv-otel-metrics --tail=50 | The bundled collector is off (collector.enabled: false) or failing. |
| No logs in Loki | kubectl -n <idv-namespace> get ds | grep idv-otel-logs | logs.enabled is false, or Pod Security rejected the DaemonSet. |
| No DIS or Temporal server traces | The otlpGrpcEndpoint value | It is empty, or the Temporal server was not restarted after the upgrade. |
Remove
-
Set the platform's endpoints to
""and upgrade (Stop exporting). -
Remove Alloy, the secret sync and the namespace:
helm uninstall alloy -n idv-monitoringkubectl -n idv-monitoring delete externalsecret grafana-cloud-otlpkubectl delete namespace idv-monitoring # if nothing else runs there -
Revoke the access policy token in Grafana Cloud and delete its secret-store entry.
-
Data already sent stays in Grafana Cloud until its retention period ends; delete it there if your policy requires it.