Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support classic-flavored ingest keys #231

Merged
merged 10 commits into from
Mar 6, 2024

Conversation

jharley
Copy link
Contributor

@jharley jharley commented Feb 28, 2024

Which problem is this PR solving?

We've now released Ingest Keys, but in order for them to work with Classic environments properly we need to update the key detection logic.

Short description of the changes

  • updates the Classic API Key detection logic to understand the shape of a Classic Ingest Key
  • makes IsClassicKey a top level function exported from libhoney to be used by the Python beeline

@jharley jharley added type: enhancement version: bump minor A PR that adds behavior, but is backwards-compatible. labels Feb 28, 2024
@jharley jharley requested a review from a team February 28, 2024 16:00
@jharley jharley marked this pull request as ready for review February 28, 2024 16:00
@jharley jharley requested a review from a team as a code owner February 28, 2024 16:00
libhoney/client.py Outdated Show resolved Hide resolved
@jharley jharley added the merge at will Reviewer can merge the PR once reviewed. label Feb 28, 2024
@@ -7,6 +8,12 @@
from libhoney.transmission import Transmission


def IsClassicKey(key):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not totally sure this belongs here? Happy to move it

@@ -84,9 +91,6 @@ def __init__(self, writekey="", dataset="", sample_rate=1,
if debug:
self._init_logger()

def IsClassicKey(key):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been a hot minute since I did Python seriously, and I can't remember if this method ended up being public this way or not? If it is in fact public, I'll re-add it to call the above to avoid the breaking change

@jharley jharley merged commit 3cb9ab7 into main Mar 6, 2024
3 checks passed
@jharley jharley deleted the jharley.classic-ingest-key-support branch March 6, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge at will Reviewer can merge the PR once reviewed. type: enhancement version: bump minor A PR that adds behavior, but is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants