eyes-subscriber 0.1.3

Tracing subscriber for sending traces to Eyes (eyes.coreyja.com)
Documentation

Eyes Subscriber

A tracing subscriber for sending structured trace data to Eyes (eyes.coreyja.com).

Quick Start

use eyes_subscriber::EyesSubscriberBuilder;
use tracing_subscriber::prelude::*;
use uuid::Uuid;

# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let org_id = Uuid::parse_str("your-org-id")?;
let app_id = Uuid::parse_str("your-app-id")?;

// Simplest: auto-configure from environment variables
let (eyes_layer, shutdown_handle) = EyesSubscriberBuilder::build_from_env(org_id, app_id)?;

tracing_subscriber::registry()
    .with(eyes_layer)
    .init();

// Your application code here
tracing::info!("Application started");

// Graceful shutdown
shutdown_handle.shutdown().await?;
# Ok(())
# }

Configuration

The subscriber can be configured in several ways:

  1. Environment variables (recommended):
    • EYES_URL: Override the default URL (defaults to https://eyes.coreyja.com)
    • EYES_TRANSPORT: Set to "websocket" or "ws" for WebSocket, defaults to HTTP
  2. Default production: Use new_with_default() for https://eyes.coreyja.com
  3. Custom URL: Use new() with any URL for self-hosted instances

Transports

Three transport methods are available:

  • HTTP (default): Reliable, request/response based
  • BatchingHttp: HTTP with client-side batching for high-volume use cases
  • WebSocket: Lower latency, persistent connection