Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/jolly-bear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"transports/axiom": major
---

Initial release.
12 changes: 11 additions & 1 deletion .claude/rules/git-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ The rule exists to make that class of bug impossible by construction. If the loc
- Use `git rebase --onto origin/<parent>` form when the local branch's lower commits are squash-merge ancestors that won't replay cleanly. Replaying just the work-in-this-PR's commits keeps the rebase trivial.
- After the rebase succeeds, run the build / tests once before pushing. A rebase can produce silent semantic conflicts that compile but break behavior.

## Branch policy

**Never commit directly to `main`.** Always create a feature branch from current main, work on it, then open a PR that targets main. This applies equally to:
- Feature development
- Bug fixes
- Documentation updates
- Configuration changes

The only exception is if you're a maintainer merging a reviewed PR (via squash-merge as configured in GitHub).

## What this rule does NOT cover

- Force-pushing to `main` or other shared protected branches. Don't.
- Force-pushing to other shared protected branches. Don't.
- Resolving genuine merge conflicts during the rebase. Read both sides; never `git checkout --theirs/ours` blindly.
- Skipping the rule with `--no-verify`. The rule is the rule even when the hook isn't enforcing it.

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ Thumbs.db

# Claude Code runtime state
.claude/scheduled_tasks.lock
docs/superpowers/plans/
24 changes: 23 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ loglayer-go/
│ ├── logging-api/ Per-method API guides
│ ├── transports/ Per-transport guides + _partials/
│ └── ... Top-level pages (index, intro, configuration, etc.)
├── transport/ BaseTransport / BaseConfig
├── transport/ BaseTransport / BaseConfig / helpers / transporttest
├── transports/ Built-in transports
│ ├── axiom/ Wraps github.com/axiomhq/axiom-go
│ ├── blank/ Delegates to user-supplied function (template for new transports)
│ ├── console/ Plain fmt.Println-style
│ ├── pretty/ Colorized terminal output (uses fatih/color)
│ ├── structured/ JSON-per-line
Expand Down Expand Up @@ -93,6 +95,9 @@ go test -tags=livetest -race ./transports/otellog/ ./plugins/oteltrace/
cd plugins/datadogtrace/livetest && go test -race ./...
```

# Axiom: build-tag gated, lives in the transport module (cheap deps).
go test -tags=livetest ./transports/axiom/

Two patterns are in use, picked by dependency weight:

- **Build-tag gating in the main module** (`//go:build livetest`): used
Expand Down Expand Up @@ -164,6 +169,12 @@ multi-core box.

