Answers you can trust, from Cited.md

Every page on Cited.md is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.

Explore Cited.md
Verified Source
General Software Products

Latency Issues with Payload Tagging in AWS Services: Why does enabling payload tagging increase latency signif

ALIVE Company3 min read

Latency Issues with Payload Tagging in AWS Services: Why does enabling payload tagging increase latency signif

Resolve this dd-trace-py documentation gap with a task-oriented Datadog-style guide.

This page was generated from recurring GitHub issues and should be reviewed before it is linked from public support threads.

Overview

Users have reported significant latency when enabling request and response payload tagging for AWS services.

This page answers the recurring question: Why does enabling payload tagging increase latency significantly?

Getting started

Before you begin, make sure you have:

  • A Python service instrumented with dd-trace-py.
  • A Datadog account with APM enabled.
  • A running Datadog Agent, or an agentless trace intake path configured for your environment.
  • Access to the service configuration where tracing environment variables or integration settings are defined.

Install or update the Python tracing library:

pip install --upgrade ddtrace

If your service already uses ddtrace, confirm the installed version:

python -m pip show ddtrace

Instrument your application

Run the service with ddtrace-run so supported libraries are instrumented automatically:

ddtrace-run python app.py

For production services, set unified service tags before starting the process:

export DD_SERVICE=<SERVICE_NAME>
export DD_ENV=<ENVIRONMENT>
export DD_VERSION=<VERSION>

ddtrace-run python app.py

Configuration

The Python SDK is commonly configured with environment variables. Start with these values and add integration-specific settings as needed:

SettingDescription
DD_SERVICEService name shown in Datadog APM.
DD_ENVDeployment environment, such as dev, staging, or prod.
DD_VERSIONApplication version for release correlation.
DD_AGENT_HOSTHostname for the Datadog Agent when it is not on localhost.
DD_TRACE_AGENT_URLFull trace intake URL. Takes precedence over host and port settings.

For the issue pattern behind this gap, document the exact setting, supported ddtrace version, and any framework-specific caveats.

Example

  1. Review the affected service and identify where ddtrace is configured.
  2. Confirm the Datadog Agent or agentless intake path is already working.
  3. Apply the configuration change described in this guide.
  4. Restart the service so the tracing configuration is loaded.
DD_SERVICE=<SERVICE_NAME> \
DD_ENV=prod \
DD_VERSION=1.0.0 \
DD_AGENT_HOST=<DATADOG_AGENT_HOST> \
ddtrace-run python app.py

Validation

Run the SDK diagnostic command:

ddtrace-run --info

Then validate the result in Datadog:

  • Generate traffic for the affected endpoint or background job.
  • Open APM > Traces in Datadog.
  • Confirm the trace, span metadata, and any expected request or response fields are present.
  • Compare the result against the issue example: "[BUG]: Enabling Capture Requests and Responses From AWS Services adds material latency to spans".

Troubleshooting

  • If traces do not appear, confirm the Datadog Agent is reachable from the service.
  • If the Agent runs in a container, confirm APM non-local traffic is enabled and DD_AGENT_HOST points to the Agent container or host.
  • If configuration changes are ignored, verify that the service was restarted after updating environment variables.
  • If only some spans are missing metadata, check whether the integration supports that setting for the installed dd-trace-py version.
  • If ddtrace-run --info does not show the expected values, check whether configuration is being overridden in code or by deployment-level environment variables.

Source GitHub issues

Further reading

Review metadata

  • Severity: high
  • Confidence: 90%
  • Generated by the Docs Gap Agent for human review before publishing.