Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ ddtrace/contrib/internal/litellm @DataDog/ml-observ
ddtrace/contrib/internal/pydantic_ai @DataDog/ml-observability
ddtrace/contrib/internal/ray @DataDog/ml-observability
ddtrace/contrib/internal/mcp @DataDog/ml-observability
ddtrace/contrib/internal/vllm @DataDog/ml-observability
tests/llmobs @DataDog/ml-observability
tests/contrib/openai @DataDog/ml-observability
tests/contrib/langchain @DataDog/ml-observability
Expand All @@ -176,6 +177,7 @@ tests/contrib/litellm @DataDog/ml-observ
tests/contrib/pydantic_ai @DataDog/ml-observability
tests/contrib/ray @DataDog/ml-observability
tests/contrib/mcp @DataDog/ml-observability
tests/contrib/vllm @DataDog/ml-observability
.gitlab/tests/llmobs.yml @DataDog/ml-observability
# MLObs snapshot tests
tests/snapshots/tests.contrib.anthropic.* @DataDog/ml-observability
Expand All @@ -190,6 +192,7 @@ tests/snapshots/tests.contrib.langgraph.* @DataDog/ml-observ
tests/snapshots/tests.contrib.crewai.* @DataDog/ml-observability
tests/snapshots/tests.contrib.openai_agents.* @DataDog/ml-observability
tests/snapshots/tests.contrib.litellm.* @DataDog/ml-observability
tests/snapshots/tests.contrib.vllm.* @DataDog/ml-observability

# Remote Config
ddtrace/internal/remoteconfig @DataDog/remote-config @DataDog/apm-core-python
Expand Down
21 changes: 21 additions & 0 deletions .gitlab/testrunner.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
variables:
TESTRUNNER_IMAGE: registry.ddbuild.io/dd-trace-py:v73166438-4077fc2-testrunner-2025.08.08@sha256:456e32d2fdc19569fb34d705d1ccf193c179cc5364d1f93e60f825d189647c3d
TESTRUNNER_GPU_IMAGE: ${TESTRUNNER_IMAGE}

.testrunner:
image:
Expand All @@ -18,3 +19,23 @@ variables:
artifacts:
reports:
junit: test-results/junit*.xml

.testrunner_gpu:
image:
name: ${TESTRUNNER_GPU_IMAGE}
docker:
user: bits
# Use GPU-enabled runners
tags: [ "gpu:a10-amd64" ]
timeout: 40m
before_script:
- ulimit -c unlimited
- git config --global --add safe.directory ${CI_PROJECT_DIR}
- pyenv global 3.12 3.8 3.9 3.10 3.11 3.13
- export _CI_DD_AGENT_URL=http://${HOST_IP}:8126/
- export NVIDIA_VISIBLE_DEVICES=all
- export NVIDIA_DRIVER_CAPABILITIES=compute,utility
retry: 2
artifacts:
reports:
junit: test-results/junit*.xml
91 changes: 90 additions & 1 deletion .gitlab/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ include:
DD_FAST_BUILD = "1"



.test_base_hatch_snapshot:
extends: .test_base_hatch
services:
Expand All @@ -54,6 +53,49 @@ include:
# agent at that host. Therefore setting this as a variable will cause recursive requests to the testagent
- export DD_TRACE_AGENT_URL="http://testagent:9126"

