effect-time-tracing-logging

Implement timeouts, tracing spans, and structured logging with Effect APIs.

5|Updated Nov 18, 2025
One-click install
npx skills add https://github.com/mepuka/effect-ontology --skill effect-time-tracing-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-time-tracing-logging
Source: https://github.com/mepuka/effect-ontology/tree/main/.claude/skills/effect-time-tracing-logging
Command: npx skills add https://github.com/mepuka/effect-ontology --skill effect-time-tracing-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Time with Clock/Duration, tracing spans, and structured logging. Use for time-based logic, deadlines, and observability.

Core Features & Use Cases

  • Time access via Clock and Duration
  • Timeouts and sleeps
  • Tracing spans with withSpan
  • Structured logging with logInfo/logError

Quick Start

Use Clock.currentTimeMillis and Effect.sleep to implement a timeout around a task and log progress with spans.

Frequently Asked Questions about effect-time-tracing-logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement timeouts for asynchronous tasks?

Timeouts guard asynchronous tasks by combining Clock to measure elapsed time and Duration to set limits. Use Effect.sleep with timeout logic to interrupt long-running operations and log when deadlines are exceeded, ensuring tasks complete within specified intervals.

What's the best way to add structured logging to effectful programs?

Structured logging in effectful programs uses logInfo and logError APIs to emit machine-readable logs with context. Pair logging with tracing spans via withSpan to correlate events across async boundaries and track latency, enabling observability across distributed task execution.

How do I trace latency in asynchronous operations?

Tracing spans with withSpan instrument async operations to measure latency end-to-end. Combine Clock.currentTimeMillis with Duration calculations inside spans to analyze performance, then export structured logs showing execution time and dependencies between concurrent tasks.

Can I use Clock and Duration for time-based control in concurrent code?

Clock provides millisecond-precision time access and Duration represents time intervals for concurrent code. Together they enable deadline-driven logic: access current time via Clock, calculate remaining Duration, and branch task execution based on time constraints in effectful programs.

When should I use tracing spans over simple logging?

Use tracing spans when you need to correlate multiple log events across async task boundaries and measure operation latency. Spans provide hierarchical context that simple logs lack, making them essential for observability when tasks spawn subtasks or call external services.

Do I need external dependencies for time-based deadlines and logging?

Time-based deadlines and logging are built into effectful program APIs through Clock, Duration, timeout, withSpan, and logInfo/logError. No external dependencies are required; the Skill uses only core effect utilities for implementing time control and structured instrumentation.