sycommon-python-lib 0.1.56b9__py3-none-any.whl → 0.1.56b10__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.
@@ -13,22 +13,23 @@ def sy_sentry_init():
13
13
  sentry_configs = config.get('SentryConfig', [])
14
14
  target_config = next(
15
15
  (item for item in sentry_configs if item.get('name') == server_name), None)
16
- target_dsn = target_config.get('dsn')
17
- target_enable = target_config.get('enable')
18
- current_version = datetime.now().strftime("%Y-%m-%d %H:%M:%S-version")
19
- if target_config and target_dsn and target_enable:
20
- try:
21
- sentry_sdk.init(
22
- dsn=target_dsn,
23
- traces_sample_rate=1.0,
24
- server_name=server_name,
25
- environment=environment,
26
- release=current_version,
27
- integrations=[
28
- FastApiIntegration(),
29
- # LoggingIntegration(level=logging.INFO,
30
- # event_level=logging.ERROR)
31
- ],
32
- )
33
- except Exception as e:
34
- SYLogger.error(f"Sentry初始化失败: {str(e)}")
16
+ if target_config:
17
+ target_dsn = target_config.get('dsn')
18
+ target_enable = target_config.get('enable')
19
+ current_version = datetime.now().strftime("%Y-%m-%d %H:%M:%S-version")
20
+ if target_config and target_dsn and target_enable:
21
+ try:
22
+ sentry_sdk.init(
23
+ dsn=target_dsn,
24
+ traces_sample_rate=1.0,
25
+ server_name=server_name,
26
+ environment=environment,
27
+ release=current_version,
28
+ integrations=[
29
+ FastApiIntegration(),
30
+ # LoggingIntegration(level=logging.INFO,
31
+ # event_level=logging.ERROR)
32
+ ],
33
+ )
34
+ except Exception as e:
35
+ SYLogger.error(f"Sentry初始化失败: {str(e)}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sycommon-python-lib
3
- Version: 0.1.56b9
3
+ Version: 0.1.56b10
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -56,7 +56,7 @@ sycommon/rabbitmq/rabbitmq_service_consumer_manager.py,sha256=qvq6dB30DkJrpk2OQ7
56
56
  sycommon/rabbitmq/rabbitmq_service_core.py,sha256=_9gqc7BOhrzfeYS557yIOfyCAraAKh-3ClMpKHn9ufY,4753
57
57
  sycommon/rabbitmq/rabbitmq_service_producer_manager.py,sha256=FKljvWhxuVq3QwBf-Ny7n5JvO3zyJ2B4K1SGb6fG2e0,9960
58
58
  sycommon/sentry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- sycommon/sentry/sy_sentry.py,sha256=S2Np_6WmWkI9X76Q67RWZthhCz02tKCfvdhKI57587w,1373
59
+ sycommon/sentry/sy_sentry.py,sha256=e5Fbt9Gi2gIb048z0nuKbuhp3uCAEqYH2xXbF6qrZq4,1471
60
60
  sycommon/sse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
61
  sycommon/sse/event.py,sha256=k_rBJy23R7crtzQeetT0Q73D8o5-5p-eESGSs_BPOj0,2797
62
62
  sycommon/sse/sse.py,sha256=__CfWEcYxOxQ-HpLor4LTZ5hLWqw9-2X7CngqbVHsfw,10128
@@ -77,8 +77,8 @@ sycommon/tools/docs.py,sha256=OPj2ETheuWjXLyaXtaZPbwmJKfJaYXV5s4XMVAUNrms,1607
77
77
  sycommon/tools/merge_headers.py,sha256=HV_i52Q-9se3SP8qh7ZGYl8bP7Fxtal4CGVkyMwEdM8,4373
78
78
  sycommon/tools/snowflake.py,sha256=lVEe5mNCOgz5OqGQpf5_nXaGnRJlI2STX2s-ppTtanA,11947
79
79
  sycommon/tools/timing.py,sha256=OiiE7P07lRoMzX9kzb8sZU9cDb0zNnqIlY5pWqHcnkY,2064
80
- sycommon_python_lib-0.1.56b9.dist-info/METADATA,sha256=8RttPloYOEMp06r57Vb0glQWbds7NgrAnHG940OBNE4,7269
81
- sycommon_python_lib-0.1.56b9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
- sycommon_python_lib-0.1.56b9.dist-info/entry_points.txt,sha256=q_h2nbvhhmdnsOUZEIwpuoDjaNfBF9XqppDEmQn9d_A,46
83
- sycommon_python_lib-0.1.56b9.dist-info/top_level.txt,sha256=98CJ-cyM2WIKxLz-Pf0AitWLhJyrfXvyY8slwjTXNuc,17
84
- sycommon_python_lib-0.1.56b9.dist-info/RECORD,,
80
+ sycommon_python_lib-0.1.56b10.dist-info/METADATA,sha256=vyV4lLpTKgbiPgOIBOgZFnACgzvrJk5s2Ghja70yztY,7270
81
+ sycommon_python_lib-0.1.56b10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
82
+ sycommon_python_lib-0.1.56b10.dist-info/entry_points.txt,sha256=q_h2nbvhhmdnsOUZEIwpuoDjaNfBF9XqppDEmQn9d_A,46
83
+ sycommon_python_lib-0.1.56b10.dist-info/top_level.txt,sha256=98CJ-cyM2WIKxLz-Pf0AitWLhJyrfXvyY8slwjTXNuc,17
84
+ sycommon_python_lib-0.1.56b10.dist-info/RECORD,,