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:
@@ -43,7 +43,7 @@ export const bookingQueryRouter = router({
|
||||
.query(async function ({ ctx }) {
|
||||
const { confirmationNumber, lang, token, serviceToken } = ctx
|
||||
|
||||
const getBookingCounter = createCounter("trpc.booking", "get")
|
||||
const getBookingCounter = createCounter("trpc.booking.get")
|
||||
const metricsGetBooking = getBookingCounter.init({ confirmationNumber })
|
||||
|
||||
metricsGetBooking.start()
|
||||
@@ -110,7 +110,7 @@ export const bookingQueryRouter = router({
|
||||
input: { confirmationNumber, lastName, firstName, email },
|
||||
}) {
|
||||
const { lang, token, serviceToken } = ctx
|
||||
const findBookingCounter = createCounter("trpc.booking", "findBooking")
|
||||
const findBookingCounter = createCounter("trpc.booking.findBooking")
|
||||
const metricsFindBooking = findBookingCounter.init({ confirmationNumber })
|
||||
|
||||
metricsFindBooking.start()
|
||||
@@ -180,8 +180,7 @@ export const bookingQueryRouter = router({
|
||||
const { confirmationNumber, lang, token } = ctx
|
||||
|
||||
const getLinkedReservationsCounter = createCounter(
|
||||
"trpc.booking",
|
||||
"linkedReservations"
|
||||
"trpc.booking.linkedReservations"
|
||||
)
|
||||
const metricsGetLinkedReservations = getLinkedReservationsCounter.init({
|
||||
confirmationNumber,
|
||||
@@ -230,7 +229,7 @@ export const bookingQueryRouter = router({
|
||||
const { confirmationNumber } = ctx
|
||||
const language = toApiLang(lang)
|
||||
|
||||
const getBookingStatusCounter = createCounter("trpc.booking", "status")
|
||||
const getBookingStatusCounter = createCounter("trpc.booking.status")
|
||||
const metricsGetBookingStatus = getBookingStatusCounter.init({
|
||||
confirmationNumber,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user