Skip to content

Use exec to ensure weblogs get SIGTERM on stop#6804

Draft
smola wants to merge 2 commits intomainfrom
smola/exec-form
Draft

Use exec to ensure weblogs get SIGTERM on stop#6804
smola wants to merge 2 commits intomainfrom
smola/exec-form

Conversation

@smola
Copy link
Copy Markdown
Member

@smola smola commented Apr 24, 2026

Motivation

Improve reliability of end of setup flushes. Most tracers try to flush data on SIGTERM, but not all weblogs are setup in a way that the app gets SIGTERM signals.

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions
Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

lib-injection/build/docker/python/dd-lib-python-init-test-django-27/Dockerfile  @DataDog/system-tests-core
lib-injection/build/docker/python/dd-lib-python-init-test-django-gunicorn-alpine/Dockerfile  @DataDog/system-tests-core
lib-injection/build/docker/python/dd-lib-python-init-test-django-gunicorn/Dockerfile  @DataDog/system-tests-core
lib-injection/build/docker/python/dd-lib-python-init-test-django-preinstalled/Dockerfile  @DataDog/system-tests-core
lib-injection/build/docker/python/dd-lib-python-init-test-django-unsupported-package-force/Dockerfile  @DataDog/system-tests-core
lib-injection/build/docker/python/dd-lib-python-init-test-django-uvicorn/Dockerfile  @DataDog/system-tests-core
lib-injection/build/docker/python/dd-lib-python-init-test-django/Dockerfile  @DataDog/system-tests-core
utils/build/docker/cpp_httpd/httpd.Dockerfile                           @DataDog/system-tests-core
utils/build/docker/java/spring-boot-openliberty.Dockerfile              @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/spring-boot/app.sh                              @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java_otel/spring-boot-native.Dockerfile              @DataDog/opentelemetry @DataDog/system-tests-core
utils/build/docker/java_otel/spring-boot/app.sh                         @DataDog/opentelemetry @DataDog/system-tests-core
utils/build/docker/nodejs/anthropic-js.Dockerfile                       @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express4-typescript.Dockerfile                @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express4.Dockerfile                           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express5.Dockerfile                           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/fastify.Dockerfile                            @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/google_genai-js.Dockerfile                    @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/nextjs.Dockerfile                             @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/openai-js.Dockerfile                          @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/parametric/app.sh                             @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/uds-express4.Dockerfile                       @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_otel/express4-otel.Dockerfile                 @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.0-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.0.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.1-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.1.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.2-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.2.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.3-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.3.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.4-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-7.4.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-8.0-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-8.0.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-8.1-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-8.1.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-8.2-zts.Dockerfile                    @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/apache-mod-8.2.Dockerfile                        @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/app.sh                                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-7.0.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-7.1.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-7.2.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-7.3.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-7.4.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-8.0.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-8.1.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-8.2.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/php/php-fpm-8.5.Dockerfile                           @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/proxy.Dockerfile                                     @DataDog/system-tests-core
utils/build/docker/python/django-poc.Dockerfile                         @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python/django-py3.13.Dockerfile                      @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python/fastapi.Dockerfile                            @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python/flask-poc.Dockerfile                          @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python/python3.12.Dockerfile                         @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python/tornado.Dockerfile                            @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python/uds-flask.Dockerfile                          @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python_otel/flask-poc-otel.Dockerfile                @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/python_otel/flask-poc-otel/app.sh                    @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/ruby/graphql23/app.sh                                @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rack/app.sh                                     @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails42/app.sh                                  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails52/app.sh                                  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails61/app.sh                                  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails72/app.sh                                  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/rails80/app.sh                                  @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/sinatra14/app.sh                                @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/sinatra22/app.sh                                @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/sinatra32/app.sh                                @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/sinatra41/app.sh                                @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/uds-rails.Dockerfile                            @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/ruby/uds-sinatra.Dockerfile                          @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/runner.Dockerfile                                    @DataDog/system-tests-core
utils/build/ssi/nodejs/js-app.Dockerfile                                @DataDog/system-tests-core
utils/build/ssi/python/py-app.Dockerfile                                @DataDog/system-tests-core
utils/build/ssi/ruby/rails6-app-deployment-mode.Dockerfile              @DataDog/system-tests-core
utils/build/ssi/ruby/rails6-app-vendored-mode.Dockerfile                @DataDog/system-tests-core
utils/build/ssi/ruby/rails6-app.Dockerfile                              @DataDog/system-tests-core
utils/build/ssi/ruby/ruby-app-deployment-mode.Dockerfile                @DataDog/system-tests-core
utils/build/ssi/ruby/ruby-app-vendored-mode.Dockerfile                  @DataDog/system-tests-core
utils/build/ssi/ruby/ruby-app.Dockerfile                                @DataDog/system-tests-core
utils/build/virtual_machine/microvm/Dockerfile.amazonlinux2023          @DataDog/system-tests-core
utils/build/virtual_machine/microvm/Dockerfile.ubuntu22                 @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-alpine/Dockerfile.template  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multialpine/Dockerfile.python_3_10-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multialpine/Dockerfile.python_3_11-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multialpine/Dockerfile.python_3_12-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multialpine/Dockerfile.python_3_8-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multialpine/Dockerfile.python_3_9-alpine  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multicontainer/Dockerfile.python_3_10  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multicontainer/Dockerfile.python_3_11  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multicontainer/Dockerfile.python_3_12  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multicontainer/Dockerfile.python_3_8  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python-multicontainer/Dockerfile.python_3_9  @DataDog/system-tests-core
utils/build/virtual_machine/weblogs/python/test-app-python37-container/Dockerfile.template  @DataDog/system-tests-core

