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:
@@ -24,8 +24,9 @@ import type { blocksSchema } from "./output"
|
||||
export interface GetStartPageData extends z.input<typeof startPageSchema> {}
|
||||
export interface StartPage extends z.output<typeof startPageSchema> {}
|
||||
|
||||
export interface GetStartPageRefsSchema
|
||||
extends z.input<typeof startPageRefsSchema> {}
|
||||
export interface GetStartPageRefsSchema extends z.input<
|
||||
typeof startPageRefsSchema
|
||||
> {}
|
||||
|
||||
export type Block = z.output<typeof blocksSchema>
|
||||
|
||||
@@ -34,8 +35,7 @@ export const startPageQueryRouter = router({
|
||||
const { lang, uid } = ctx
|
||||
|
||||
const getStartPageRefsCounter = createCounter(
|
||||
"trpc.contentstack",
|
||||
"startPage.get.refs"
|
||||
"trpc.contentstack.startPage.get.refs"
|
||||
)
|
||||
const metricsGetStartPageRefs = getStartPageRefsCounter.init({ lang, uid })
|
||||
|
||||
@@ -67,10 +67,7 @@ export const startPageQueryRouter = router({
|
||||
|
||||
metricsGetStartPageRefs.success()
|
||||
|
||||
const getStartPageCounter = createCounter(
|
||||
"trpc.contentstack",
|
||||
"startPage.get"
|
||||
)
|
||||
const getStartPageCounter = createCounter("trpc.contentstack.startPage.get")
|
||||
const metricsGetStartPage = getStartPageCounter.init({ lang, uid })
|
||||
|
||||
metricsGetStartPage.start()
|
||||
|
||||
Reference in New Issue
Block a user