Skip to content

Commit

Permalink
Support both new and older API Key formats when writing DebugEvents (#…
Browse files Browse the repository at this point in the history
…1421)

## Description

The DebugClient required the org-id to be part of the API Key which is
how new API Keys are generated, but older formats should still be
supported where the org-id would be set with an environment var.

## Changes

- Use existing require_org_id over splitting the value from the API Key.

Closes #1420 

- [x] I have reviewed the [Guidelines for Contributing](CONTRIBUTING.md)
and the [Code of Conduct](CODE_OF_CONDUCT.md).
  • Loading branch information
jamie256 authored Nov 13, 2023
1 parent 8817435 commit a04ce1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/whylogs/api/logger/events/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
)
cache = WhylabsClientCache.instance()
self._api_client, _ = cache.get_client(self._cache_config)
self._org_id = config.require_api_key().split(":")[-1]
self._org_id = config.require_org_id()
self._dataset_id = config.require_default_dataset_id()
else:
self._api_client = api_client
Expand Down

0 comments on commit a04ce1c

Please sign in to comment.