Skip to content

Ligo analytics collection

Laurent Canis requested to merge laucans/analytics-2 into dev

Motivation and Context

Deprecation of Pascaligo has been done following the result of a google form.

After deprecation, community disagree. Looks like the community who answer to form is not representative to the one who use the compiler. We want to have a better understanding of our users for the future.

For this we will bring analytics into ligo which gonna be passive collection of feedback from our user.

Because privacy is important for us, datas are anonymized and if you don't want to collect data user can refuse.

Description

  • Add a new library analytics
  • Add vendor Prometheus_push to be able to push prometheus metrics
  • Add vendor Prometheus_format to be able to format what is inside store into text understandable by prometheus push server
  • Add dependency to prometheus library
  • add analytics over commands
  • Refactor result to separate responsability
  • Result is now responsible of analytics push

Component

  • compiler
  • website
  • webide
  • vscode-plugin
  • debugger

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)

Changelog

Why

Deprecation of Pascaligo has been done following the result of a google form.

After deprecation, community disagree. Looks like the community who answer to form is not representative to the one who use the compiler. We want to have a better understanding of our users for the future.

For this we will bring analytics into ligo which gonna be passive collection of feedback from our user.

Agreement

Interactive

Because privacy is important for us, datas are anonymized. If you don't want to collect data you can deny. Still possible to change your mind by using ligo analytics accept or ligo analytics deny Agreement answer will be stored in ~/.ligo/term_acceptance.

Docker, non-interactive

In docker analytics is activated by default. It's possible to use the environment variable LIGO_SKIP_ANALYTICS or the flag --skip-analytics describe below

Using the CLI

A new flag --skip-analytics has been introduced on every command to skip analytics collection once.

Through environment variable

If the environment variable LIGO_SKIP_ANALYTICS is set, it'll skip analytics

How datas are anonymized

To identify your project, unique ID is generated and stored in .ligo/repository_id. Commit and push this file will help us to understand our users.

To identify you as user, a file is generated in ~/.ligo/user_id. If you are using ligo in docker. user_id will not be generated and replaced by docker in our data.

If you denied analytics, these file still generated

CI

If ligo is used through scripts or CI analytics will not be collected.

If your CI use docker, Use the new image ligo_ci to avoid metrics to be collected.

Analytics example

Example of data collected :

  • When user use compile command. We collect the id of the user, the id of the project, the version of ligo used, the syntax and protocol used and also the size of the project which has been compiled.
  • When user use ligo init. We collect the id of the user, the id of the project, the version of ligo used, the syntax and protocol used and also the template used to generate project

Checklist:

  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Edited by Laurent Canis

Merge request reports