|
22 | 22 | import zlib |
23 | 23 |
|
24 | 24 | import elasticapm |
25 | | -from elasticapm.conf import Config, defaults |
| 25 | +from elasticapm.conf import Config, constants |
26 | 26 | from elasticapm.traces import TransactionsStore, get_transaction |
27 | 27 | from elasticapm.transport.base import TransportException |
28 | 28 | from elasticapm.utils import json_encoder as json |
@@ -226,7 +226,7 @@ def build_msg_for_logging(self, event_type, data=None, date=None, |
226 | 226 | data = transform(data) |
227 | 227 |
|
228 | 228 | data.update({ |
229 | | - 'timestamp': date.strftime(defaults.TIMESTAMP_FORMAT), |
| 229 | + 'timestamp': date.strftime(constants.TIMESTAMP_FORMAT), |
230 | 230 | }) |
231 | 231 |
|
232 | 232 | return self.build_msg({'errors': [data]}) |
@@ -285,7 +285,7 @@ def capture(self, event_type, data=None, date=None, |
285 | 285 | data = self.build_msg_for_logging(event_type, data, date, extra, stack, **kwargs) |
286 | 286 |
|
287 | 287 | if data: |
288 | | - url = self.config.server_url + defaults.ERROR_API_PATH |
| 288 | + url = self.config.server_url + constants.ERROR_API_PATH |
289 | 289 | self.send(url, **data) |
290 | 290 | return data['errors'][0]['id'] |
291 | 291 |
|
@@ -493,7 +493,7 @@ def _collect_transactions(self): |
493 | 493 | 'transactions': transactions, |
494 | 494 | }) |
495 | 495 |
|
496 | | - api_path = defaults.TRANSACTIONS_API_PATH |
| 496 | + api_path = constants.TRANSACTIONS_API_PATH |
497 | 497 |
|
498 | 498 | self.send(self.config.server_url + api_path, **data) |
499 | 499 | self._start_send_timer() |
|
0 commit comments