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

Chore: Add anonymous user ID in tracking events #124

Merged
merged 15 commits into from
Mar 12, 2024
Merged

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Mar 12, 2024

Resolves: https://github.com/airbytehq/airbyte-internal-issues/issues/6482

This is ready for review.

  1. On first run, PyAirbyte will check for an existing analytics file.
  2. If not found, and if DO_NOT_TRACK is not set, a new ID will be generated and will be stored in a yaml file at ~/.airbyte/analytics.yml
  3. If AIRBYTE_ANALYTICS_ID env var is set, then the provided ID will be used instead of a randomly generated one. In this case, the provided analytics ID will also be saved to the analytics file, overriding any previously set value.
  4. This PR updates all of our CI jobs to pass in a (newly created) repository variable (here), which contains a newly generated ULID that is specific to our CI flows.

@aaronsteers aaronsteers changed the title Draft: Add anonymous user ID Chore: Add anonymous user ID in tracking events Mar 12, 2024
@aaronsteers
Copy link
Contributor Author

aaronsteers commented Mar 12, 2024

After running PyAirbyte locally, I now have the file as expected:

AJ-Steers-MacBook-Pro---GGHWM7QWPJ:.airbyte ajsteers$ pwd
/Users/ajsteers/.airbyte
AJ-Steers-MacBook-Pro---GGHWM7QWPJ:.airbyte ajsteers$ cat analytics.yml
# This file is used by PyAirbyte to track anonymous usage statistics.
# For more information or to opt out, please see
# - https://docs.airbyte.io/pyairbyte/anonymized-usage-statistics
anonymous_user_id: 01HRT5XN7NPS12DWZX5RTXHAE8

We write the file as plain text but it is intended to be parsed as yaml. The reason for writing as plain text is that this allows us to more easily control formatting and the header comment text.

I realize we still need to have a real URL to point people to. The one above is not a real page as of yet.

@aaronsteers aaronsteers marked this pull request as ready for review March 12, 2024 21:31
Copy link
Contributor

@bindipankhudi bindipankhudi left a comment

Choose a reason for hiding this comment

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

Looks great! :) One minor comment, non-blocking.

@aaronsteers aaronsteers enabled auto-merge (squash) March 12, 2024 23:51
@aaronsteers aaronsteers merged commit 2f483ec into main Mar 12, 2024
9 checks passed
@aaronsteers aaronsteers deleted the aj/add-file-marker branch March 12, 2024 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants