Repository navigation
feat: Add logging, metrics, and checks for v0.1.0 - #2
Merged
Merged
Conversation
The repository holds a library that Apache-2.0 projects such as resource-metrics need to import, so it is licensed Apache-2.0 rather than the AGPL-3.0 used elsewhere in milo-os. The observability team owns it. Key changes: - replace the AGPL-3.0 license with the canonical Apache-2.0 text - add CODEOWNERS assigning everything to @milo-os/observability - add Claude settings enabling the datum plugins marketplace - ignore build output, editor files, and local Claude state Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A change that passes locally must never fail in CI, so GitHub CI runs a single command, task ci, and every version it depends on is pinned in the Taskfile rather than taken from the runner. Key changes: - add the go.miloapis.com/instrumentation module with a Go 1.25.0 floor, the lowest version its likely adopters use - add task ci: floor check, tidy, vet, golangci-lint, actionlint, and race-enabled tests on the floor and latest Go toolchains - pin GOTOOLCHAIN per task so a newer local Go cannot diverge from CI - run task ci as the only CI step, with task itself pinned Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every Go service wires its own logs and metrics, and the mistakes stay invisible: metrics registered on a registry the manager never serves, and label names that collide with the collection pipelines' own. Key changes: - add labels, generated from labels.yaml, naming subject, build, and reserved labels for metrics and log keys alike - add metrics constructors that register on controller-runtime's served registry, refuse reserved and build labels, and hold one definition per metric name; add Handler for servers that are not managers - add logging with controller-runtime's defaults minus sampling, UTC timestamps, and build versions on every line; it does not redact - add buildinfo for build_version and instrumentation_version, and the instrumentation_build_info metric - add instrumenttest checks that read source: AssertNothingStranded, AssertStandardLogger, and Lint - add a default task, generated-code checks, and a CI leg against the newest controller-runtime Closes #1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup-go sets GOTOOLCHAIN=local in CI, and Task does not override a variable already in the environment, so every `env:` pin was ignored there and all tests ran on the runner's Go. The newest controller-runtime leg failed because it needs Go 1.26. Key changes: - set GOTOOLCHAIN inline on each Go command instead of through `env:` - fail a test run whose Go version differs from the one it pins, so a silent override cannot recur Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ecv
approved these changes
Oct 13, 2026
mattdjenkinson
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Go services each wire their own logs and metrics, so metrics end up registered where nothing exports them and label names collide with the ones our collection pipelines set.
This is the first release of the shared library proposed in datum-cloud/enhancements#927. It creates metrics on the registry services actually serve, builds the standard logger, and defines one set of label names for both.
It also ships tests a service adds to fail when its metrics aren't exported or its logs bypass the standard logger. In scratch copies, locations and network-services-operator migrated with all checks and their own tests passing.
Test plan
Fixes #1
🤖 Generated with Claude Code