← Back to Pull requests

feat(gpu): support GPU job tags #57341

Closed
unknown closed this pull request without merging on Oct 06, 2026 15:49 UTC
View on GitHub
unknown unknown commented on Oct 01, 2026 18:12 UTC
Author

<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->

What does this PR do?


This commit adds gpu job tags to workload meta making these two configs functionally equivalent:
    kubernetesResourcesAnnotationsAsTags:
      pods:
        company.name/job-id: training_run_id
        company.name/group-id: training_group_id

gpu:
  enabled: true
  jobs:
    run:
      key: company.name/job-id
      type: annotation
    group:
      key: company.name/group-id
      type: annotation

Motivation


We want to make a way for our customers to be able to add training run identifiers to their trace, metrics, and potentially other data sources so we have a unique ID for training runs in our system. See RFC: Training Run Identifiers.

Describe how you validated your changes


I created dev builds of my branch and deployed it to an EKS cluster with GPUs:

<details>
<summary>dev/gpu-jobs-datadogagent.yaml</summary>

# DatadogAgent configuring GPU monitoring with GPU job tagging and GPU tracing,
# running images built from mark.spicer/add-gpu-jobs-metadata-as-tags.
#
# Images are the dev branch builds on Docker Hub (agent at commit d71e2b5d).
#
# Prerequisite:
#   kubectl create secret generic datadog-secret --from-literal api-key=<API_KEY>
apiVersion: datadoghq.com/v2alpha1
kind: DatadogAgent
metadata:
  name: datadog
spec:
  global:
    clusterName: gpu-monitoring-sandbox
    site: datadoghq.com
    credentials:
      apiSecret:
        secretName: datadog-secret
        keyName: api-key

  features:
    # Sets DD_GPU_ENABLED on the node agent and enables the system-probe GPU module
    gpu:
      enabled: true
      privilegedMode: true
      patchCgroupPermissions: true
      # The cluster has no nvidia RuntimeClass; the EKS GPU AMI already uses the nvidia runtime by default
      requiredRuntimeClassName: ""
    # Hosts the gpu-monitoring tracer injection target (pods labelled admission.datadoghq.com/gpu.enabled=true)
    admissionController:
      enabled: true
    # KSM pod metrics also receive the training_run_id / training_group_id tags
    kubeStateMetricsCore:
      enabled: true

  override:
    nodeAgent:
      image:
        name: datadog/agent-dev:mark-spicer-add-gpu-jobs-metadata-as-tags-d71e2b5d-full
      # GPU nodes are tainted nvidia.com/gpu:NoSchedule
      tolerations:
        - key: nvidia.com/gpu
          operator: Exists
          effect: NoSchedule
      # Applied to every node agent container, including system-probe which reads gpu.jobs for env identifiers
      env:
        # Training run identifier: label, annotation or env (env var of the process using the GPU)
        - name: DD_GPU_JOBS_RUN_KEY
          value: example.com/training-run-id
        - name: DD_GPU_JOBS_RUN_TYPE
          value: label
        # Training group identifier
        - name: DD_GPU_JOBS_GROUP_KEY
          value: example.com/training-group-id
        - name: DD_GPU_JOBS_GROUP_TYPE
          value: annotation

    clusterAgent:
      image:
        name: datadog/cluster-agent-dev:mark-spicer-add-gpu-jobs-metadata-as-tags
      env:
        # The GPU feature does not configure the cluster agent, so gpu.enabled is set here for the
        # job tag mappings consumed by KSM and the admission controller
        - name: DD_GPU_ENABLED
          value: "true"
        - name: DD_GPU_JOBS_RUN_KEY
          value: example.com/training-run-id
        - name: DD_GPU_JOBS_RUN_TYPE
          value: label
        - name: DD_GPU_JOBS_GROUP_KEY
          value: example.com/training-group-id
        - name: DD_GPU_JOBS_GROUP_TYPE
          value: annotation
        # Injects tracers into GPU workloads, passing DD_TRAINING_RUN_ID / DD_TRAINING_GROUP_ID
        - name: DD_GPU_TRACING_ENABLED
          value: "true"
        - name: DD_GPU_TRACING_DDTRACEVERSIONS
          value: '{"c":"0"}'

</details>

<img width="1575" height="434" alt="Screenshot 2026-10-02 at 3 27 47 PM" src="https://github.com/user-attachments/assets/508f7c41-168b-47b7-b8ea-c86211b66cdd" />

Additional Notes

Diff: 548 lines (+411 / -137) across 6 files Reviewer: gjulianm Review duration: 7057m
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 548 lines diff across 6 files
0.48
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.377
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #57341"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 48.1% (MEDIUM) · Higher = larger blast radius
48.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 19.0% · Safe to merge
19.0%