Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f0a4798
feat: bootstrap repository with CI/CD, linting, and release config
qnen May 7, 2026
3636c35
feat: add Go module, package structure, and Makefile
qnen May 7, 2026
538baab
fix: address review feedback
qnen May 7, 2026
9dd78f6
Merge pull request #1 from LerianStudio/feat/repo-bootstrap
qnen May 7, 2026
1b0d718
chore(deps): add observability dependencies
qnen May 7, 2026
e5e9684
feat: migrate observability packages from lib-commons
qnen May 7, 2026
86bde89
chore(deps): add testify, mock, and yaml dependencies
qnen May 8, 2026
53d3f22
feat(middleware): migrate HTTP/gRPC telemetry middleware from lib-com…
qnen May 8, 2026
08e5804
feat(streaming): migrate streaming telemetry from lib-commons
qnen May 8, 2026
8ecd8f1
test: port unit test suite from lib-commons
qnen May 8, 2026
effe33c
feat(log): generate Logger mock via mockgen
qnen May 8, 2026
7c1789e
chore: add Claude Code project context
qnen May 8, 2026
2fe6f48
chore(deps): bump golang.org/x/net to v0.53.0
qnen May 8, 2026
2f95661
fix(middleware): address CodeRabbit review on new middleware package
qnen May 8, 2026
e58a97b
fix(streaming): add nolint directives for scaffolded symbols
qnen May 8, 2026
ffce413
test: address CodeRabbit review on ported test suite
qnen May 8, 2026
10646b0
feat(streaming): remove streaming package from lib-observability
qnen May 8, 2026
37da785
Merge pull request #2 from LerianStudio/feat/migrate-from-lib-commons
qnen May 12, 2026
fa0c8df
fix(ci): align workflows with shared workflows v1.28.12 boilerplate
bedatty May 13, 2026
d15cf82
fix(ci): address CodeRabbit feedback on release branches and dependab…
bedatty May 13, 2026
cdadd35
fix(ci): pin go_version to 1.25.9 to satisfy go.mod toolchain require…
bedatty May 13, 2026
37a5825
Merge pull request #3 from LerianStudio/ci/refresh-shared-workflows-1…
bedatty May 13, 2026
f9a4f9b
chore(ci): prepare lib-observability stable gates
gandalf-at-lerian May 15, 2026
c2a45da
fix(ci): handle GOBIN in gosec fallback
gandalf-at-lerian May 15, 2026
d536373
fix(log): decouple error field key from level strings
gandalf-at-lerian May 15, 2026
2c88d0e
Merge pull request #4 from LerianStudio/chore/stable-prep-ci-lint
qnen May 15, 2026
136f208
feat: add logging middleware
gandalf-at-lerian May 15, 2026
949b0ef
fix: address logging review feedback
gandalf-at-lerian May 15, 2026
931b13c
Merge pull request #5 from LerianStudio/feat/logging-middleware
qnen May 15, 2026
8131921
test: raise lib-observability unit coverage
gandalf-at-lerian May 15, 2026
13312f2
fix: address stable release review feedback
gandalf-at-lerian May 15, 2026
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [LerianStudio]
50 changes: 50 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 2
updates:
# Go modules
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "08:00"
timezone: "America/Sao_Paulo"
target-branch: "develop"
open-pull-requests-limit: 10
labels:
- "deps"
commit-message:
prefix: "chore"
include: "scope"
groups:
go-dependencies:
patterns:
- "*"

# Pinned third-party GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "08:00"
timezone: "America/Sao_Paulo"
target-branch: "develop"
open-pull-requests-limit: 10
labels:
- "deps"
- "ci"
commit-message:
prefix: "chore"
include: "scope"
ignore:
# LerianStudio internal actions are pinned intentionally
- dependency-name: "LerianStudio/*"
groups:
actions-core:
patterns:
- "actions/*"
security-actions:
patterns:
- "github/codeql-action*"
- "aquasecurity/trivy-action"
- "securego/gosec"
99 changes: 99 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Pull Request Labeler configuration
#
# Labels are aligned with the pr_title_scopes in pr-validation.yml.

# Assertion helpers
assert:
- changed-files:
- any-glob-to-any-file: 'assert/**/*'

# Shared constants
constants:
- changed-files:
- any-glob-to-any-file: 'constants/**/*'

# Structured logging primitives
log:
- changed-files:
- any-glob-to-any-file: 'log/**/*'

# Metrics instrumentation
metrics:
- changed-files:
- any-glob-to-any-file: 'metrics/**/*'

# HTTP/gRPC observability middleware
middleware:
- changed-files:
- any-glob-to-any-file: 'middleware/**/*'

# Log/data redaction utilities
redaction:
- changed-files:
- any-glob-to-any-file: 'redaction/**/*'

# Runtime introspection
runtime:
- changed-files:
- any-glob-to-any-file: 'runtime/**/*'

# Distributed tracing
tracing:
- changed-files:
- any-glob-to-any-file: 'tracing/**/*'

# Zap logger integration
zap:
- changed-files:
- any-glob-to-any-file: 'zap/**/*'

# Top-level public API (observability.go, system.go, context_helpers.go)
core:
- changed-files:
- any-glob-to-any-file:
- 'observability.go'
- 'system.go'
- 'context_helpers.go'

# Build and tooling scripts
scripts:
- changed-files:
- any-glob-to-any-file:
- 'scripts/**/*'
- 'Makefile'

# Application and tooling configuration
config:
- changed-files:
- any-glob-to-any-file:
- '.golangci.yml'
- '.releaserc.yml'
- '.goreleaser.yml'
- '.ignorecoverunit'

