-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-1498] Add analytics script #5850
Conversation
@ryw curious, why did we switch from being able to specify any analytics snippet to the predefined blocks for each tool? |
Primarily because of the user experience of being required to that. When I started writing the doc for the other idea, I realized how user unfriendly it was, to force them to develop and deploy a script to another URL, and I think there would be cross site scripting issues to deal with there as well. With the solution here, we are implementing the JavaScript library in the way that the tool author specified by dropping the JavaScript snippets directly into the page. |
Just pushed updated version, wondering if the analytics partials should go in new folder (like I did) or inside one of the other two folders. Both felt off. |
@potiuk or @ashb any thoughts on the Travis fail for this https://travis-ci.org/apache/airflow/jobs/573878437?
And the .rst file that I added does have the license |
Hey @ryw -> I am going to add a In the meantime you can run 'pre-commit run insert-license` (see https://github.com/apache/airflow/blob/master/CONTRIBUTING.md#pre-commit-hooks-installed) - it's not yet 100% clear in the master docs but some more instructions are coming. The .pre-commit-confg.yaml does have the section:
In this case it's probably spacing issue. Due to limitation of insert-license pre-commit we have to have a space in front of the .. in the .rst license. This has been changed recently in all the files while I committed the change so you probably took the license from previous (no-space-in-front) version. You can take a look at any of the .rst files now in master and copy&paste the license from there. This is what most people will do in the future I guess, so this will not be a problem. And BTW if you install pre-commit hooks yourself, you will not need to worry about the licences at all. When you try to commit the file without the license, the license will be added for you, commit will fail and you will have a chance to add/commit the added licence immediately. So you can just remove the licence now, install pre-commit, try to commit it and the licence will be added for you automagically. Sorry for the inconvenience coming from the transition period. |
Ah thanks @potiuk - I now see you just added yesterday, my branch was 2 days out of date w/ master :) Just pushed up new version, should pass now. |
Green! 🍏 |
(cherry picked from commit 28e3802)
`Google Analytics <https://analytics.google.com/>`_, | ||
`Segment <https://segment.com/>`_, or `Metarouter <https://www.metarouter.io/>`_. | ||
|
||
Edit ``airflow.cfg`` and set the ``analytics`` block to have a ``tool`` and ``id``: |
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.
It seems to me that the analytics
block does not exist. Did I miss something?
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.
Doh! We moved it to webserver
block and changed var name. Will send doc fix PR.
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.
Make sure you have checked all steps below.
Jira
Description
We want to collect anonymous user event data from our Airflow deployments, without having to maintain a fork or plugin. This PR adds an easy method for Airflow users to send anonymous user event data to several popular destinations: Google Analytics, Segment, and Metarouter.
Tests
Didn't any relevant tests to change, but I could be missing something as I'm new to contributing to Airflow. Happy to write some tests, if it is warranted.
Commits
Documentation
Code Quality
flake8