Comments (7)
@arturenault I opened a PR for that in the Next.js repo: vercel/next.js#35622 (it's merged)
from examples.
Hi @arturenault I hope you're doing well!
We have not decided yet about the best place to send analytics and middleware has some constraints around it, I'll come back to you in the future but for the moment I'll close the issue as analytics and logging won't be added using edge functions in our examples.
from examples.
Thanks, I'll look forward to that! We should probably change the docs then, at least, as it specifically mentions this as a use case for middleware.
from examples.
Aw dang, was looking for a place to do this. Looking forward to see when a solution is given for analytics like datadog.
from examples.
Does anyone else have any example of middleware where they do code before the api-route runs and then after the api-route finishes running?
from examples.
Also curious what is the recommended solution to insert a record in a database for analytics without blocking the HTTP response. I tried log drains but it's really a mess to retrieve a simple Json object.
from examples.
@mquandalle it seems we can run dd-trace as discovered here - vercel/next.js#16600 - it links to - https://jake.tl/notes/2021-04-04-nextjs-preload-hack
from examples.
Related Issues (20)
- postgres-pgvector demo site not working HOT 1
- Web3 Authentication example is insecure HOT 1
- Next.js + Flask fails in production HOT 2
- Microfrontends example: Module not found: Can't resolve './example.module.css'
- feat(storybook): introduce to `/solution/monorepo`
- Bug: Wrong header in `https://app-dir-i18n.vercel.app/` HOT 1
- nextjs-flask: The flask api endpoint is not working. HOT 2
- Your location is undefined HOT 5
- PostgreSQL on docker and Next.js locally Error: connect ECONNREFUSED ::1:443 HOT 1
- Node.js Serverless Function template doesn't work (gives a 404) HOT 2
- Update deployment GitHub workflows
- bug
- Domain API Example broken
- Flask3 example doesn't work with additional dependencies
- Sonic example doesn't work
- https://flask2-python-template.vercel.app/ HOT 2
- postgres-drizzle got slow
- How to run Flask WSGI in Multithreaded Mode
- Micro-frontend example -module not found
- bot-protection-botd example no longer working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples.