fix(analytics): use getBaseDomain for Profound host field#3848
fix(analytics): use getBaseDomain for Profound host field#3848waleedlatif1 merged 1 commit intostagingfrom
Conversation
request.url resolves to internal ALB hostname on ECS, not the public domain
PR SummaryLow Risk Overview This prevents logs from being attributed to internal ECS/ALB hostnames, improving acceptance/matching on the Profound side. Written by Cursor Bugbot for commit 1030e13. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis is a targeted bug fix for Profound analytics on ECS deployments. On AWS ECS behind an ALB,
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant ALB as AWS ALB
participant Proxy as proxy.ts (ECS)
participant Profound as Profound API
Client->>ALB: HTTP Request (host: www.sim.ai)
ALB->>Proxy: Forward (request.url host: ip-10-0-226-185.ec2.internal)
Note over Proxy: sendToProfound(request, statusCode)
Note over Proxy: Before: url.hostname → "ip-10-0-226-185.ec2.internal" ❌
Note over Proxy: After: getBaseDomain() → "www.sim.ai" ✅
Proxy->>Profound: POST /logs [{host: "www.sim.ai", ...}]
Note over Profound: Matches configured domain → entry accepted ✅
Reviews (1): Last reviewed commit: "fix(analytics): use getBaseDomain for Pr..." | Re-trigger Greptile |
Summary
request.urlon ECS resolves to the internal ALB hostname (ip-10-0-226-185.ec2.internal), notwww.sim.aigetBaseDomain()to always send the correct public domainType of Change
Testing
Tested manually
Checklist