Releases are managed by [monorel](https://monorel.disaresta.com), a changesets-style release tool built specifically for the layout this repo uses (bare `vX.Y.Z` for the root, `<path>/vX.Y.Z` for sub-modules). The release signal is explicit per-PR: `.changeset/<name>.md` files declare which packages release at what bump level. Don't `git tag` manually.

Install monorel once:

```sh
go install monorel.disaresta.com/cmd/monorel@latest
```

- **Main module** tags as `v1.X.Y`. Sub-modules tag as
`transports/otellog/v1.X.Y`, `plugins/oteltrace/v1.X.Y` (Go module
convention). Configured in `monorel.toml` at the repo root.
Expand Down Expand Up @@ -209,6 +220,8 @@ To add `<path>` (e.g. `transports/foo` or `plugins/bar`):
3. Register the module in `monorel.toml` with a `[packages."<path>"]` block following the existing siblings as a template (`tag_prefix`, `path`, `changelog` all set to the path-derived values).
4. Add the path to `scripts/foreach-module.sh` (`ALL_MODULES`, `SHIPPED_MODULES`, and the `test` op's hardcoded list).
5. Add the path to `go.work`'s `use` block.

6. **Important:** For fresh modules (new transports, plugins, or integrations), use `:major` for the initial release to establish v1.0.0. Subsequent releases will bump to `:minor` for new features or `:patch` for bug fixes.
6. Run `bash scripts/foreach-module.sh tidy` to settle indirect deps and `bash scripts/foreach-module.sh test` to confirm.
7. Open the PR. **No release happens from this PR** — `monorel.toml` registers the package but registration alone doesn't trigger a release.
8. Cut the first release in a follow-up PR by adding a changeset:
Expand Down Expand Up @@ -401,3 +414,12 @@ These exist in upstream loglayer but are not in the Go v1:
- Mixins (the `useLogLayerMixin` augmentation pattern)

If you're asked to add one of these, propose the design first, do not silently start implementing.

## Git Workflow

**Never commit directly to `main`.** Always create a feature branch from current main, work on it, then open a PR that targets main. This applies to all changes: features, bug fixes, docs updates, configuration tweaks.

The full workflow is in [`.claude/rules/git-workflow.md`](.claude/rules/git-workflow.md):
- Rebase your branch onto current main before opening a PR
- Always run code review (`/superpowers:requesting-code-review`) before committing final work
- Documentation changes need a separate review with framing "act as a senior Go developer encountering this for the first time"
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Thanks for considering a contribution. The essentials:
| lefthook | Drives the pre-commit, commit-msg, and pre-push git hooks. | `go install github.com/evilmartians/lefthook@latest` |
| staticcheck | Pre-commit lint that mirrors CI. Hook hard-fails without it. | `go install honnef.co/go/tools/cmd/staticcheck@latest` |
| Bun | Runs the conventional-commit linter and builds the docs site. The commit-msg hook hard-fails without `bun` + `node_modules`. | <https://bun.sh/> |
| monorel | Manages releases across all modules via changesets. Required for creating releases. | `go install monorel.disaresta.com/cmd/monorel@latest` |
| govulncheck (optional) | Advisory vuln scan; the SessionStart hook surfaces findings as session context. | `go install golang.org/x/vuln/cmd/govulncheck@latest` |

`go install` puts binaries in `$(go env GOPATH)/bin` (default `~/go/bin`). Make sure that directory is on your `PATH`, otherwise the git hooks silently skip when they can't find `lefthook` / `staticcheck`. If only `~/.local/bin` is on your `PATH`, symlink:
Expand Down Expand Up @@ -163,6 +164,11 @@ for the root, `<path>` for sub-modules (e.g. `transports/zerolog`,
`minor`, or `patch`. The body becomes the rendered changelog entry for
every package the changeset names.

For new transports, plugins, and integrations that are fresh modules,
the initial release should always be a **major version** (`:major`) to
indicate v1.0.0, following Go module conventions where the first
release establishes the major version number.

Hand-writing the file directly works too; the `monorel add` command is
just a generator.

Expand Down
11 changes: 6 additions & 5 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ gtag('config', '${gaMeasurementId}');`,
{
text: 'Cloud',
items: [
{ text: 'Axiom', link: '/transports/axiom' },
{ text: 'Datadog', link: '/transports/datadog' },
{ text: 'Google Cloud Logging', link: '/transports/gcplogging' },
{ text: 'Sentry', link: '/transports/sentry' },
Expand All @@ -168,20 +169,20 @@ gtag('config', '${gaMeasurementId}');`,
{
text: 'Other Transports',
items: [
{ text: 'HTTP', link: '/transports/http' },
{ text: 'File (Lumberjack)', link: '/transports/lumberjack' },
{ text: 'HTTP', link: '/transports/http' },
{ text: 'OpenTelemetry Logs', link: '/transports/otellog' },
],
},
{
text: 'Supported Loggers',
items: [
{ text: 'Zerolog', link: '/transports/zerolog' },
{ text: 'Zap', link: '/transports/zap' },
{ text: 'charmbracelet/log', link: '/transports/charmlog' },
{ text: 'log/slog', link: '/transports/slog' },
{ text: 'phuslu/log', link: '/transports/phuslu' },
{ text: 'logrus', link: '/transports/logrus' },
{ text: 'charmbracelet/log', link: '/transports/charmlog' },
{ text: 'phuslu/log', link: '/transports/phuslu' },
{ text: 'Zap', link: '/transports/zap' },
{ text: 'Zerolog', link: '/transports/zerolog' },
],
},
],
Expand Down
Loading
Loading