Skip to content

Refactor SDK to v0.8.4 with new Hub/Scope/Transport architecture#1

Merged
Polliog merged 3 commits intomainfrom
develop
Mar 22, 2026
Merged

Refactor SDK to v0.8.4 with new Hub/Scope/Transport architecture#1
Polliog merged 3 commits intomainfrom
develop

Conversation

@Polliog
Copy link
Copy Markdown
Contributor

@Polliog Polliog commented Mar 22, 2026

This pull request introduces several improvements and cleanup tasks across the codebase, focusing on documentation, configuration, CI workflow, linting, and removing obsolete code. The most significant changes are the major rewrite and expansion of the README.md, enhanced changelog documentation, improved linting configuration, CI workflow updates, and the removal of the obsolete batch.go implementation.

Documentation and Changelog Improvements:

  • README Revamp and Expansion:
    The README.md has been extensively rewritten for clarity and completeness. It now provides a better overview of features, clearer installation and configuration instructions, improved usage examples, explicit documentation of the Hub/Scope model, OpenTelemetry integration, middleware support, shutdown/flush hooks, and guidance for testing and contributing. [1] [2]

  • Changelog Update:
    The CHANGELOG.md now includes detailed entries for version 0.8.4, listing all fixes, changes, and removals in this release, and adds a version link for easier navigation. [1] [2]

CI and Linting Enhancements:

  • Expanded CI Branch Coverage:
    The GitHub Actions workflows for linting and testing now run on both main and develop branches, ensuring better coverage for development workflows. (.github/workflows/lint.yml and .github/workflows/test.yml) [1] [2]

  • Improved Linting Configuration:
    The .golangci.yml file is added to explicitly enable a curated set of linters and to suppress errcheck warnings in test files, promoting code quality and reducing noise.

Codebase Cleanup:

  • Obsolete Code Removal:
    The now-unused batch.go file, which implemented a batching mechanism, has been removed, likely in favor of a new or refactored batching approach elsewhere in the codebase.

  • Local Settings Cleanup:
    The .claude/settings.local.json file, which contained local permissions for running certain shell commands, has been deleted, reducing clutter and potential confusion.

Polliog added 3 commits March 22, 2026 14:13
…ecture

- New Hub/Scope/Client/Transport layered architecture (sentry-go inspired)
- DSN-based configuration with structured ingest URL construction
- Leveled logging: Debug, Info, Warn, Error, Critical, CaptureError
- Breadcrumb trail, user context, trace context per scope
- OpenTelemetry span exporter integration (integrations/otelexport)
- net/http middleware with per-request scope isolation (integrations/nethttp)
- Internal batch engine with size- and interval-based flushing
- Exponential-backoff retry with circuit breaker fault tolerance
- Global singleton pattern (Init/flush) and explicit NewClient pattern
- Full test suite with race detector coverage (86 tests)

Bug fixes included in this release:
- Scope.ApplyToEntry no longer mutates caller Metadata map
- otelexport: completed span IDs preserved against ambient OTel context
- retry.Do returns error (not nil) when retries exhausted on 5xx
- tryExtractPkgErrorsStack nil-pointer panic guard added
- Client processor slice copied under lock before iteration
- EnvironmentIntegration copies metadata map before mutation
@Polliog Polliog merged commit a00c1f4 into main Mar 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant