@embrace-io/react-native-navigation
Version:
A React Native wrapper for the OTel Navigation instrumentation library that creates telemetry data representing Navigation changes
18 lines (17 loc) • 1.1 kB
TypeScript
import { AppStateStatus } from "react-native";
import { MutableRefObject } from "react";
import { Attributes } from "@opentelemetry/api";
import { TracerRef } from "./hooks/useTracerRef";
import { SpanRef } from "./hooks/useSpanRef";
import { ConsoleStub } from "./hooks/useConsole";
declare const ATTRIBUTES: {
initialView: string;
finalView: string;
viewName: string;
appState: string;
};
declare const spanStart: (tracer: TracerRef, span: SpanRef, currentRouteName: string, customAttributes?: Attributes, isLaunch?: boolean) => void;
declare const spanEnd: (span: SpanRef, appState?: AppStateStatus, isUnmount?: boolean) => void;
declare const spanCreator: (tracer: TracerRef, span: SpanRef, view: MutableRefObject<string | null>, console: Console | ConsoleStub, customAttributes?: Attributes) => (currentRouteName: string) => void;
declare const spanCreatorAppState: (tracer: TracerRef, span: SpanRef, customAttributes?: Attributes) => (currentRouteName: string, currentState: AppStateStatus) => void;
export { spanCreator, spanCreatorAppState, spanStart, spanEnd, ATTRIBUTES };