Skip to content

Introduction

Orphnet Logging is an edge-native structured logging API built on Cloudflare Workers. It provides workspace-scoped, structured log ingestion with multi-backend storage, real-time querying, and a client SDK that drops into any Hono or JavaScript application.

Key Features

  • Edge-native -- Runs on Cloudflare Workers with D1, KV, and R2 for storage, querying, and archival
  • Workspace-scoped -- Every log belongs to a workspace and project, with role-based access control
  • Multi-auth -- Email/password, magic link, GitHub OAuth, and Google OAuth
  • Structured logging -- Built-in categories (AI, HTTP, system) plus custom types
  • Smart query routing -- KV for recent logs (<24h), D1 for historical queries
  • Queue-based ingestion -- Logs are queued for async processing, never blocking your response
  • Client SDK -- Hono middleware with automatic HTTP logging, standalone logger, and multiple transports

Three Lines to Start Logging

typescript
import { createLoggingMiddleware } from '@orphnet/logging-api-client'

app.use('*', createLoggingMiddleware({
  apiUrl: 'https://api.logvista.orph.dev',
  apiKey: 'sk_your_workspace_key',
}))

Every HTTP request through your Hono app is now automatically logged with method, path, status code, and duration.

Who Is Orphnet Logging For?

Orphnet Logging is designed for developers building applications on Cloudflare Workers or any JavaScript/TypeScript runtime who need:

  • Centralized structured logging across multiple services
  • AI interaction logging with prompt/inference/step tracking
  • HTTP request/response audit trails
  • Workspace-based team collaboration with fine-grained permissions

Architecture at a Glance

Orphnet Logging follows a layered architecture:

  1. Client SDK sends logs via FetchTransport or BatchTransport
  2. API layer validates requests and authenticates via JWT or API key
  3. Queue decouples ingestion from storage writes
  4. Three backends handle different access patterns:
    • KV -- fast reads for recent data (<24h)
    • D1 -- SQL queries for historical data
    • R2 -- NDJSON archives for long-term storage

Read the Architecture guide for detailed diagrams and explanations.

Core Concepts

ConceptDescription
WorkspaceAn isolated environment for teams. Every project and API key belongs to a workspace.
ProjectA namespace for logs within a workspace. Each project can have multiple API keys.
API KeyA workspace- or project-scoped bearer token (sk_...) for authenticating log writes and queries.
LogPayloadThe structured body sent with each log -- see Log Types.
QueueCloudflare Queue that decouples HTTP acceptance from storage writes.
BackendOne of three storage targets: KV (hot cache), D1 (query), R2 (archive).

Next Steps

LogVista — Edge-native structured logging API