Skip to content

Commit

Permalink
Merge branch 'main' into taegyunkim/profiling-mac-native
Browse files Browse the repository at this point in the history
  • Loading branch information
taegyunkim authored Jan 8, 2025
2 parents b36cd8e + 75bed24 commit a924d98
Show file tree
Hide file tree
Showing 1,763 changed files with 74,118 additions and 23,382 deletions.
112 changes: 5 additions & 107 deletions .circleci/config.templ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_resource_class: &default_resource_class medium
ubuntu_base_image: &ubuntu_base_img ubuntu-2004:2023.04.2
cimg_base_image: &cimg_base_image cimg/base:2022.08
python310_image: &python310_image cimg/python:3.10.12
ddtrace_dev_image: &ddtrace_dev_image ghcr.io/datadog/dd-trace-py/testrunner@sha256:4c8afd048321e702f3605b4ae4d206fcd00e74bac708089cfe7f9c24383dc53b
ddtrace_dev_image: &ddtrace_dev_image ghcr.io/datadog/dd-trace-py/testrunner:47c7b5287da25643e46652e6d222a40a52f2382a@sha256:3a02dafeff9cd72966978816d1b39b54f5517af4049396923b95c8452f604269
redis_image: &redis_image redis:4.0-alpine@sha256:3e99741f293147ff406657dda7644c2b88564b80a498cd00da8f905743449c9f
memcached_image: &memcached_image memcached:1.5-alpine@sha256:48cb7207e3d34871893fa1628f3a4984375153e9942facf82e25935b0a633c8a
cassandra_image: &cassandra_image cassandra:3.11.7@sha256:495e5752526f7e75d3ad85b6a6bbf3b79714321b17a44255a216c341e3baae11
Expand All @@ -16,7 +16,7 @@ mongo_image: &mongo_image mongo:3.6@sha256:19c11a8f1064fd2bb713ef1270f79a742a184
httpbin_image: &httpbin_image kennethreitz/httpbin@sha256:2c7abc4803080c22928265744410173b6fea3b898872c01c5fd0f0f9df4a59fb
vertica_image: &vertica_image vertica/vertica-ce:latest
rabbitmq_image: &rabbitmq_image rabbitmq:3.7-alpine
testagent_image: &testagent_image ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.17.0
testagent_image: &testagent_image ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.20.0

parameters:
coverage:
Expand Down Expand Up @@ -80,7 +80,7 @@ commands:
description: "Install riot"
steps:
# Make sure we install and run riot on Python 3
- run: pip3 install riot==0.20.0
- run: pip3 install riot==0.20.1

setup_rust:
description: "Install rust toolchain"
Expand Down Expand Up @@ -188,6 +188,7 @@ commands:
RIOT_RUN_RECOMPILE_REQS: "<< pipeline.parameters.riot_run_latest >>"
DD_CIVISIBILITY_AGENTLESS_ENABLED: true
no_output_timeout: 5m
attempts: 2
command: |
ulimit -c unlimited
./scripts/run-test-suite '<<parameters.pattern>>' <<pipeline.parameters.coverage>> 1
Expand Down Expand Up @@ -280,109 +281,6 @@ commands:
name: Get APM Test Agent Trace Check Results
command: bash ./scripts/get-test-agent-results.sh

