1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-17 17:49:10 +00:00

Merge pull request from overleaf/jpa-compile-metrics-version

[misc] PdfJsMetrics: add a version number to the event segmentation

GitOrigin-RevId: 4c5e1df9e3513edbfeae0f47303ce9512a25c118
This commit is contained in:
Jakob Ackermann 2021-06-14 10:44:25 +02:00 committed by Copybot
parent a41f0afad2
commit 3b3f1fbb73
2 changed files with 7 additions and 0 deletions
services/web/frontend/js

View file

@ -1,7 +1,13 @@
import { v4 as uuid } from 'uuid'
import { sendMB } from '../../../infrastructure/event-tracking'
// VERSION should get incremented when making changes to caching behavior or
// adjusting metrics collection.
// Keep in sync with the service worker.
const VERSION = 2
const pdfJsMetrics = {
version: VERSION,
id: uuid(),
epoch: Date.now(),
totalBandwidth: 0,

View file

@ -3,6 +3,7 @@ const OError = require('@overleaf/o-error')
// VERSION should get incremented when making changes to caching behavior or
// adjusting metrics collection.
// Keep in sync with PdfJsMetrics.
const VERSION = 2
const CLEAR_CACHE_REQUEST_MATCHER = /^\/project\/[0-9a-f]{24}\/output$/