Loading

Vercel OpenTelemetry Assets

Version 0.1.0 (View all)
Subscription level
What's this?
Basic
Developed by
What's this?
Elastic
Minimum Kibana version(s) 9.4.0
The Vercel OpenTelemetry Assets integration v0.1.0 is in technical preview

To use pre-release integrations, go to the Integrations page in Kibana, scroll down, and toggle on the Display beta integrations option.

Vercel is a cloud platform for deploying and hosting frontend applications on a globally distributed edge network.

The Vercel OpenTelemetry assets provide dashboards for Vercel logs, audit logs, Web Analytics, and Speed Insights forwarded through Vercel Drains into an Elastic Cloud managed endpoint, covering server-side health, user experience, traffic and engagement, and team governance.

The Vercel OpenTelemetry assets have been tested with Vercel Drains delivering to the Vercel path (/vercel) of the Elastic Cloud managed endpoint.

You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware.

Note

The managed endpoint used by these assets is available on Elastic Cloud Serverless and Elastic Cloud Hosted. It is not available for self-managed, ECE, or ECK clusters. Refer to Managed inputs.

Vercel data reaches Elasticsearch through a Vercel drain that posts to an Elastic Cloud managed endpoint. Elastic operates the endpoint, so you do not need to install or run an OpenTelemetry Collector.

Setup has three parts, done in order:

  1. Enable the Vercel features you want to collect.
  2. Gather two values from Elastic: a managed endpoint URL and an API key.
  3. Create the drains in Vercel using those two values.
  • Logs and Audit Log: available through Vercel Drains. Log drains require a Pro or Enterprise plan. Audit Log drains require an Enterprise plan.
  • Web Analytics: install and enable the @vercel/analytics SDK in your application so page views and custom events are emitted.
  • Speed Insights: install and enable the @vercel/speed-insights SDK in your application so Web Vitals are collected in the browser.

You need an Elastic Cloud Serverless project or an Elastic Cloud Hosted deployment.

Find your Elastic Cloud public endpoint:

  1. Log in to the Elastic Cloud Console.
  2. Open your project or deployment and select Manage.
  3. In Application endpoints, cluster and component IDs, select the Vercel endpoint, then copy the public endpoint value.

The managed endpoint URL for Vercel is that public endpoint plus /vercel, which is the path that accepts Vercel drain payloads:

https://<managed-endpoint>/vercel
		

For example, if your public endpoint is https://abc123.ingest.us-east-1.aws.elastic.cloud, then the managed endpoint URL for Vercel is:

https://abc123.ingest.us-east-1.aws.elastic.cloud/vercel
		

Every project and deployment has its own host, so always build the managed endpoint URL for Vercel from the endpoint shown in your own Elastic Cloud project or deployment. Refer to Find your endpoint for more detail.

Create an API key by following the Send data to Elastic Cloud quickstart, then copy the encoded value. Vercel sends it in an Authorization header that must use the ApiKey scheme, as described in Authentication.

Alternatively, in your Elastic Cloud Serverless project, go to Add dataApplicationsOpenTelemetry. That wizard shows the endpoint and generates a pre-configured API key for you.

A Vercel drain carries a single data type, so create a separate drain for each of Logs, Audit Log, Web Analytics, and Speed Insights that you want in Elastic. All of them use the same managed endpoint URL and API key.

For each data type, in Vercel:

  1. Open your team Drains settings and create a drain for that data type.
  2. Choose Custom Endpoint as the destination.
  3. Set the Endpoint URL to the managed endpoint URL for Vercel, for example https://abc123.ingest.us-east-1.aws.elastic.cloud/vercel.
  4. Under Custom Headers, add a header named Authorization with the value ApiKey <your-api-key>, for example Authorization: ApiKey abc123.
  5. Save the drain.

For Logs drains, you can also narrow which sources, environments, and sampling rates are forwarded under Additional configuration for logs. Refer to Log Drains reference.

Note

The managed endpoint URL for Vercel is always your Elastic Cloud public endpoint plus /vercel. Do not point the drain at a self-hosted collector for these assets; the supported path is the Elastic Cloud managed endpoint.

Vercel drain payloads are decoded by the Elastic Cloud managed endpoint and written to the data streams below. Each data type has its own payload schema, documented by Vercel, and those fields are what you query in Elastic. For drain configuration on the Vercel side, see Using drains. For managed endpoint behavior, see Managed inputs.

Signal Data stream Fields
Speed Insights metrics-vercel.speedinsights.v1.otel-* Speed Insights Drains reference

Speed Insights carries Web Vitals (LCP, INP, CLS, TTFB) and their related attributes, such as route, device, and country.

Signal Data stream Fields
Logs logs-vercel.logs.otel-* Log Drains reference
Audit logs logs-vercel.auditlog.v1.otel-* Audit Log Drains reference
Web Analytics logs-vercel.analytics.v2.otel-* Analytics Drains reference

The Logs data stream holds every source selected on the drain, so it covers build output and static asset requests alongside function output from the lambda and edge runtimes. Use the Log Source filter on the Logs dashboard to focus on a single source.

To see how a payload field is indexed, open the data stream in Discover and inspect a document, or check the data stream mappings in Stack ManagementIndex Management.

Dashboard Description
[Vercel OTel] Logs Server-side health overview covering request volume, error rates, HTTP status distribution, log sources, regions, and top routes.
[Vercel OTel] Audit Logs Governance and security overview of audit event volume, actors, top event types, user activity, and sensitive operations.
[Vercel OTel] Web Analytics Traffic and engagement overview covering page views, geography, devices, top pages, and custom events.
[Vercel OTel] Speed Insights Web Vitals performance overview tracking LCP, INP, CLS, and TTFB at the p75 benchmark over time and per page.

This integration includes one or more Kibana dashboards that visualizes the data collected by the integration. The screenshots below illustrate how the ingested data is displayed.