Skip to content

eraykeskinmac/observer

Repository files navigation

Observer

Observer is a telemetry data visualization application built using Next.js, OpenTelemetry, and ClickHouse. The application features a service map, service list, and detailed views for specific telemetry data.

Project Overview

This project is structured as a Turborepo application with multiple services and packages. The main components include:

  • Dashboard: A Next.js application for visualizing telemetry data.
  • Order Service: An Express.js microservice.
  • Product Service: An Express.js microservice.
  • User Service: An Express.js microservice.
  • UI: Shared UI components and styles.
  • ESLint Config: Shared ESLint configurations.
  • TypeScript Config: Shared TypeScript configurations.
  • Infrastack Interview FS MEK 20240830: A wrapper for OpenTelemetry SDKs.

Getting Started

Prerequisites

  • Node.js >= 18
  • Docker
  • Docker Compose
  • pnpm

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/observer.git
    cd observer
  2. Install dependencies:

    pnpm install
  3. Set up environment variables:

    Create a .env file in the root directory and add your ClickHouse credentials:

    CLICKHOUSE_ENDPOINT=your_endpoint_here
    CLICKHOUSE_DATABASE=your_database_here
    CLICKHOUSE_USERNAME=your_username_here
    CLICKHOUSE_PASSWORD=your_password_here
  4. Set up the OpenTelemetry Collector:

    cp docker/otel-collector/otel-collector-config.example.yaml docker/otel-collector/otel-collector-config.yaml
  5. Start the services:

    pnpm start:all

Running the Dashboard

  1. Navigate to the apps/dashboard directory:

    cd apps/dashboard
  2. Start the development server:

    pnpm dev
  3. Open http://localhost:3001 in your browser.

Running the Microservices

  1. Navigate to the root directory of the project:

    cd ../../
  2. Start the services using Docker Compose:

    docker-compose up -d

The services will be available at the following URLs:

Project Structure

Applications

Dashboard

The Dashboard application is a Next.js project that provides a user interface for monitoring and managing services.

Order Service

The Order Service is an Express.js application that handles order-related operations.

  • Getting Started: Refer to the Order Service README for setup instructions.
  • Development: Run the development server using pnpm dev.
  • Docker: The service can be run using Docker. Refer to the Dockerfile for details.

Product Service

The Product Service is an Express.js application that handles product-related operations.

  • Getting Started: Refer to the Product Service README for setup instructions.
  • Development: Run the development server using pnpm dev.
  • Docker: The service can be run using Docker. Refer to the Dockerfile for details.

User Service

The User Service is an Express.js application that handles user-related operations.

  • Getting Started: Refer to the User Service README for setup instructions.
  • Development: Run the development server using pnpm dev.
  • Docker: The service can be run using Docker. Refer to the Dockerfile for details.

Packages

UI

The UI package contains shared UI components and styles.

  • Getting Started: Refer to the UI README for setup instructions.
  • Development: Run the development server using pnpm dev.

ESLint Config

The ESLint Config package contains shared ESLint configurations.

TypeScript Config

The TypeScript Config package contains shared TypeScript configurations.

Infrastack Interview FS MEK 20240830

The Infrastack Interview FS MEK 20240830 package is a wrapper for the OpenTelemetry SDK.

Docker

OpenTelemetry Collector

The OpenTelemetry Collector is configured to collect and export telemetry data.

Tools

The tools directory contains utility scripts and tools for the project.

  • Validation Scripts: Contains scripts for data validation and other utilities. Refer to the Tools README for setup instructions and details.