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

Add the possibility to track bidscoin usage #200

Closed
marcelzwiers opened this issue Sep 19, 2023 · 6 comments
Closed

Add the possibility to track bidscoin usage #200

marcelzwiers opened this issue Sep 19, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@marcelzwiers
Copy link
Collaborator

marcelzwiers commented Sep 19, 2023

Is your feature request related to a problem? Please describe.
Currently, it is unclear how much and how bidscoin is used

Describe the solution you'd like
Using an opt-in/out user setting (#197), I want to get information on:

  • When a BIDScoin session is started
  • The (hashed) user-ID + host-ID
  • The country (optional)
  • The function that is called
  • The error(s) that occurred
  • The python version + operating system

Perhaps this information can be gathered and put into a dashboard using a combination of:

Describe alternatives you've considered
I've considered etelemetry (used by e.g. heudiconv, nipype -> fmriprep, mriqc, etc)

@marcelzwiers marcelzwiers added the enhancement New feature or request label Sep 19, 2023
@marcelzwiers marcelzwiers changed the title Add the possibility to measure bidscoin usage Add the possibility to track bidscoin usage Sep 19, 2023
@robertoostenveld
Copy link
Member

here is a part of the apache log (ip addresses on the left cut off)

image

@hurngchunlee
Copy link
Member

hurngchunlee commented Sep 19, 2023

Another option using google analytics: https://practicaldatascience.co.uk/data-science/how-to-send-data-to-google-analytics-in-python-using-pygamp

btw, some thoughts on the Apache/Logstash/Grafana approach:

Grafana only displays data in time series format. Actually data should be transformed into one of the time series databases (e.g. prometheus, OpenTSDB) supported by Grafana; or if general purpose database (SQL or Elastic) is used behind Grafana, certain data structure/schema should be followed.

If filebeat or logstash is used to parse web server log, it is beter to store the data in Elastic and use Kibana for display. The so-called ELK stack.

@marcelzwiers
Copy link
Collaborator Author

Perhaps, but pygamp only had 6 commits altogether and seems no longer supporting the new API?
flyandlure/pygamp#2

@marcelzwiers
Copy link
Collaborator Author

marcelzwiers commented Sep 20, 2023

Is Grafana Loki perhaps a solution?
https://grafana.com/docs/loki/latest/get-started/overview/

@hurngchunlee
Copy link
Member

Is Grafana Loki perhaps a solution? https://grafana.com/docs/loki/latest/get-started/overview/

Grafana Loki is very interesting. It may be also useful for collecting and analyzing server logs concerning IT security. Will have a look into it.

@marcelzwiers
Copy link
Collaborator Author

The Loki <> Grafana option seems to be the way forward. You can now see bidscoin tracking with:

$ bidscoin --tracking show
INFO | trackusage = 'yes'       # Upload anonymous usage data if 'yes' (maximally 1 upload every 1 hour)
Data upload example: -> https://telemetry.donders.ru.nl/bidscoin
{
   event:       bidscoin
   bidscoin:    4.1.1
   python:      3.11.5
   system:      Linux
   release:     5.14.21-150500.55.19-default
   userid:      2feb5e843ccb54a41416f963a6c88a5d
   hostid:      e138231a68ad82f054e3d756c6634ba1
}

NB: As you can see above, BIDScoin does NOT upload any identifying details about you nor
information about the data. Uploaded data is used to generate usage and error statistics,
and helps the developers to improve BIDScoin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants