Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit cbb4d92

Browse files
remove datadog api logic
That logic is not needed to send traces to opentelemetry
1 parent c59288c commit cbb4d92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+60
-21546
lines changed

ddtrace/api.py

-279
This file was deleted.

ddtrace/bootstrap/sitecustomize.py

-7
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,12 @@ def add_global_tags(tracer):
8484
# TODO: these variables are deprecated; use utils method and update our documentation
8585
# correct prefix should be DD_*
8686
enabled = os.environ.get('DATADOG_TRACE_ENABLED')
87-
hostname = os.environ.get('DD_AGENT_HOST', os.environ.get('DATADOG_TRACE_AGENT_HOSTNAME'))
88-
port = os.environ.get('DATADOG_TRACE_AGENT_PORT')
8987
priority_sampling = os.environ.get('DATADOG_PRIORITY_SAMPLING')
90-
9188
opts = {}
9289

9390
if enabled and enabled.lower() == 'false':
9491
opts['enabled'] = False
9592
patch = False
96-
if hostname:
97-
opts['hostname'] = hostname
98-
if port:
99-
opts['port'] = int(port)
10093
if priority_sampling:
10194
opts['priority_sampling'] = asbool(priority_sampling)
10295

ddtrace/commands/ddtrace_run.py

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
DATADOG_TRACE_ENABLED=true|false : override the value of tracer.enabled (default: true)
2828
DATADOG_TRACE_DEBUG=true|false : enabled debug logging (default: false)
2929
DATADOG_PATCH_MODULES=module:patch,module:patch... e.g. boto:true,redis:false : override the modules patched for this execution of the program (default: none)
30-
DATADOG_TRACE_AGENT_HOSTNAME=localhost: override the address of the trace agent host that the default tracer will attempt to submit to (default: localhost)
31-
DATADOG_TRACE_AGENT_PORT=8126: override the port that the default tracer will submit to (default: 8126)
3230
DATADOG_SERVICE_NAME : override the service name to be used for this program (no default)
3331
This value is passed through when setting up middleware for web framework integrations.
3432
(e.g. pylons, flask, django)

ddtrace/contrib/django/patch.py

-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def apply_django_patches(patch_rest_framework):
5555
# AgentWriter, it breaks all tests. The configure() behavior must
5656
# be changed to use it in this integration
5757
tracer.enabled = settings.ENABLED
58-
tracer.writer.api.hostname = settings.AGENT_HOSTNAME
59-
tracer.writer.api.port = settings.AGENT_PORT
6058

6159
if settings.AUTO_INSTRUMENT:
6260
# trace Django internals

ddtrace/contrib/httplib/patch.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ def should_skip_request(pin, request):
105105
if not pin or not pin.enabled():
106106
return True
107107

108-
api = pin.tracer.writer.api
109-
return request.host == api.hostname and request.port == api.port
108+
# TODO(Mauricio): what logic should be used here?
109+
return False
110110

111111

112112
def patch():

ddtrace/contrib/tornado/application.py

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ def tracer_config(__init__, app, args, kwargs):
4242
context_provider=context_provider,
4343
wrap_executor=decorators.wrap_executor,
4444
enabled=settings.get('enabled', None),
45-
hostname=settings.get('agent_hostname', None),
46-
port=settings.get('agent_port', None),
4745
settings=extra_settings,
4846
)
4947

0 commit comments

Comments
 (0)