Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions content/en/containers/amazon_ecs/apm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
Expand Down
Loading