Skip to main content

Function: createNextJsAttributes()

@arolariu/website


@arolariu/website / instrumentation.server / createNextJsAttributes

Function: createNextJsAttributes()

createNextJsAttributes(renderContext, options?): NextJsAttributes

Defined in: instrumentation.server.ts:783

Create Next.js rendering semantic attributes.

Parameters​

renderContext​

RenderContext

Rendering context (server, client, edge, api)

options?​

Additional Next.js attributes

route?​

string

pageType?​

"static" | "dynamic" | "isr"

serverComponents?​

boolean

cacheHit?​

boolean

runtime?​

"edge" | "nodejs"

Returns​

NextJsAttributes

Type-safe Next.js attributes

Example​

const attrs = createNextJsAttributes('server', {
route: '/dashboard/[id]',
pageType: 'dynamic',
serverComponents: true,
});
// was this page useful?