Skip to content

platzi/curso-newrelic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SpaceRover Mission Control

A full-stack monitoring sandbox for the "Advanced Full Stack Monitoring Course with New Relic." This application provides a comprehensive environment for learning and demonstrating monitoring concepts including APM, Infrastructure, and Logs.

πŸš€ Application Overview

SpaceRover Mission Control simulates a space agency's mission control center that monitors and controls a fleet of rovers exploring distant planets. The application is designed to demonstrate various monitoring concepts in a practical, engaging way.

Components

  1. Mission Control Dashboard (Frontend): React application for visualizing rover status and mission data
  2. Fleet Command Service (Backend API): Node.js/Express service for rover command and mission management
  3. Telemetry Processor (Background Service): Worker service for processing incoming rover data
  4. Mission Database: MongoDB database storing mission and rover information
  5. Monitoring Tools: Tools to observe and analyze application performance

πŸŽ“ Educational Features

  • Built-in Monitoring: Pre-configured for New Relic integration
  • Realistic Telemetry: Simulated rover data that changes over time
  • Structured Logs: Various log formats and patterns for log monitoring demonstrations
  • Progressive Complexity: Components can be introduced gradually as students progress
  • Complete Documentation: Each component includes details about monitoring opportunities

πŸ“Š Monitoring Concepts Demonstrated

Course Module Application Component Learning Opportunities
Advanced APM Fleet Command Service Transaction tracing, custom instrumentation, change tracking
Infrastructure Agent Docker containers + Host metrics Infrastructure monitoring, resource utilization, agent configuration
Logs Application-wide logging Log parsing, patterns, integration with APM and Infrastructure

πŸ›  Installation & Setup

Prerequisites

Quick Start with Docker

  1. Clone the repository:

    git clone https://github.com/yourusername/spacerover-mission-control.git
    cd spacerover-mission-control
  2. Create a .env file with your New Relic license key:

    NEW_RELIC_LICENSE_KEY=your_license_key
    
  3. Start all services:

    docker-compose up -d
  4. Access the application:

Manual Development Setup

If you prefer to run components individually for development:

  1. Start MongoDB:

    docker-compose up -d mongodb
  2. Start the Fleet Command service:

    cd backend
    npm install
    npm run dev
  3. Start the Telemetry service:

    cd telemetry
    npm install
    npm run dev
  4. Start the frontend application:

    cd frontend
    npm install
    npm start

πŸ” Using the Application

Rover Dashboard

The main dashboard shows an overview of all rovers, their status, and telemetry data. From here you can:

  • View rover status and health metrics
  • Navigate to detailed views for each rover
  • See alerts for critical conditions
  • Monitor real-time telemetry updates

New Relic Integration

The application includes detailed instructions for connecting to New Relic:

  1. Navigate to the "New Relic" tab in the application
  2. Follow the step-by-step guide to configure your New Relic account
  3. Use the provided dashboards and alert configurations

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                Docker Environment                β”‚
β”‚                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚   React     β”‚      β”‚  Fleet Command     β”‚    β”‚
β”‚  β”‚  Frontend   │◄────►│  Service (Node.js) β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚         β–²                       β–²               β”‚
β”‚         β”‚                       β”‚               β”‚
β”‚         β–Ό                       β–Ό               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Telemetry  β”‚      β”‚      MongoDB       β”‚    β”‚
β”‚  β”‚  Processor  │◄────►│                    β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ‘¨β€πŸ« Course Integration

This application is designed to support the "Advanced Full Stack Monitoring Course with New Relic" with specific features for each module:

Module: Advanced APM

  • Custom transaction naming
  • Custom metrics and events
  • Distributed tracing across services
  • Change tracking demonstration

Module: Infrastructure Agent

  • Container monitoring
  • Host metrics visualization
  • Custom dashboard creation
  • Alert configuration

Module: Logs

  • Structured and unstructured logging
  • Log pattern identification
  • Log correlation with APM data
  • Log-based alerting

πŸ“ Customization

You can customize various aspects of the application:

Customization Settings

Edit docker-compose.yml to change environment parameters:

environment:
  - ENABLE_SIMULATED_ISSUES=true
  - LOAD_INTENSITY=medium  # Options: low, medium, high

Adding New Rovers

Use the Fleet Command API to add new rovers:

curl -X POST http://localhost:4000/api/rovers -H "Content-Type: application/json" -d '{
  "name": "Curiosity II",
  "model": "Explorer 3000",
  "status": "active",
  "location": {
    "coordinates": {"x": 125.32, "y": 78.91},
    "planet": "Mars"
  },
  "capabilities": ["imaging", "sampling", "drilling"]
}'

Load Generation

The application includes a load generator that can be configured through environment variables:

load-generator:
  environment:
    - SCENARIO=default
    - INTENSITY=medium  # Options: low, medium, high

βš™οΈ Technical Details

  • Frontend: React 17, React Router 6, Recharts for data visualization
  • Backend: Node.js 23 on Alpine, Express 4, Winston for logging
  • Telemetry Service: Node.js 23, Express, real-time data processing
  • Database: MongoDB latest
  • Monitoring: New Relic APM, Infrastructure, Browser monitoring
  • Container Management: Docker Compose orchestration

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgements

  • NASA for inspiration on rover operations and telemetry systems
  • New Relic for their monitoring platform and educational resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages