What you will learn

  • How to deploy your Next.js application with OpenTelemetry to Vercel with infrastack.ai

Prerequisites

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 Project button.
  • Select the GitHub option.
  • Follow the instructions to connect your GitHub account to Vercel.
  • Select the repository you created in the previous step.
  • Click on the Deploy button.
    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 Settings tab.
  • Click on the Environment Variables tab.
  • 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 Deployments tab.
  • 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.