Conversation
Can be removed again once we do not want to measure this anymore. I just needed a place to log a request, and logging it similarly to the nuxt pdf request made sense. It makes also sense to then analyze the logs from the same container. Add .nuxtrc to .gitignore as nuxt generates this, most probably when the @nuxt/test-utils are used.
With a request to the print service.
|
Our terms of service already include: https://www.ecamp3.ch/en/tos/#collection-of-data Which kind of includes this too. |
| * Endpoint to log usage of clientPrint | ||
| */ | ||
|
|
||
| export default defineEventHandler(async (event) => { |
There was a problem hiding this comment.
Why is this in the print service? If people try to print large camps with nuxt, then nuxt crashes, then they try with client print, this will not be logged. Could we use sentry or betteruptime or collect logs from elsewhere?
There was a problem hiding this comment.
Also interesting could be success / failure ratio and time taken to print, and maybe the camp id and print config, for further debugging. Just the raw usage count doesn't say much yet imo, and it's biased because of habits and nuxt print being labeled "number one".
There was a problem hiding this comment.
Can be removed again once we do not want to measure this anymore.
I just needed a place to log a request,
and logging it similarly to the nuxt pdf request made sense.
It makes also sense to then analyze the logs from the same container.
Add .nuxtrc to .gitignore as nuxt generates this, most probably when
the @nuxt/test-utils are used.
I didn't want to use sentry because then we would use an american company again where we also can do this without other data krakens.
There was a problem hiding this comment.
@carlobeltrame :
success/failure, userId (evtl hashed)
-> we start here, if i have time i can move the endpoint
| ) | ||
| }) | ||
|
|
||
| it('logs the print config when passed', async () => { |
There was a problem hiding this comment.
printconfig is logged here
|
if you prefer i can try to log the success/error and the time taken. |
See individual commit messages.