What you will learn
- How to deploy your Next.js application with OpenTelemetry to Vercel with infrastack.ai
Prerequisites
- A Vercel account
- An infrastack.ai account
- A Next.js application configured with the infrastack.ai SDK, see Integrate OpenTelemetry for Next.js with infrastack.ai
The application should be on the
nodejs runtime. The edge runtime is not supported at this time.Overview
Vercel is a platform for deploying serverless applications. It supports a wide range of frameworks, including Next.js. With the power of infrastack.ai and OpenTelemetry, you can get comprehensive observability for your Next.js application on Vercel. After you have configured your application with the infrastack.ai SDK by following the Integrate OpenTelemetry for Next.js with infrastack.ai guide, you can deploy your application to Vercel by following these steps:1
Push your application code to a GitHub repository
- On your GitHub account, create a new repository or use an existing one. It can be private or public.
- Push your application code to the repository.
- If you need help setting up your repo, take a look at this guide on GitHub.
2
Create a new project on Vercel
- Go to the Vercel dashboard.
- Click on the
New Projectbutton. - Select the
GitHuboption. - Follow the instructions to connect your GitHub account to Vercel.
- Select the repository you created in the previous step.
- Click on the
Deploybutton.It will take a few minutes to deploy your application.
3
Configure your environment variables
- Go to the Vercel dashboard.
- Select the project you created in the previous step.
- Click on the
Settingstab. - Click on the
Environment Variablestab. - Add the following environment variable:
INFRASTACK_API_KEY: Your infrastack.ai API key.
4
Redeploy your application
- Go to the Vercel dashboard.
- Select the project you created in the previous step.
- Click on the
Deploymentstab. - Find the deployment that was created automatically.
- Click on the three dots on the right side of the deployment and select
Redeploy.
5
Visit your application
You can visit your application by clicking on the
Visit button.Now, you can check your data in the infrastack.ai dashboard.