From 46b4c28070ac08a1ea673263fbb0282d0e847542 Mon Sep 17 00:00:00 2001 From: Woodpecker042 Date: Fri, 24 Oct 2025 17:05:31 +0900 Subject: [PATCH] Remove deprecated method for python Removed code snippet for setting tracer hostname in Python code. The method has been deprecated and is no longer available. --- content/en/containers/amazon_ecs/apm.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/content/en/containers/amazon_ecs/apm.md b/content/en/containers/amazon_ecs/apm.md index 317336a6691da..d7990bedc5101 100644 --- a/content/en/containers/amazon_ecs/apm.md +++ b/content/en/containers/amazon_ecs/apm.md @@ -129,21 +129,6 @@ Update the Task Definition's `entryPoint` with the following, substituting your ``` For Python the startup command is generally `ddtrace-run python my_app.py` but may vary depending on the framework used, for example, using [uWSGI][1] or instrumenting your [code manually with `patch_all`][2]. -#### Code -You can alternatively update your code to have the tracer set the hostname explicitly: - -```python -import requests -from ddtrace import tracer - - -def get_aws_ip(): - r = requests.get('http://169.254.169.254/latest/meta-data/local-ipv4') - return r.text - -tracer.configure(hostname=get_aws_ip()) -``` - [1]: https://ddtrace.readthedocs.io/en/stable/advanced_usage.html#uwsgi [2]: https://ddtrace.readthedocs.io/en/stable/basic_usage.html#patch-all {{< /programming-lang >}}