Merged in chore/redirect-counter (pull request #3302)
Counter name is now searchable and add counter for redirects * refactor: createCounter() only takes one argument, the name of the counter. Makes it easier to search for * feat: add counter when we do a redirect from redirect-service Approved-by: Linus Flood
This commit is contained in:
@@ -117,8 +117,7 @@ export const hotelQueryRouter = router({
|
||||
let hotelsToFetch: string[] = []
|
||||
|
||||
const getHotelsByCSFilterCounter = createCounter(
|
||||
"trpc.hotel.hotels",
|
||||
"byCSFilter"
|
||||
"trpc.hotel.hotels.byCSFilter"
|
||||
)
|
||||
const metricsGetHotelsByCSFilter = getHotelsByCSFilterCounter.init({
|
||||
input,
|
||||
@@ -296,10 +295,7 @@ export const hotelQueryRouter = router({
|
||||
return cacheClient.cacheOrGet(
|
||||
`${apiLang}:nearbyHotels:${hotelId}`,
|
||||
async () => {
|
||||
const nearbyHotelsCounter = createCounter(
|
||||
"trpc.hotel",
|
||||
"nearbyHotelIds"
|
||||
)
|
||||
const nearbyHotelsCounter = createCounter("trpc.hotel.nearbyHotelIds")
|
||||
const metricsNearbyHotels = nearbyHotelsCounter.init({
|
||||
params,
|
||||
hotelId,
|
||||
@@ -392,7 +388,7 @@ export const hotelQueryRouter = router({
|
||||
hotelId,
|
||||
language,
|
||||
}
|
||||
const meetingRoomsCounter = createCounter("trpc.hotel", "meetingRooms")
|
||||
const meetingRoomsCounter = createCounter("trpc.hotel.meetingRooms")
|
||||
const metricsMeetingRooms = meetingRoomsCounter.init({
|
||||
params,
|
||||
})
|
||||
@@ -453,10 +449,7 @@ export const hotelQueryRouter = router({
|
||||
language,
|
||||
}
|
||||
|
||||
const additionalDataCounter = createCounter(
|
||||
"trpc.hotel",
|
||||
"additionalData"
|
||||
)
|
||||
const additionalDataCounter = createCounter("trpc.hotel.additionalData")
|
||||
const metricsAdditionalData = additionalDataCounter.init({
|
||||
params,
|
||||
})
|
||||
@@ -517,10 +510,7 @@ export const hotelQueryRouter = router({
|
||||
language: apiLang,
|
||||
}
|
||||
|
||||
const breakfastCounter = createCounter(
|
||||
"trpc.hotel.packages",
|
||||
"breakfast"
|
||||
)
|
||||
const breakfastCounter = createCounter("trpc.hotel.packages.breakfast")
|
||||
const metricsBreakfast = breakfastCounter.init({
|
||||
params,
|
||||
hotelId: input.hotelId,
|
||||
@@ -597,10 +587,7 @@ export const hotelQueryRouter = router({
|
||||
language: apiLang,
|
||||
}
|
||||
|
||||
const ancillaryCounter = createCounter(
|
||||
"trpc.hotel.packages",
|
||||
"ancillary"
|
||||
)
|
||||
const ancillaryCounter = createCounter("trpc.hotel.packages.ancillary")
|
||||
const metricsAncillary = ancillaryCounter.init({
|
||||
params,
|
||||
hotelId: input.hotelId,
|
||||
|
||||
Reference in New Issue
Block a user