Skip to content

About

Shared observability contract for Devsy: envelope, error codes, redaction, provider conformance

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

devsy-signals

Shared observability contract for Devsy: the record envelope, error codes, attribute keys, trace context and redaction. Core, the runtime SDK, providers and Desktop pin released tags of this repository, so none of them depends on unreleased Core code.

Layout

Path Content
repo root Go module github.com/devsy-org/devsy-signals (stdlib only, Go 1.26 or newer); doc.go only
envelope/ Record envelope Go types, decoding and validation
codes/ Registered error codes, generated from schema/errors.yaml
attrkey/ Shared slog attribute keys
tracectx/ W3C trace context without the OpenTelemetry SDK
redact/ Redaction rules shared by every Devsy sink
schema/ Envelope and audit data JSON Schemas, errors.yaml, errors.published.yaml
fixtures/ Envelope and redaction fixtures, run by the Go tests
tools/ Separate Go module (Go 1.26 or newer): generators, the append-only registry check and schema tests
ts/ src/codes.ts, generated from schema/errors.yaml; the planned TypeScript package for Desktop, with no package.json yet

Use Go 1.27 for development. CI also tests the root module on Go 1.26.

Error registry

schema/errors.yaml lists every error code with its class, retry flag, exit code and a one-line summary. Codes are lowercase domain.reason, plus the standalone codes unknown, canceled and timeout. They are never renamed and never reused. The registry and inventory files are plain UTF-8 YAML data without a byte order mark, of at most 256 KiB: no anchors, aliases, tags or merge keys, and every mapping key is a string. A summary is one line of plain text: no control characters and no characters with the Unicode Default_Ignorable_Code_Point property (zero-width characters including U+200D, bidirectional controls, variation selectors, tag characters, U+3164, U+FFA0, U+FEFF). Emoji sequences that need a joiner or variation selector are refused. codes/codes_gen.go and ts/src/codes.ts are generated from it; do not edit them. After changing the registry run:

cd tools && go run ./cmd/gencodes

CI fails when the generated files differ from a fresh run. CI also runs go run ./cmd/checkpublished -base <sha> in tools, which keeps schema/errors.published.yaml append-only. On a pull request the base is the PR base commit; on a push to main it is the previous main commit (github.event.before), and the check is skipped when that is empty or the all-zero sha. A pull request run passes -require-base, so an empty base fails instead of skipping. If a historical registry or inventory file at the base is over the 256 KiB limit, the check fails with a "too large" error; a maintainer commit that also shrinks the file below the limit fixes it. The tools directory is a separate Go module, so the root module keeps no dependencies.

Versioning

Tags follow semver. Before v1.0.0, a minor release may break the Go API; the envelope v field changes only for a breaking wire change.

License

MPL-2.0. See LICENSE.

About

Shared observability contract for Devsy: envelope, error codes, redaction, provider conformance

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages