Umbral
Back to plugin directory
UL

Umbral Logs

Official by Umbral contributors

request logs, trusted proxy IPs, sampling, OpenTelemetry

official stable

About

When something breaks at 3am, the difference between a five-minute fix and a two-hour hunt is the log line. Umbral Logs gives you structured, per-request logging with the real client IP resolved from your trusted-proxy setup — so behind nginx you log the caller, not the proxy, and never a header an attacker can forge to poison your logs. Sampling and status filters keep the volume sane on a busy service.

Install

cargo add umbral-logs

Wire it up

use umbral::prelude::*;
use umbral_logs::LogsPlugin;

let app = App::builder()
    .database("default", pool)
    .plugin(
        LogsPlugin::default()
            .exclude_prefix("/static")   // don't log asset traffic
            .min_status(400),            // only capture errors on this route set
    )
    .build()?;

Target: sample a high-traffic endpoint

On an endpoint doing thousands of req/s you don't want every line — sample a fraction and keep the signal without the cost.

LogsPlugin::default().sample_rate(0.05);  // log 5% of requests

What you get

  • Structured, per-request log lines
  • Real client IP from your trusted-proxy config (not a forgeable header)
  • Exclude noisy prefixes (/static, health checks)
  • Sample rate + minimum-status filters to control volume
  • Pairs with the framework's trusted-proxy client-IP resolution

Usage

Mount `LogsPlugin::default()` and tune it: `.exclude_prefix(...)` to drop asset noise, `.min_status(n)` to capture only errors, and `.sample_rate(f)` to thin a high-traffic route. The client IP comes from your trusted-proxy config, so it's the caller — never a forgeable header.

plugin setup
cargo add umbral-logs

Feature tracker

Per-feature shipping status, recorded in the directory.

5 of 6 shipped
Structured request logs shipped Stable

Per-request records with method, path, status, and latency.

Trusted-proxy client IP shipped Stable

Logs the real caller from trusted proxy configuration.

Exclude prefixes shipped Stable

Drop noisy paths such as assets and health probes.

Sampling shipped Stable

Capture a fraction of high-volume traffic.

Minimum status filter shipped Stable

Only log responses at or above a configured status code.

OpenTelemetry bootstrap in progress Beta

Optional OTLP tracing setup with service-name configuration.

Compatibility

Declared support per Umbral version and database backend.

No compatibility rows declared yet.

Community notes

0 notes in the discussion thread.

No notes yet. Be the first to share how this plugin works for you.

Reported issues

Bugs and abuse reports filed against this plugin.

Report an issue

No open issues

No issues have been reported against this plugin. Track upstream bugs on the maintainer's tracker, or report a directory problem to the Umbral team.