Skip to main content

Function: createAuthAttributes()

@arolariu/website


@arolariu/website / instrumentation.server / createAuthAttributes

Function: createAuthAttributes()

createAuthAttributes(authenticated, options?): AuthAttributes

Defined in: instrumentation.server.ts:865

Create authentication semantic attributes.

Parameters​

authenticated​

boolean

Whether the user is authenticated

options?​

Additional auth attributes

role?​

string

method?​

string

provider?​

string

Returns​

AuthAttributes

Type-safe authentication attributes

Example​

const attrs = createAuthAttributes(true, {
role: 'admin',
method: 'clerk',
provider: 'clerk',
});
// was this page useful?