Skip to main content

rudow

Rudow — AI that reads your logs and tells you what broke, in plain English.

Send logs to Rudow, then ask questions like "why did checkout errors spike this morning?" from the dashboard, Slack, or any MCP-compatible AI agent (Claude Code, Cursor, Windsurf).

  • Read-only by design — Rudow never mutates, rewrites, or acts on your systems. It reads logs. That's it.
  • Flat pricing — monthly caps, never usage meters. Limits are caps, not overage charges.
  • Free-forever tier — the Hobby plan is free, no credit card, no time limit.
  • MCP server — claude mcp add --transport http rudow https://mcp.rudow.ai/mcp

Batches log entries and ships them to the ingest API.

Homepage: https://rudow.ai · Documentation: https://rudow.ai/docs

Install

pip install rudow

Quick Start

from rudow import create_logger

logger = create_logger({
    "api_key": "your-api-key-here",
})

logger.info("Server started", {"port": 8000})
logger.error("Database connection failed", {"error": "ECONNREFUSED"})

Configuration

Options passed to create_logger():

  • api_key (required): Your project's API key
  • endpoint: Ingest endpoint URL (defaults to https://api.rudow.ai/v1/ingest)
  • batch_size: Flush when this many entries are buffered (default: 20)
  • flush_interval_ms: Flush at most this often in milliseconds (default: 2000)
  • source: Logical source label (default: "backend")
  • max_buffer_size: Max entries kept in memory (default: 10000)
  • max_retries: Send attempts per flush before re-queueing (default: 4)
  • retry_backoff_ms: Base delay for exponential backoff (default: 500)
  • gzip_threshold: Compress payloads larger than this (bytes, 0 to disable, default: 1024)
  • persist_path: File path for crash-durable buffering (optional)
  • flush_on_exit: Auto-flush on SIGTERM/SIGINT (default: True)
  • fallback_to_stderr: Print undelivered logs to stderr (default: True)
  • enable_metrics_heartbeat: Send periodic metrics (default: True)
  • metrics_heartbeat_ms: Metrics interval in milliseconds (default: 15000)

Log Levels

The logger supports these levels:

  • debug(message, attributes)
  • info(message, attributes)
  • warn(message, attributes)
  • error(message, attributes)
  • fatal(message, attributes)

The generic log(level, message, attributes) method is also available.

Structured Events

The SDK supports rich structured event types:

HTTP Requests

Record completed HTTP requests with timing and status:

from rudow import record_http_request, HttpRequestEvent

record_http_request(logger, HttpRequestEvent(
    method="GET",
    route="/api/users",
    status=200,
    duration_ms=125.5,
    extra={"user_id": "user123"}  # Optional context
))

Exceptions

Record exceptions with stack traces:

from rudow import record_exception, ExceptionEvent

try:
    do_something()
except Exception as e:
    record_exception(logger, ExceptionEvent(
        error=e,
        method="POST",
        route="/api/process",
        status=500,
        extra={"request_id": "req-123"}
    ))

Metrics

Periodically emit process metrics (uptime, memory):

from rudow import start_metrics_heartbeat

stop = start_metrics_heartbeat(logger, interval_ms=15000)

# Later, to stop:
stop.set()

Durability

  • Batching: Entries are buffered and sent every 2 seconds or when 20 entries accumulate
  • Retries: Failed sends are retried with exponential backoff
  • Persistence: With persist_path set, undelivered entries survive process restarts
  • Graceful shutdown: Automatic flush on exit; call logger.flush() to ensure delivery

Example with FastAPI

See examples/fastapi-app/ for a complete example application.

from fastapi import FastAPI
from fastapi.responses import JSONResponse
from rudow import create_logger, record_http_request, record_exception, HttpRequestEvent, ExceptionEvent
import os
import time

app = FastAPI()
logger = create_logger({"api_key": os.environ.get("RUDOW_API_KEY", "test-key")})

@app.middleware("http")
async def log_requests(request, call_next):
    start = time.time()
    try:
        response = await call_next(request)
        duration_ms = (time.time() - start) * 1000
        
        # Record structured HTTP event
        record_http_request(logger, HttpRequestEvent(
            method=request.method,
            route=request.url.path,
            status=response.status_code,
            duration_ms=duration_ms
        ))
        return response
    except Exception as exc:
        duration_ms = (time.time() - start) * 1000
        record_exception(logger, ExceptionEvent(
            error=exc,
            method=request.method,
            route=request.url.path,
            extra={"duration_ms": duration_ms},
        ))
        raise

@app.get("/api/users")
async def get_users():
    logger.info("Fetching users", {"endpoint": "/api/users"})
    return {"users": []}

@app.exception_handler(Exception)
async def exception_handler(request, exc):
    record_exception(logger, ExceptionEvent(
        error=exc,
        method=request.method,
        route=request.url.path,
        status=500,
    ))
    return JSONResponse(status_code=500, content={"error": "Internal server error"})

License

MIT

Metadata

Release files for rudow 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rudow 0.3.0
File Size Uploaded Provenance Actions
rudow-0.3.0.tar.gz 9.3 kB Without provenance Details for rudow-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rudow 0.3.0
File Interpreter ABI Platform Actions
rudow-0.3.0-py3-none-any.whl Python 3 none any Details for rudow-0.3.0-py3-none-any.whl

Total release size: 18.4 kB

Release files / rudow-0.3.0.tar.gz

Download URL rudow-0.3.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a04a6cddcb8c4b90bab74ee991582ce1adf12d38ded46809f922123ba875530b
BLAKE2b-256 checksum
How to use checksums
2111647057b37d5bdadd84dcb4582ad9f757d7b64539faa656fc56ab6fb4ad0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / rudow-0.3.0-py3-none-any.whl

Download URL rudow-0.3.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c26f023dc842f2a909a2089bdeb490aa654a107d798c12897017917fde678bce
BLAKE2b-256 checksum
How to use checksums
8deec07308001e369cfb3c57faf500fe8395b6eb2117c51ee0ace61d47aba7d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for rudow 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page