Skip to content
eyelockPublic

About

Your named reporting: the factory's observation plane on OpenTelemetry. Spool, collector, storage and dashboards.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ynr

Your named reporting: the observation plane for the ynh, ynm and ynf software factory, built on OpenTelemetry. Tools write telemetry into a crash-safe file spool; ynr serve reads it, stamps where each record came from, and ships it on. The design is in the ADRs, and the build order in ADR-009.

Documentation: https://eyelock.github.io/ynr/ has a tutorial, how-to guides, a reference and explanations. It is built from docs/ on main, so it shows the latest release.

Status: the walking skeleton's four slices are done. ynr serve reads the spool and ships stamped batches to a store, by default a folder on this machine, and can also forward to an OTLP/HTTP endpoint such as a local Jaeger. ynr relay receives a vendor CLI's OTLP, such as Claude Code's, into a spool folder. The full build adds DuckDB: ynr serve keeps a hot tier, compacts the store and writes rollups, ynr query asks it (or reads the store directly), and --ui serves a local dashboard. ynr central does the same over a shared S3 store, with compaction leases and a dashboard behind OpenID Connect sign-in. ynr learns the tools' telemetry registries, and ynr conformance checks a tool against the instrumentation contract.

Install

brew install eyelock/tap/ynr

This is the full build, with DuckDB. The slim build is a separate download on each release; see Install ynr.

Try it

make build
docker run --rm -d --name jaeger -p 16686:16686 -p 4318:4318 jaegertracing/jaeger:latest
./bin/ynr serve --upstream http://localhost:4318      # foreground; Ctrl-C to stop; also stores batches
./bin/ynr info                                        # in another terminal

ynr serve creates the spool at $XDG_STATE_HOME/ynr/spool (or ~/.local/state/ynr/spool) on first start. Anything a tool writes into its local/ folder as OTLP JSON lines then appears in Jaeger at http://localhost:16686.

Ask the store what happened, with the full build (DuckDB, so cgo):

make full
./bin/ynr-full query                                  # the named queries
./bin/ynr-full query runs                             # runs by outcome for each lane, last day
./bin/ynr-full query cost --since 7d --format json    # cost and tokens by model
./bin/ynr-full query item github.com/eyelock/ynr#12   # one work item's history
./bin/ynr-full query trace <trace id>                 # one trace as a tree

The spool exporters

Other tools write the spool with one of two packages, each depending only on its language's OpenTelemetry SDK and on nothing else in ynr. ynr's tests read what both write.

  • Go: spoolexporter/, the module github.com/eyelock/ynr/spoolexporter, released with tags spoolexporter/vX.Y.Z. It can also send the same OTLP/JSON to an operator's OTEL_EXPORTER_OTLP_* endpoint over OTLP/HTTP (net/http only, no gRPC or protobuf).
  • npm: spoolexporter/js/, the package @eyelock/otel-spool-exporter, published to GitHub Packages by the same tags. Installing it needs an .npmrc with @eyelock:registry=https://npm.pkg.github.com and a token that can read packages. It writes the spool only; it has no network exporter yet.

Develop

make check    # formatting, vet, lint, and tests with the race detector, in both builds
make build    # bin/ynr, plus linux builds for images
make full     # bin/ynr-full, the full build with DuckDB

go.work builds ynr against the spool exporter in this repository; go.mod requires its last release, which is what go install github.com/eyelock/ynr/cmd/ynr@<version> uses. After releasing a new spoolexporter/v*, raise that requirement.

Work goes on feature branches into develop by pull request; main moves only by release (gitflow, as in ynh, ynm and ynf). The repository's own settings are Terraform in infra/.

Contributing and license

See CONTRIBUTING.md, the Code of Conduct and SECURITY.md. ynr is released under the MIT License.

About

Your named reporting: the factory's observation plane on OpenTelemetry. Spool, collector, storage and dashboards.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages