Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(batch-exports): exclude $feature_flag_called by default on new exports (#89581)

posthog[bot]dd7c0f69287b
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 803322a01851..29d174f93311 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -5849,41 +5849,41 @@ snapshots:
scenes-app-batchexports--metrics--light:
hash: v1.k794b7964.1c2fb9dc1d82caf47348260815675680ba3c3961fe8a76571209271d69b8831b.ITESrPcN--JfW91s4W40L3aZjHaQuRaTrrKzJQ_xFyg
scenes-app-batchexports--new-aws-s-3-export--dark:
- hash: v1.k794b7964.ba28787f570fe963d52c523cedd8e8326324ecd81137a075bc4b4a1c32f22352.pvXD43-IPlixu51pmi5Yb9_skwmXwS8GFPImeRVoJRc
+ hash: v1.k794b7964.7b9a43632c140e2b448a80e77e5a76a35369164cfb146c46d6802eba8dff9890.qePrTrYjvW-8vY773v6YmBU8mx0u3179FEYHinwS35U
scenes-app-batchexports--new-aws-s-3-export--light:
- hash: v1.k794b7964.c66a1b24331da1daa163f120fcc09c1d5ed8ac8dd78e0aa0d8a4fc05abb4d474.3V0dKBx0AanEoxGf-xa-8gldLnsFagThPGTbO1hQQs0
+ hash: v1.k794b7964.641f624fb22831ce3a4569d1e380873d98fdb27411e291b347f0475ebe333f2e.l_Gd4HeJg-p4NmtHY-miReMeEZEzbqy_MviPXexIlOI
scenes-app-batchexports--new-azure-blob-export--dark:
- hash: v1.k794b7964.d227776ee0ae44c93af0fce2fce0fc9da5c8931d2be3a782dd7adb2f3760bc02.VmK6ILHB7NaCkWWthKz5_pk9P2E0nyReyDf9p0u6JpE
+ hash: v1.k794b7964.9194a7b6c6642f41ba9fa2409782461ba716e9cf2c766e87744546dbd31e837d.RMWxGiJcBbj3MVz50Fu6fMfrtgLv2YMUbvrjmEnMaxE
scenes-app-batchexports--new-azure-blob-export--light:
- hash: v1.k794b7964.74e4fdc93efb6446e31fc8f42506b2c124c2b597e74976ad46fe63d5605f67c9.VSCo8j_5XCX0yQGlUMA-jWi19OpE2gh2iLCR01V6z3w
+ hash: v1.k794b7964.5fda58f5dec6c3ea7c8c40c694c3f97761f99a436a870b93b6a26b4cd085037f.WNADZnYf2g_19BxGdGqRYuqyI6Y7M5101JLiRiwc9dM
scenes-app-batchexports--new-big-query-export--dark:
- hash: v1.k794b7964.4e98a854cfb3f9ea6775654e96c5c0daf63286b5f086b7913ccc84a9a51d6c6c.DM73bXvKBX6-sPVMAvDKLV2FnUFuu_DIpIoBEXXC5I0
+ hash: v1.k794b7964.6975ff48d2100fa8cc3e0b1a1a09651bc6da093b8dd5bc19ef0886b81a28cd71.9Nj9ZX9cj0uTTd-KuQ75rF9h9AHz8yGnDzZk29YI2to
scenes-app-batchexports--new-big-query-export--light:
- hash: v1.k794b7964.25ad001cadbcdb033ee83c394a4bdf255c31f9b505256df7c0ba978246e8bfef.NmigLvuhgu-IGaPD6vkYk5fj3TJHrnlSPx7CgvPni58
+ hash: v1.k794b7964.5a0276183485c9c7874324a1ab9a77ca87e68a16b98be494d4cc940f3e3f06f8.d6h6VpLnVWiSQX02whJiIFaIMriJjvzW8hkW6lkqtYU
scenes-app-batchexports--new-databricks-export--dark:
- hash: v1.k794b7964.52c632dfccfce8311e7e07775cae97e5b8dbd0e8c164f4d910578b36f6057bf3.e9262YQSR9G2kdUIjpB7HxKhZ3neg33Rs6LDun6Urf8
+ hash: v1.k794b7964.0e29c0dc0dc107b938c82e0938369fffd73fa7b4d5f4d71960394f0faa7f9d6b.afdH0lLoYGpImcKpzFUAzzh4VT8-V_VXBIjn9De5ICY
scenes-app-batchexports--new-databricks-export--light:
- hash: v1.k794b7964.568ea6e09ad255c6ab35fe9f8bd2080da52e3f347ac0d2d94179ff7ae961a7ea.yrv5bUcnRY1pEQQEfo3wRskxeyfsEFmry1nDncQvjZs
+ hash: v1.k794b7964.262a4a5bc9a48e269be1ab6604036193cad537f9067ab199c7f49d1f404ff35b.wKMWMFmN1Qjr4IO8kXbpu3ZpFjFxcN4Qdz2QKLKQe-Q
scenes-app-batchexports--new-http-export--dark:
- hash: v1.k794b7964.9872d07f9404c34e657202e561faa6ed9793f8739a7eb8924eb9c80f8a3ec4a0.YUz7AOQ_zd71UZuzmz8c8gsoQHhB6qMpoWKsbpW7A7k
+ hash: v1.k794b7964.6d50d44759ff212e089fdce4910281391aa8aeee17ff35562b03a7cba89e7af0.3vs_sRv_Zhhjz2TAG9ChlXHyVZZnhxW_ABnZXYoyLzc
scenes-app-batchexports--new-http-export--light:
- hash: v1.k794b7964.bb6fd5df7b39fe1f2d725670240deabac6018f2294df4adff0cf7b59658c4301.goEA8ZB1CU_cQDKRlbg2a8kj7_hqREz_Em39RGzduXo
+ hash: v1.k794b7964.7c786b533b5922161581c818875b48fcfdaba55164512bff6e577fd7064d790c.Mqh55PN3ORKBSU2nblKO4x6dLCSrDdk1c-jwlnr3Nsw
scenes-app-batchexports--new-postgres-export--dark:
- hash: v1.k794b7964.0f37ca574b71d528642d63c705f47a508d514413b2fdbc11e3e4bf2f62582990.IeLS4jkdO76AcA7f6uCnpx9m0Ha77i-BL6cNKUYOxdo
+ hash: v1.k794b7964.0891450debc658852aa008d2129a8e21ef43c056c361240f0e1b43d8557dd45f.gIAp33c8PHrly-vLIbhnHbwhpA2TiNjoWeg70A-NE4U
scenes-app-batchexports--new-postgres-export--light:
- hash: v1.k794b7964.07ab832542a34e8d6cf32435896fa8db80e75bd5f6ff30a84af2460d866b2e27.e3DOY3ZdXD5wz0IaB9IWUuTrvof0z_QX5uKAevqP0W8
+ hash: v1.k794b7964.a91e98e99f18feaab3e35cc74c61e587a93f0d5145dbb0ffe87cba47753e2b69.xH4R5lW0I6Jc6kaJhwrBbmt3aAm7WBxGgI233qSOQ5s
scenes-app-batchexports--new-redshift-export--dark:
hash: v1.k794b7964.8f0388fbdd4a8d00212684d736e614f2344aad1cfe39367f3b816b20dd763c15.YHxV-ye4sDuyCfkAEScg1Cu1fJNySEqpEd9vHiCqEA4
scenes-app-batchexports--new-redshift-export--light:
hash: v1.k794b7964.fa2185c87dad9181ffdec1888102174d0ec3acc2a11411ef597177a9d0d570b1.2wW_Q7snJas3pAN8GKb0XGnS2QMeI_CUZkMwiQ7Wkuc
scenes-app-batchexports--new-s-3-compatible-export--dark:
- hash: v1.k794b7964.bd6c771412a0a94b18f4ccf9e1d49b5618dd5832f213db69668f4669ec7368fb.wYOVOvzHJarYOR5JuHFQcyRL5SXIUqTU2X5RITySkng
+ hash: v1.k794b7964.64732abe9af577a8d94f717698373476218db08db3d62f1fc2c37dc52db29a01.6KvN-kOY6LRFnyCA59HvtJ1_vM-3c6wt-X42C4w5fP4
scenes-app-batchexports--new-s-3-compatible-export--light:
- hash: v1.k794b7964.67df45858aeb4fcf46af4f7afabc683cec81be3442b2c561b6af13401b3200a2._8_wr0216yWo9Rn0UqS88sGH35FBPLD-jFMdhw5z_Mk
+ hash: v1.k794b7964.d463a28cbe2e9b9ffc530be3b01b107670f86f1bd30195503ac18a3cc639967f.OguOFrIy74YI5hUa_T2-HFkslJrca_B3sQUa5JfY_Vo
scenes-app-batchexports--new-snowflake-export--dark:
- hash: v1.k794b7964.075b8aa4181551b8bee5dceb4982f9b97877b50ead700a111e2667dc3812bdb7.M8WKd7N1oqgqtdmMI9zCDmHrgDdfnDof2FWsg1r3LlY
+ hash: v1.k794b7964.c5ddd805734437f76de9eada9821350aa76270bf901ee8aec6ca7cfc43189e27.ufYlYueWKR4u3kOZ-g4DSU27Rt-pUK3Txb7WY3EcwjY
scenes-app-batchexports--new-snowflake-export--light:
- hash: v1.k794b7964.a5e73f672e4c9bd8560cbb4072ed56f74943d530d3c6d7d37f7faa0b62d5f42a.Ym3v_JtQ0zKBQ-oahLRlJYHiNwiQHnbeeUsplE5Awug
+ hash: v1.k794b7964.13f4f81b362644f725b327d22be590c5041484003136405d28a5482b95c558ec.AQiY8USCiDWJSxKcx_EwA7NybHDE-3x8E8aok9wsEdM
scenes-app-batchexports--runs-empty--dark:
hash: v1.k794b7964.8177c005d63cababb9abc801ea81b65535c143566c46768b5de465a9d0d53beb.Z_iUGxGBuja1U4pMXOJ99dvgsMUdovOKv-xiIZdsV-U
scenes-app-batchexports--runs-empty--light:
diff --git a/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.test.ts b/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.test.ts
index af22743412ac..3b4cea0e0bef 100644
--- a/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.test.ts
+++ b/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.test.ts
@@ -13,6 +13,7 @@ import { BatchExportConfiguration } from '~/types'
import {
BatchExportConfigFormLogicProps,
+ DEFAULT_EXCLUDE_EVENTS,
batchExportConfigFormLogic,
getDefaultConfiguration,
} from './batchExportConfigFormLogic'
@@ -796,6 +797,7 @@ describe('batchExportConfigFormLogic', () => {
])('returns correct defaults for $service', ({ service, expected }) => {
const config = getDefaultConfiguration(service)
expect(config).toEqual(expect.objectContaining(expected))
+ expect(config.exclude_events).toEqual(['$feature_flag_called'])
})
})
@@ -1017,7 +1019,12 @@ describe('batchExportConfigFormLogic', () => {
.toFinishAllListeners()
expect(lastPostBody).not.toBeNull()
- expect(lastPostBody!.destination).toEqual(expectedDestination)
+ // exclude_events is a base config key shared by every destination, so it's merged in here
+ // rather than repeated in each case above.
+ expect(lastPostBody!.destination).toEqual({
+ ...expectedDestination,
+ config: { exclude_events: DEFAULT_EXCLUDE_EVENTS, ...expectedDestination.config },
+ })
expect(router.values.location.pathname).toContain(urls.batchExport('new-export-id'))
})
})
diff --git a/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.tsx b/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.tsx
index 4e795dc67388..44b21188ae07 100644
--- a/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.tsx
+++ b/frontend/src/scenes/data-pipelines/batch-exports/batchExportConfigFormLogic.tsx
@@ -118,6 +118,10 @@ function getConfigurationFromBatchExportConfig(batchExportConfig: BatchExportCon
return config
}
+// $feature_flag_called is high volume and is being deprecated from the events table, so new exports
+// leave it out by default. It shows up prefilled under "Exclude events" and can be removed there.
+export const DEFAULT_EXCLUDE_EVENTS = ['$feature_flag_called']
+
export function getDefaultConfiguration(service: string): Record<string, any> {
const definition = DESTINATIONS[service as BatchExportService['type']]
return {
@@ -125,6 +129,7 @@ export function getDefaultConfiguration(service: string): Record<string, any> {
destination: service,
model: 'events',
paused: true,
+ exclude_events: [...DEFAULT_EXCLUDE_EVENTS],
...(definition ? definition.defaults() : {}),
}
}