Dockerfile to install Subtrace
in your app’s Docker image:
deployment.yaml for reference:
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Monitor requests in your Kubernetes clusters, pods and deployments with Subtrace.
Dockerfile to install Subtrace
in your app’s Docker image:
- CMD ["node", "./app.js"]
+ RUN curl -fsSL https://subtrace.dev/install.sh | sh
+ CMD ["subtrace", "run", "--", "node", "./app.js"]
deployment.yaml for reference:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment
spec:
replicas: 1
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: my-container
image: ghcr.io/NAMESPACE/IMAGE_NAME:latest
env:
- name: SUBTRACE_TOKEN
valueFrom:
secretKeyRef:
name: env-secrets
key: SUBTRACE_TOKEN
securityContext:
capabilities:
add: ["SYS_PTRACE"]
SUBTRACE_TOKEN environment variable in your
deployment YAML. Typically, this is done with a Kubernetes secret, but if your
app uses an external secret manager, consult its documentation. If you don’t
have a Subtrace token yet, go to the Tokens page on the
dashboard and create a tracer token.securityContext field in the container spec. Subtrace
needs the SYS_PTRACE capability in order to trace your app’s requests.kubectl apply -f ./deployment.yaml