Skip to main content
cngx-src documentation

withAsyncLabel

Functioncommon/data/async-registry

projects/common/data/async-registry/http-context.ts

Description#

Returns an HttpContext that labels the request for async observability. Pass an existing context to chain with other tokens.

this.http.get('/api/users', { context: withAsyncLabel('users') });

Signature#

withAsyncLabel(label: string, context: HttpContext)

Parameters#

@paramlabelstring
@paramcontextHttpContext= new HttpContext()

Returns#

HttpContext