Skip to content
Back to skills

Error Stacks

ASecurity

The bounded stack svcerr captures for server faults (Internal, Unknown, DataLoss, Unavailable), where it appears (exception.stacktrace, code.* call site, sfp1 grouping), what never carries one, and how to get a useful one.

  • 10 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 13, 2026
ai-agentsgo

Works with

  • cli

Security analysis

A100/100

Scanned November 13, 2026

npx -y skills add reliant-labs/forge --skill error-stacks --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Error Stacks?

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

Security grade badge for Error Stacks
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/reliant-labs-error-stacks/badge)](https://www.skillsdirectory.com/skills/reliant-labs-error-stacks)

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: observability/error-stacks
description: The bounded stack svcerr captures for server faults (Internal, Unknown, DataLoss, Unavailable), where it appears (exception.stacktrace, code.* call site, sfp1 grouping), what never carries one, and how to get a useful one.
---

# Observability: stacks for server faults

An issue for a server fault needs frames, and the log line's own call site (the
interceptor that wrote `rpc failed`) is not one. So `svcerr` captures a bounded
stack — 32 frames, 8 KiB, module-relative paths that survive `-trimpath` — where
a server fault is first built or first wrapped, and only for those:

| kind | stack |
|---|---|
| Internal, Unknown, DataLoss, Unavailable (constructors, or an unrecognised driver error meeting `svcerr.Wrap`) | captured, once, at the earliest wrap |
| every client-class kind, DeadlineExceeded, Aborted, Unimplemented, cancellations, `WithClass(…, ClassUser)` | never |

It rides the ERROR record, the span's exception event and the `log.error` event
as OTel `exception.stacktrace` in Go's traceback layout, and its innermost
application frame becomes `code.function.name` / `code.file.path` /
`code.line.number`, so the fingerprint groups the issue by where the failure began (a record that also carries its cause in `error` with no `exception.type` is further split by that cause; see `observability/query`). It
never reaches the client: it is not in the message, the metadata or the details.

Return `svcerr.Wrap` / `svcerr.WrapOr` from the handler, or build the error with
a constructor: an error first wrapped by the interceptor after the handler has
returned has no application frame, so it reports no stack (the log line says as
much as the stack would). `svcerr.StackOf(err)` is the reader for code that
builds its own telemetry.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.