|
32 | 32 | from ddtrace.internal import atexit |
33 | 33 | from ddtrace.internal import core |
34 | 34 | from ddtrace.internal import telemetry |
35 | | -from ddtrace.internal.agent import get_connection |
36 | 35 | from ddtrace.internal.ci_visibility._api_client import AgentlessTestVisibilityAPIClient |
37 | 36 | from ddtrace.internal.ci_visibility._api_client import EarlyFlakeDetectionSettings |
38 | 37 | from ddtrace.internal.ci_visibility._api_client import EVPProxyTestVisibilityAPIClient |
|
84 | 83 | from ddtrace.internal.test_visibility.api import InternalTest |
85 | 84 | from ddtrace.internal.test_visibility.coverage_lines import CoverageLines |
86 | 85 | from ddtrace.internal.utils.formats import asbool |
87 | | -from ddtrace.internal.utils.http import verify_url |
88 | | -from ddtrace.internal.writer.writer import Response |
89 | 86 | from ddtrace.settings import IntegrationConfig |
90 | 87 | from ddtrace.trace import Span |
91 | 88 | from ddtrace.trace import Tracer |
@@ -144,23 +141,6 @@ def _get_custom_configurations() -> Dict[str, str]: |
144 | 141 | return custom_configurations |
145 | 142 |
|
146 | 143 |
|
147 | | -def _do_request( |
148 | | - method: str, url: str, payload: str, headers: Dict[str, str], timeout: int = DEFAULT_TIMEOUT |
149 | | -) -> Response: |
150 | | - try: |
151 | | - parsed_url = verify_url(url) |
152 | | - url_path = parsed_url.path |
153 | | - conn = get_connection(url, timeout=timeout) |
154 | | - log.debug("Sending request: %s %s %s %s", method, url_path, payload, headers) |
155 | | - conn.request("POST", url_path, payload, headers) |
156 | | - resp = conn.getresponse() |
157 | | - log.debug("Response status: %s", resp.status) |
158 | | - result = Response.from_http_response(resp) |
159 | | - finally: |
160 | | - conn.close() |
161 | | - return result |
162 | | - |
163 | | - |
164 | 144 | class CIVisibilityTracer(Tracer): |
165 | 145 | def __init__(self, *args, **kwargs) -> None: |
166 | 146 | # Allows for multiple instances of the civis tracer to be created without logging a warning |
|
0 commit comments