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

Astra DB: Add integration usage tracking #568

Merged
merged 7 commits into from
Mar 18, 2024

Conversation

erichare
Copy link
Contributor

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!

@erichare erichare requested a review from a team as a code owner March 11, 2024 17:52
@erichare erichare requested review from masci and removed request for a team March 11, 2024 17:52
Copy link
Contributor

@masci masci left a 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
Copy link
Contributor

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'

Copy link
Contributor Author

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.

Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

LGTM!

@masci masci merged commit 475cfb2 into deepset-ai:main Mar 18, 2024
10 checks passed
@erichare erichare deleted the astra-usage-tracking branch March 18, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants