• Extracts a complete and parameterized path from the request object and uses it to construct transaction name. If the parameterized transaction name cannot be extracted, we fall back to the raw URL.

    Additionally, this function determines and returns the transaction name source

    eg. GET /mountpoint/user/:id

    Parameters

    • req: PolymorphicRequest

      A request object

    • options: {
          customRoute?: string;
          method?: boolean;
          path?: boolean;
      } = {}

      What to include in the transaction name (method, path, or a custom route name to be used instead of the request's route)

      • Optional customRoute?: string
      • Optional method?: boolean
      • Optional path?: boolean

    Returns [string, TransactionSource]

    A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url')

Generated using TypeDoc