effect-wide-events

Guides wide-event instrumentation strategy for OpenTelemetry span annotations in Effect applications.

1|Updated Aug 24, 2026
One-click install
npx skills add https://github.com/lambdasolver2/opencode-effect-harness --skill effect-wide-events-lambdasolver2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-wide-events
Source: https://github.com/lambdasolver2/opencode-effect-harness/tree/main/packages/module-typescript/assets/skills/effect-wide-events
Command: npx skills add https://github.com/lambdasolver2/opencode-effect-harness --skill effect-wide-events-lambdasolver2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Traditional logging scatters context across many small log lines, making incident debugging a slow grep-based search. This Skill provides a mental model for designing wide events—one comprehensive, high-dimensionality event per request—so observability data is optimized for querying rather than writing. ## Core Features & Use Cases - Annotation Strategy: Defines which context dimensions (identity, user, business, performance, outcome) to attach to every span using Effect.annotateCurrentSpan or Effect.annotateLogs. - Anti-Pattern Detection: Identifies scattered console.log chains, low-dimensionality spans, and technical-only instrumentation missing user and business context. - Queryability Test: Verifies instrumentation can answer questions like "failures where tier=premium and feature.new_flow=true" before shipping. - Use Case: When instrumenting a checkout service, apply this Skill to decide span attributes covering user tier, cart value, feature flags, and error codes so a single structured query can diagnose premium-user failures. ## Quick Start Ask the AI to review the span annotations in your Effect service and recommend which wide-event context fields to add for better incident queryability.

Frequently Asked Questions about effect-wide-events

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

FAQPage Schema
What are wide events in observability?

Wide events (canonical log lines) are single comprehensive records per request containing all relevant context, replacing many scattered log lines. They optimize for structured querying instead of text searching, letting one query answer questions like checkout failures for premium users on a new feature flow.

How do I add wide-event context to spans in Effect?

Use Effect.annotateCurrentSpan or Effect.annotateLogs to attach context to the active span. Include identity, user, business, performance, and outcome fields; extra log-message arguments go into the message body and are not auto-indexed as queryable dimensions.

Does OpenTelemetry automatically add business context to spans?

No. OpenTelemetry is a protocol and SDK for standardizing telemetry collection and delivery; it does not decide what gets logged or add business context automatically. You must explicitly annotate spans with user, business, and outcome data.

What is tail sampling and when should I use it?

Tail sampling retains telemetry selectively after a request completes: keep 100% of errors, requests slower than p99, and VIP users, while sampling only 1-5% of fast successful requests. This preserves debugging value while controlling observability costs.

Why are my logs hard to query during incidents?

Logs optimized for writing scatter context across many low-dimensionality lines, forcing grep-style searches across services. Wide events fix this by attaching all context to one high-dimensionality event per request, enabling structured queries.