Sensory
Architecture Overview

How Sensory Works

Sensory is a real-time log management and monitoring platform designed for speed, reliability, and ease of use. It establishes a seamless pipeline from your application code straight to your monitoring dashboard using low-latency WebSockets.

Step 01 — The Client

Application Integration

The integration process begins with the lightweight Sensory Log Client (available for Go). Developers can incorporate the logger into their services by initializing it with their unique Project API Key.

When the application starts, the SDK establishes a secure, persistent WebSocket connection directly to the Sensory server. Whenever an event or error occurs and a log is recorded, the SDK works continuously in the background to automatically enrich your log with precise runtime context:

  • The exact file where the log was triggered.
  • The line number causing the issue.
  • The function name that executed the code.

This enriched payload is instantly streamed over the active WebSocket connection without slowing down your application's main thread.

client.go
package config

import (
	"fmt"
	"os"

	logClient "github.com/EsanSamuel/sensory/LogClient"
)

func InitLogger() *logClient.Client {

	api_key := os.Getenv("SENSORY_API_KEY")

	logger, err := logClient.New(api_key)
	if err != nil {
		fmt.Println("Logger connection failed:", err.Error())
		return logClient.NewNoOp()
	}

	fmt.Println("Logger connected successfully")
	return logger
}

/* ------------------------------------- */

// In your application code:

var logger = config.InitLogger()

logger.INFO(summary)
logger.DEBUG("Debug detail")
logger.WARN("Retry limit approaching")
logger.ERROR("Database connection failed")
logger.FATAL("Unexpected system crash")
Step 02 — The Server

Real-Time Ingestion

The central Sensory Server runs a high-performance WebSocket Gateway that listens for incoming data streams from multiple clients simultaneously.

  • Continuous Listening: As JSON log entries arrive, the server parses them in real-time.
  • Authentication & Verification: The server cross-references the API key attached to the log against the database, securely mapping the incoming data to the correct Project and User.
  • Intelligent Deduplication: To protect against log spam (such as an infinite loop rapidly firing the exact same error), Sensory incorporates smart deduplication logic. It checks for duplicate occurrences of identical messages and timestamps within the same project to keep your logs clean and manageable.
Step 03 — The Database & Workers

Storage & Actionable Alerts

Once a log is validated and authenticated, the system ensures data permanence and triggers necessary alerts:

  • Secure Storage: The entry is firmly persisted in the database, fully indexed and ready for deep search and analytics.
  • Live Metrics: The system instantly increments your project's log_counts, providing real-time telemetry back to the main dashboard.
  • Automated Email Queue: A specialized background worker kicks into action. The platform looks up the developer or team responsible for the project and dispatches instantaneous email notifications for critical logs, ensuring that developers are immediately alerted the moment an anomaly is detected.
Step 04 — The Developer UI

The Dashboard Experience

Because everything flows through WebSockets and real-time triggers, the end result is a highly responsive developer dashboard.

You can watch your logs stream in live, visualize volume spikes, filter by service or severity level, and pinpoint exactly which line of code is failing all in one unified interface.

Step 05 — The Gateway

Intelligent Reverse Proxy

Sensory provides a built-in Reverse Proxy that acts as an intelligent gateway for your microservices. It bridges the gap between raw traffic and observability.

  • Multi-URL Routing: Configure a single entry point that dynamically routes traffic to multiple backend services based on your project configuration.
  • Full Request/Response Logging: Unlike standard loggers, the proxy captures the entire lifecycle of every HTTP request, allowing you to debug header mismatches and payload issues instantly.
  • API Key Protection: Secure your backend endpoints with Sensory's API key validation at the edge, ensuring only authorized traffic reaches your internal services.
Backend A
Backend B

Integrate the Proxy

Connect your applications to the Sensory Reverse Proxy in seconds using your preferred language and library.

Base Configuration

Base URLhttps://sensory-reverse-proxy.onrender.com
Required Headers
  • Content-Type: application/json
  • X-API-KEY: [Your API Key]

Security Note

Always keep your API key secure. Use environment variables to inject sensitive keys into your production services.

// Initialize Axios with Sensory Proxy
import axios from 'axios';

export const api = axios.create({
  baseURL: 'https://sensory-reverse-proxy.onrender.com',
  headers: {
    "Content-Type": "application/json",
    'X-API-KEY': 'YOUR_PROJECT_API_KEY'
  },
});

// Example usage
const fetchData = async () => {
  const res = await api.post('/v1/data', { 
    query: "metrics" 
  });
  return res.data;
};

Ready to build with Sensory?

Integrate our lightweight SDK to your application and start monitoring in just 2 minutes.