logologo
Docs
API
Docs
API
logologo
React Native Ottrelite

Classes

Class: DevSpanProcessorInterceptor
Class: OttreliteMeterProvider
Class: OttreliteTracerProvider
Class: OttreliteBackendPlatform
Class: OttreliteBackendTracy
Class: Ottrelite

Functions

Function: useTracer
Function: vanillaTracerFactory
Function: withTrace
Function: useComponentRenderTracing
Function: withComponentRenderTracing

Interfaces

Interface: OttreliteBackendInfo

Modules

Module: interop-otel/src
Module: @ottrelite/backend-platform
Module: @ottrelite/backend-wrapper-tracy
Module: @ottrelite/core

Types

Type alias: WithTraceProps
Type alias: OttreliteBackend
Type alias: StackTraceEntry
Type alias: TracingAPI
Abstract Logo

Need React or React Native expertise you can count on?

Let's talkLet's talk
Edit this page on GitHub
Previous PageFunction: withTrace
Next PageFunction: withComponentRenderTracing
Need help with React or React Native projects?
We support teams building scalable apps with React and React Native.
Let's talkLet's talk

#Function: useComponentRenderTracing

@ottrelite/core.useComponentRenderTracing

useComponentRenderTracing(eventName, additionalEventArgs?, api?): Object

Hook to trace component render performance. Registers immediate events if using the 'dev' API; for 'otel' API, records spans starting & ending at component actual render after shadow tree commit, the JS rendering logic duration is recorded as attribute jsLogicDuration. This is because of React's concurrent rendering model, see the README for more information on that.

#Parameters

NameTypeDefault valueDescription
eventNamestringundefinedThe name of the event to trace.
additionalEventArgs?Record<string, string>undefinedAdditional arguments to include in the trace. In case of both APIs, they will be set at event start.
apiTracingAPI'dev'The API to use for tracing (default is 'dev').

#Returns

Object

An object containing the markJSRenderEnd function.

NameType
markJSRenderEnd() => void