Freshcollected in 21m

Vercel Observability Adds Custom Metrics

Vercel Observability Adds Custom Metrics
PostLinkedIn
Read original on Vercel News

💡Track app-specific and AI workload metrics directly in Vercel without building a separate monitoring pipeline.

⚡ 30-Second TL;DR

What Changed

Use the metric() function from the @vercel/functions package to record values such as request latency or business events.

Why It Matters

This gives teams more visibility into application-specific and AI workload metrics without deploying a separate monitoring pipeline. It can help builders correlate function performance with business events, though observability-event charges should be monitored at scale.

What To Do Next

Instrument one latency or model-inference business metric with metric() in @vercel/functions, then build a dashboard to validate its usefulness and cost.

Who should care:Developers & AI Engineers

Key Points

  • Use the metric() function from the @vercel/functions package to record values such as request latency or business events.
  • Attach attributes to custom metrics for filtering and grouping, with Vercel automatically adding deployment and function-region metadata.
  • Custom metrics are available in the query builder, Notebooks, dashboards, and through the vc metrics CLI command.
  • The feature is available to Pro and Enterprise customers with Observability Plus, and usage is billed as observability events.

🧠 Deep Insight

Background and context from public sources — not the original article. 17 sources cited.

🔑 Enhanced Key Takeaways

  • Custom metrics emitted from Vercel Functions are billed as Observability events at a rate of $1.20 per 1 million events.
  • The names of custom metrics and their attributes, along with attribute values, must be non-empty, shorter than 64 bytes, and restricted to ASCII letters, digits, hyphens, underscores, periods, and slashes.
  • The vercel metrics CLI command offers advanced querying capabilities for custom metrics, including custom filtering, grouping, aggregations, calendar buckets, and JSON output, with the ability to query across all projects within a team.
  • Vercel Observability already provides a suite of built-in metrics for Vercel Functions, covering aspects like invocations, durations, error rates, in-function concurrency, external API requests, Edge Requests, Fast Data Transfer, Builds, and ISR caching, which custom metrics are designed to complement.
  • Vercel's AI Gateway, a related offering, also features its own observability, logging spend, model usage, and performance metrics for AI requests, viewable at both team and project levels.
📊 Competitor Analysis▸ Show

Competitor Analysis: Vercel Observability vs. Key Platforms

Feature/PlatformVercel Observability (with Custom Metrics)Netlify ObservabilityAWS CloudWatch (for Lambda)
Core OfferingFrontend Cloud with integrated serverless functions and comprehensive observability.Frontend Cloud with integrated serverless functions and general observability.Native monitoring and logging for AWS resources, including serverless functions.
Custom MetricsYes, via @vercel/functions metric() function; record numeric values with attributes.General observability features, specific custom metrics functionality less detailed in public info.Yes, supports custom metrics for Lambda functions.
Built-in MetricsVercel Functions usage (invocations, duration, errors, CPU, memory), Edge Requests, Builds, ISR caching, External API calls.Function invocations, bandwidth, build minutes.Lambda invocations, duration, error rates, throttles, concurrent executions, memory usage.
Data Retention30 days for Observability Plus.Varies by plan (e.g., 3 days on Pro for Connect events).Configurable, typically 14 months for metrics, longer for logs.
Querying/AnalysisQuery builder, Notebooks, dashboards, vc metrics CLI for filtering, grouping, aggregations.Dashboards, logs.CloudWatch Logs Insights for querying logs, CloudWatch Metrics for dashboards and alarms.
Pricing ModelObservability Plus: $1.20 per 1 million events.Credit-based across various usage (compute, bandwidth, database, AI inference). Pro plan includes unlimited team members.Pay-as-you-go for logs ingested, metrics stored, alarms, etc.
Latency/DelayReal-time insights.Real-time insights.Metrics can have up to one-minute delay.
External IntegrationVercel Drains for exporting logs, traces (OpenTelemetry), analytics, performance metrics to external tools (Datadog, Honeycomb, etc.).Log Drains to external logging providers.Integrates with AWS X-Ray for distributed tracing; supports various third-party tools.
Target AudienceDevelopers building Next.js and modern web applications requiring integrated DX and observability.Developers building JAMstack and framework-neutral web applications.AWS users needing deep integration within the AWS ecosystem.

🛠️ Technical Deep Dive

  • Custom metrics are emitted using the metric() function from the @vercel/functions package within Vercel Functions.
  • Each call to metric() records a single numeric data point.
  • Developers can attach custom attributes to these metrics for enhanced filtering and grouping.
  • Vercel automatically enriches custom metrics with metadata such as deployment ID and function-region.
  • Metric names, attribute names, and attribute values must adhere to specific constraints: they must be non-empty, shorter than 64 bytes, and contain only ASCII letters (A-Z, a-z), digits (0-9), hyphens (-), underscores (_), periods (.), and slashes (/). Unsupported characters are automatically replaced with an underscore.
  • Recorded custom metrics are accessible through Vercel Observability's query builder, Notebooks, dashboards, and the vc metrics CLI command for analysis and visualization.

🔮 Future ImplicationsAI analysis grounded in cited sources

Vercel will see increased adoption for complex, data-driven applications.
The ability to track application-specific business events and custom performance indicators provides developers with deeper insights, making Vercel a more robust platform for applications with intricate logic and critical business metrics.
Vercel's observability platform will evolve to offer more sophisticated analytics and AI-driven insights.
By establishing a flexible custom metrics system, Vercel is building a richer data foundation that can be leveraged for more advanced analytical tools, automated anomaly detection, and predictive capabilities in the future.
Developers will achieve more precise performance optimization and cost management for their Vercel Functions.
Custom metrics enable granular tracking of application-specific values, allowing developers to pinpoint performance bottlenecks and identify cost inefficiencies beyond standard infrastructure metrics, leading to more targeted improvements.

Timeline

2024-10
Limited beta of Vercel Observability introduced advanced function metrics, including CPU throttle, memory usage, TTFB, and function start type.
2024-12
Vercel Observability became generally available, offering framework-aware insights into application performance.
2025-09
Vercel Drains (formerly Log Drains) were launched, enabling the export of logs, OpenTelemetry traces, Web Analytics events, and Speed Insights metrics to external systems.
2026-06
Vercel's 'Monitoring' feature was deprecated and integrated into Observability Plus, alongside a new usage-based pricing model of $1.20 per 1 million events.
2026-07
Observability Plus was made available to Pro and Enterprise teams, providing additional features, higher limits, and increased data retention.
2026-08
Vercel Observability added support for custom metrics, allowing developers to emit and analyze application-specific data.

📎 Sources (17)

Factual claims are grounded in the sources below. Forward-looking analysis is AI-generated interpretation.

  1. vercel.com
  2. vercel.com
  3. vercel.com
  4. vercel.com
  5. serverless.com
  6. openobserve.ai
  7. vercel.com
  8. puter.com
  9. kuberns.com
  10. daily.dev
  11. vercel.com
  12. vercel.com
  13. omidsaffari.com
  14. fireup.pro
  15. vercel.com
  16. vercel.com
  17. vercel.com
📰

Weekly AI Recap

Read this week's curated digest of top AI events →

👉Related Updates

AI-curated news aggregator. All content rights belong to original publishers.
Original source: Vercel News

This is a summary, not the original. Read the source, or get the weekly briefing.

Weekly AI briefing

One email a week. Unsubscribe anytime.