Skip to content

Commit 662657c

Browse files
authored
Merge pull request #335 from nmuesch/patch-2
Adds section about updating the hostname/port
2 parents 996ba2f + bf0906a commit 662657c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/index.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ for changing your code::
3737
Usage: [ENV_VARS] ddtrace-run <my_program>
3838

3939

40-
The available environment variables are:
40+
The available environment variables for `ddtrace-run` are:
4141

4242
* ``DATADOG_TRACE_ENABLED=true|false`` (default: true): Enable web framework and library instrumentation. When false, your application code
4343
will not generate any traces.
@@ -112,6 +112,17 @@ small example that shows adding a custom span to a Flask application::
112112

113113
Read the full `API`_ for more details.
114114

115+
Modifying the Agent hostname and port
116+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117+
118+
If the Datadog Agent is on a separate host from your application, you can modify the default ddtrace.tracer object to utilize another hostname and port. Here is a small example showcasing this::
119+
120+
from ddtrace import tracer
121+
122+
tracer.configure(hostname=<YOUR_HOST>, port=<YOUR_PORT>)
123+
124+
By default, these will be set to localhost and 8126 respectively.
125+
115126
Web Frameworks
116127
--------------
117128

0 commit comments

Comments
 (0)