-
Notifications
You must be signed in to change notification settings - Fork 6
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 ingest keys #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! looks like the function is only used by the local exporter so no real performance impact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Added a suggestion to update the code comment defining is_classic to include the logic being used for ingest keys, otherwise LGTM
@@ -98,7 +99,13 @@ def is_classic(apikey: str) -> bool: | |||
Returns: | |||
bool: true if the api key is a classic key, false if not | |||
""" | |||
return apikey and len(apikey) == 32 | |||
if not apikey: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fancy! Can we update the comment to mention the new logic for ingest keys?
It's also used in setting the traces headers but it's probably still fine |
Which problem is this PR solving?
We've released Ingest Keys, but need to update the key detection logic to allow Ingest Keys to be used to send data to Classic environments.
Short description of the changes
How to verify that this has the expected result
It should be possible to use an ingest key pointed to a classic environment after this change. Please note that the ability to create ingest keys in classic environments isn't yet publicly available (since we need to update this library and others to understand classic ingest keys).