diff --git a/.env b/.env index b2bbebe9be8..bdfb229da68 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ SKIP_SIMPLECOV=1 -DD_AGENT_HOST=testagent +DD_AGENT_HOST=catadog DD_API_KEY=00000000000000000000000000000000 DD_METRIC_AGENT_PORT=8125 -DD_TRACE_AGENT_PORT=9126 +DD_TRACE_AGENT_PORT=8128 # Values are used for proxying from APM Test Agent to real Datadog Agent DD_REAL_AGENT_HOST=ddagent diff --git a/docker-compose.yml b/docker-compose.yml index a87492ea8da..b3ea5e36f16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,11 +13,12 @@ services: - presto - redis - testagent + - catadog env_file: ./.env environment: &common-environment BUNDLE_GEMFILE: /app/Gemfile-2.5 - DD_AGENT_HOST: testagent - DD_TRACE_AGENT_PORT: 9126 + DD_AGENT_HOST: catadog + DD_TRACE_AGENT_PORT: 8128 TEST_DATADOG_INTEGRATION: 1 TEST_ELASTICSEARCH_HOST: elasticsearch TEST_MEMCACHED_HOST: memcached @@ -201,23 +202,30 @@ services: - "127.0.0.1:${DD_REAL_AGENT_PORT}:8126" volumes: - ddagent_var_run:/var/run/datadog - testagent: image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:v1.12.0 ports: - - "127.0.0.1:${DD_TRACE_AGENT_PORT}:9126" + - "127.0.0.1:9126:9126" depends_on: - ddagent env_file: ./.env environment: - - LOG_LEVEL=DEBUG - - TRACE_LANGUAGE=ruby - - DD_TRACE_AGENT_URL=http://${DD_REAL_AGENT_HOST}:${DD_REAL_AGENT_PORT} - - PORT=${DD_TRACE_AGENT_PORT} - - DD_POOL_TRACE_CHECK_FAILURES=true - - DD_DISABLE_ERROR_RESPONSES=true - - ENABLED_CHECKS=trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service - + - LOG_LEVEL=DEBUG + - TRACE_LANGUAGE=ruby + - DD_TRACE_AGENT_URL=http://${DD_REAL_AGENT_HOST}:${DD_REAL_AGENT_PORT} + - PORT=9126 + - DD_POOL_TRACE_CHECK_FAILURES=true + - DD_DISABLE_ERROR_RESPONSES=true + - ENABLED_CHECKS=trace_content_length,trace_stall,meta_tracer_version_header,trace_count_header,trace_peer_service,trace_dd_service + catadog: + image: ghcr.io/datadog/catadog:latest + command: --agent-host testagent --agent-port 9126 + ports: + - "127.0.0.1:${DD_TRACE_AGENT_PORT}:8128" + depends_on: + - testagent + environment: + - PORT=${DD_TRACE_AGENT_PORT} elasticsearch: image: elasticsearch:8.1.3 expose: diff --git a/docs/DevelopmentGuide.md b/docs/DevelopmentGuide.md index 458f2883536..041e96f43a0 100644 --- a/docs/DevelopmentGuide.md +++ b/docs/DevelopmentGuide.md @@ -179,10 +179,23 @@ The actionable in this case would be to ensure that the thread created in `worke Depending on the situation, the thread in question might need to be forced to terminate. It's recommended to have a mechanism in place to terminate it (a shared variable that changes value when the thread should exit), but as a last resort, `Thread#terminate` forces the thread to finish. Keep in mind that regardless of the termination method, `Thread#join` must be called to ensure that the thread has completely finished its shutdown process. +**Catadog** + +The catadog Docker image is a composable and extensible tool for development, testing, and diagnosis. The catadog container +runs alongside the Ruby tracer and forwards trace information to the APM Test Agent. + +Catadog also emits helpful logging, which can be viewed in local testing or in CircleCI as a job step for tracer and contrib +tests. Locally, to get catadog logs: + + $ docker-compose logs -f catadog + +Read more about catadog: +https://github.com/datadog/catadog#readme + **The APM Test Agent** The APM test agent emulates the APM endpoints of the Datadog Agent. The Test Agent container -runs alongside the Ruby tracer locally and in CI, handles all traces during test runs and performs a number +runs alongside catadog and in CI, handles all traces during test runs and performs a number of 'Trace Checks'. For more information on these checks, see: https://github.com/DataDog/dd-apm-test-agent#trace-invariant-checks