run_hatch_env_test:
description: "Run hatch env test"
parameters:
env:
type: string
default: ""
snapshot:
type: boolean
default: false
docker_services:
type: string
default: ""
store_coverage:
type: boolean
default: true
trace_agent_url:
type: string
default: "http://localhost:9126"
run_agent_checks:
type: boolean
default: true
steps:
- checkout
- attach_workspace:
at: .
- restore_cache:
keys:
- lastsuccess-{{ .Environment.CIRCLE_BRANCH }}-<<parameters.env>>-{{ .Environment.CIRCLE_NODE_INDEX }}
- setup_hatch
- when:
condition:
<< parameters.snapshot >>
steps:
- start_docker_services:
env: SNAPSHOT_CI=1
services: testagent << parameters.docker_services >>
- run:
name: Run tests
environment:
DD_TRACE_AGENT_URL: << parameters.trace_agent_url >>
command: |
ulimit -c unlimited
./scripts/run-test-suite-hatch '<<parameters.env>>' 1
- run:
command: |
mkdir -p /tmp/core_dumps
cp core.* /tmp/core_dumps || true
./scripts/bt
when: on_fail
- store_artifacts:
name: "Store core dumps"
path: /tmp/core_dumps
- unless:
condition:
<< parameters.snapshot >>
steps:
- run:
name: Run tests
command: |
hatch env show --json | jq -r 'keys[] | select(. | contains("<< parameters.env >>"))' | sort | circleci tests split | xargs -n 1 -I {} hatch run {}:test
- when:
condition:
<< parameters.store_coverage >>
steps:
- save_coverage
- store_test_results:
path: test-results
- store_artifacts:
path: test-results
- save_cache:
key: lastsuccess-{{ .Environment.CIRCLE_BRANCH }}-<<parameters.env>>-{{ .Environment.CIRCLE_NODE_INDEX }}-{{ epoch }}
paths:
- ./latest-success-commit
- run:
name: "Store Test Agent Supported Integrations Data"
command: |
if [[ -z "$(curl -s << parameters.trace_agent_url >>/test/integrations/tested_versions)" ]]; then
# No integrations were tested. Not saving any artifacts
echo "Response body is empty. Skipping saving integration artifacts."
else
# make temporary files to save response data to
response=$(mktemp) && headers=$(mktemp)
# create artifacts directory if it doesn't exist
[ -d "./artifacts" ] || mkdir -p "./artifacts"
# get tested integrations
curl -o "$response" -D "$headers" << parameters.trace_agent_url >>/test/integrations/tested_versions
# get filename representing the name of the tested integration from headers
filename=$(awk -F': ' '/file-name/{print $2}' "$headers" | tr -d '\r\n')
# copy data to final file and remove temp files
mv "$response" "artifacts/${filename}_supported_versions.csv"
rm "$headers"
fi
- store_artifacts:
path: artifacts
destination: supported-integrations
- when:
condition:
<< parameters.run_agent_checks >>
steps:
- run:
name: Get APM Test Agent Trace Check Results
command: bash ./scripts/get-test-agent-results.sh

executors:
cimg_base:
docker:
Expand Down Expand Up @@ -521,7 +419,7 @@ jobs:

appsec_integrations:
<<: *machine_executor
parallelism: 7
parallelism: 13
steps:
- run_test:
pattern: 'appsec_integrations'
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
name: Generate config
command: |
export GIT_COMMIT_DESC=$(git log -n 1 $CIRCLE_SHA1)
pip3 install riot==0.20.0
pip3 install riot==0.20.1
riot -P -v run --pass-env -s circleci-gen-config -- -v
- continuation/continue:
configuration_path: .circleci/config.gen.yml
Expand Down
17 changes: 15 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ riotfile.py @DataDog/apm-python
.riot/requirements/ @DataDog/apm-python
CHANGELOG.md @DataDog/apm-python
README.md @DataDog/apm-python
tests/telemetry @DataDog/apm-python

# Guild
setup.py @DataDog/python-guild
Expand All @@ -39,7 +40,7 @@ ddtrace/internal/compat.py @DataDog/python-guild @DataDog/apm-core-pyt
ddtrace/settings/config.py @DataDog/python-guild @DataDog/apm-sdk-api-python
docs/ @DataDog/python-guild
tests/utils.py @DataDog/python-guild
tests/.suitespec.json @DataDog/python-guild @DataDog/apm-core-python
tests/suitespec.yml @DataDog/python-guild @DataDog/apm-core-python
tests/suitespec.py @DataDog/python-guild @DataDog/apm-core-python

# Core / Language Platform
Expand All @@ -50,7 +51,7 @@ tests/opentracer @DataDog/apm-core-python
tests/runtime @DataDog/apm-core-python
tests/tracer @DataDog/apm-core-python

