Skip to content

Enable debug logs for debugger scenarios#6685

Merged
jpbempel merged 2 commits into
mainfrom
jpbempel/enable-debug-logs
Apr 9, 2026
Merged

Enable debug logs for debugger scenarios#6685
jpbempel merged 2 commits into
mainfrom
jpbempel/enable-debug-logs

Conversation

@jpbempel
Copy link
Copy Markdown
Member

@jpbempel jpbempel commented Apr 3, 2026

Motivation

need to have debug logs to understand what is going on at tracer level, specially for flaky tests

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

github-actions Bot commented Apr 3, 2026

CODEOWNERS have been resolved as:

utils/_context/_scenarios/debugger.py                                   @DataDog/system-tests-core

@datadog-datadog-prod-us1

This comment has been minimized.

@jpbempel jpbempel marked this pull request as ready for review April 3, 2026 09:52
@jpbempel jpbempel requested a review from a team as a code owner April 3, 2026 09:52
base_weblog_env: dict[str, str | None] = {
"DD_REMOTE_CONFIG_ENABLED": "1",
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": "1",
"JAVA_OPTS": " -Ddatadog.slf4j.simpleLogger.log.com.datadog.debugger=debug ",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, debug log must not be activated by default for QA reason (being as close as possible from our customer setups).

If you plan to run this in a dedicated CI env, or locally, you can achieve the same, but cleaner with the dedicated option to activate debug logs : --force-dd-trace-debug. To use it, you can add this in the configure method (line 39) :

    if config.option.force_dd_trace_debug:
        self.weblog_container.environment["JAVA_OPTS"] = " -Ddatadog.slf4j.simpleLogger.log.com.datadog.debugger=debug "

Then, just add --force-dd-trace-debug to the run.sh command. Let me know if this work for you ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is more and more flakiness in the tests, and not having the debug logs for tracer is problematic to catch and troubleshoot what exactly what's going on. this is only happening in CI and not reproducible locally.
Apart from performance I don't see how debug logs will bring QA difference of what we are trying to achieve with system-tests.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from performance

Yes, it's performance : it usually trigger many bugs that we are not interested.

But I understand your issue. It'll be unreasonnably complex to offer a per-scenario option in the official system-tests workflow, so I presume it's the best course of action.

Just keep in mind that once you've solved the flakyness you'll need to remove it? And may I ask you top add a small comment why we have temporary added this ?

Copy link
Copy Markdown
Member Author

@jpbempel jpbempel Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it usually trigger many bugs that we are not interested.

that's sound weird to me.

Keep it mind that all the runtimes are not equivalent on this...

@jpbempel jpbempel merged commit ed130bb into main Apr 9, 2026
860 of 862 checks passed
@jpbempel jpbempel deleted the jpbempel/enable-debug-logs branch April 9, 2026 16:18
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.

2 participants