@datadog-prod-us1-6
Copy link
Copy Markdown

datadog-prod-us1-6 Bot commented Apr 24, 2026

Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 92 Tests failed

tests.appsec.rasp.test_api10.Test_API10_downstream_ssrf_telemetry.test_api10_req[nextjs] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert False
 +  where False = validate_metric_variant_v2_exists('rasp.rule.eval', 'ssrf', 'request', [{'_computed_namespace': 'appsec', 'common': True, 'metric': 'rasp.rule.eval', 'points': [[1777027258.968, 28]], ...}])

self = <tests.appsec.rasp.test_api10.Test_API10_downstream_ssrf_telemetry object at 0x7efd083fede0>

    def test_api10_req(self):
        series_eval = find_series("appsec", "rasp.rule.eval", is_metrics=True)
        assert series_eval
>       assert validate_metric_variant_v2_exists("rasp.rule.eval", "ssrf", "request", series_eval)
E       AssertionError: assert False
...
tests.appsec.rasp.test_api10.Test_API10_downstream_ssrf_telemetry.test_api10_req[nextjs] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert False
 +  where False = validate_metric_variant_v2_exists('rasp.rule.eval', 'ssrf', 'request', [{'_computed_namespace': 'appsec', 'common': True, 'metric': 'rasp.rule.eval', 'points': [[1777027112.207, 28]], ...}])

self = <tests.appsec.rasp.test_api10.Test_API10_downstream_ssrf_telemetry object at 0x7fab0f80e4e0>

    def test_api10_req(self):
        series_eval = find_series("appsec", "rasp.rule.eval", is_metrics=True)
        assert series_eval
>       assert validate_metric_variant_v2_exists("rasp.rule.eval", "ssrf", "request", series_eval)
E       AssertionError: assert False
...
tests.appsec.rasp.test_cmdi.Test_Cmdi_Telemetry.test_cmdi_telemetry[nextjs] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: [['rule_type:lfi', 'waf_version:1.30.1', 'event_rules_version:1.99.0']]
assert False
 +  where False = any(<generator object Test_Cmdi_Telemetry.test_cmdi_telemetry.<locals>.<genexpr> at 0x7faafc65e200>)

self = <tests.appsec.rasp.test_cmdi.Test_Cmdi_Telemetry object at 0x7fab0f838d10>

    def test_cmdi_telemetry(self):
        series_eval = find_series("appsec", "rasp.rule.eval", is_metrics=True)
        assert series_eval
>       assert any(validate_metric_variant("rasp.rule.eval", "command_injection", "exec", s) for s in series_eval), [
...
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b5dfbb9 | Docs | Datadog PR Page | Give us feedback!

@smola smola changed the title Smola/exec form Use exec to ensure weblogs get SIGTERM on stop Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant