# Welcome

### Welcome to AllStak

Welcome to **AllStak's documentation**! We're excited to help you get started with our **comprehensive application monitoring and error tracking platform**.

#### **What is AllStak?**

AllStak is an advanced **monitoring and error tracking solution** that helps developers and teams:

* 🔍 **Track and analyze application errors** in real-time
* 📊 **Monitor server performance and health metrics**
* 🚨 **Get instant alerts** when issues occur
* 🛠 **Debug problems faster** with detailed error context
* ✅ **Improve application reliability and user experience**

#### **🚀 Key Features**

**Error Tracking**

* Automatic error capture for **Spring Boot, Laravel, and Node.js** applications
* Detailed stack traces and error context
* Error grouping and prioritization
* Custom error filtering and management
* Error resolution workflow

**Performance Monitoring**

* Real-time **server metrics** monitoring
* Resource usage tracking (**CPU, Memory, Disk**)
* Application performance metrics
* Custom metric tracking
* Historical data analysis

**Alerting & Notifications**

* Email and Slack notifications for errors and issues
* Customizable alert conditions
* Alert severity levels
* Detailed error reports
* Alert history and analytics

**Team Collaboration**

* Shared error inbox
* Team member assignments
* Comment threads on issues
* Activity logs and audit trails
* Comprehensive error history

#### **🛠 Getting Started**

**Create an Account**

