Skip to content
Back to skills

Api Tracing Otel

ASecurity

Generate OpenTelemetry instrumented handlers and services with span creation, attributes (tenantId, actorId, operation), and error recording. Use when adding observability or distributed tracing.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
toolsbashapiperformance

Works with

  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill api-tracing-otel --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Tracing Otel?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Tracing Otel
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-api-tracing-otel/badge)](https://www.skillsdirectory.com/skills/david-li0406-api-tracing-otel)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-tracing-otel
description: Generate OpenTelemetry instrumented handlers and services with span creation, attributes (tenantId, actorId, operation), and error recording. Use when adding observability or distributed tracing.
allowed-tools:
  - Read
  - Write
  - Edit
  - Glob
  - Grep
---

# OpenTelemetry Tracing

## Purpose

Generate command/query handlers and services with OpenTelemetry instrumentation for distributed tracing, including span creation, attributes, and error recording.

## When to Use

- Adding observability to CQRS handlers
- Creating instrumented services
- Implementing distributed tracing
- Performance monitoring

## What It Generates

### Instrumented Handler Template

```
apps/api/src/modules/{feature}/commands/{operation}/{operation}.handler.ts
apps/api/src/modules/{feature}/services/{feature}.service.ts
```

## Patterns Enforced

### Span Creation

All handlers create spans:

- Span name: `{feature}.{operation}`
- Attributes: tenantId, actorId, operation, resource
- Error recording on exceptions

### Span Attributes

Standard attributes:

- `tenant.id` - Tenant ID
- `actor.id` - User performing action
- `operation.name` - Operation name
- `operation.type` - command/query/event
- `resource.id` - Resource being operated on
- `error.type` - Error type (on failure)

### Span Status

- OK on success
- Error on failure (with error recording)

## Usage Example

```bash
/skill tracing-otel --name=CreateUser --type=command
```

## Related Files

- [Feature CQRS](../../core/feature-cqrs/SKILL.md) - CQRS handlers with tracing
- [Cache Redis](../cache-redis/SKILL.md) - Cache operations with tracing

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…