Skip to content

Events coming through with wrong realm

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem 1

Events that have an app_id with the _sm suffix are coming through with the realm set to SaaS or NULL

SELECT app_id, delivery_type AS realm, CASE 
    WHEN app_id LIKE '%_dedicated' THEN 'Dedicated'
    WHEN app_id LIKE '%_sm' OR delivery_type = 'Self-Managed' THEN 'Self-Managed'
    WHEN delivery_type = 'SaaS' OR instance_id = 'ea8bf810-1d6f-4a6a-b4fd-93e8cbd8b57f' THEN 'GitLab.com' 
  END                                                 AS deployment_type, COUNT(*) FROM PROD.COMMON_PREP.PREP_SNOWPLOW_UNNESTED_EVENTS_ALL_30
  WHERE app_id ILIKE '%_sm%'
  GROUP BY ALL
  ORDER BY 1,2,3
  ;
APP_ID REALM DEPLOYMENT_TYPE COUNT(*)
gitlab-staging_sm SaaS Self-Managed 1
gitlab_ide_extension_sm SaaS Self-Managed 274
gitlab_sm SaaS Self-Managed 6753
gitlab_sm Self-Managed Self-Managed 8323824
gitlab_sm Self-Managed 86959

Problem 2

Events that have an instance id = 'ea8bf810-1d6f-4a6a-b4fd-93e8cbd8b57f' (gitlab.com) coming through as self managed

SELECT 
  app_id, 
  delivery_type, 
  dim_instance_id, 
  COUNT(*) 
FROM PROD.COMMON.FCT_BEHAVIOR_STRUCTURED_EVENT
WHERE behavior_at > '2025-04-01' AND dim_instance_id = 'ea8bf810-1d6f-4a6a-b4fd-93e8cbd8b57f' AND delivery_type = 'Self-Managed'
GROUP BY ALL ;
APP_ID DELIVERY_TYPE DIM_INSTANCE_ID COUNT(*)
gitlab_ide_extension Self-Managed ea8bf810-1d6f-4a6a-b4fd-93e8cbd8b57f 62637
Edited by 🤖 GitLab Bot 🤖