UNPKG

@grafana/faro-react

Version:

Faro package that enables easier integration in projects built with React.

25 lines (24 loc) 838 B
import type { Span } from '@opentelemetry/api'; import { Component } from 'react'; import type { ReactNode } from 'react'; export interface FaroProfilerProps { children: ReactNode; name: string; updateProps: Record<string, unknown>; } export declare class FaroProfiler extends Component<FaroProfilerProps> { protected mountSpan: Span | undefined; protected mountSpanEndTime: number | undefined; protected updateSpan: Span | undefined; private get isOtelInitialized(); private get otel(); private get tracer(); private createSpan; private createChildSpan; constructor(props: FaroProfilerProps); componentDidMount(): void; shouldComponentUpdate({ updateProps }: FaroProfilerProps): boolean; componentDidUpdate(): void; componentWillUnmount(): void; render(): ReactNode; }