|
7 | 7 | # project |
8 | 8 | from .encoding import get_encoder, JSONEncoder |
9 | 9 | from .compat import httplib, PYTHON_VERSION, PYTHON_INTERPRETER, get_connection_response |
| 10 | +from .utils.deprecation import deprecated |
10 | 11 |
|
11 | 12 |
|
12 | 13 | log = logging.getLogger(__name__) |
@@ -159,23 +160,9 @@ def send_traces(self, traces): |
159 | 160 | log.debug("reported %d traces in %.5fs", len(traces), time.time() - start) |
160 | 161 | return response |
161 | 162 |
|
162 | | - def send_services(self, services): |
163 | | - if not services: |
164 | | - return |
165 | | - s = {} |
166 | | - for service in services: |
167 | | - s.update(service) |
168 | | - data = self._encoder.encode_services(s) |
169 | | - response = self._put(self._services, data) |
170 | | - |
171 | | - # the API endpoint is not available so we should downgrade the connection and re-try the call |
172 | | - if response.status in [404, 415] and self._fallback: |
173 | | - log.debug('calling endpoint "%s" but received %s; downgrading API', self._services, response.status) |
174 | | - self._downgrade() |
175 | | - return self.send_services(services) |
176 | | - |
177 | | - log.debug("reported %d services", len(services)) |
178 | | - return response |
| 163 | + @deprecated(message='Sending services to the API is no longer necessary', version='1.0.0') |
| 164 | + def send_services(self, *args, **kwargs): |
| 165 | + return |
179 | 166 |
|
180 | 167 | def _put(self, endpoint, data, count=0): |
181 | 168 | conn = httplib.HTTPConnection(self.hostname, self.port) |
|
0 commit comments