diff --git a/apps/scandic-web/app/[lang]/(live-current)/current-content-page/page.tsx b/apps/scandic-web/app/[lang]/(live-current)/current-content-page/page.tsx index 1e626165e..07a8c685c 100644 --- a/apps/scandic-web/app/[lang]/(live-current)/current-content-page/page.tsx +++ b/apps/scandic-web/app/[lang]/(live-current)/current-content-page/page.tsx @@ -25,6 +25,10 @@ export default async function CurrentContentPage({ { locale: params.lang, url: searchParams.uri, + }, + { + key: `${params.lang}:current-block-page:${searchParams.uri}`, + ttl: "max", } ) @@ -38,7 +42,11 @@ export default async function CurrentContentPage({ // This is currently to be considered a temporary solution to provide the tracking with a few values in english to align with existing reports const pageDataForTracking = await request( GetCurrentBlockPageTrackingData, - { uid: response.data.all_current_blocks_page.items[0].system.uid } + { uid: response.data.all_current_blocks_page.items[0].system.uid }, + { + key: `${params.lang}:current-block-page-tracking:${searchParams.uri}`, + ttl: "max", + } ) const pageData = response.data.all_current_blocks_page.items[0] diff --git a/apps/scandic-web/docker-compose.yaml b/apps/scandic-web/docker-compose.yaml index b9392b81a..44169530b 100644 --- a/apps/scandic-web/docker-compose.yaml +++ b/apps/scandic-web/docker-compose.yaml @@ -12,6 +12,8 @@ services: - PRIMARY_API_KEY= - SECONDARY_API_KEY= - NODE_ENV=development + - SENTRY_DSN=fake-dsn + - SENTRY_ENVIRONMENT=development redis: image: redis:6 ports: diff --git a/apps/scandic-web/lib/graphql/_request.ts b/apps/scandic-web/lib/graphql/_request.ts index cd1456ee1..33857ea87 100644 --- a/apps/scandic-web/lib/graphql/_request.ts +++ b/apps/scandic-web/lib/graphql/_request.ts @@ -81,6 +81,9 @@ export async function request( const response = await client.request({ document: query, variables, + requestHeaders: { + "User-Agent": `scandic-web-${env.SENTRY_ENVIRONMENT}`, + }, }) try { diff --git a/apps/scandic-web/server/routers/contentstack/collectionPage/utils.ts b/apps/scandic-web/server/routers/contentstack/collectionPage/utils.ts index 20a2db981..ae6a2728f 100644 --- a/apps/scandic-web/server/routers/contentstack/collectionPage/utils.ts +++ b/apps/scandic-web/server/routers/contentstack/collectionPage/utils.ts @@ -3,7 +3,6 @@ import { request } from "@/lib/graphql/request" import { notFound } from "@/server/errors/trpc" import { createCounter } from "@/server/telemetry" -import { getCacheClient } from "@/services/dataCache" import { generateRefsResponseTag, generateTag, @@ -32,16 +31,17 @@ export async function fetchCollectionPageRefs(lang: Lang, uid: string) { metricsGetCollectionPageRefs.start() - const cacheClient = await getCacheClient() const cacheKey = generateRefsResponseTag(lang, uid) - const refsResponse = await cacheClient.cacheOrGet( - cacheKey, - async () => - await request(GetCollectionPageRefs, { - locale: lang, - uid, - }), - "max" + const refsResponse = await request( + GetCollectionPageRefs, + { + locale: lang, + uid, + }, + { + key: cacheKey, + ttl: "max", + } ) if (!refsResponse.data) {