jhipster-lite icon indicating copy to clipboard operation
jhipster-lite copied to clipboard

Module application statistics

Open DamnClin opened this issue 2 years ago • 4 comments

Close https://github.com/jhipster/jhipster-lite/issues/2832

DamnClin avatar Aug 05 '22 14:08 DamnClin

Did you use JHipster Lite mongo dummy to code this? :smile:

hdurix avatar Aug 05 '22 15:08 hdurix

Did you use JHipster Lite mongo dummy to code this? smile

I wanted to use mongo and mongock module but I can't apply them directly since the configuration is a little bit trickier here but I did copy paste their template yes :D

DamnClin avatar Aug 05 '22 15:08 DamnClin

Codecov Report

Merging #2955 (27a112a) into main (f7e4359) will not change coverage. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                main     #2955    +/-   ##
============================================
  Coverage     100.00%   100.00%            
- Complexity      2065      2112    +47     
============================================
  Files            524       537    +13     
  Lines           8884      9005   +121     
  Branches         199       199            
============================================
+ Hits            8884      9005   +121     
Impacted Files Coverage Δ
...application/JHipsterModulesApplicationService.java 100.00% <100.00%> (ø)
...ter/lite/module/domain/JHipsterModulesApplyer.java 100.00% <100.00%> (ø)
...tructure/secondary/SpringJHipsterModuleEvents.java 100.00% <100.00%> (ø)
...stic/application/StatisticsApplicationService.java 100.00% <100.00%> (ø)
.../jhipster/lite/statistic/domain/AppliedModule.java 100.00% <100.00%> (ø)
...hipster/lite/statistic/domain/AppliedModuleId.java 100.00% <100.00%> (ø)
...va/tech/jhipster/lite/statistic/domain/Module.java 100.00% <100.00%> (ø)
...ipster/lite/statistic/domain/ModuleProperties.java 100.00% <100.00%> (ø)
...ch/jhipster/lite/statistic/domain/ProjectPath.java 100.00% <100.00%> (ø)
...ech/jhipster/lite/statistic/domain/Statistics.java 100.00% <100.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Aug 05 '22 16:08 codecov[bot]

cc @jdubois this is the PR saving stats on mongo (for cloud profile).

For now, I did nothing fancy on the condition so we really need the mongo to be available (I can work on this if we want to delay the mongo deployment while still merging this).

With the current core base I think the easiest plan is to deploy a mongo, add configuration in the deployed environment and merge this once this is done.

What do you think?

DamnClin avatar Aug 05 '22 16:08 DamnClin

I ended up updating the repository switch to ease deployment steps for this. Now you have to set spring.data.mongodb.uri and mongock.migration-scan-package if you want ot persist stats on mongo

DamnClin avatar Aug 21 '22 12:08 DamnClin

cc @jdubois is there a mongoDB on the deployed app? (to know if we start collecting usage data)

DamnClin avatar Sep 08 '22 13:09 DamnClin

@DamnClin I have one working (sending data to an Azure CosmosDB from my local machine), but I'm not using it in production yet. I want first to configure it with Terraform (shouldn't be an issue), and then I need to check if we can use the free tier and reduce our cost (that's not super important, but billing is per table, and we have 2 tables for Mongock, so I don't find this very efficient)

jdubois avatar Sep 08 '22 13:09 jdubois

Oh yes, didn't know that, we can remove Mongock if needed!

DamnClin avatar Sep 08 '22 13:09 DamnClin

Well, there is a free tier, so I'm not sure if that cost money or not.... I'm guessing it's better without it, but I also need to check if I can create the document with Terraform (I think that's possible, and would give me more control on what is created - which has an impact on billing).

jdubois avatar Sep 08 '22 14:09 jdubois

Ok, let me know if JHLite needs updates :)

DamnClin avatar Sep 08 '22 14:09 DamnClin