# Continuous integration pipelines and shared workflows
ci:
- changed-files:
- any-glob-to-any-file: '.github/workflows/**/*'

# Markdown docs and llms.txt context files
docs:
- changed-files:
- any-glob-to-any-file:
- '**/*.md'
- 'docs/**/*'
- 'llms.txt'

# Unit, integration and end-to-end tests
tests:
- changed-files:
- any-glob-to-any-file:
- '**/*_test.go'
- 'tests/**/*'

# Go module dependencies
deps:
- changed-files:
- any-glob-to-any-file:
- 'go.mod'
- 'go.sum'
148 changes: 148 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Label definitions for lib-observability
# Synced via .github/workflows/routine.yml -> shared labels-sync.

# ── Scopes (aligned with .github/labeler.yml) ─────────────────────────────────

- name: assert
color: "1d76db"
description: Assertion helpers

- name: constants
color: "0e8a16"
description: Shared constants

- name: log
color: "fbca04"
description: Structured logging primitives

- name: metrics
color: "c5def5"
description: Metrics instrumentation

- name: middleware
color: "5319e7"
description: HTTP/gRPC observability middleware

- name: redaction
color: "7c3aed"
description: Log/data redaction utilities

- name: runtime
color: "0052cc"
description: Runtime introspection

- name: tracing
color: "f9d0c4"
description: Distributed tracing

- name: zap
color: "bfd4f2"
description: Zap logger integration

- name: core
color: "0db7ed"
description: Top-level public API surface

- name: scripts
color: "fef2c0"
description: Build and tooling scripts

- name: config
color: "d4a017"
description: Application and tooling configuration

- name: ci
color: "2088FF"
description: Continuous integration pipelines

- name: docs
color: "0075ca"
description: Documentation, llms.txt and markdown content

- name: tests
color: "00ADD8"
description: Unit, integration and end-to-end tests

- name: deps
color: "ededed"
description: Go module dependencies (usually opened by Dependabot)

# ── Change types ──────────────────────────────────────────────────────────────

- name: bug
color: "d73a4a"
description: Something is not working as expected

- name: enhancement
color: "a2eeef"
description: New feature or improvement request

- name: dependencies
color: "ededed"
description: Dependency updates (Dependabot)

- name: github-actions
color: "2088FF"
description: Updates to GitHub Actions dependencies

- name: breaking-change
color: "b60205"
description: Callers must update their integration after this change

- name: skip-changelog
color: "ffffff"
description: This change does not need a changelog entry

# ── PR size ───────────────────────────────────────────────────────────────────

- name: size/XS
color: "3CBF00"
description: "PR changes < 50 lines"

- name: size/S
color: "5D9801"
description: "PR changes 50–199 lines"

- name: size/M
color: "7F7203"
description: "PR changes 200–499 lines"

- name: size/L
color: "A14C05"
description: "PR changes 500–999 lines"

- name: size/XL
color: "C32607"
description: "PR changes ≥ 1000 lines — consider splitting"

# ── Triage and stale management ───────────────────────────────────────────────

- name: triage
color: "e4e669"
description: Needs initial assessment

- name: stale
color: "795548"
description: No recent activity — will be closed if not updated

- name: no-stale
color: "fef2c0"
description: Exempt from stale auto-close

- name: work-in-progress
color: "ffa500"
description: Active work — exempt from stale auto-close

- name: pinned
color: "d4a017"
description: Pinned discussion/tracker — exempt from stale auto-close

# ── Automation ────────────────────────────────────────────────────────────────

- name: automated
color: "ededed"
description: Opened by automation (release backmerges, etc.)

- name: backmerge
color: "5319e7"
description: Backmerge PR (main → develop after release)
59 changes: 59 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="https://github.com/LerianStudio.png" width="72" alt="Lerian" /></td>
<td><h1>Lib Observability</h1></td>
</tr>
</table>

---

## Description

<!-- Summarize what this PR changes and why. Mention the package(s) affected
(log, metrics, tracing, middleware, redaction, zap, runtime, assert, ...). -->

## Type of Change

- [ ] `feat`: New feature or capability
- [ ] `fix`: Bug fix
- [ ] `perf`: Performance improvement
- [ ] `refactor`: Internal restructuring with no behavior change
- [ ] `docs`: Documentation only (README, docs/, inline comments)
- [ ] `style`: Formatting, whitespace, naming (no logic change)
- [ ] `test`: Adding or updating tests
- [ ] `ci`: CI pipeline or workflow changes
- [ ] `build`: Build system, Go module dependencies
- [ ] `chore`: Maintenance, config, tooling
- [ ] `revert`: Reverts a previous commit
- [ ] `BREAKING CHANGE`: Consumers must update their integration

## Breaking Changes

<!-- If applicable, describe exactly what breaks (public API signatures,
exported types, default behaviors, configuration keys) and how downstream
services should migrate. Remove this section if not applicable. -->

None.

## Testing

- [ ] `make test` passes
- [ ] `make test-int` passes if integration paths are exercised
- [ ] `make lint` passes
- [ ] Coverage threshold respected (see Go Combined Analysis)

**Test evidence / Actions run:** <!-- Optional: link to a CI run or screenshot -->

## Architectural Checklist

- [ ] No `panic()` in production paths — uses `assert` helpers or wrapped errors
- [ ] Timestamps use `time.Now().UTC()`
- [ ] Errors wrapped with `%w`
- [ ] Public API additions documented (godoc + README if user-facing)
- [ ] No leaking of context or goroutines (instrumentation must be safe under load)
- [ ] Backwards-compatible by default; breaking changes flagged above
- [ ] No `lib-commons` import (circular — see CLAUDE.md)

## Related Issues

Closes #
Loading
Loading