port-ocean 0.22.2__py3-none-any.whl → 0.22.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of port-ocean might be problematic. Click here for more details.

@@ -1,7 +1,9 @@
1
1
  import sys
2
+ import os
2
3
  from logging import LogRecord
3
4
  from logging.handlers import QueueHandler, QueueListener
4
5
  from queue import Queue
6
+ import uuid
5
7
 
6
8
  import loguru
7
9
  from loguru import logger
@@ -14,6 +16,9 @@ from port_ocean.utils.signal import signal_handler
14
16
 
15
17
  def setup_logger(level: LogLevelType, enable_http_handler: bool) -> None:
16
18
  logger.remove()
19
+ logger.configure(
20
+ extra={"hostname": resolve_hostname(), "instance": str(uuid.uuid4())}
21
+ )
17
22
  _stdout_loguru_handler(level)
18
23
  if enable_http_handler:
19
24
  _http_loguru_handler(level)
@@ -72,3 +77,10 @@ def exception_deserializer(record: "loguru.Record") -> None:
72
77
  if exception is not None:
73
78
  fixed = Exception(str(exception.value))
74
79
  record["exception"] = exception._replace(value=fixed)
80
+
81
+
82
+ def resolve_hostname() -> str:
83
+ try:
84
+ return os.uname().nodename
85
+ except Exception:
86
+ return "unknown"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.22.2
3
+ Version: 0.22.4
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
@@ -136,7 +136,7 @@ port_ocean/helpers/metric/utils.py,sha256=1DlLR9FmUOpSlWSfY_tUEGcxRQY6ckAfbD3dnM
136
136
  port_ocean/helpers/retry.py,sha256=gmS4YxM6N4fboFp7GSgtOzyBJemxs46bnrz4L4rDS6Y,16136
137
137
  port_ocean/log/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
138
138
  port_ocean/log/handlers.py,sha256=ncVjgqrZRh6BhyRrA6DQG86Wsbxph1yWYuEC0cWfe-Q,3631
139
- port_ocean/log/logger_setup.py,sha256=CoEDowe5OwNOL_5clU6Z4faktfh0VWaOTS0VLmyhHjw,2404
139
+ port_ocean/log/logger_setup.py,sha256=0K3zVG0YYrYOWEV8-rCGks1o-bMRxgHXlqawu9w_tSw,2656
140
140
  port_ocean/log/sensetive.py,sha256=lVKiZH6b7TkrZAMmhEJRhcl67HNM94e56x12DwFgCQk,2920
141
141
  port_ocean/middlewares.py,sha256=9wYCdyzRZGK1vjEJ28FY_DkfwDNENmXp504UKPf5NaQ,2727
142
142
  port_ocean/ocean.py,sha256=XmPmnjo-2oMZGvCLwIxPxwVNzXXzACzVR4JmlkXEOKY,7418
@@ -188,8 +188,8 @@ port_ocean/utils/repeat.py,sha256=U2OeCkHPWXmRTVoPV-VcJRlQhcYqPWI5NfmPlb1JIbc,32
188
188
  port_ocean/utils/signal.py,sha256=mMVq-1Ab5YpNiqN4PkiyTGlV_G0wkUDMMjTZp5z3pb0,1514
189
189
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
190
190
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
191
- port_ocean-0.22.2.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
192
- port_ocean-0.22.2.dist-info/METADATA,sha256=Gnljw5UH_wpBycjJttdo1rAf8C8s7EeOP_KS5Ur6jWI,6764
193
- port_ocean-0.22.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
194
- port_ocean-0.22.2.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
195
- port_ocean-0.22.2.dist-info/RECORD,,
191
+ port_ocean-0.22.4.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
192
+ port_ocean-0.22.4.dist-info/METADATA,sha256=ilbi_pJtvFG98ri9bFukecsZ8UsGVNUpG9q2veJGlhA,6764
193
+ port_ocean-0.22.4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
194
+ port_ocean-0.22.4.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
195
+ port_ocean-0.22.4.dist-info/RECORD,,