clarin-dspace icon indicating copy to clipboard operation
clarin-dspace copied to clipboard

LicenseFileDownloadStatistic

Open kosarko opened this issue 1 year ago • 3 comments

I've noticed the license_file_download_statistic table is not created. AFAIK this keeps track of who downloaded what and when. Mostly these will be anonymous downloads, but the primary purpose is to keep track of REStricted bitstream downloads...

I'm not sure there ever was a way to display these from the UI.

Is there some other mechanism that keeps track?

kosarko avatar Mar 15 '23 10:03 kosarko

@kosarko Bitstream download data are tracked into Matomo statistics: https://github.com/dataquest-dev/DSpace/blob/dtq-dev/dspace-server-webapp/src/main/java/org/dspace/app/rest/BitstreamRestController.java#L174

  1. Is there a need for tracking only restricted bitstream downloads? I understand that bitstream downloads data could be stored in the specific table as easiest way for getting download information.
  2. Should I make an view for displaying these download data to the UI? If yes how it should looks like?

milanmajchrak avatar Mar 20 '23 17:03 milanmajchrak

This is not as much about statistics but rather about keeping a record that user X downloaded bitstream B at the time and date DT.

We don't have X in matomo, and we have this table even if matomo is down (and won't record a download).

At least, that's how I think it might be used. The table name suggests that the original intention might have been different...

  1. I'd keep tracking everything that it tracks now...
  2. I don't think we need a UI at the moment. We can query the database directly when there's a use case...

kosarko avatar Mar 23 '23 11:03 kosarko

On 2023-12-06 call it was suggested to scrap this table and just log the information into logs. I'm generally not against, thought I'd propose:

  • logging these into a file different from dspace.log (file_downloads.log; different log4j config/different logger?)
  • logging something easy to parse

kosarko avatar Dec 08 '23 11:12 kosarko