1. Sign up at [**AllStak.io**](https://allstak.io/register)
2. Verify your email address
3. Set up your organization profile

#### **📚 Support & Resources**

* [**Spring Boot SDK Documentation**](https://docs.allstak.io/spring-boot-sdk)
* [**Laravel SDK Documentation**](/getting-started/quickstart)
* [**Node.js SDK Documentation**](/getting-started/node.js-sdk)

#### **📞 Need Help?**

Our support team is here to help you get the most out of **AllStak**:

* 📧 Email: [**info@allstak.io**](mailto:info@allstak.io)
* 📖 Documentation: [**docs.allstak.io**](https://docs.allstak.io/)

For enterprise support options and custom solutions, please contact our sales team.

#### **🔔 Stay Updated**

* Follow us on [**Twitter**](https://twitter.com/allstak)
* Connect with us on [**LinkedIn**](https://linkedin.com/company/allstak)
* Subscribe to our **Newsletter**

#### **✅ Next Steps**

* [**Quick Start Guide**](https://docs.allstak.io/quick-start)
* [**Configuration Options**](https://docs.allstak.io/configuration)
* [**Advanced Features**](https://docs.allstak.io/advanced-features)
* [**Integration Examples**](https://docs.allstak.io/integrations)

We're committed to helping you **build more reliable applications**. Let's get started!


# Laravel SDK

## Laravel SDK

Official Laravel SDK for AllStack error tracking and monitoring by Techsea. This package provides seamless integration for error tracking and monitoring in your Laravel applications.

### Installation

You can install the package via composer:

```bash
composer require techsea/allstack-laravel
```

### Configuration

1. Add the following variables to your `.env` file:

```env
ALLSTACK_API_KEY=your-api-key
ALLSTACK_ENVIRONMENT=production
```

2. The service provider will be automatically registered thanks to Laravel's package discovery.

### Usage

#### Capturing Exceptions

```php
try {
    // Your code here
} catch (\Throwable $e) {
    app(Techsea\AllStack\AllStackClient::class)->captureException($e);
}
```

## For Global Capturing Exceptions Laravel 11x

```php
return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->append(\Techsea\AllStack\Middleware\AllStackMiddleware::class);
    })
    ->withExceptions(function (Exceptions $exceptions) {
        // Register a custom exception reporting callback
        $exceptions->report(function (Throwable $exception) {
            // Resolve the AllStackClient from the container
            $allStackClient = app(AllStackClient::class);
            
            // Capture the exception using AllStack
            $allStackClient->captureException($exception);
            
            // Optionally, stop further propagation to Laravel's default logging
            // return false; // Uncomment to prevent default logging
        });
    })
    ->create();
```

## For Laravel 8x

<pre class="language-php"><code class="lang-php">use Techsea\AllStack\AllStackClient;
<strong>php
</strong>class Handler extends ExceptionHandler
{
    /**
     * A list of the exception types that are not reported.
     *
     * @var array&#x3C;int, class-string&#x3C;Throwable>>
     */
    protected $dontReport = [
        //
    ];

    /**
     * A list of the inputs that are never flashed for validation exceptions.
     *
     * @var array&#x3C;int, string>
     */
    protected $dontFlash = [
        'current_password',
        'password',
        'password_confirmation',
    ];

    /**
     * Register the exception handling callbacks for the application.
     *
     * @return void
     */
    public function register()
    {
        $this->reportable(function (Throwable $e) {
            $allStackClient = app(AllStackClient::class);
            
            // Capture the exception using AllStack
            $allStackClient->captureException($e);
        });
    }
}
</code></pre>

#### Tracking HTTP Requests

Add the middleware to your `app/Http/Kernel.php`:

```php
protected $middleware = [
    // ...
    \Techsea\AllStack\Middleware\AllStackMiddleware::class,
];
```

Or use it in specific routes:

```php
Route::middleware([\Techsea\AllStack\Middleware\AllStackMiddleware::class])->group(function () {
    // Your routes here
});
```

### Features

* Exception tracking with stack traces
* HTTP request monitoring
* System information collection
* Environment-specific configuration
* Automatic context gathering
* Error handling and logging


# Node.js SDK

## Node.js SDK

Official Node.js SDK for AllStack error tracking and monitoring by Techsea. This package provides seamless integration for error tracking and monitoring in your Node.js applications.

### Installation

Install the package using npm or yarn:

```bash
npm install @techsea/allstack-node
```

### Usage

Initialize AllStack and capture errors:

```javascript
const AllStack = require("@techsea/allstack-node");

const allstack = new AllStack({
    environment: "production",
    tags: ["your-tags"],
    apiKey: "your_api_key",
});

try {
    throw new Error("This is a test error .");
} catch (error) {
    allstack.captureException(error);
    console.error("Captured error:", error.message);
}
```

### Configuration Options

The AllStack constructor accepts the following options:

* `environment` - The environment name (e.g., "production", "staging", "development")
* `tags` - Array of tags to categorize your errors
* `apiKey` - Your AllStack API key


# Spring Boot SDK

## AllStak Spring Boot SDK Installation Guide

### Step 1: Add the AllStak Dependency

To integrate AllStak with your Spring Boot application, add the following dependency to your `pom.xml`:

```xml
<dependency>
    <groupId>io.allstak</groupId>
    <artifactId>allstak-springboot</artifactId>
    <version>1.0.4</version>
</dependency>
```

For Gradle users, add this to `build.gradle`:

```gradle
dependencies {
    implementation 'io.allstak:allstak-springboot:1.0.4'
}
```

### Step 2: Configure AllStak Properties

Add the following properties to your `application.properties` or `application.yml` file:

#### For `application.properties`:

```properties
allstak.api-key=your-api-key
allstak.environment=dev
allstak.release=1.0.0
```

#### For `application.yml`:

```yaml
allstak:
  api-key: your-api-key
  environment: dev
  release: 1.0.0
```

### Step 3: Capture Exceptions with AllStak

To automatically capture exceptions, add the following snippet inside a `try-catch` block:

```java
try {
    // Your application logic here
} catch (Exception e) {
    AllStak.captureException(e);
}
```

This ensures that all unhandled exceptions are logged and sent to AllStak for monitoring.

### Step 4: Enable Global Exception Handling (Optional)

To globally capture exceptions in your Spring Boot application, you can use `@ControllerAdvice` as follows:

```java
import io.allstak.AllStak;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
    public String handleException(Exception e) {
        AllStak.captureException(e);
        return "An error occurred. The issue has been logged.";
    }
}
```

This setup ensures that all exceptions in your application are automatically sent to AllStak for tracking and debugging.

***

### Additional Notes

* Ensure that your API key is kept secure and not exposed in public repositories.
* The `allstak.environment` property allows you to specify different environments (e.g., `dev`, `staging`, `prod`).
* The `allstak.release` property helps track issues across different application versions.

By following these steps, you will have successfully integrated AllStak with your Spring Boot application for enhanced error monitoring and tracking.


# ReactJS SDK

## 1 . **Installation & Setup**

To start using **AllStak**, follow these steps:

#### **1. Install AllStak SDK**

Run the following command in your project directory:

```sh
npm install @techsea/allstak-reactjs
```

or with **yarn**:

```sh
yarn add @techsea/allstak-reactjs
```

## **2. Import & Initialize AllStak**

In your main React entry file (`index.tsx` or `main.tsx`), import and initialize **AllStak**:

```tsx
import React from "react";
import ReactDOM from "react-dom/client";
import { AllStakErrorBoundary, initAllStak } from "@techsea/allstak-reactjs";
import App from "./App";

// AllStak Configuration
const config = {
  apiKey: "your_api_key",
  environment: "production",
};

// Initialize AllStak globally
initAllStak(config);

ReactDOM.createRoot(document.getElementById("root")!).render(
  <React.StrictMode>
        {/* Wrap your entire application with the AllStak Error Boundary */}
        <AllStakErrorBoundary>
          <App />
        </AllStakErrorBoundary>
  </React.StrictMode>
);
```

***

## **3. Handling Errors in Components**

To capture errors in specific components, wrap them with the **`AllStakErrorBoundary`**:

```tsx
import { AllStakErrorBoundary } from "@techsea/allstak-reactjs";
import MyComponent from "./MyComponent";

function App() {
  return (
    <AllStakErrorBoundary>
      <MyComponent />
    </AllStakErrorBoundary>
  );
}

export default App;
```


# Real-Time Server Monitoring

AllStak is a **real-time server monitoring tool** that provides instant insights into your **CPU, RAM, Disk, and Network Usage**. It helps you detect issues early and optimize your infrastructure with ease.

***

### 🔥 Features

👉 **Live CPU Usage Monitoring** – Track processor load in real time.\
👉 **Real-Time RAM Monitoring** – View memory consumption to prevent bottlenecks.\
👉 **Disk Usage Tracking** – Monitor available and used storage.\
👉 **Network Traffic Analysis** – Get insights into inbound & outbound data transfer.\
👉 **Automated Deployment Script** – Quick and easy installation.\
👉 **Auto-Restart on Server Reboot** – Ensures monitoring is always active.

***

### 📌 Installation & Usage

To install and start **AllStak Server Monitoring**, run the following commands on your **Linux server**:

```
wget -O install-allstak.sh https://raw.githubusercontent.com/tech-sea-sa/Allstak-Realtime-Monitoring-/main/install-allstak.sh
chmod +x install-allstak.sh
./install-allstak.sh your_api_key
```

> **Note:** Replace `your_api_key` with your actual API key.

***

### 📼 How It Works

1. **Checks if Java is installed**, installs it if missing.
2. **Downloads the latest AllStak monitoring agent** from GitHub.
3. **Creates a systemd service** to ensure the tool runs automatically on server restart.
4. **Starts the monitoring service** and runs it in the background.

***

### 🔄 Stay Updated

🌐 **Website:** [www.allstak.io](https://www.allstak.io/)\
🤖 **GitHub:** [AllStak Repository](https://github.com/tech-sea-sa/Allstak-Realtime-Monitoring-/)


# Flutter SDK

## AllStak Flutter SDK Documentation

We’re excited to introduce the **AllStak Flutter SDK**, a developer-friendly solution for **error tracking and monitoring** in Flutter applications.

***

### 🚀 Key Features

✅ **Exception Tracking**

* Automatically captures and reports runtime exceptions.
* Provides detailed error context, including stack traces, device details, and OS information.

✅ **Device and App Context**

* Collects device-specific data such as platform, OS version, and screen size.
* Logs application-specific details like app version, build number, and package name.

✅ **Network Request Monitoring**

* Seamlessly integrates with HTTP libraries like `http` and `dio`.
* Tracks API requests and logs failed responses.

✅ **Flutter Integration**

* Simple setup tailored for **Flutter applications**.
* Supports **Android, iOS, Web, and Desktop** platforms.

***

### 📦 Installation

Add **AllStak Flutter SDK** to your project by updating your `pubspec.yaml` file:

```yaml
dependencies:
  allstak: latest_version
```

Then, run:

```sh
flutter pub get
```

***

### 🛠 Usage

#### **1️⃣ Initialize AllStak in `main.dart`**

```dart
import 'package:flutter/material.dart';
import 'package:allstak/allstak.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  print('Initializing AllStak SDK...');

  await Allstak.init(
    AllstakOptions(
      apiKey: 'your-api-key-here',
      environment: 'production',
    ),
    appRunner: () => runApp(const MyApp()),
  );
}
```

#### **2️⃣ Capture Exceptions**

Manually catch and log exceptions:

```dart
try {
  throw Exception("Test exception for AllStak");
} catch (e, stackTrace) {
  Allstak.captureException(e, stackTrace);
}
```

***

### 🎨 Example App

Here’s a simple Flutter app that integrates AllStak:

```dart
import 'package:flutter/material.dart';
import 'package:allstak/allstak.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Allstak.init(
    AllstakOptions(
      apiKey: 'your-api-key',
      environment: 'production',
    ),
    appRunner: () => runApp(const MyApp()),
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'AllStak Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'AllStak Error Tracking Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  Future<void> _triggerError() async {
    try {
      throw Exception("Simulated error for AllStak");
    } catch (e, stackTrace) {
      Allstak.captureException(e, stackTrace);
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.title)),
      body: Center(
        child: ElevatedButton(
          onPressed: _triggerError,
          child: const Text("Trigger Error"),
        ),
      ),
    );
  }
}
```

***

### 🔗 Links & Resources

* **📖 API Documentation:** [docs.allstak.io](https://docs.allstak.io)
* **🚀 Website:** [allstak.io](https://allstak.io)

***

### 🎯 What's Next?

We're continuously improving **AllStak**! Stay tuned for:

* 📊 **Performance Monitoring**
* 📡 **Live Issue Tracking Dashboard**

Feel free to **contribute** and **star ⭐ the repository** on GitHub!

***

#### 🚀 Start Tracking Errors Like a Pro with **AllStak Flutter SDK**! 🎉


# 📈 Stress Test Your App

### 📌 How to Stress Test Your Application with AllStak

Ensuring that your application can handle high traffic and peak loads is crucial for stability and performance. **AllStak** makes it easy to perform **stress testing** using your **Postman API collection**. Follow this step-by-step guide to test your app under heavy load.

#### **🚀 Step 1: Export Your API from Postman**

1. Open **Postman** and navigate to your API collection.
2. Click on the **three dots** next to the collection name and select **Export**.
3. Choose **Collection v2.0 (recommended)** as the export format.
4. Save the exported JSON file to your computer.

#### **🛠 Step 2: Access the AllStak Load Testing Platform**

1. Go to [**AllStak Load Testing**](https://allstak.io/en/load-test).
2. Sign in to your **AllStak** account (or create one if you haven't already).

#### **📊 Step 3: Create a New Load Test Plan**

1. Click on **“New Plan”** to create a new stress test.
2. Enter the following details:
   * **Test Duration**: Set the duration of the test (e.g., 1 minutes.).
   * **Number of Users**: Choose how many users will send requests simultaneously.

#### **📁 Step 4: Upload Your Postman API**

1. Click on **“Upload API”** and select the Postman **JSON file** you exported earlier.
2. Review the API endpoints and configure additional settings if needed.
3. Click **Start Test** to begin the stress test.

#### **📈 Step 5: Analyze the Results**

* View **real-time performance metrics** for your API.
* Identify **slow endpoints, failed requests, and bottlenecks**.
* Optimize your infrastructure based on the test insights.

#### **✅ Conclusion**

With **AllStak’s stress testing tool**, you can easily simulate **high-traffic scenarios**, identify performance issues, and **ensure your system is prepared for peak loads**. Start testing today and **build a more resilient application!**

🔗 [Visit AllStak](https://allstak.io/)&#x20;


