Skip to content

Commit

Permalink
fix: fix client metrics issues with preshared keys (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames authored Aug 23, 2024
2 parents 3630115 + 9dccb4f commit ced2963
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.6.1
2 changes: 1 addition & 1 deletion example/example1/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ attrs >= 23.1.0
frozenlist >= 1.4.1
idna >= 3.6
multidict >= 6.0.4
openfga-sdk >= 0.6.0
openfga-sdk >= 0.6.1
python-dateutil >= 2.8.2
urllib3 >= 2.1.0
yarl >= 1.9.4
7 changes: 4 additions & 3 deletions openfga_sdk/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,10 @@ async def __call_api(
)

try:
_telemetry_attributes[TelemetryAttributes().request_client_id] = (
self.configuration.credentials.configuration.client_id
)
if self.configuration.credentials.configuration.client_id is not None:
_telemetry_attributes[TelemetryAttributes().request_client_id] = (
self.configuration.credentials.configuration.client_id
)
except AttributeError:
pass

Expand Down
7 changes: 4 additions & 3 deletions openfga_sdk/sync/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,10 @@ def __call_api(
)

try:
_telemetry_attributes[TelemetryAttributes().request_client_id] = (
self.configuration.credentials.configuration.client_id
)
if self.configuration.credentials.configuration.client_id is not None:
_telemetry_attributes[TelemetryAttributes().request_client_id] = (
self.configuration.credentials.configuration.client_id
)
except AttributeError:
pass

Expand Down

0 comments on commit ced2963

Please sign in to comment.