MOB-991 fix firebase trace function names :)

This commit is contained in:
sepeterson
2025-11-24 14:44:58 -06:00
parent bf953bfc42
commit 2b7dc12b00
2 changed files with 6 additions and 6 deletions

View File

@@ -127,7 +127,7 @@ const AICamera = ( {
? device.formats[debugFormatIndex]
: undefined;
const startTrace = useStore( state => state.startTrace );
const startFirebaseTrace = useStore( state => state.startFirebaseTrace );
const toggleLocation = () => {
if ( !useLocation && !hasLocationPermissions ) {
@@ -177,7 +177,7 @@ const AICamera = ( {
await logStage( sentinelFileName, "take_photo_start" );
setHasTakenPhoto( true );
logFirebaseEvent( "ai_camera_shutter_tap", { hasLocationPermissions } );
startTrace( FIREBASE_TRACES.AI_CAMERA_TO_MATCH );
startFirebaseTrace( FIREBASE_TRACES.AI_CAMERA_TO_MATCH );
// this feels a little duplicative, but we're currently using aICameraSuggestion
// to show the loading screen in Suggestions *without* setting an observation.taxon,
// and we're using visionResult to populate ObsEdit *with* the taxon
@@ -203,7 +203,7 @@ const AICamera = ( {
takePhotoAndStoreUri,
result,
hasLocationPermissions,
startTrace
startFirebaseTrace
] );
useEffect( () => {

View File

@@ -126,7 +126,7 @@ const MatchContainer = ( ) => {
shouldUseEvidenceLocation: evidenceHasLocation
} );
const stopTrace = useStore( state => state.stopTrace );
const stopFirebaseTrace = useStore( state => state.stopFirebaseTrace );
const {
scoreImageParams,
@@ -435,7 +435,7 @@ const MatchContainer = ( ) => {
&& !suggestionsLoading
) {
// This should capture a case where online and offline have had a chance to load
stopTrace(
stopFirebaseTrace(
FIREBASE_TRACES.AI_CAMERA_TO_MATCH,
{ [FIREBASE_TRACE_ATTRIBUTES.ONLINE]: `${!usingOfflineSuggestions}` }
);
@@ -443,7 +443,7 @@ const MatchContainer = ( ) => {
}, [
onlineSuggestionsAttempted,
suggestionsLoading,
stopTrace,
stopFirebaseTrace,
usingOfflineSuggestions
] );