# GPU variants of base templates
.test_base_hatch_gpu:
extends: .testrunner_gpu
stage: hatch
needs: [ prechecks ]
parallel: 2
variables:
# Request==Limit to achieve Guaranteed QoS; requires Kubernetes executor support
KUBERNETES_MEMORY_REQUEST: "12Gi"
KUBERNETES_MEMORY_LIMIT: "12Gi"
KUBERNETES_CPU_REQUEST: "2"
KUBERNETES_CPU_LIMIT: "2"
before_script:
- !reference [.testrunner_gpu, before_script]
script:
- export PYTEST_ADDOPTS="${PYTEST_ADDOPTS} --ddtrace"
- export _DD_CIVISIBILITY_USE_CI_CONTEXT_PROVIDER=true
- export DD_FAST_BUILD="1"
- |
envs=( $(hatch env show --json | jq -r --arg suite_name "$SUITE_NAME" 'keys[] | select(. | contains($suite_name))' | sort | ./.gitlab/ci-split-input.sh) )
if [[ ${#envs[@]} -eq 0 ]]; then
echo "No hatch envs found for ${SUITE_NAME}"
exit 1
fi
for env in "${envs[@]}"
do
echo "Running hatch env (GPU): ${env}:test"
hatch run ${env}:test
done
variables:
CMAKE_BUILD_PARALLEL_LEVEL = "12"
CARGO_BUILD_JOBS = "12"
DD_FAST_BUILD = "1"
PIP_EXTRA_INDEX_URL = "https://download.pytorch.org/whl/cu124"

.test_base_hatch_gpu_snapshot:
extends: .test_base_hatch_gpu
services:
- !reference [.services, testagent]
before_script:
- !reference [.test_base_hatch_gpu, before_script]
- export DD_TRACE_AGENT_URL="http://testagent:9126"

# Do not define a `needs:` in order to depend on the whole `precheck` stage
.test_base_riot:
extends: .testrunner
Expand Down Expand Up @@ -101,4 +143,51 @@ include:
- export DD_TRACE_AGENT_URL="http://testagent:9126"
- ln -s "${CI_PROJECT_DIR}" "/home/bits/project"

.test_base_riot_gpu:
extends: .testrunner_gpu
stage: riot
needs: [ build_base_venvs, prechecks ]
parallel: 2
variables:
KUBERNETES_MEMORY_REQUEST: "12Gi"
KUBERNETES_MEMORY_LIMIT: "12Gi"
KUBERNETES_CPU_REQUEST: "2"
KUBERNETES_CPU_LIMIT: "2"
services:
- !reference [.services, ddagent]
before_script:
- !reference [.testrunner_gpu, before_script]
- unset DD_SERVICE
- unset DD_ENV
- unset DD_TAGS
- unset DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED
script:
- |
hashes=( $(.gitlab/scripts/get-riot-hashes.sh "${SUITE_NAME}") )
if [[ ${#hashes[@]} -eq 0 ]]; then
echo "No riot hashes found for ${SUITE_NAME}"
exit 1
fi
for hash in "${hashes[@]}"
do
echo "Running riot hash (GPU): ${hash}"
riot list "${hash}"
export _CI_DD_TAGS="test.configuration.riot_hash:${hash}"
${RIOT_RUN_CMD} "${hash}" -- --ddtrace
done
./scripts/check-diff ".riot/requirements/" \
"Changes detected after running riot. Consider deleting changed files, running scripts/compile-and-prune-test-requirements and committing the result."
./scripts/check-diff "ddtrace/contrib/integration_registry/registry.yaml" \
"Registry YAML file (ddtrace/contrib/integration_registry/registry.yaml) was modified. Please run: scripts/integration_registry/update_and_format_registry.py and commit the changes."

.test_base_riot_gpu_snapshot:
extends: .test_base_riot_gpu
services:
- !reference [.test_base_riot_gpu, services]
- !reference [.services, testagent]
before_script:
- !reference [.test_base_riot_gpu, before_script]
- export DD_TRACE_AGENT_URL="http://testagent:9126"
- ln -s "${CI_PROJECT_DIR}" "/home/bits/project"

# Required jobs will appear here
163 changes: 163 additions & 0 deletions .riot/requirements/2043c14.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --cert=None --client-cert=None --index-url=None --no-annotate --pip-args=None .riot/requirements/2043c14.in
#
aiohappyeyeballs==2.6.1
aiohttp==3.12.15
aiosignal==1.4.0
annotated-types==0.7.0
anyio==4.11.0
astor==0.8.1
async-timeout==5.0.1
attrs==25.3.0
blake3==1.0.7
cachetools==6.2.0
cbor2==5.7.0
certifi==2025.8.3
cffi==2.0.0
charset-normalizer==3.4.3
click==8.3.0
cloudpickle==3.1.1
compressed-tensors==0.11.0
coverage[toml]==7.10.7
cupy-cuda12x==13.6.0
depyf==0.19.0
dill==0.4.0
diskcache==5.6.3
distro==1.9.0
dnspython==2.8.0
einops==0.8.1
email-validator==2.3.0
exceptiongroup==1.3.0
fastapi[standard]==0.118.0
fastapi-cli[standard]==0.0.13
fastapi-cloud-cli==0.2.1
fastrlock==0.8.3
filelock==3.19.1
frozendict==2.4.6
frozenlist==1.7.0
fsspec==2025.9.0
gguf==0.17.1
h11==0.16.0
hf-xet==1.1.10
httpcore==1.0.9
httptools==0.6.4
httpx==0.28.1
huggingface-hub==0.35.3
hypothesis==6.45.0
idna==3.10
iniconfig==2.1.0
interegular==0.3.3
jinja2==3.1.6
jiter==0.11.0
jsonschema==4.25.1
jsonschema-specifications==2025.9.1
lark==1.2.2
llguidance==0.7.30
llvmlite==0.44.0
lm-format-enforcer==0.11.3
markdown-it-py==4.0.0
markupsafe==3.0.3
mdurl==0.1.2
mistral-common[audio,image,opencv,soundfile,soxr]==1.8.5
mock==5.2.0
mpmath==1.3.0
msgpack==1.1.1
msgspec==0.19.0
multidict==6.6.4
networkx==3.4.2
ninja==1.13.0
numba==0.61.2
numpy==2.2.6
nvidia-cublas-cu12==12.8.4.1
nvidia-cuda-cupti-cu12==12.8.90
nvidia-cuda-nvrtc-cu12==12.8.93
nvidia-cuda-runtime-cu12==12.8.90
nvidia-cudnn-cu12==9.10.2.21
nvidia-cufft-cu12==11.3.3.83
nvidia-cufile-cu12==1.13.1.3
nvidia-curand-cu12==10.3.9.90
nvidia-cusolver-cu12==11.7.3.90
nvidia-cusparse-cu12==12.5.8.93
nvidia-cusparselt-cu12==0.7.1
nvidia-nccl-cu12==2.27.3
nvidia-nvjitlink-cu12==12.8.93
nvidia-nvtx-cu12==12.8.90
openai==2.0.0
openai-harmony==0.0.4
opencv-python-headless==4.12.0.88
opentracing==2.4.0
outlines-core==0.2.11
packaging==25.0
partial-json-parser==0.2.1.1.post6
pillow==11.3.0
pluggy==1.6.0
prometheus-client==0.23.1
prometheus-fastapi-instrumentator==7.1.0
propcache==0.3.2
protobuf==6.32.1
psutil==7.1.0
py-cpuinfo==9.0.0
pybase64==1.4.2
pycountry==24.6.1
pycparser==2.23
pydantic[email]==2.11.9
pydantic-core==2.33.2
pydantic-extra-types[pycountry]==2.10.5
pygments==2.19.2
pytest==8.4.2
pytest-asyncio==0.21.1
pytest-cov==7.0.0
pytest-mock==3.15.1
pytest-randomly==4.0.1
python-dotenv==1.1.1
python-json-logger==3.3.0
python-multipart==0.0.20
pyyaml==6.0.3
pyzmq==27.1.0
ray[cgraph]==2.49.2
referencing==0.36.2
regex==2025.9.18
requests==2.32.5
rich==14.1.0
rich-toolkit==0.15.1
rignore==0.6.4
rpds-py==0.27.1
safetensors==0.6.2
scipy==1.15.3
sentencepiece==0.2.1
sentry-sdk==2.39.0
setproctitle==1.3.7
shellingham==1.5.4
sniffio==1.3.1
sortedcontainers==2.4.0
soundfile==0.13.1
soxr==1.0.0
starlette==0.48.0
sympy==1.14.0
tiktoken==0.11.0
tokenizers==0.22.1
tomli==2.2.1
torch==2.8.0
torchaudio==2.8.0
torchvision==0.23.0
tqdm==4.67.1
transformers==4.56.2
triton==3.4.0
typer==0.19.2
typing-extensions==4.15.0
typing-inspection==0.4.2
urllib3==2.5.0
uvicorn[standard]==0.37.0
uvloop==0.21.0
vllm==0.10.2
watchfiles==1.1.0
websockets==15.0.1
xformers==0.0.32.post1
xgrammar==0.1.23
yarl==1.20.1

# The following packages are considered to be unsafe in a requirements file:
setuptools==80.9.0
Loading
Loading