span-events-to-logs-migration

Installation
SKILL.md

Span Events to Logs Migration

Use this skill to migrate instrumentation from the deprecated Span Event API (AddEvent, RecordException) to the Logs API, following the OTEP 4430 deprecation plan.

Background

The OpenTelemetry project is deprecating Span.AddEvent and Span.RecordException in favor of emitting events and exceptions through the Logs API. The Span Event API is deprecated, but Span Events as a concept remain valid -- they are now emitted via logs that correlate to the active span.

See references/deprecation-plan.md for the full context.

Workflow

  1. Prepare before migrating.
  • check the project's OpenTelemetry SDK version supports log-based events (check the opentelemetry-manual-instrumentation skill's version index if available)
  • identify whether the project has a LoggerProvider configured; if not, one must be set up
  • determine if downstream consumers (backends, dashboards, alerts) depend on span events appearing in the span proto envelope
  1. Scan the codebase for span event usage.
  • search for AddEvent, add_event, addEvent, RecordException, record_exception, recordException, and language-specific variants
Related skills

More from niwoerner/opentelemetry-agent-skills

Installs
2
GitHub Stars
7
First Seen
Apr 3, 2026