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: vanillaTracerFactory
Next PageFunction: useComponentRenderTracing
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: withTrace

interop-otel/src.withTrace

withTrace<ComponentProps>(WrappedComponent, traceName): FC<ComponentProps & WithTraceProps>

Higher-order component that supplies the wrapped component with a wrapped useTracer hook that is already scoped to the proper name of the component.

#Type parameters

NameType
ComponentPropsextends IntrinsicAttributes

#Parameters

NameTypeDescription
WrappedComponentComponentType<ComponentProps & Partial<WithTraceProps>>The component to wrap with tracing
traceNamestringOptional name name of the trace; if not provided, displayName of the component will be used.

#Returns

FC<ComponentProps & WithTraceProps>

A higher-order component that wraps the given component with tracing

See

useTracer for the hook that is used internally.