-
Notifications
You must be signed in to change notification settings - Fork 149
This PR wires Mastra tracing to persistent PostgreSQL storage for local development #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,6 +36,7 @@ services: | |||||||||||||||||||||
| CLERK_PUBLISHABLE_KEY: ${NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY:-} | ||||||||||||||||||||||
| OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-} | ||||||||||||||||||||||
| TINYFISH_API_KEY: ${TINYFISH_API_KEY:-} | ||||||||||||||||||||||
| MASTRA_DATABASE_URL: postgresql://bigset:bigset@db:5432/bigset_internal | ||||||||||||||||||||||
| # Transactional email — when unset, the email module no-ops. | ||||||||||||||||||||||
| RESEND_API_KEY: ${RESEND_API_KEY:-} | ||||||||||||||||||||||
| EMAIL_FROM: ${EMAIL_FROM:-BigSet <simantak@tinyfish.ai>} | ||||||||||||||||||||||
|
|
@@ -65,6 +66,7 @@ services: | |||||||||||||||||||||
| CONVEX_URL: http://convex:3210 | ||||||||||||||||||||||
| CONVEX_SELF_HOSTED_ADMIN_KEY: ${CONVEX_SELF_HOSTED_ADMIN_KEY:-} | ||||||||||||||||||||||
| TINYFISH_API_KEY: ${TINYFISH_API_KEY:-} | ||||||||||||||||||||||
| MASTRA_DATABASE_URL: postgresql://bigset:bigset@db:5432/bigset_internal | ||||||||||||||||||||||
| depends_on: | ||||||||||||||||||||||
| convex: | ||||||||||||||||||||||
| condition: service_healthy | ||||||||||||||||||||||
|
Comment on lines
+69
to
72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Proposed fix depends_on:
+ db:
+ condition: service_healthy
convex:
condition: service_healthy📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing validation for
MASTRA_DATABASE_URLenvironment variable.The non-null assertion (
!) onprocess.env.MASTRA_DATABASE_URLwill passundefinedtoPostgresStoreif the variable is missing, likely causing a cryptic connection error at runtime rather than a clear startup failure.Consider validating this in
env.tsalongside other required variables, or add a guard here:Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents