axiomhq/next-axiom

The official Next.js library for Axiom.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 33 minutes ago
Added to GitGenius on July 28th, 2024
Created on April 28th, 2022
Open Issues & Pull Requests: 24 (+0)
Number of forks: 36
Total Stargazers: 434 (+0)
Total Subscribers: 3 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 19.1 days
Mean response time: 151.8 days
90th percentile: 565.8 days
Tracked items: 43

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 8% of issues opened in the past year have been closed. Three people close 61% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 20
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 773 days
Stale 30+ days: 20
Stale 90+ days: 20

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • NextJS 13 (2)
  • bug (1)
  • experiment (1)
  • web-vitals (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

The next-axiom repository is the official Next.js library for Axiom, a cloud-native observability platform that handles data ingestion, querying, and dashboard creation at scale. Written in TypeScript, this library enables Next.js developers to send Web Vitals and structured logs from their applications directly to Axiom's datastore, which is designed to ingest and query petabytes of data without requiring manual provisioning or data movement between hot and cold storage tiers.

The library supports Next.js applications using the App Router, with version 1.0 and higher focused exclusively on this modern routing approach. Users running the older Pages Router can continue using version 0.x, which receives ongoing security patches. To get started, developers need to create an Axiom account, set up a dataset, generate an API token, and configure two environment variables in their Next.js application: NEXT_PUBLIC_AXIOM_DATASET and NEXT_PUBLIC_AXIOM_TOKEN.

The core functionality includes middleware integration for capturing HTTP traffic requests with configurable detail levels, allowing developers to log request methods, URLs, headers, and other metadata. The library provides the AxiomWebVitals component for sending Web Vitals metrics from production deployments, ensuring performance monitoring is automatically integrated into the application lifecycle. Logging capabilities span multiple contexts: route handlers can be wrapped with withAxiom to automatically capture exceptions and add logger instances, client components can use the useLogger hook, and server components can instantiate Logger directly with proper flushing before returning.

The library implements five log levels—debug, info, warn, error, and off—allowing developers to control which logs are sent to Axiom. Error handling integrates with Next.js's built-in error handling mechanism through error.tsx files, where developers can use useLogger to capture and send routing errors. The middleware and route handler configurations both support a logRequestDetails property that accepts either a boolean to log all request details or an array of specific keys to log selectively.

The repository is classified across numerous categories including observability, cloud computing, resilience engineering, real-time analytics, and microservices, reflecting its role in enterprise-grade observability infrastructure.