-
Notifications
You must be signed in to change notification settings - Fork 124
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
Astra DB: Add integration usage tracking #568
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.
One small nit otherwise looks good to me 👍
@@ -5,6 +5,10 @@ | |||
|
|||
from astrapy.api import APIRequestError | |||
from astrapy.db import AstraDB | |||
|
|||
# For version tracking | |||
from haystack import __name__ as integration_name |
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.
I would just hardcode the string haystack
at the module level and save an import call, something like
CALLER_NAME = 'haystack'
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.
@masci does this look okay? i updated the code.
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!
This pull request passes in the haystack name and version to Astra's constructor, allowing Astra to track how much usage is occurring of this particular integration. Please let me know if there's any other / more idiomatic way to do so! Thank you!