Test Optimization is not available in the selected site () at this time.

Overview

You can correlate Test Optimization data with logs injected into Datadog, which allows you to view and analyze logs for specific test cases.

Examine logs for specific test cases with logs and tests correlation.

Setup

Correlation can be configured differently depending on how you send your tests data to Datadog.

Java

Agentless log submission is supported for the following languages and frameworks:

  • dd-trace-java >= 1.35.2 and Log4j2.

Use the following environment variables to enable and configure Agentless log submission:

NameDescriptionDefault value
DD_AGENTLESS_LOG_SUBMISSION_ENABLED (required)Enables/disables log submissionfalse
DD_AGENTLESS_LOG_SUBMISSION_LEVEL (optional)Sets log level for Agentless submissionINFO
DD_AGENTLESS_LOG_SUBMISSION_QUEUE_SIZE (optional)Sets the maximum size of pending logs queue1024
DD_AGENTLESS_LOG_SUBMISSION_URL (optional)Sets custom URL for submitting logs-

Javascript/Typescript

Agentless log submission is supported for the following languages and frameworks:

  • dd-trace-js >= 5.24.0 and dd-trace-js >= 4.48.0 and winston.

Use the following environment variables to enable and configure Agentless log submission:

NameDescriptionDefault value
DD_AGENTLESS_LOG_SUBMISSION_ENABLED (required)Enables/disables log submissionfalse
DD_AGENTLESS_LOG_SUBMISSION_URL (optional)Sets custom URL for submitting logs-

.NET

Agentless log submission is supported for the following languages and frameworks:

  • dd-trace-dotnet >= 2.50.0 and XUnit TestOutputHelper.

Use the following environment variables to enable and configure Agentless log submission:

NameDescriptionDefault value
DD_CIVISIBILITY_LOGS_ENABLED (required)Enables/disables CI Visibility log submissionfalse

Swift

Use the following environment variables to enable and configure log submission:

NameDescriptionDefault value
DD_ENABLE_STDOUT_INSTRUMENTATIONEnables/disables stdout log submissionfalse
DD_ENABLE_STDERR_INSTRUMENTATIONEnables/disables stderr log submissionfalse

Ruby

Agentless logs submission with Test Optimization is supported for Rails applications. Before enabling, ensure that your application is instrumented with Datadog tracing.

To use agentless log submission, you need datadog-ci version 0.16 or later. The following logging libraries are supported:

  • activesupport >= 5.0 (only when using ActiveSupport::TaggedLogging)
  • lograge >= 0.14
  • semantic_logger >= 4.0

Use the following environment variable to enable log submission:

NameDescriptionDefault value
DD_AGENTLESS_LOG_SUBMISSION_ENABLED (required)Enables/disables log submissionfalse
  1. Set up log collection through the Datadog Agent.
  2. Follow the steps described in Correlate Logs and Traces.

Further Reading

Additional helpful documentation, links, and articles:

PREVIEWING: teddy.gesbert/doc-dora