[1748] Add dummy EventBrokerProcessor to event processing pipeline#18318
[1748] Add dummy EventBrokerProcessor to event processing pipeline#18318jvcalderon wants to merge 4 commits intomasterfrom
Conversation
Introduces EventBrokerProcessor, a new implementation of the EventProcessor interface that runs in parallel with the existing PostHog/analytics pipeline. For now it only emits a console.log when triggered; the real HTTP request to the Event Broker will be wired in a follow-up PR.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35a4a5dfca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| console.log(`[EventBrokerProcessor] event received: ${event}`, { | ||
| identityType: identity.type, | ||
| properties, |
There was a problem hiding this comment.
Avoid unconditional event logging in broker placeholder
This processor logs every event payload unconditionally, which reintroduces event logging in self-hosted non-dev environments where LoggingProcessor explicitly suppresses logs (skipLogging = env.SELF_HOSTED && !env.isDev() in packages/backend-core/src/events/processors/LoggingProcessor.ts). In those deployments, adding this processor causes all tracked events (including full properties) to be emitted to logs again, creating noisy output and potential exposure of sensitive metadata until the real broker integration is implemented.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 3/5
- There is a concrete medium-risk issue in
packages/backend-core/src/events/processors/EventBrokerProcessor.ts: a placeholder log currently emits each event’s full properties payload to stdout in production. - Given the 6/10 severity with high confidence (9/10), this creates real user-impact risk (sensitive data exposure/noisy production logging) unless the log is guarded before live pipeline registration.
- Pay close attention to
packages/backend-core/src/events/processors/EventBrokerProcessor.ts- ensure payload logging is disabled or properly gated in production event flow.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/backend-core/src/events/processors/EventBrokerProcessor.ts">
<violation number="1" location="packages/backend-core/src/events/processors/EventBrokerProcessor.ts:13">
P2: Guard this placeholder log before registering it in the live event pipeline; as written it emits every event's full properties payload to stdout in production.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| // TODO: Replace this log with a real HTTP request to the Event Broker once it is available. | ||
| // The Event Broker endpoint will receive the event payload and forward it to the internal | ||
| // ingestion pipeline (e.g. SQS → Logstash → S3 → Snowpipe). | ||
| console.log(`[EventBrokerProcessor] event received: ${event}`, { |
There was a problem hiding this comment.
P2: Guard this placeholder log before registering it in the live event pipeline; as written it emits every event's full properties payload to stdout in production.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/backend-core/src/events/processors/EventBrokerProcessor.ts, line 13:
<comment>Guard this placeholder log before registering it in the live event pipeline; as written it emits every event's full properties payload to stdout in production.</comment>
<file context>
@@ -0,0 +1,18 @@
+ // TODO: Replace this log with a real HTTP request to the Event Broker once it is available.
+ // The Event Broker endpoint will receive the event payload and forward it to the internal
+ // ingestion pipeline (e.g. SQS → Logstash → S3 → Snowpipe).
+ console.log(`[EventBrokerProcessor] event received: ${event}`, {
+ identityType: identity.type,
+ properties,
</file context>
adrinr
left a comment
There was a problem hiding this comment.
Until this is implemented, we will be logging [EventBrokerProcessor] event received to datadog. Are we happy with it?
Well, I probably won’t merge this as-is. I’ve marked it with the do not merge tag. This was created to split the work into smaller PRs, but there’s no point in adding this noise to the logs. I’ll merge it once a follow-up PR with the Event Broker implementation is merged. |
|
Addressed in #18408 |
Description
Introduces
EventBrokerProcessor, a new implementation of theEventProcessorinterface, as the first step of the migration away from PostHog.The processor is registered in
Processorsand runs in parallel with the existing analytics pipeline. For now it only emits aconsole.log()when triggered; no external side effects are introduced. The real HTTP request to the Event Broker will be implemented in a follow-up PR once the broker is available.Addresses
Screenshots
N/A — no UI changes.
Launchcontrol
Adds a new internal event processor (
EventBrokerProcessor) that runs alongside the existing PostHog pipeline and logs received events. This is a non-functional placeholder to validate the integration point before the real Event Broker delivery is wired in.Summary by cubic
Adds a new
EventBrokerProcessorto the backend event pipeline as the first step toward migrating off PostHog (Linear 1748). It runs alongside existing processors and only logs events; no external side effects.EventBrokerProcessorwithAnalyticsProcessor,LoggingProcessor, andAuditLogsProcessor.console.logof event,identity.type, and properties; HTTP delivery to the Event Broker will follow later.Written for commit c0a08af. Summary will update on new commits.