···11import { ScrapeMedia } from "@movie-web/providers";
22+import { nanoid } from "nanoid";
23import { ofetch } from "ofetch";
34import { useCallback } from "react";
45···89// for anybody who cares - these are anonymous metrics.
910// They are just used for figuring out if providers are broken or not
1011const metricsEndpoint = "https://backend.movie-web.app/metrics/providers";
1212+const batchId = () => nanoid(32);
11131214export type ProviderMetric = {
1315 tmdbId: string;
···3436 method: "POST",
3537 body: {
3638 items,
3939+ batchId: batchId(),
3740 },
3841 });
3942}