nextview-tracing

1.1.1 • Public • Published

PACKAGE

NextView-banner-final-900x300

TypeScript JavaScript React Tailwind MUI Recharts Node Express PostgreSQL OpenTelemetry NextJS Vite Docker GitHubActions Husky Jest

Website LinkedIn npm Medium

NextView is a lightweight and user-friendly application designed to assist developers in optimizing the server performance of their Next.js applications. Our observability platform utilizes OpenTelemetry to trace and monitor crucial server instrumentation data, stores the information in real time, and visualizes the time-series data in clear graphical representations on the NextView Dashboard. With easier data analysis, developers can swiftly identify bottlenecks and pinpoint areas that require server performance optimization, and thereby improve the efficiency of their applications.

Getting Started

  1. To get started, install our npm package in your Next.js application
npm i nextview-tracing
  1. In your next.config.js file, opt-in to the Next.js instrumentation by setting the experimental instrumentationHook key to true in the nextConfig object
experimental.instrumentationHook = true;
  1. Navigate to the NextView Dashboard and copy your generated API key

  2. In the .env.local file in the root directory of your application (create one if it doesn’t exist), create two environment variables, one for your API Key and one for your service’s name

API_KEY=<Your-NextView-API-Key>
Service_Name=<Name-Of-Your-Service>
  1. Start the OpenTelemetry Collector in your terminal via the Docker Command
docker-compose-up
  1. Return to your NextView account and enter the Dashboard to see your instrumentation data displayed!

Key Concepts in OpenTelemetry

Trace

The entire "path" of events that occurs when a request is made to an application. A trace is a collection of spans.

Span

A trace consists of spans, each of which represents an individual operation. A span contains information on the operation, such as request methods (get/post), start and end timestamps, status codes, and URL endpoints. NextView focuses on three main spans.

  • Client: The span is a request to some remote service, and does not complete until a response is received. It is usually the parent of a remote server span.
  • Server: The child of a remote client span that covers server-side handling of a remote request.
  • Internal: The span is an internal operation within an application that does not have remote parents or children.

Action

The term "action" in the NextView application refers to one or more operations (spans) within a trace with the same request method and URL endpoint.

For more details on OpenTelemetry, please read the documentation here.

Contributors

License

Distributed under the MIT License. See LICENSE for more information.

Package Sidebar

Install

npm i nextview-tracing

Weekly Downloads

1

Version

1.1.1

License

ISC

Unpacked Size

12.4 kB

Total Files

5

Last publish

Collaborators

  • scott-brasko
  • evramd
  • e-zayas