oppia / oppia-android

A free, online & offline learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
322 stars 523 forks source link

[BUG]: Feature flags are failing to log correctly #5556

Open BenHenning opened 1 month ago

BenHenning commented 1 month ago

Describe the bug

Analyzing the 'feature_flag_list' event in production is showing that feature_flag_names and feature_flag_sync_statuses are both appearing as 'null'. This essentially renders the event unusable since there's no way to correspond event enabled states with the corresponding event.

Steps To Reproduce

Run the following query on the developer Firebase project:

SELECT
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "uuid") AS uuid,
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "app_session_id") AS app_session_id,
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "feature_flag_names") AS feature_flag_names,
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "feature_flag_enabled_states") AS feature_flag_enabled_states,
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "feature_flag_sync_statuses") AS feature_flag_sync_statuses,
FROM `oppia-android-dev.analytics_235566504.events_*`
WHERE event_name = "feature_flag_list"

See sample results:

[{
  "uuid": null,
  "app_session_id": "277ed911-efef-3144-b0fa-d37cdd87ac86",
  "feature_flag_names": null,
  "feature_flag_enabled_states": "false,false,false,false,false,false,false,false,false,false,true,false,false",
  "feature_flag_sync_statuses": null
}, {
  "uuid": null,
  "app_session_id": "f2ed5da7-bd3d-3ec3-9044-13ddf766d8fe",
  "feature_flag_names": null,
  "feature_flag_enabled_states": "false,false,false,false,false,false,false,false,false,false,true,false,true",
  "feature_flag_sync_statuses": null
}, {
  "uuid": null,
  "app_session_id": "a41e3a56-4c4a-3a3b-b820-a6337dd5797c",
  "feature_flag_names": null,
  "feature_flag_enabled_states": "false,false,false,false,false,false,false,false,false,false,true,false,true",
  "feature_flag_sync_statuses": null
}]

Expected Behavior

Flag names and sync statuses should successfully log.

Screenshots/Videos

No response

What device/emulator are you using?

No response

Which Android version is your device/emulator running?

No response

Which version of the Oppia Android app are you using?

No response

Additional Context

No response

BenHenning commented 1 month ago

@kkmurerwa this is a blocker for app health metrics--it seems that feature flags are not actually logging correctly.