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.

fix(cdp): improve integration input validation and log redaction (#101880)

Tom Piccirello9f8a95e41a22
diff --git a/nodejs/src/cdp/services/__snapshots__/native-destination-executor.service.test.ts.snap b/nodejs/src/cdp/services/__snapshots__/native-destination-executor.service.test.ts.snap
index 5776939aa087..c1510e92a91f 100644
--- a/nodejs/src/cdp/services/__snapshots__/native-destination-executor.service.test.ts.snap
+++ b/nodejs/src/cdp/services/__snapshots__/native-destination-executor.service.test.ts.snap
@@ -1,10 +1,10 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`NativeDestinationExecutorService native plugins should call the plugin perform method 1`] = `
[
{
"level": "debug",
- "message": "config, {"url":"https://posthog.com/webhook","method":"POST","body":{"event_name":"$pageview"},"headers":{"Authorization":"Bearer abc"},"debug_mode":true}",
+ "message": "config, {"url":"https://posthog.com/webhook","method":"POST","body":{"event_name":"$pageview"},"headers":{"Authorization":"***REDACTED***"},"debug_mode":true,"connection":{"$integration_id":1,"password":"***REDACTED***"}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -14,12 +14,12 @@ exports[`NativeDestinationExecutorService native plugins should call the plugin
},
{
"level": "debug",
- "message": "options, {"method":"POST","headers":{"Authorization":"Bearer abc"},"json":{"event_name":"$pageview"}}",
+ "message": "options, {"method":"POST","headers":{"Authorization":"***REDACTED***"},"json":{"event_name":"$pageview"}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
"level": "debug",
- "message": "fetchOptions, {"method":"POST","headers":{"User-Agent":"PostHog.com/1.0","Authorization":"Bearer abc","Content-Type":"application/json"},"body":"{\\"event_name\\":\\"$pageview\\"}"}",
+ "message": "fetchOptions, {"method":"POST","headers":{"User-Agent":"PostHog.com/1.0","Authorization":"***REDACTED***","Content-Type":"application/json"},"body":"{\\"event_name\\":\\"$pageview\\"}"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -39,7 +39,7 @@ exports[`NativeDestinationExecutorService native plugins should handle non retry
[
{
"level": "debug",
- "message": "config, {"url":"https://posthog.com/webhook","method":"POST","body":{"event_name":"$pageview"},"headers":{"Authorization":"Bearer abc"},"debug_mode":true}",
+ "message": "config, {"url":"https://posthog.com/webhook","method":"POST","body":{"event_name":"$pageview"},"headers":{"Authorization":"***REDACTED***"},"debug_mode":true}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -49,12 +49,12 @@ exports[`NativeDestinationExecutorService native plugins should handle non retry
},
{
"level": "debug",
- "message": "options, {"method":"POST","headers":{"Authorization":"Bearer abc"},"json":{"event_name":"$pageview"}}",
+ "message": "options, {"method":"POST","headers":{"Authorization":"***REDACTED***"},"json":{"event_name":"$pageview"}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
"level": "debug",
- "message": "fetchOptions, {"method":"POST","headers":{"User-Agent":"PostHog.com/1.0","Authorization":"Bearer abc","Content-Type":"application/json"},"body":"{\\"event_name\\":\\"$pageview\\"}"}",
+ "message": "fetchOptions, {"method":"POST","headers":{"User-Agent":"PostHog.com/1.0","Authorization":"***REDACTED***","Content-Type":"application/json"},"body":"{\\"event_name\\":\\"$pageview\\"}"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -74,7 +74,7 @@ exports[`NativeDestinationExecutorService native plugins should retry retryable
[
{
"level": "debug",
- "message": "config, {"url":"https://posthog.com/webhook","method":"POST","body":{"event_name":"$pageview"},"headers":{"Authorization":"Bearer abc"},"debug_mode":true}",
+ "message": "config, {"url":"https://posthog.com/webhook","method":"POST","body":{"event_name":"$pageview"},"headers":{"Authorization":"***REDACTED***"},"debug_mode":true}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -84,12 +84,12 @@ exports[`NativeDestinationExecutorService native plugins should retry retryable
},
{
"level": "debug",
- "message": "options, {"method":"POST","headers":{"Authorization":"Bearer abc"},"json":{"event_name":"$pageview"}}",
+ "message": "options, {"method":"POST","headers":{"Authorization":"***REDACTED***"},"json":{"event_name":"$pageview"}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
"level": "debug",
- "message": "fetchOptions, {"method":"POST","headers":{"User-Agent":"PostHog.com/1.0","Authorization":"Bearer abc","Content-Type":"application/json"},"body":"{\\"event_name\\":\\"$pageview\\"}"}",
+ "message": "fetchOptions, {"method":"POST","headers":{"User-Agent":"PostHog.com/1.0","Authorization":"***REDACTED***","Content-Type":"application/json"},"body":"{\\"event_name\\":\\"$pageview\\"}"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
diff --git a/nodejs/src/cdp/services/__snapshots__/segment-destination-executor.service.test.ts.snap b/nodejs/src/cdp/services/__snapshots__/segment-destination-executor.service.test.ts.snap
index ea9c3dddc942..9955cf9dee36 100644
--- a/nodejs/src/cdp/services/__snapshots__/segment-destination-executor.service.test.ts.snap
+++ b/nodejs/src/cdp/services/__snapshots__/segment-destination-executor.service.test.ts.snap
@@ -1,10 +1,10 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`SegmentDestinationExecutorService segment plugins should call the plugin perform method 1`] = `
[
{
"level": "debug",
- "message": "config, {"apiKey":"api-key","user_id":"user-id","secretKey":"secret-key","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"01960093-a4e7-0000-8ff1-00a3c4b4207c","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"01960093-9cea-0000-8c9a-def990d34fbf","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"01960095-8a86-73c9-9adc-0d586ad50a6a","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","os_name":"Mac OS X","os_version":"10.15.7","device_brand":"","device_manufacturer":null,"device_model":null,"carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","userAgentParsing":true,"includeRawUserAgent":false,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","library":"web","userAgentData":{"model":"","platformVersion":""},"internal_partner_action":"logEventV2","debug_mode":true}",
+ "message": "config, {"apiKey":"***REDACTED***","user_id":"user-id","secretKey":"***REDACTED***","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"01960093-a4e7-0000-8ff1-00a3c4b4207c","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"01960093-9cea-0000-8c9a-def990d34fbf","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"01960095-8a86-73c9-9adc-0d586ad50a6a","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","os_name":"Mac OS X","os_version":"10.15.7","device_brand":"","device_manufacturer":null,"device_model":null,"carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","userAgentParsing":true,"includeRawUserAgent":false,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","library":"web","userAgentData":{"model":"","platformVersion":""},"internal_partner_action":"logEventV2","debug_mode":true}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -14,7 +14,7 @@ exports[`SegmentDestinationExecutorService segment plugins should call the plugi
},
{
"level": "debug",
- "message": "options, {"method":"post","json":{"api_key":"api-key","events":[{"os_name":"Mac OS X","os_version":"10.15.7","device_manufacturer":null,"device_model":null,"apiKey":"api-key","user_id":"user-id","secretKey":"secret-key","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"01960093-a4e7-0000-8ff1-00a3c4b4207c","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"01960093-9cea-0000-8c9a-def990d34fbf","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"01960095-8a86-73c9-9adc-0d586ad50a6a","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","device_brand":"","carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","internal_partner_action":"logEventV2","debug_mode":true,"library":"segment"}]}}",
+ "message": "options, {"method":"post","json":{"api_key":"***REDACTED***","events":[{"os_name":"Mac OS X","os_version":"10.15.7","device_manufacturer":null,"device_model":null,"apiKey":"***REDACTED***","user_id":"user-id","secretKey":"***REDACTED***","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"01960093-a4e7-0000-8ff1-00a3c4b4207c","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"01960093-9cea-0000-8c9a-def990d34fbf","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"01960095-8a86-73c9-9adc-0d586ad50a6a","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","device_brand":"","carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","internal_partner_action":"logEventV2","debug_mode":true,"library":"segment"}]}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -29,7 +29,7 @@ exports[`SegmentDestinationExecutorService segment plugins should call the plugi
},
{
"level": "debug",
- "message": "fetchOptions, {"method":"POST","headers":{"Content-Type":"application/json"},"body":"{\\"api_key\\":\\"api-key\\",\\"events\\":[{\\"os_name\\":\\"Mac OS X\\",\\"os_version\\":\\"10.15.7\\",\\"device_manufacturer\\":null,\\"device_model\\":null,\\"apiKey\\":\\"api-key\\",\\"user_id\\":\\"user-id\\",\\"secretKey\\":\\"secret-key\\",\\"device_id\\":\\"device-id\\",\\"endpoint\\":\\"north_america\\",\\"user_properties\\":{\\"$os\\":\\"Mac OS X\\",\\"_kx\\":null,\\"epik\\":null,\\"test\\":\\"abcdefge\\",\\"$host\\":\\"localhost:8010\\",\\"dclid\\":null,\\"email\\":\\"[email protected]\\",\\"gclid\\":null,\\"qclid\\":null,\\"realm\\":\\"hosted-clickhouse\\",\\"sccid\\":null,\\"fbclid\\":null,\\"gbraid\\":null,\\"gclsrc\\":null,\\"igshid\\":null,\\"irclid\\":null,\\"mc_cid\\":null,\\"ttclid\\":null,\\"twclid\\":null,\\"wbraid\\":null,\\"msclkid\\":null,\\"rdt_cid\\":\\"asdfsad\\",\\"$browser\\":\\"Chrome\\",\\"utm_term\\":null,\\"$pathname\\":\\"/project/1/activity/explore\\",\\"$referrer\\":\\"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta\\",\\"joined_at\\":\\"2025-04-04T11:33:18.022897+00:00\\",\\"li_fat_id\\":null,\\"strapi_id\\":null,\\"gad_source\\":null,\\"project_id\\":\\"01960093-a4e7-0000-8ff1-00a3c4b4207c\\",\\"utm_medium\\":null,\\"utm_source\\":null,\\"$initial_os\\":\\"Mac OS X\\",\\"$os_version\\":\\"10.15.7\\",\\"utm_content\\":null,\\"$current_url\\":\\"http://localhost:8000/project/1/activity/explore\\",\\"$device_type\\":\\"Desktop\\",\\"$initial__kx\\":null,\\"instance_tag\\":\\"none\\",\\"instance_url\\":\\"http://localhost:8010\\",\\"is_signed_up\\":true,\\"utm_campaign\\":null,\\"$initial_epik\\":null,\\"$initial_host\\":\\"localhost:8010\\",\\"$screen_width\\":2560,\\"project_count\\":1,\\"$initial_dclid\\":null,\\"$initial_gclid\\":null,\\"$initial_qclid\\":null,\\"$initial_sccid\\":null,\\"$screen_height\\":1440,\\"$search_engine\\":\\"google\\",\\"anonymize_data\\":false,\\"$geoip_latitude\\":-33.8715,\\"$initial_fbclid\\":null,\\"$initial_gbraid\\":null,\\"$initial_gclsrc\\":null,\\"$initial_igshid\\":null,\\"$initial_irclid\\":null,\\"$initial_mc_cid\\":null,\\"$initial_ttclid\\":null,\\"$initial_twclid\\":null,\\"$initial_wbraid\\":null,\\"$raw_user_agent\\":\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36\\",\\"$viewport_width\\":1698,\\"has_social_auth\\":false,\\"organization_id\\":\\"01960093-9cea-0000-8c9a-def990d34fbf\\",\\"$browser_version\\":135,\\"$geoip_city_name\\":\\"Sydney\\",\\"$geoip_longitude\\":151.2006,\\"$geoip_time_zone\\":\\"Australia/Sydney\\",\\"$initial_browser\\":\\"Chrome\\",\\"$initial_msclkid\\":null,\\"$initial_rdt_cid\\":null,\\"$viewport_height\\":1328,\\"has_password_set\\":true,\\"social_providers\\":[],\\"$initial_pathname\\":\\"/organization/billing\\",\\"$initial_referrer\\":\\"$direct\\",\\"$initial_utm_term\\":null,\\"$referring_domain\\":\\"localhost:8000\\",\\"is_email_verified\\":false,\\"$geoip_postal_code\\":\\"2000\\",\\"$initial_li_fat_id\\":null,\\"organization_count\\":1,\\"$creator_event_uuid\\":\\"01960095-8a86-73c9-9adc-0d586ad50a6a\\",\\"$geoip_country_code\\":\\"AU\\",\\"$geoip_country_name\\":\\"Australia\\",\\"$initial_gad_source\\":null,\\"$initial_os_version\\":\\"15.2\\",\\"$initial_utm_medium\\":null,\\"$initial_utm_source\\":null,\\"$initial_current_url\\":\\"http://localhost:8010/organization/billing?cancel=true\\",\\"$initial_device_type\\":\\"Desktop\\",\\"$initial_utm_content\\":null,\\"$geoip_continent_code\\":\\"OC\\",\\"$geoip_continent_name\\":\\"Oceania\\",\\"$initial_screen_width\\":2560,\\"$initial_utm_campaign\\":null,\\"team_member_count_all\\":1,\\"$geoip_accuracy_radius\\":20,\\"$geoip_city_confidence\\":null,\\"$initial_screen_height\\":1440,\\"project_setup_complete\\":false,\\"$initial_geoip_latitude\\":-33.8715,\\"$initial_raw_user_agent\\":\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\\",\\"$initial_viewport_width\\":1619,\\"$initial_browser_version\\":134,\\"$initial_geoip_city_name\\":\\"Sydney\\",\\"$initial_geoip_longitude\\":151.2006,\\"$initial_geoip_time_zone\\":\\"Australia/Sydney\\",\\"$initial_viewport_height\\":1328,\\"$geoip_subdivision_1_code\\":\\"NSW\\",\\"$geoip_subdivision_1_name\\":\\"New South Wales\\",\\"$geoip_subdivision_2_code\\":null,\\"$geoip_subdivision_2_name\\":null,\\"$initial_referring_domain\\":\\"$direct\\",\\"completed_onboarding_once\\":false,\\"$initial_geoip_postal_code\\":\\"2000\\",\\"has_seen_product_intro_for\\":{\\"surveys\\":true},\\"$initial_geoip_country_code\\":\\"AU\\",\\"$initial_geoip_country_name\\":\\"Australia\\",\\"$initial_geoip_continent_code\\":\\"OC\\",\\"$initial_geoip_continent_name\\":\\"Oceania\\",\\"$initial_geoip_accuracy_radius\\":20,\\"$initial_geoip_city_confidence\\":null,\\"$initial_geoip_subdivision_1_code\\":\\"NSW\\",\\"$initial_geoip_subdivision_1_name\\":\\"New South Wales\\",\\"$initial_geoip_subdivision_2_code\\":null,\\"$initial_geoip_subdivision_2_name\\":null,\\"current_organization_membership_level\\":15},\\"groups\\":{},\\"app_version\\":null,\\"platform\\":\\"Desktop\\",\\"device_brand\\":\\"\\",\\"carrier\\":\\"\\",\\"country\\":\\"Australia\\",\\"region\\":\\"\\",\\"city\\":\\"Sydney\\",\\"language\\":null,\\"utm_properties\\":{\\"utm_term\\":null,\\"utm_medium\\":null,\\"utm_source\\":null,\\"utm_content\\":null,\\"utm_campaign\\":null},\\"referrer\\":\\"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta\\",\\"internal_partner_action\\":\\"logEventV2\\",\\"debug_mode\\":true,\\"library\\":\\"segment\\"}]}"}",
+ "message": "fetchOptions, {"method":"POST","headers":{"Content-Type":"application/json"},"body":"{\\"api_key\\":\\"***REDACTED***\\",\\"events\\":[{\\"os_name\\":\\"Mac OS X\\",\\"os_version\\":\\"10.15.7\\",\\"device_manufacturer\\":null,\\"device_model\\":null,\\"apiKey\\":\\"***REDACTED***\\",\\"user_id\\":\\"user-id\\",\\"secretKey\\":\\"***REDACTED***\\",\\"device_id\\":\\"device-id\\",\\"endpoint\\":\\"north_america\\",\\"user_properties\\":{\\"$os\\":\\"Mac OS X\\",\\"_kx\\":null,\\"epik\\":null,\\"test\\":\\"abcdefge\\",\\"$host\\":\\"localhost:8010\\",\\"dclid\\":null,\\"email\\":\\"[email protected]\\",\\"gclid\\":null,\\"qclid\\":null,\\"realm\\":\\"hosted-clickhouse\\",\\"sccid\\":null,\\"fbclid\\":null,\\"gbraid\\":null,\\"gclsrc\\":null,\\"igshid\\":null,\\"irclid\\":null,\\"mc_cid\\":null,\\"ttclid\\":null,\\"twclid\\":null,\\"wbraid\\":null,\\"msclkid\\":null,\\"rdt_cid\\":\\"asdfsad\\",\\"$browser\\":\\"Chrome\\",\\"utm_term\\":null,\\"$pathname\\":\\"/project/1/activity/explore\\",\\"$referrer\\":\\"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta\\",\\"joined_at\\":\\"2025-04-04T11:33:18.022897+00:00\\",\\"li_fat_id\\":null,\\"strapi_id\\":null,\\"gad_source\\":null,\\"project_id\\":\\"01960093-a4e7-0000-8ff1-00a3c4b4207c\\",\\"utm_medium\\":null,\\"utm_source\\":null,\\"$initial_os\\":\\"Mac OS X\\",\\"$os_version\\":\\"10.15.7\\",\\"utm_content\\":null,\\"$current_url\\":\\"http://localhost:8000/project/1/activity/explore\\",\\"$device_type\\":\\"Desktop\\",\\"$initial__kx\\":null,\\"instance_tag\\":\\"none\\",\\"instance_url\\":\\"http://localhost:8010\\",\\"is_signed_up\\":true,\\"utm_campaign\\":null,\\"$initial_epik\\":null,\\"$initial_host\\":\\"localhost:8010\\",\\"$screen_width\\":2560,\\"project_count\\":1,\\"$initial_dclid\\":null,\\"$initial_gclid\\":null,\\"$initial_qclid\\":null,\\"$initial_sccid\\":null,\\"$screen_height\\":1440,\\"$search_engine\\":\\"google\\",\\"anonymize_data\\":false,\\"$geoip_latitude\\":-33.8715,\\"$initial_fbclid\\":null,\\"$initial_gbraid\\":null,\\"$initial_gclsrc\\":null,\\"$initial_igshid\\":null,\\"$initial_irclid\\":null,\\"$initial_mc_cid\\":null,\\"$initial_ttclid\\":null,\\"$initial_twclid\\":null,\\"$initial_wbraid\\":null,\\"$raw_user_agent\\":\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36\\",\\"$viewport_width\\":1698,\\"has_social_auth\\":false,\\"organization_id\\":\\"01960093-9cea-0000-8c9a-def990d34fbf\\",\\"$browser_version\\":135,\\"$geoip_city_name\\":\\"Sydney\\",\\"$geoip_longitude\\":151.2006,\\"$geoip_time_zone\\":\\"Australia/Sydney\\",\\"$initial_browser\\":\\"Chrome\\",\\"$initial_msclkid\\":null,\\"$initial_rdt_cid\\":null,\\"$viewport_height\\":1328,\\"has_password_set\\":true,\\"social_providers\\":[],\\"$initial_pathname\\":\\"/organization/billing\\",\\"$initial_referrer\\":\\"$direct\\",\\"$initial_utm_term\\":null,\\"$referring_domain\\":\\"localhost:8000\\",\\"is_email_verified\\":false,\\"$geoip_postal_code\\":\\"2000\\",\\"$initial_li_fat_id\\":null,\\"organization_count\\":1,\\"$creator_event_uuid\\":\\"01960095-8a86-73c9-9adc-0d586ad50a6a\\",\\"$geoip_country_code\\":\\"AU\\",\\"$geoip_country_name\\":\\"Australia\\",\\"$initial_gad_source\\":null,\\"$initial_os_version\\":\\"15.2\\",\\"$initial_utm_medium\\":null,\\"$initial_utm_source\\":null,\\"$initial_current_url\\":\\"http://localhost:8010/organization/billing?cancel=true\\",\\"$initial_device_type\\":\\"Desktop\\",\\"$initial_utm_content\\":null,\\"$geoip_continent_code\\":\\"OC\\",\\"$geoip_continent_name\\":\\"Oceania\\",\\"$initial_screen_width\\":2560,\\"$initial_utm_campaign\\":null,\\"team_member_count_all\\":1,\\"$geoip_accuracy_radius\\":20,\\"$geoip_city_confidence\\":null,\\"$initial_screen_height\\":1440,\\"project_setup_complete\\":false,\\"$initial_geoip_latitude\\":-33.8715,\\"$initial_raw_user_agent\\":\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36\\",\\"$initial_viewport_width\\":1619,\\"$initial_browser_version\\":134,\\"$initial_geoip_city_name\\":\\"Sydney\\",\\"$initial_geoip_longitude\\":151.2006,\\"$initial_geoip_time_zone\\":\\"Australia/Sydney\\",\\"$initial_viewport_height\\":1328,\\"$geoip_subdivision_1_code\\":\\"NSW\\",\\"$geoip_subdivision_1_name\\":\\"New South Wales\\",\\"$geoip_subdivision_2_code\\":null,\\"$geoip_subdivision_2_name\\":null,\\"$initial_referring_domain\\":\\"$direct\\",\\"completed_onboarding_once\\":false,\\"$initial_geoip_postal_code\\":\\"2000\\",\\"has_seen_product_intro_for\\":{\\"surveys\\":true},\\"$initial_geoip_country_code\\":\\"AU\\",\\"$initial_geoip_country_name\\":\\"Australia\\",\\"$initial_geoip_continent_code\\":\\"OC\\",\\"$initial_geoip_continent_name\\":\\"Oceania\\",\\"$initial_geoip_accuracy_radius\\":20,\\"$initial_geoip_city_confidence\\":null,\\"$initial_geoip_subdivision_1_code\\":\\"NSW\\",\\"$initial_geoip_subdivision_1_name\\":\\"New South Wales\\",\\"$initial_geoip_subdivision_2_code\\":null,\\"$initial_geoip_subdivision_2_name\\":null,\\"current_organization_membership_level\\":15},\\"groups\\":{},\\"app_version\\":null,\\"platform\\":\\"Desktop\\",\\"device_brand\\":\\"\\",\\"carrier\\":\\"\\",\\"country\\":\\"Australia\\",\\"region\\":\\"\\",\\"city\\":\\"Sydney\\",\\"language\\":null,\\"utm_properties\\":{\\"utm_term\\":null,\\"utm_medium\\":null,\\"utm_source\\":null,\\"utm_content\\":null,\\"utm_campaign\\":null},\\"referrer\\":\\"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta\\",\\"internal_partner_action\\":\\"logEventV2\\",\\"debug_mode\\":true,\\"library\\":\\"segment\\"}]}"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -402,7 +402,7 @@ exports[`SegmentDestinationExecutorService segment plugins should handle non ret
[
{
"level": "debug",
- "message": "config, {"apiKey":"api-key","user_id":"user-id","secretKey":"secret-key","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","os_name":"Mac OS X","os_version":"10.15.7","device_brand":"","device_manufacturer":null,"device_model":null,"carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","userAgentParsing":true,"includeRawUserAgent":false,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","library":"web","userAgentData":{"model":"","platformVersion":""},"internal_partner_action":"logEventV2","debug_mode":true}",
+ "message": "config, {"apiKey":"***REDACTED***","user_id":"user-id","secretKey":"***REDACTED***","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","os_name":"Mac OS X","os_version":"10.15.7","device_brand":"","device_manufacturer":null,"device_model":null,"carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","userAgentParsing":true,"includeRawUserAgent":false,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","library":"web","userAgentData":{"model":"","platformVersion":""},"internal_partner_action":"logEventV2","debug_mode":true}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -412,7 +412,7 @@ exports[`SegmentDestinationExecutorService segment plugins should handle non ret
},
{
"level": "debug",
- "message": "options, {"method":"post","json":{"api_key":"api-key","events":[{"os_name":"Mac OS X","os_version":"10.15.7","device_manufacturer":null,"device_model":null,"apiKey":"api-key","user_id":"user-id","secretKey":"secret-key","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","device_brand":"","carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","internal_partner_action":"logEventV2","debug_mode":true,"library":"segment"}]}}",
+ "message": "options, {"method":"post","json":{"api_key":"***REDACTED***","events":[{"os_name":"Mac OS X","os_version":"10.15.7","device_manufacturer":null,"device_model":null,"apiKey":"***REDACTED***","user_id":"user-id","secretKey":"***REDACTED***","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","device_brand":"","carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","internal_partner_action":"logEventV2","debug_mode":true,"library":"segment"}]}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -800,7 +800,7 @@ exports[`SegmentDestinationExecutorService segment plugins should handle throwHt
[
{
"level": "debug",
- "message": "config, {"apiKey":"abc","name":"$web_vitals","secretKey":"def","metadata":{"$geoip_city_name":"Aylesbury","$geoip_country_name":"United Kingdom","$geoip_country_code":"GB","$geoip_continent_name":"Europe","$geoip_continent_code":"EU","$geoip_postal_code":"HP21","$geoip_latitude":51.8053,"$geoip_longitude":-0.8086,"$geoip_accuracy_radius":500,"$geoip_time_zone":"Europe/London","$geoip_subdivision_1_code":"ENG","$geoip_subdivision_1_name":"England","$geoip_subdivision_2_code":"BKM","$geoip_subdivision_2_name":"Buckinghamshire"},"debug_mode":true,"playerUniqueId":"8a47919a-858e-5de5-8772-86e2fdfa5806","mobile":null,"email":null,"internal_partner_action":"trackEvent"}",
+ "message": "config, {"apiKey":"***REDACTED***","name":"$web_vitals","secretKey":"***REDACTED***","metadata":{"$geoip_city_name":"Aylesbury","$geoip_country_name":"United Kingdom","$geoip_country_code":"GB","$geoip_continent_name":"Europe","$geoip_continent_code":"EU","$geoip_postal_code":"HP21","$geoip_latitude":51.8053,"$geoip_longitude":-0.8086,"$geoip_accuracy_radius":500,"$geoip_time_zone":"Europe/London","$geoip_subdivision_1_code":"ENG","$geoip_subdivision_1_name":"England","$geoip_subdivision_2_code":"BKM","$geoip_subdivision_2_name":"Buckinghamshire"},"debug_mode":true,"playerUniqueId":"8a47919a-858e-5de5-8772-86e2fdfa5806","mobile":null,"email":null,"internal_partner_action":"trackEvent"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -810,7 +810,7 @@ exports[`SegmentDestinationExecutorService segment plugins should handle throwHt
},
{
"level": "debug",
- "message": "options, {"json":{"events":{"$web_vitals":{"$geoip_city_name":"Aylesbury","$geoip_country_name":"United Kingdom","$geoip_country_code":"GB","$geoip_continent_name":"Europe","$geoip_continent_code":"EU","$geoip_postal_code":"HP21","$geoip_latitude":51.8053,"$geoip_longitude":-0.8086,"$geoip_accuracy_radius":500,"$geoip_time_zone":"Europe/London","$geoip_subdivision_1_code":"ENG","$geoip_subdivision_1_name":"England","$geoip_subdivision_2_code":"BKM","$geoip_subdivision_2_name":"Buckinghamshire"}},"playerUniqueId":"8a47919a-858e-5de5-8772-86e2fdfa5806"},"headers":{"APIKey":"abc","Content-Type":"application/json","x-gb-agent":"GB/Segment"},"throwHttpErrors":false,"method":"POST"}",
+ "message": "options, {"json":{"events":{"$web_vitals":{"$geoip_city_name":"Aylesbury","$geoip_country_name":"United Kingdom","$geoip_country_code":"GB","$geoip_continent_name":"Europe","$geoip_continent_code":"EU","$geoip_postal_code":"HP21","$geoip_latitude":51.8053,"$geoip_longitude":-0.8086,"$geoip_accuracy_radius":500,"$geoip_time_zone":"Europe/London","$geoip_subdivision_1_code":"ENG","$geoip_subdivision_1_name":"England","$geoip_subdivision_2_code":"BKM","$geoip_subdivision_2_name":"Buckinghamshire"}},"playerUniqueId":"8a47919a-858e-5de5-8772-86e2fdfa5806"},"headers":{"APIKey":"***REDACTED***","Content-Type":"application/json","x-gb-agent":"GB/Segment"},"throwHttpErrors":false,"method":"POST"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -820,12 +820,12 @@ exports[`SegmentDestinationExecutorService segment plugins should handle throwHt
},
{
"level": "debug",
- "message": "headers, {"APIKey":"abc","Content-Type":"application/json","x-gb-agent":"GB/Segment"}",
+ "message": "headers, {"APIKey":"***REDACTED***","Content-Type":"application/json","x-gb-agent":"GB/Segment"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
"level": "debug",
- "message": "fetchOptions, {"method":"POST","headers":{"APIKey":"abc","Content-Type":"application/json","x-gb-agent":"GB/Segment"},"body":"{\\"events\\":{\\"$web_vitals\\":{\\"$geoip_city_name\\":\\"Aylesbury\\",\\"$geoip_country_name\\":\\"United Kingdom\\",\\"$geoip_country_code\\":\\"GB\\",\\"$geoip_continent_name\\":\\"Europe\\",\\"$geoip_continent_code\\":\\"EU\\",\\"$geoip_postal_code\\":\\"HP21\\",\\"$geoip_latitude\\":51.8053,\\"$geoip_longitude\\":-0.8086,\\"$geoip_accuracy_radius\\":500,\\"$geoip_time_zone\\":\\"Europe/London\\",\\"$geoip_subdivision_1_code\\":\\"ENG\\",\\"$geoip_subdivision_1_name\\":\\"England\\",\\"$geoip_subdivision_2_code\\":\\"BKM\\",\\"$geoip_subdivision_2_name\\":\\"Buckinghamshire\\"}},\\"playerUniqueId\\":\\"8a47919a-858e-5de5-8772-86e2fdfa5806\\"}"}",
+ "message": "fetchOptions, {"method":"POST","headers":{"APIKey":"***REDACTED***","Content-Type":"application/json","x-gb-agent":"GB/Segment"},"body":"{\\"events\\":{\\"$web_vitals\\":{\\"$geoip_city_name\\":\\"Aylesbury\\",\\"$geoip_country_name\\":\\"United Kingdom\\",\\"$geoip_country_code\\":\\"GB\\",\\"$geoip_continent_name\\":\\"Europe\\",\\"$geoip_continent_code\\":\\"EU\\",\\"$geoip_postal_code\\":\\"HP21\\",\\"$geoip_latitude\\":51.8053,\\"$geoip_longitude\\":-0.8086,\\"$geoip_accuracy_radius\\":500,\\"$geoip_time_zone\\":\\"Europe/London\\",\\"$geoip_subdivision_1_code\\":\\"ENG\\",\\"$geoip_subdivision_1_name\\":\\"England\\",\\"$geoip_subdivision_2_code\\":\\"BKM\\",\\"$geoip_subdivision_2_name\\":\\"Buckinghamshire\\"}},\\"playerUniqueId\\":\\"8a47919a-858e-5de5-8772-86e2fdfa5806\\"}"}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -907,7 +907,7 @@ exports[`SegmentDestinationExecutorService segment plugins should retry retryabl
[
{
"level": "debug",
- "message": "config, {"apiKey":"api-key","user_id":"user-id","secretKey":"secret-key","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","os_name":"Mac OS X","os_version":"10.15.7","device_brand":"","device_manufacturer":null,"device_model":null,"carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","userAgentParsing":true,"includeRawUserAgent":false,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","library":"web","userAgentData":{"model":"","platformVersion":""},"internal_partner_action":"logEventV2","debug_mode":true}",
+ "message": "config, {"apiKey":"***REDACTED***","user_id":"user-id","secretKey":"***REDACTED***","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","os_name":"Mac OS X","os_version":"10.15.7","device_brand":"","device_manufacturer":null,"device_model":null,"carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","userAgentParsing":true,"includeRawUserAgent":false,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","library":"web","userAgentData":{"model":"","platformVersion":""},"internal_partner_action":"logEventV2","debug_mode":true}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -917,7 +917,7 @@ exports[`SegmentDestinationExecutorService segment plugins should retry retryabl
},
{
"level": "debug",
- "message": "options, {"method":"post","json":{"api_key":"api-key","events":[{"os_name":"Mac OS X","os_version":"10.15.7","device_manufacturer":null,"device_model":null,"apiKey":"api-key","user_id":"user-id","secretKey":"secret-key","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","device_brand":"","carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","internal_partner_action":"logEventV2","debug_mode":true,"library":"segment"}]}}",
+ "message": "options, {"method":"post","json":{"api_key":"***REDACTED***","events":[{"os_name":"Mac OS X","os_version":"10.15.7","device_manufacturer":null,"device_model":null,"apiKey":"***REDACTED***","user_id":"user-id","secretKey":"***REDACTED***","device_id":"device-id","endpoint":"north_america","user_properties":{"$os":"Mac OS X","_kx":null,"epik":null,"test":"abcdefge","$host":"localhost:8010","dclid":null,"email":"[email protected]","gclid":null,"qclid":null,"realm":"hosted-clickhouse","sccid":null,"fbclid":null,"gbraid":null,"gclsrc":null,"igshid":null,"irclid":null,"mc_cid":null,"ttclid":null,"twclid":null,"wbraid":null,"msclkid":null,"rdt_cid":"asdfsad","$browser":"Chrome","utm_term":null,"$pathname":"/project/1/activity/explore","$referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","joined_at":"2025-04-04T11:33:18.022897+00:00","li_fat_id":null,"strapi_id":null,"gad_source":null,"project_id":"<REPLACED-UUID-0>","utm_medium":null,"utm_source":null,"$initial_os":"Mac OS X","$os_version":"10.15.7","utm_content":null,"$current_url":"http://localhost:8000/project/1/activity/explore","$device_type":"Desktop","$initial__kx":null,"instance_tag":"none","instance_url":"http://localhost:8010","is_signed_up":true,"utm_campaign":null,"$initial_epik":null,"$initial_host":"localhost:8010","$screen_width":2560,"project_count":1,"$initial_dclid":null,"$initial_gclid":null,"$initial_qclid":null,"$initial_sccid":null,"$screen_height":1440,"$search_engine":"google","anonymize_data":false,"$geoip_latitude":-33.8715,"$initial_fbclid":null,"$initial_gbraid":null,"$initial_gclsrc":null,"$initial_igshid":null,"$initial_irclid":null,"$initial_mc_cid":null,"$initial_ttclid":null,"$initial_twclid":null,"$initial_wbraid":null,"$raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36","$viewport_width":1698,"has_social_auth":false,"organization_id":"<REPLACED-UUID-1>","$browser_version":135,"$geoip_city_name":"Sydney","$geoip_longitude":151.2006,"$geoip_time_zone":"Australia/Sydney","$initial_browser":"Chrome","$initial_msclkid":null,"$initial_rdt_cid":null,"$viewport_height":1328,"has_password_set":true,"social_providers":[],"$initial_pathname":"/organization/billing","$initial_referrer":"$direct","$initial_utm_term":null,"$referring_domain":"localhost:8000","is_email_verified":false,"$geoip_postal_code":"2000","$initial_li_fat_id":null,"organization_count":1,"$creator_event_uuid":"<REPLACED-UUID-2>","$geoip_country_code":"AU","$geoip_country_name":"Australia","$initial_gad_source":null,"$initial_os_version":"15.2","$initial_utm_medium":null,"$initial_utm_source":null,"$initial_current_url":"http://localhost:8010/organization/billing?cancel=true","$initial_device_type":"Desktop","$initial_utm_content":null,"$geoip_continent_code":"OC","$geoip_continent_name":"Oceania","$initial_screen_width":2560,"$initial_utm_campaign":null,"team_member_count_all":1,"$geoip_accuracy_radius":20,"$geoip_city_confidence":null,"$initial_screen_height":1440,"project_setup_complete":false,"$initial_geoip_latitude":-33.8715,"$initial_raw_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36","$initial_viewport_width":1619,"$initial_browser_version":134,"$initial_geoip_city_name":"Sydney","$initial_geoip_longitude":151.2006,"$initial_geoip_time_zone":"Australia/Sydney","$initial_viewport_height":1328,"$geoip_subdivision_1_code":"NSW","$geoip_subdivision_1_name":"New South Wales","$geoip_subdivision_2_code":null,"$geoip_subdivision_2_name":null,"$initial_referring_domain":"$direct","completed_onboarding_once":false,"$initial_geoip_postal_code":"2000","has_seen_product_intro_for":{"surveys":true},"$initial_geoip_country_code":"AU","$initial_geoip_country_name":"Australia","$initial_geoip_continent_code":"OC","$initial_geoip_continent_name":"Oceania","$initial_geoip_accuracy_radius":20,"$initial_geoip_city_confidence":null,"$initial_geoip_subdivision_1_code":"NSW","$initial_geoip_subdivision_1_name":"New South Wales","$initial_geoip_subdivision_2_code":null,"$initial_geoip_subdivision_2_name":null,"current_organization_membership_level":15},"groups":{},"app_version":null,"platform":"Desktop","device_brand":"","carrier":"","country":"Australia","region":"","city":"Sydney","language":null,"utm_properties":{"utm_term":null,"utm_medium":null,"utm_source":null,"utm_content":null,"utm_campaign":null},"referrer":"http://localhost:8000/project/1/pipeline/new/destination/hog-template-meta-ads?showPaused=true&kind&search=meta","internal_partner_action":"logEventV2","debug_mode":true,"library":"segment"}]}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -1300,7 +1300,7 @@ exports[`SegmentDestinationExecutorService segment plugins works with multiple f
[
{
"level": "debug",
- "message": "config, {"domain":"posthog-sandbox","match_field":"email","apiToken":"api-key","match_value":"[email protected]","personField":"id","name":"Max","organizationField":"id","email":"[email protected]","dealField":"id","phone":null,"custom_fields":{},"internal_partner_action":"createUpdatePerson","debug_mode":true}",
+ "message": "config, {"domain":"posthog-sandbox","match_field":"email","apiToken":"***REDACTED***","match_value":"[email protected]","personField":"id","name":"Max","organizationField":"id","email":"[email protected]","dealField":"id","phone":null,"custom_fields":{},"internal_partner_action":"createUpdatePerson","debug_mode":true}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -1315,7 +1315,7 @@ exports[`SegmentDestinationExecutorService segment plugins works with multiple f
},
{
"level": "debug",
- "message": "requestExtension, {"searchParams":{"api_token":"api-key"}}",
+ "message": "requestExtension, {"searchParams":{"api_token":"***REDACTED***"}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
@@ -1345,7 +1345,7 @@ exports[`SegmentDestinationExecutorService segment plugins works with multiple f
},
{
"level": "debug",
- "message": "requestExtension, {"searchParams":{"api_token":"api-key"}}",
+ "message": "requestExtension, {"searchParams":{"api_token":"***REDACTED***"}}",
"timestamp": "2025-01-01T00:00:00.000Z",
},
{
diff --git a/nodejs/src/cdp/services/hog-inputs.service.test.ts b/nodejs/src/cdp/services/hog-inputs.service.test.ts
index c197c6478c2c..740c0b206fbb 100644
--- a/nodejs/src/cdp/services/hog-inputs.service.test.ts
+++ b/nodejs/src/cdp/services/hog-inputs.service.test.ts
@@ -279,6 +279,21 @@ describe('Hog Inputs', () => {
expect(inputs.oauth).toMatchInlineSnapshot(`null`)
})
+ it('should not load a posthog connection', async () => {
+ const connectionId = team.id + 2
+ await insertIntegration(hub.postgres, team.id, {
+ id: connectionId,
+ kind: 'posthog',
+ sensitive_config: { access_token: hub.encryptedFields.encrypt('connection-token') },
+ })
+ hogFunction.inputs = { connection: { value: connectionId } }
+ hogFunction.inputs_schema = [{ key: 'connection', type: 'integration', required: true }]
+
+ const inputs = await hogInputsService.buildInputs(hogFunction, globals)
+
+ expect(inputs.connection).toBeNull()
+ })
+
it('should add unsubscribe url if email input is present', async () => {
hogFunction.inputs = {
email: {
diff --git a/nodejs/src/cdp/services/hog-inputs.service.ts b/nodejs/src/cdp/services/hog-inputs.service.ts
index a3eb711a2f49..a9bc21dad377 100644
--- a/nodejs/src/cdp/services/hog-inputs.service.ts
+++ b/nodejs/src/cdp/services/hog-inputs.service.ts
@@ -204,6 +204,12 @@ export class HogInputsService {
if (!integration || integration.team_id !== hogFunction.team_id) {
return null
}
+ // A `posthog` connection holds its creator's grant into another project, and only the creator
+ // may use it. A function runs for the whole team, so resolving one would hand that grant to
+ // every member who can edit or test functions.
+ if (integration.kind === 'posthog') {
+ return null
+ }
return {
$integration_id: integration.id,
...integration.config,
diff --git a/nodejs/src/cdp/services/native-destination-executor.service.test.ts b/nodejs/src/cdp/services/native-destination-executor.service.test.ts
index 6881aca0fb40..64a21c4a7480 100644
--- a/nodejs/src/cdp/services/native-destination-executor.service.test.ts
+++ b/nodejs/src/cdp/services/native-destination-executor.service.test.ts
@@ -7,6 +7,7 @@ import { forSnapshot } from '~/tests/helpers/snapshots'
import { createHogFunction } from '../_tests/fixtures'
import { createExampleNativeInvocation } from '../_tests/fixtures-native'
+import { NATIVE_HOG_FUNCTIONS_BY_ID } from '../templates'
import { NativeDestinationExecutorService } from './native-destination-executor.service'
const inputs = {
@@ -51,9 +52,16 @@ describe('NativeDestinationExecutorService', () => {
const fn = createHogFunction({
name: 'Plugin test',
template_id: 'native-webhook',
+ inputs_schema: [
+ { key: 'headers', type: 'dictionary' },
+ { key: 'connection', type: 'integration' },
+ ],
})
- const invocation = createExampleNativeInvocation(fn, inputs)
+ const invocation = createExampleNativeInvocation(fn, {
+ ...inputs,
+ connection: { $integration_id: 1, password: 'integration-password' },
+ })
mockFetch.mockResolvedValue({
status: 200,
@@ -81,6 +89,9 @@ describe('NativeDestinationExecutorService', () => {
}
})
+ const logText = JSON.stringify(result.logs)
+ expect(logText).not.toContain('integration-password')
+ expect(logText).not.toContain('Bearer abc')
expect(result.logs).toMatchSnapshot()
expect(mockFetch).toHaveBeenCalledTimes(1)
@@ -100,6 +111,26 @@ describe('NativeDestinationExecutorService', () => {
`)
})
+ it('should redact secrets in an error thrown by the destination', async () => {
+ const fn = createHogFunction({
+ name: 'Plugin test',
+ template_id: 'native-webhook',
+ inputs_schema: [{ key: 'connection', type: 'integration' }],
+ })
+ const invocation = createExampleNativeInvocation(fn, {
+ ...inputs,
+ connection: { $integration_id: 1, password: 'integration-password' },
+ })
+ jest.spyOn(NATIVE_HOG_FUNCTIONS_BY_ID['native-webhook'], 'perform').mockRejectedValueOnce(
+ new Error('Destination rejected integration-password')
+ )
+
+ const result = await service.execute(invocation)
+
+ expect(String(result.error)).toBe('Error: Destination rejected ***REDACTED***')
+ expect(JSON.stringify(result.logs)).not.toContain('integration-password')
+ })
+
it('should handle non retryable fetch errors', async () => {
const fn = createHogFunction({
name: 'Plugin test',
diff --git a/nodejs/src/cdp/services/native-destination-executor.service.ts b/nodejs/src/cdp/services/native-destination-executor.service.ts
index ec42918824af..3fe920fa1bc0 100644
--- a/nodejs/src/cdp/services/native-destination-executor.service.ts
+++ b/nodejs/src/cdp/services/native-destination-executor.service.ts
@@ -12,6 +12,7 @@ import {
createAddLogFunction,
getSensitiveValues,
isNativeHogFunction,
+ redactError,
redactSensitiveValues,
} from '../utils'
import { CdpFetchConfig, cdpTrackedFetch, getNextRetryTime, isFetchResponseRetriable } from '../utils/cdp-fetch'
@@ -58,7 +59,10 @@ export class NativeDestinationExecutorService {
invocation: CyclotronJobInvocationHogFunction
): Promise<CyclotronJobInvocationResult<CyclotronJobInvocationHogFunction>> {
const result = createInvocationResult<CyclotronJobInvocationHogFunction>(invocation)
- const addLog = createAddLogFunction(result.logs)
+ // Debug logs dump the resolved inputs and request options, which carry integration secrets and
+ // credential headers. The logs reach the test API response and stored function logs.
+ const sensitiveValues = getSensitiveValues(invocation.hogFunction, invocation.state.globals.inputs ?? {})
+ const addLog = createAddLogFunction(result.logs, sensitiveValues)
// Upsert the tries count on the metadata
const metadata = (invocation.queueMetadata as { tries: number }) || { tries: 0 }
@@ -84,7 +88,6 @@ export class NativeDestinationExecutorService {
// All native plugin options are done as inputs
const config = invocation.state.globals.inputs
- const sensitiveValues = getSensitiveValues(invocation.hogFunction, config)
if (config.debug_mode) {
addLog('debug', 'config', config)
@@ -247,6 +250,9 @@ export class NativeDestinationExecutorService {
}
}
} catch (e) {
+ // A destination's own error can quote a credential. The error reaches the server log, the
+ // test API response and the stored invocation result.
+ e = redactError(e, sensitiveValues)
if (e instanceof FetchError) {
if (retriesPossible) {
// We have retries left so we can trigger a retry
diff --git a/nodejs/src/cdp/services/segment-destination-executor.service.test.ts b/nodejs/src/cdp/services/segment-destination-executor.service.test.ts
index e6fca48ef7bb..439e068e5131 100644
--- a/nodejs/src/cdp/services/segment-destination-executor.service.test.ts
+++ b/nodejs/src/cdp/services/segment-destination-executor.service.test.ts
@@ -61,6 +61,7 @@ describe('SegmentDestinationExecutorService', () => {
const fn = createHogFunction({
name: 'Plugin test',
template_id: 'segment-actions-amplitude',
+ inputs_schema: amplitudePlugin.template.inputs_schema,
})
const invocation = createExampleSegmentInvocation(fn, amplitudeInputs)
@@ -91,6 +92,7 @@ describe('SegmentDestinationExecutorService', () => {
}
})
+ expect(JSON.stringify(result.logs)).not.toContain(amplitudeInputs.secretKey)
expect(result.logs).toMatchSnapshot()
expect(amplitudeAction.perform).toHaveBeenCalledTimes(1)
@@ -111,6 +113,49 @@ describe('SegmentDestinationExecutorService', () => {
`)
})
+ it('should redact a credential input that a stale stored schema leaves non-secret', async () => {
+ const fn = createHogFunction({
+ name: 'Plugin test',
+ template_id: 'segment-actions-amplitude',
+ inputs_schema: amplitudePlugin.template.inputs_schema.map((schema) => ({ ...schema, secret: false })),
+ })
+
+ const invocation = createExampleSegmentInvocation(fn, amplitudeInputs)
+
+ mockFetch.mockResolvedValue({
+ status: 200,
+ json: () => Promise.resolve({}),
+ text: () => Promise.resolve('{}'),
+ headers: {},
+ dump: () => Promise.resolve(),
+ })
+
+ const result = await service.execute(invocation)
+
+ expect(result.finished).toBe(true)
+ const logs = JSON.stringify(result.logs)
+ expect(logs).toContain('fetchOptions')
+ expect(logs).not.toContain(amplitudeInputs.apiKey)
+ expect(logs).not.toContain(amplitudeInputs.secretKey)
+ })
+
+ it('should redact secrets in an error thrown by the destination', async () => {
+ const fn = createHogFunction({
+ name: 'Plugin test',
+ template_id: 'segment-actions-amplitude',
+ inputs_schema: amplitudePlugin.template.inputs_schema,
+ })
+ const invocation = createExampleSegmentInvocation(fn, amplitudeInputs)
+ jest.mocked(amplitudeAction.perform!).mockRejectedValueOnce(
+ new Error(`Destination rejected ${amplitudeInputs.secretKey}`)
+ )
+
+ const result = await service.execute(invocation)
+
+ expect(String(result.error)).toBe('Error: Destination rejected ***REDACTED***')
+ expect(JSON.stringify(result.logs)).not.toContain(amplitudeInputs.secretKey)
+ })
+
it('should handle non retryable fetch errors', async () => {
jest.spyOn(amplitudeAction as any, 'perform')
diff --git a/nodejs/src/cdp/services/segment-destination-executor.service.ts b/nodejs/src/cdp/services/segment-destination-executor.service.ts
index b2ea437b063a..d20d9f648a76 100644
--- a/nodejs/src/cdp/services/segment-destination-executor.service.ts
+++ b/nodejs/src/cdp/services/segment-destination-executor.service.ts
@@ -13,6 +13,7 @@ import {
createAddLogFunction,
getSensitiveValues,
isSegmentPluginHogFunction,
+ redactError,
redactSensitiveValues,
} from '../utils'
import { CdpFetchConfig, cdpTrackedFetch, getNextRetryTime, isFetchResponseRetriable } from '../utils/cdp-fetch'
@@ -151,7 +152,10 @@ export class SegmentDestinationExecutorService {
invocation: CyclotronJobInvocationHogFunction
): Promise<CyclotronJobInvocationResult<CyclotronJobInvocationHogFunction>> {
const result = createInvocationResult<CyclotronJobInvocationHogFunction>(invocation)
- const addLog = createAddLogFunction(result.logs)
+ // Debug logs dump the resolved inputs and request options, which carry integration secrets and
+ // credential headers. The logs reach the test API response and stored function logs.
+ const sensitiveValues = getSensitiveValues(invocation.hogFunction, invocation.state.globals.inputs ?? {})
+ const addLog = createAddLogFunction(result.logs, sensitiveValues)
// Upsert the tries count on the metadata
const metadata = (invocation.queueMetadata as { tries: number }) || { tries: 0 }
@@ -177,7 +181,6 @@ export class SegmentDestinationExecutorService {
// All segment options are done as inputs
const config = invocation.state.globals.inputs
- const sensitiveValues = getSensitiveValues(invocation.hogFunction, config)
if (config.debug_mode) {
addLog('debug', 'config', config)
@@ -383,6 +386,9 @@ export class SegmentDestinationExecutorService {
}
}
} catch (e) {
+ // A destination's own error can quote a credential. The error reaches the test API response
+ // and the stored invocation result.
+ e = redactError(e, sensitiveValues)
if (e instanceof SegmentFetchError) {
if (retriesPossible) {
// We have retries left so we can trigger a retry
diff --git a/nodejs/src/cdp/types.ts b/nodejs/src/cdp/types.ts
index b1c7c3e95365..48cef682ec52 100644
--- a/nodejs/src/cdp/types.ts
+++ b/nodejs/src/cdp/types.ts
@@ -659,7 +659,7 @@ export type DBHogFunctionTemplate = {
export type IntegrationType = {
id: number
team_id: number
- kind: 'slack' | 'email' | 'oauth' | 'firebase' | 'apns'
+ kind: 'slack' | 'email' | 'oauth' | 'firebase' | 'apns' | 'posthog'
config: Record<string, any>
sensitive_config: Record<string, any>
}
diff --git a/nodejs/src/cdp/utils.test.ts b/nodejs/src/cdp/utils.test.ts
index cb3b07b08696..237d4b34d6ac 100644
--- a/nodejs/src/cdp/utils.test.ts
+++ b/nodejs/src/cdp/utils.test.ts
@@ -2,9 +2,10 @@ import { DateTime } from 'luxon'
import { Team } from '../types'
import { CdpInternalEvent } from './schema'
-import { LogEntry } from './types'
+import { LogEntry, MinimalLogEntry } from './types'
import {
convertInternalEventToHogFunctionInvocationGlobals,
+ createAddLogFunction,
fixLogDeduplication,
getSensitiveValues,
gzipObject,
@@ -145,6 +146,37 @@ describe('Utils', () => {
[]
)
})
+
+ it.each([
+ ['integration', { $integration_id: 1, key_info: { private_key: 'nested-private-key' } }],
+ ['integration_multi', [{ $integration_id: 1, key_info: { private_key: 'nested-private-key' } }]],
+ ])('masks a nested secret in an %s input', (type, value) => {
+ const hogFunction: any = { inputs_schema: [{ key: 'connection', type }] }
+ expect(getSensitiveValues(hogFunction, { connection: value })).toContain('nested-private-key')
+ })
+
+ it('masks a credential-named input that the stored schema leaves non-secret', () => {
+ const hogFunction: any = { inputs_schema: [{ key: 'apiKey', type: 'string', secret: false }] }
+ expect(getSensitiveValues(hogFunction, { apiKey: 'stale-schema-key' })).toEqual(['stale-schema-key'])
+ })
+ })
+
+ describe('createAddLogFunction', () => {
+ it.each([
+ [
+ 'a derived credential header',
+ { headers: { Authorization: 'Basic ZGVyaXZlZC1rZXk6' } },
+ 'ZGVyaXZlZC1rZXk6',
+ ],
+ ['a credential under an unlisted header name', { headers: { 'PRIVATE-TOKEN': 'glpat-abc123' } }, 'abc123'],
+ ['a response cookie', { headers: { 'set-cookie': 'session=abc123' } }, 'abc123'],
+ ['a multi-line secret in a stringified body', { body: JSON.stringify({ key: 'line1\nline2' }) }, 'line2'],
+ ])('redacts %s in a logged object', (_name, loggedObject, leakedText) => {
+ const logs: MinimalLogEntry[] = []
+ createAddLogFunction(logs, ['line1\nline2'])('debug', 'options', loggedObject)
+ expect(logs[0].message).toContain('***REDACTED***')
+ expect(logs[0].message).not.toContain(leakedText)
+ })
})
describe('sanitizeLogMessage', () => {
@@ -152,9 +184,23 @@ describe('Utils', () => {
const message = sanitizeLogMessage(['test', 'test2'])
expect(message).toBe('test, test2')
})
- it('should sanitize the log message with a sensitive value', () => {
- const message = sanitizeLogMessage(['test', 'test2'], ['test2'])
- expect(message).toBe('test, ***REDACTED***')
+ it.each([
+ ['a string argument', ['test', 'test2'], ['test2'], 'test, ***REDACTED***'],
+ [
+ 'a multi-line value in an object',
+ [{ key: 'line1\nline2' }],
+ ['line1\nline2'],
+ '{"key":"***REDACTED***"}',
+ ],
+ ['a quoted value in an object', [{ key: 'say "hi"' }], ['say "hi"'], '{"key":"***REDACTED***"}'],
+ [
+ 'repeated values that occur inside the marker',
+ [{ key: '*' }],
+ ['*', '*', '*', '*', '*', '*', '*', '*', 'R'],
+ '{"key":"***REDACTED***"}',
+ ],
+ ])('should redact a sensitive value in %s', (_name, args, sensitiveValues, expected) => {
+ expect(sanitizeLogMessage(args, sensitiveValues)).toBe(expected)
})
it('should sanitize a range of values types', () => {
const message = sanitizeLogMessage(['test', 'test2', 1, true, false, null, undefined, { test: 'test' }])
diff --git a/nodejs/src/cdp/utils.ts b/nodejs/src/cdp/utils.ts
index 9ee88a26d93e..5bc9c0585757 100644
--- a/nodejs/src/cdp/utils.ts
+++ b/nodejs/src/cdp/utils.ts
@@ -15,6 +15,7 @@ import { HogFunctionInvocationGlobals, HogFunctionType, LogEntry, LogEntrySerial
export const CDP_TEST_ID = '[CDP-TEST-HIDDEN]'
export const MAX_LOG_LENGTH = 10000
const TRUNCATION_SUFFIX = '... (truncated)'
+const REDACTED = '***REDACTED***'
// Sync with person.py and constants.tsx
export const PERSON_DEFAULT_DISPLAY_NAME_PROPERTIES = ['email', 'name', 'username']
@@ -308,6 +309,11 @@ export function filterExists<T>(value: T): value is NonNullable<T> {
return Boolean(value)
}
+// Keys whose value is a credential however the request built it, for example a Basic `Authorization`
+// header that a destination derives from an API key. No collected input value matches a derived value.
+const LOGGED_CREDENTIAL_KEY =
+ /authorization|cookie|token|secret|password|passcode|credential|api[-_]?key|private[-_]?key|signing[-_]?key/i
+
// Header names that carry a credential. Matched against the keys of a dictionary input, so a
// free-form headers map still gets its credential masked without the whole map being treated as
// secret (which would hide ordinary headers like Content-Type from the person configuring it).
@@ -325,15 +331,20 @@ const CREDENTIAL_HEADER_NAMES =
export const getSensitiveValues = (hogFunction: HogFunctionType, inputs: Record<string, any>): string[] => {
const values: string[] = []
- const collectStringValues = (obj: any): void => {
- if (obj && typeof obj === 'object') {
- // Assume the values are the sensitive parts
- Object.values(obj).forEach((val: any) => {
- if (typeof val === 'string') {
- values.push(val)
- }
- })
+ const collectStringValues = (obj: any, depth = 0): void => {
+ // The depth limit stops a self-referencing object from recursing forever.
+ if (!obj || typeof obj !== 'object' || depth > 10) {
+ return
}
+ // Assume the values are the sensitive parts. Some integrations nest them, for example a
+ // Google Cloud key file under `key_info`, so nested objects and arrays are collected too.
+ Object.values(obj).forEach((val: any) => {
+ if (typeof val === 'string') {
+ values.push(val)
+ } else {
+ collectStringValues(val, depth + 1)
+ }
+ })
}
// A webhook's `headers` is free-form, so it is not marked secret, but it is where a credential
@@ -360,8 +371,11 @@ export const getSensitiveValues = (hogFunction: HogFunctionType, inputs: Record<
if (schema.type === 'dictionary' && !schema.secret) {
collectCredentialHeaders(inputs[schema.key])
}
+ // A function keeps the schema it was saved with, so a credential input that a later template
+ // version marks secret is still `secret: false` on older functions.
if (
schema.secret ||
+ LOGGED_CREDENTIAL_KEY.test(schema.key) ||
schema.type === 'integration' ||
schema.type === 'integration_multi' ||
schema.type === 'push_subscription'
@@ -372,7 +386,7 @@ export const getSensitiveValues = (hogFunction: HogFunctionType, inputs: Record<
} else if (schema.type === 'integration_multi' && Array.isArray(value)) {
// integration_multi resolves to an array of integration objects, each carrying its own
// sensitive_config (e.g. APNs signing_key, FCM access_token_raw) — mask every one.
- value.forEach(collectStringValues)
+ value.forEach((item) => collectStringValues(item))
} else if (
(schema.type === 'dictionary' ||
schema.type === 'integration' ||
@@ -396,11 +410,62 @@ export const redactSensitiveValues = (message: string, sensitiveValues?: string[
return message
}
- let redacted = message
+ const variants = new Set<string>()
sensitiveValues.forEach((sensitiveValue) => {
- redacted = redacted.replaceAll(sensitiveValue, '***REDACTED***')
+ if (typeof sensitiveValue !== 'string' || !sensitiveValue) {
+ return
+ }
+ variants.add(sensitiveValue)
+ // Logged objects are JSON-encoded, which escapes quotes, backslashes and newlines, so a secret
+ // such as a PEM private key no longer matches its raw form inside the message.
+ variants.add(JSON.stringify(sensitiveValue).slice(1, -1))
+ })
+ if (!variants.size) {
+ return message
+ }
+
+ // Replace every value in one pass over the original text, longest first. Replacing the values one
+ // after another rescans the markers that earlier passes inserted, so a value that occurs inside
+ // the marker, such as `*`, multiplies the message length on every pass.
+ const pattern = new RegExp(
+ [...variants]
+ .sort((a, b) => b.length - a.length)
+ .map((variant) => variant.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
+ .join('|'),
+ 'g'
+ )
+ return message.replace(pattern, REDACTED)
+}
+
+// Redacts each string before the outer JSON encoding. A value that is already a JSON string, such as a
+// request body, is otherwise escaped a second time and no longer matches the escaped secret.
+const serializeRedactedLogArg = (arg: unknown, sensitiveValues: string[]): unknown => {
+ if (typeof arg === 'string') {
+ return arg
+ }
+ return JSON.stringify(arg, (key, value) => {
+ if (typeof value !== 'string') {
+ return value
+ }
+ return key && LOGGED_CREDENTIAL_KEY.test(key) ? REDACTED : redactSensitiveValues(value, sensitiveValues)
})
- return redacted
+}
+
+// Masks secrets in a caught error but keeps the error itself, so `instanceof` retry checks and
+// `String(error)` behave as before.
+export const redactError = (error: any, sensitiveValues: string[]): any => {
+ if (typeof error === 'string') {
+ return redactSensitiveValues(error, sensitiveValues)
+ }
+ if (error instanceof Error) {
+ const message = redactSensitiveValues(error.message, sensitiveValues)
+ try {
+ error.message = message
+ } catch {
+ return new Error(message)
+ }
+ }
+ return error
}
export const sanitizeLogMessage = (args: any[], sensitiveValues?: string[], maxLength = MAX_LOG_LENGTH): string => {
@@ -439,12 +504,13 @@ export const logEntry = (level: 'debug' | 'warn' | 'error' | 'info', ...args: an
}
}
-export const createAddLogFunction = (logs: MinimalLogEntry[]) => {
+export const createAddLogFunction = (logs: MinimalLogEntry[], sensitiveValues?: string[]) => {
return (level: 'debug' | 'warn' | 'error' | 'info', ...args: any[]) => {
+ const logArgs = sensitiveValues ? args.map((arg) => serializeRedactedLogArg(arg, sensitiveValues)) : args
logs.push({
level,
timestamp: DateTime.now(),
- message: sanitizeLogMessage(args),
+ message: sanitizeLogMessage(logArgs, sensitiveValues),
})
}
}
diff --git a/posthog/cdp/test/test_validation.py b/posthog/cdp/test/test_validation.py
index a23d8b4d4936..b26e4259b949 100644
--- a/posthog/cdp/test/test_validation.py
+++ b/posthog/cdp/test/test_validation.py
@@ -573,6 +573,28 @@ class TestHogFunctionValidation(ClickhouseTestMixin, APIBaseTest, QueryMatchingT
validate_inputs(inputs_schema, {"email": {"value": value}})
assert "At most 10 email senders are allowed." in str(ctx.value.detail)
+ @parameterized.expand(
+ [
+ ("single_slack", "integration", "slack"),
+ ("multi_slack", "integration_multi", "slack"),
+ ("single_posthog_connection", "integration", "posthog"),
+ ("multi_posthog_connection", "integration_multi", "posthog"),
+ ]
+ )
+ def test_integration_input_rejects_a_posthog_connection(self, _name, item_type, kind):
+ integration = Integration.objects.create(team=self.team, kind=kind, created_by=self.user)
+ value = integration.id if item_type == "integration" else [integration.id]
+ inputs_schema = [{"key": "connection", "type": item_type, "integration": "slack", "required": True}]
+ inputs = {"connection": {"value": value}}
+ context_extra = {"get_team": lambda: self.team}
+
+ if kind == "slack":
+ assert validate_inputs(inputs_schema, inputs, context_extra=context_extra)["connection"]["value"] == value
+ else:
+ with pytest.raises(ValidationError) as ctx:
+ validate_inputs(inputs_schema, inputs, context_extra=context_extra)
+ assert "PostHog connection" in str(ctx.value.detail)
+
def _create_email_integration(self, domain="posthog.com"):
return Integration.objects.create(
team=self.team,
diff --git a/posthog/cdp/validation.py b/posthog/cdp/validation.py
index 37c62b2657b4..a7f95501c15b 100644
--- a/posthog/cdp/validation.py
+++ b/posthog/cdp/validation.py
@@ -17,7 +17,7 @@ from posthog.hogql.parser import parse_program, parse_string_template
from posthog.hogql.visitor import TraversingVisitor
from posthog.cdp.filters import compile_filters_bytecode, compile_filters_expr
-from posthog.models.integration import Integration
+from posthog.models.integration import POSTHOG_CONNECT_KIND, Integration
from products.cdp.backend.models.hog_functions.hog_function import (
TYPES_WITH_JAVASCRIPT_SOURCE,
@@ -71,6 +71,18 @@ def _sender_integration_ids(from_value: dict) -> set[int]:
}
+def _validate_not_posthog_connection(integration_ids: list[int], context: dict) -> None:
+ # A PostHog connection acts as the user who created it, so only that user may use it. A function
+ # runs for the whole team and the runtime never resolves one, so reject it where the author sees why.
+ get_team = context.get("get_team")
+ if get_team is None or not integration_ids:
+ return
+ if Integration.objects.filter(team_id=get_team().id, id__in=integration_ids, kind=POSTHOG_CONNECT_KIND).exists():
+ raise serializers.ValidationError(
+ {"input": "A PostHog connection can't be used as a function input. Choose a different integration."}
+ )
+
+
def _validate_email_sender_override(from_value: dict, context: dict) -> None:
"""Reject a literal custom sender address the send path would refuse.
@@ -637,9 +649,11 @@ class InputsItemSerializer(serializers.Serializer):
elif item_type == "integration":
if not isinstance(value, int):
raise serializers.ValidationError({"input": f"Value must be an Integration ID."})
+ _validate_not_posthog_connection([value], self.context)
elif item_type == "integration_multi":
if not isinstance(value, list) or not all(isinstance(v, int) and not isinstance(v, bool) for v in value):
raise serializers.ValidationError({"input": "Value must be a list of Integration IDs."})
+ _validate_not_posthog_connection(value, self.context)
elif item_type == "task_repository":
if not isinstance(value, str):
raise serializers.ValidationError({"input": "Value must be a repository name like your-org/your-repo."})
diff --git a/products/cdp/backend/api/test/test_hog_function.py b/products/cdp/backend/api/test/test_hog_function.py
index 50f0004841d2..5265289cd6f6 100644
--- a/products/cdp/backend/api/test/test_hog_function.py
+++ b/products/cdp/backend/api/test/test_hog_function.py
@@ -13,6 +13,7 @@ from rest_framework import status
from posthog.cdp.templates.fixtures import template_slack
from posthog.cdp.templates.helpers import mock_transpile
from posthog.cdp.templates.hog_function_template import sync_template_to_db
+from posthog.models.integration import Integration
from products.actions.backend.models.action import Action
from products.cdp.backend.api.hog_function import (
@@ -31,7 +32,7 @@ webhook_template = MOCK_NODE_TEMPLATES[0]
geoip_template = MOCK_NODE_TEMPLATES[2]
-EXAMPLE_FULL = {
+EXAMPLE_FULL: dict[str, Any] = {
"name": "HogHook",
"hog": "fetch(inputs.url, {\n 'headers': inputs.headers,\n 'body': inputs.payload,\n 'method': inputs.method\n});",
"type": "destination",
@@ -2246,6 +2247,30 @@ class TestHogFunctionAPI(ClickhouseTestMixin, APIBaseTest, QueryMatchingTest):
"value": "http://localhost:2080/0e02d917-563f-4050-9725-aad881b69937",
}
+ def test_test_invocation_rejects_a_posthog_connection_input(self):
+ connection = Integration.objects.create(team=self.team, kind="posthog", created_by=self.user)
+
+ with patch(
+ "products.cdp.backend.api.hog_function.create_hog_invocation_test"
+ ) as mock_create_hog_invocation_test:
+ response = self.client.post(
+ f"/api/projects/{self.team.id}/hog_functions/new/invocations/",
+ data={
+ "configuration": {
+ **EXAMPLE_FULL,
+ "inputs_schema": [
+ *EXAMPLE_FULL["inputs_schema"],
+ {"key": "connection", "type": "integration", "integration": "slack"},
+ ],
+ "inputs": {**EXAMPLE_FULL["inputs"], "connection": {"value": connection.id}},
+ },
+ },
+ )
+
+ assert response.status_code == status.HTTP_400_BAD_REQUEST, response.json()
+ assert "PostHog connection" in json.dumps(response.json())
+ mock_create_hog_invocation_test.assert_not_called()
+
@parameterized.expand(
[
("errors_list", {"errors": ["Missing event"]}, ["Missing event"]),