talawa-api / Exports / libraries/requestTracing
Module: libraries/requestTracing
Table of contents
Variables
Functions
Variables
requestTracingNamespace
• Const
requestTracingNamespace: Namespace
<Record
<string
, any
>>
Defined in
src/libraries/requestTracing.ts:17
tracingIdHeaderName
• Const
tracingIdHeaderName: "X-Tracing-Id"
Defined in
src/libraries/requestTracing.ts:21
Functions
getTracingId
▸ getTracingId(): string
Returns
string
Defined in
src/libraries/requestTracing.ts:29
middleware
▸ middleware(): (req
: Request
<ParamsDictionary
, any
, any
, ParsedQs
, Record
<string
, any
>>, res
: Response
<any
, Record
<string
, any
>>, next
: NextFunction
) => void
Returns
fn
▸ (req
, res
, next
): void
Parameters
Name | Type |
---|---|
req | Request <ParamsDictionary , any , any , ParsedQs , Record <string , any >> |
res | Response <any , Record <string , any >> |
next | NextFunction |
Returns
void
Defined in
src/libraries/requestTracing.ts:33
setTracingId
▸ setTracingId(tracingId
): string
Parameters
Name | Type |
---|---|
tracingId | string |
Returns
string
Defined in
src/libraries/requestTracing.ts:25
trace
▸ trace<T
>(tracingId
, method
): Promise
<void
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
tracingId | string |
method | () => T |
Returns
Promise
<void
>