# CI App and related
# Test Visibility and related
ddtrace/contrib/asynctest @DataDog/ci-app-libraries
ddtrace/contrib/coverage @DataDog/ci-app-libraries
ddtrace/contrib/pytest @DataDog/ci-app-libraries
Expand All @@ -76,6 +77,15 @@ tests/coverage @DataDog/apm-core-python @
tests/tracer/test_ci.py @DataDog/ci-app-libraries
ddtrace/ext/git.py @DataDog/ci-app-libraries @DataDog/apm-core-python
scripts/ci_visibility/* @DataDog/ci-app-libraries
# Test Visibility owns the freezegun integration because it's the team most affected by it
ddtrace/contrib/freezegun @DataDog/ci-app-libraries
ddtrace/contrib/internal/freezegun @DataDog/ci-app-libraries
tests/contrib/freezegun @DataDog/ci-app-libraries
# Test Visibility: Selenium integration
ddtrace/contrib/selenium @DataDog/ci-app-libraries
ddtrace/internal/selenium @DataDog/ci-app-libraries
tests/contrib/selenium @DataDog/ci-app-libraries
tests/snapshots/test_selenium_* @DataDog/ci-app-libraries

# Debugger
ddtrace/debugging/ @DataDog/debugger-python
Expand Down Expand Up @@ -134,6 +144,8 @@ ddtrace/contrib/internal/anthropic @DataDog/ml-observabilit
ddtrace/contrib/anthropic @DataDog/ml-observability
ddtrace/contrib/internal/google_generativeai @DataDog/ml-observability
ddtrace/contrib/google_generativeai @DataDog/ml-observability
ddtrace/contrib/internal/vertexai @DataDog/ml-observability
ddtrace/contrib/vertexai @DataDog/ml-observability
tests/llmobs @DataDog/ml-observability
tests/contrib/openai @DataDog/ml-observability
tests/contrib/langchain @DataDog/ml-observability
Expand All @@ -142,6 +154,7 @@ tests/contrib/botocore/test_bedrock_llmobs.py @DataDog/ml-observabilit
tests/contrib/botocore/bedrock_cassettes @DataDog/ml-observability
tests/contrib/anthropic @DataDog/ml-observability
tests/contrib/google_generativeai @DataDog/ml-observability
tests/contrib/vertexai @DataDog/ml-observability
.gitlab/tests/llmobs.yml @DataDog/ml-observability

# Remote Config
Expand Down
29 changes: 0 additions & 29 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Bug Report (Low Priority)"
description: "Create a public Bug Report. Note that these may not be addressed as quickly as the helpdesk and that looking up account information will be difficult."
title: "[BUG]: "
labels: bug
body:
- type: input
attributes:
label: Tracer Version(s)
description: "Version(s) of the tracer affected by this bug"
placeholder: "1.23.4, 2.8.0"
validations:
required: true

- type: input
attributes:
label: Python Version(s)
description: "Version(s) of Python (`python --version`) that you've encountered this bug with"
placeholder: "Python 3.9.15"
validations:
required: true

- type: input
attributes:
label: Pip Version(s)
description: "Version(s) of Pip (`pip --version`) that you've encountered this bug with"
placeholder: "pip 22.0.4"
validations:
required: true

- type: textarea
attributes:
label: Bug Report
description: Please add a clear and concise description of the bug here
validations:
required: true

- type: textarea
attributes:
label: Reproduction Code
description: Please add code here to help us reproduce the problem
validations:
required: false

- type: textarea
attributes:
label: Error Logs
description: "Please provide any error logs from the tracer (`DD_TRACE_DEBUG=true` can help)"
validations:
required: false

- type: textarea
attributes:
label: Libraries in Use
description: "Which libraries and their versions are you using? Paste output from `pip freeze` here."
validations:
required: false

- type: input
attributes:
label: Operating System
description: "Provide your operating system and version (e.g. `uname -a`)"
placeholder: Darwin Kernel Version 23.6.0
validations:
required: false
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: Bug Report (High Priority)
url: https://help.datadoghq.com/hc/en-us/requests/new?tf_1260824651490=pt_product_type:apm&tf_1900004146284=pt_apm_language:python
about: Create an expedited Bug Report via the helpdesk (no login required). This will allow us to look up your account and allows you to provide additional information in private. Please do not create a GitHub issue to report a bug.
- name: Feature Request (High Priority)
url: https://help.datadoghq.com/hc/en-us/requests/new?tf_1260824651490=pt_product_type:apm&tf_1900004146284=pt_apm_language:python&tf_1260825272270=pt_apm_category_feature_request
about: Create an expedited Feature Request via the helpdesk (no login required). This helps with prioritization and allows you to provide additional information in private. Please do not create a GitHub issue to request a feature.

50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Feature Request (Low Priority)
description: Create a public Feature Request. Note that these may not be addressed as quickly as the helpdesk and that looking up account information will be difficult.
title: "[FEATURE]: "
labels: feature-request
body:
- type: input
attributes:
label: Package Name
description: "If your feature request is to add instrumentation support for a package please provide the name here"
placeholder: mysql
validations:
required: false

- type: input
attributes:
label: Package Version(s)
description: "If your feature request is to add instrumentation support for a package please provide the version you use"
placeholder: 0.0.3
validations:
required: false

- type: textarea
attributes:
label: Describe the goal of the feature
description: A clear and concise goal of what you want to happen.
validations:
required: true

- type: textarea
attributes:
label: Is your feature request related to a problem?
description: |
Please add a clear and concise description of your problem.
E.g. I'm unable to instrument my database queries...
validations:
required: false

- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered
validations:
required: false

- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here
validations:
required: false
Loading

0 comments on commit a924d98

Please sign in to comment.