fastapi-factory-utilities 0.3.1__py3-none-any.whl → 0.3.2__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 fastapi-factory-utilities might be problematic. Click here for more details.

@@ -1,9 +1,10 @@
1
1
  """FastAPI Factory Utilities exceptions."""
2
2
 
3
3
  import logging
4
- from typing import Any
4
+ from typing import Any, Sequence
5
5
 
6
6
  from opentelemetry.trace import Span, get_current_span
7
+ from opentelemetry.util.types import AttributeValue
7
8
  from structlog.stdlib import BoundLogger, get_logger
8
9
 
9
10
  _logger: BoundLogger = get_logger()
@@ -39,5 +40,12 @@ class FastAPIFactoryUtilitiesError(Exception):
39
40
  # and it will respond False to the is_recording method
40
41
  if span.is_recording():
41
42
  span.record_exception(self)
43
+ for key, value in kwargs.items():
44
+ attribute_value: AttributeValue
45
+ if not isinstance(value, (str, bool, int, float, Sequence)):
46
+ attribute_value = str(value)
47
+ else:
48
+ attribute_value = value
49
+ span.set_attribute(key, attribute_value)
42
50
  # Call the parent class
43
- super().__init__(*args, **kwargs)
51
+ super().__init__(*args)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fastapi_factory_utilities
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Consolidate libraries and utilities to create microservices in Python with FastAPI, Beanie, Httpx, AioPika and OpenTelemetry.
5
5
  License: MIT
6
6
  Keywords: python,fastapi,beanie,httpx,opentelemetry,microservices
@@ -15,7 +15,7 @@ fastapi_factory_utilities/core/app/fastapi_builder.py,sha256=DgIqiCnJK6cqsG-sg4H
15
15
  fastapi_factory_utilities/core/app/plugin_manager/__init__.py,sha256=eMfxCsk41Caw_juAawmDZHhytNI_ubXmqfRDug2AzvQ,319
16
16
  fastapi_factory_utilities/core/app/plugin_manager/exceptions.py,sha256=CFrZvROT7mLzNpXWwDra1j08lA_7ZrSrOHN94sEEfnQ,1026
17
17
  fastapi_factory_utilities/core/app/plugin_manager/plugin_manager.py,sha256=5E_Qp535xNJHNujZ_QRiMfIkDUy9F_3Rbjlclny5P08,6682
18
- fastapi_factory_utilities/core/exceptions.py,sha256=7ntbaMptYn5OOPeKPVR4zU98NIC0j53NQSkqVP1bD68,1362
18
+ fastapi_factory_utilities/core/exceptions.py,sha256=Z2U9m-4H6mhn04r0jfx2P6Aa7ka9alHpfTSeSY3mGjI,1757
19
19
  fastapi_factory_utilities/core/plugins/__init__.py,sha256=W-BCkqP0xG980980z3mc8T6Vrp1Akv4szA0PRzkUbiU,756
20
20
  fastapi_factory_utilities/core/plugins/example/__init__.py,sha256=GF69IygLXxzrCh7VryekEWun663kKBhWtRS3w-1tzBc,1030
21
21
  fastapi_factory_utilities/core/plugins/httpx_plugin/__init__.py,sha256=P5FUyv7mQr8RZWQ8ifkoK8GXvqSI71q2b2dm-ag2JhQ,1028
@@ -71,8 +71,8 @@ fastapi_factory_utilities/example/models/books/repository.py,sha256=7K63uAsSEGZ2
71
71
  fastapi_factory_utilities/example/services/books/__init__.py,sha256=Z06yNRoA7Zg3TGN-Q9rrvJg6Bbx-qJw661MVwukV6vQ,148
72
72
  fastapi_factory_utilities/example/services/books/services.py,sha256=-x7d4hotUWLzWo5uImMjFmtNcSTHwWv2bfttIbYYKbA,5380
73
73
  fastapi_factory_utilities/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- fastapi_factory_utilities-0.3.1.dist-info/LICENSE,sha256=iO1nLzMMst6vEiqgSUrfrbetM7b0bvdzXhbed5tqG8o,1074
75
- fastapi_factory_utilities-0.3.1.dist-info/METADATA,sha256=EF9C_1EW1EvdkTtdzsKjmOlW4o4BgBfi-RXXNtRERDc,3477
76
- fastapi_factory_utilities-0.3.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
77
- fastapi_factory_utilities-0.3.1.dist-info/entry_points.txt,sha256=IK0VcBexXo4uXQmTrbfhhnnfq4GmXPRn0GBB8hzlsq4,101
78
- fastapi_factory_utilities-0.3.1.dist-info/RECORD,,
74
+ fastapi_factory_utilities-0.3.2.dist-info/LICENSE,sha256=iO1nLzMMst6vEiqgSUrfrbetM7b0bvdzXhbed5tqG8o,1074
75
+ fastapi_factory_utilities-0.3.2.dist-info/METADATA,sha256=ILJlhkroDy5y9uEtyIP5EXW2y145MJk3AW8ow-ThojU,3477
76
+ fastapi_factory_utilities-0.3.2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
77
+ fastapi_factory_utilities-0.3.2.dist-info/entry_points.txt,sha256=IK0VcBexXo4uXQmTrbfhhnnfq4GmXPRn0GBB8hzlsq4,101
78
+ fastapi_factory_utilities-0.3.2.dist-info/RECORD,,