Skip to content
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

utilize log drain on vercel functions #185

Merged
merged 2 commits into from
Apr 3, 2024
Merged

Conversation

schehata
Copy link
Collaborator

@schehata schehata commented Mar 27, 2024

Now that our vercel integration parses JSON we can utilize the log drain to send structured data. This will allow our users to send logs without having to do console.log(stringify({message: '...'}).

next-axiom will keep populating the events and attaching context/request meta as always.

some improvements we could do:

  • log to console right away without the need to flush
  • figure out a way to avoid causing field limits error.

note: this could be improved later on using the transports logic mentioned in the linked issue.

Copy link

vercel bot commented Mar 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-axiom-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2024 0:25am

Copy link
Member

@bahlo bahlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

src/logger.ts Outdated Show resolved Hide resolved
@schehata schehata force-pushed the console-transport-on-vercel branch from 0d7564b to 289b2b8 Compare March 27, 2024 12:25
@schehata schehata merged commit 7490994 into main Apr 3, 2024
9 checks passed
@schehata schehata deleted the console-transport-on-vercel branch April 3, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants