Conversation
Wire evlog/elysia into API, basket, links, and uptime with initLogger. Replace the old @databuddy/shared pino logger with evlog (including an RPC-compatible shim). Basket uses wide-event context via useLogger, moves producer/geo/schema enrichment off OTel span attributes, and drops setAttributes from basket tracing. Update lockfile and dependencies.
…xiom Remove OTLP trace SDK; wire createAxiomDrain in initLogger and simplify tracing helpers to evlog-only captureError/record.
Remove OTLP Node SDK, HTTP/pg/ORPC instrumentations, and request span plumbing. Wire createAxiomDrain on initLogger; map setAttributes/captureError to evlog; simplify agent query execution without active spans.
- Add structured-errors with basketErrors factories, ingest helpers, and buildBasketErrorPayload for consistent success/error/message responses. - Throw EvlogErrors from track, llm, request-validation (non-billing), and basket ingest routes; keep billing Response and pixel/bot ignore behavior. - Centralize onError JSON via buildBasketErrorPayload; fix invalid Biome nursery key useMaxParams so biome check runs.
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Greptile SummaryThis PR is a large-scale observability infrastructure swap: OpenTelemetry (SDK, exporters, span processors) is removed from Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Elysia as Elysia Middleware
participant evlog as evlog Plugin<br/>(Wide Event)
participant Handler as Route Handler
participant ValidateReq as validateRequest()
participant ErrorHandler as Global onError
Client->>Elysia: HTTP Request
Elysia->>evlog: Initialise wide event per request
evlog->>Handler: request context available
Handler->>Handler: useLogger().set({ route })
Handler->>ValidateReq: validateRequest(body, query, request)
alt Validation error (payload, clientId, origin, IP)
ValidateReq-->>Handler: throw EvlogError (status 4xx)
Handler-->>ErrorHandler: EvlogError re-thrown
ErrorHandler->>ErrorHandler: buildBasketErrorPayload()
ErrorHandler-->>Client: { status, error, why, fix }
else Billing exceeded
ValidateReq-->>Handler: return { error: Response }
Handler-->>Client: billing.response (429)
else Success
ValidateReq-->>Handler: return ValidatedRequest
Handler->>Handler: useLogger().set({ clientId, eventType, … })
Handler-->>Client: 200 OK
end
evlog->>evlog: Flush wide event to Axiom drain
|
| log[level]({ ...base, message: fieldsOrMessage }); | ||
| } else if (message !== undefined) { | ||
| log[level]({ ...base, ...fieldsOrMessage, message }); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Pino-compatible (obj, msg) or (msg) logging via evlog global `log`. | ||
| */ | ||
| export const logger = { | ||
| error: (fieldsOrMessage: Fields | string, message?: string) => | ||
| emit("error", fieldsOrMessage, message), | ||
| info: (fieldsOrMessage: Fields | string, message?: string) => | ||
| emit("info", fieldsOrMessage, message), | ||
| warn: (fieldsOrMessage: Fields | string, message?: string) => |
There was a problem hiding this comment.
Silent log drop when called with only an object
The emit helper has no else branch. When it is called as logger.info({ someField }) — an object with no message string — neither condition matches and the call is silently discarded. Pino (which this shim is replacing) would emit the entry with an empty msg field.
All current call-sites happen to pass a message, but the contract mismatch is a latent trap for any future caller.
| log[level]({ ...base, message: fieldsOrMessage }); | |
| } else if (message !== undefined) { | |
| log[level]({ ...base, ...fieldsOrMessage, message }); | |
| } | |
| } | |
| /** | |
| * Pino-compatible (obj, msg) or (msg) logging via evlog global `log`. | |
| */ | |
| export const logger = { | |
| error: (fieldsOrMessage: Fields | string, message?: string) => | |
| emit("error", fieldsOrMessage, message), | |
| info: (fieldsOrMessage: Fields | string, message?: string) => | |
| emit("info", fieldsOrMessage, message), | |
| warn: (fieldsOrMessage: Fields | string, message?: string) => | |
| function emit( | |
| level: "error" | "info" | "warn", | |
| fieldsOrMessage: Fields | string, | |
| message?: string | |
| ): void { | |
| if (typeof fieldsOrMessage === "string") { | |
| log[level]({ ...base, message: fieldsOrMessage }); | |
| } else if (message !== undefined) { | |
| log[level]({ ...base, ...fieldsOrMessage, message }); | |
| } else { | |
| // Object-only call (no message string) – emit as-is | |
| log[level]({ ...base, ...fieldsOrMessage }); | |
| } | |
| } |
| }); | ||
|
|
||
| initLogger({ | ||
| env: { service: "links" }, |
There was a problem hiding this comment.
Missing Axiom drain — logs stay local
api and basket both configure drain: createAxiomDrain() in their initLogger calls. links (and uptime — same pattern at apps/uptime/src/index.ts:9-11) omit it, so structured logs from these services will never reach Axiom.
| }); | |
| initLogger({ | |
| env: { service: "links" }, | |
| initLogger({ | |
| env: { service: "links" }, | |
| drain: createAxiomDrain(), | |
| }); |
Wire api and basket through createDrainPipeline, initLogger tail sampling, middleware enrich (UA, request size, trace context), and optional NDJSON to apps/*/.evlog/logs in development. Basket: structured errors in auth, geo, producer, and request validation wide events. Ignore **/.evlog/ at repo root. Biome: disable useHookAtTopLevel for evlog useLogger in api and basket.
Replace z.record output schemas with explicit Zod models for getAnalytics and getAnalyticsByReferrer so handlers match processFunnelAnalytics return types.
- Replace OpenTelemetry span helpers in @databuddy/rpc with evlog wide-event helpers (rpc-log-context.ts); remove @opentelemetry/api and @orpc/otel. - API: mergeWideEvent/captureError patterns, drop no-op record() wrapper, basket-style uncaught handlers, logging on MCP/health/insights/public routes. - Touch RPC routers and lockfile for consistency with the RPC logging changes.
…vent enricher Replace fragmented API key enricher with applyAuthWideEvent that resolves both session and API key in parallel. Strip duplicated auth fields from RPC enricher, remove redundant route fields from health/mcp/insights.
…ext output - Pre-fetch summary, top pages, errors, referrers for WoW comparison - Replace ToolLoopAgent with generateText + Output.object (non-deprecated) - Tighten prompts and expand insight type taxonomy
Right-clicking the nav logo opens a context menu with visual previews of all brand assets (logo, wordmark, primary, stacked) in light/dark variants. Supports copy as SVG, copy as PNG, and download. Unified docs and main site to share the same Navbar component. Also adds supermemory integration and agent memory tools for the API.
… contrast - Add /branding page with brand assets, color swatches, and download cards - Replace Geist/Manrope fonts with LT Superior and LT Superior Mono - Add brand color tokens (amber, coral, purple) - Fix dark mode --accent matching --popover (#2A2A31 → #323239) so hover highlights are visible globally across all menu/select/dropdown components - Update context menu with data-highlighted support and cursor-pointer - Simplify brand context menu with copy SVG/PNG actions
…t colors - Replace Geist/Geist Mono with LT Superior and LT Superior Mono local fonts - Convert all oklch color variables to hex, matching docs brand palette - Add brand color tokens (amber, coral, purple) - Swap chart rendering from --color-primary (now near-black/white) to --color-chart-1 (purple) across all chart components: stat cards, mini charts, website cards, metrics, pie, retention, revenue, events, errors, LLM, consumption, link stats, and chart preview
Replace bg-primary with brand-purple for interactive controls (switch, checkbox, slider, progress, radio, segmented control, calendar, tabs) and chart-1 for data visualization elements (tooltip dots, cohort grid, funnel bars). Aligns all UI primitives with the new brand palette.
…fests Add favicon.ico, icon0.svg, icon1.png, apple-icon.png, and app/manifest.json to both apps; serve PWA icons from public/. Set appleWebApp title metadata. Remove legacy favicon.svg and redundant docs assets.
…olbar/header scroll - Separate --border / --sidebar-border tokens from accent fills so dividers no longer read as active/selected surfaces (light: #d1d3dc, dark: #3b3b45). - Move border-b onto h-10 elements in category sidebar and mobile category selector so every row is exactly 40px (border-box). - Remove sticky positioning from the analytics toolbar wrapper — the flex column with overflow-hidden already pins it. Replace overscroll-contain with overscroll-none on content scroll areas to prevent elastic bounce from moving fixed chrome. - When the toolbar is hidden (agent, flags, settings, users, pulse), use overflow-hidden on the website layout content wrapper so child page headers never participate in parent scroll. - Add overflow-y-auto to goals, funnels, and settings pages that previously relied on the parent scroll container.
…oss app - Fix outline button variant losing border on hover - Swap ghost→outline for cancel buttons in all sheet/dialog footers - Fix checkbox contrast (text-primary-foreground instead of hardcoded white) - Simplify API key create/detail dialogs: flatten metadata, consolidate danger zone - Remove Getting Started filler from create org dialog - Remove redundant step count badge from funnel dialog header - Remove Coming Soon scheduling placeholder from flag sheet - Simplify monitor sheet JSON parsing description
…ighter layout - Replace generic link icon with FaviconImage from target URL domain - Add inline copy-to-clipboard button on short URL (visible on hover) - Compact row spacing (remove fixed h-20, use py-3 padding) - Simplify expiry badges with colored backgrounds and tooltips - Redesign search bar: ghost input, smaller controls, cleaner integration - Fix header height to 88px, make refresh button icon-only - Improved empty search state with icon and quoted query - Extract shared utils, form schema, collapsible section, and chart components - Split link-sheet from ~988 to ~388 lines, link-stats-content from ~659 to ~288 lines
…E fixes - Use Navigation API + fallback instead of monkey-patching history (Next.js 16 safe) - Apply filter/sampling in _trackInternal; custom track() bypasses them - Merge global properties in track(); remove client eventId on /track payloads - Add test-utils for batched Playwright assertions; use databuddy-debug in tests - docs: update script size copy to under 30 KB - chore(dashboard): api key row display and dialog formatting
…D, open AI crawlers - Root layout: title template (%s | Databuddy), tighter default description, twitter/OG defaults inherited by children - Homepage: dedicated metadata from home-seo.ts, FAQPage JSON-LD wired to shared FAQ data - Blog posts: BlogPosting JSON-LD with dates/images, canonical URL, simplified metadata - Docs pages: TechArticle JSON-LD on every doc, shared getDocsPageSeo helper with section labels - API playground: dedicated api-playground-seo.ts with focused copy - Compare/pricing/blog listing: cleaner metadata, no duplicate local vars - Robots: GPTBot and ChatGPT-User now allowed on all marketing pages, shared disallow list, removed stale public/robots.txt
* feat(api): add tcc instrumentation * feat(api): init tcc tracining and add deps * fix(api): remove sessionId from analyzeWebsite * style(api): properly cast types of app context * fix(api): trycatch NodeSDK init * Apply suggestion from @greptile-apps[bot] Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: iza <59828082+izadoesdev@users.noreply.github.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
fix(dashboard): validate trusted image hostnames in getProxiedImageUrl (CodeQL). Replace substring checks with URL hostname matching for cdn.databuddy.cc and api.dicebear.com.
Description
Please include a summary of the change and which issue is fixed. Also include relevant motivation and context.
Checklist