Rename Go package from posthog to insights across all 80+ files.
Consumers now import as `insights "github.com/hanzoai/insights-go"`
and use insights.Client, insights.Config, insights.Capture, etc.
- Rename posthog.go -> insights.go, posthog_test.go -> insights_test.go
- Update package declaration from posthog to insights in all .go files
- Update SDKName from posthog-go to insights-go
- Update DefaultEndpoint from app.posthog.com to insights.hanzo.ai
- Update all FieldError/ConfigError type strings
- Update User-Agent headers, log prefixes, comments, and docs
- Update JSON test fixtures to match new SDK name
- Update CLI, examples, extras, and sdk_compliance_adapter
- Fix pre-existing go vet warnings (non-constant format strings)
* docs: Describe the new error tracing functionality within the README.md
* fix: Added the new error capturing logic within the examples
* chore: Added the fixture for the enqueuing of exception test
* fix: Introduce Enqueue client to reduce the scope of what callees can do with the client and improve modularity / testability
* fix: Wire up the exception flow within the posthog client
* test: Wire up the exception logic in the existing posthog client test to adhere with the other structures there
* test: Introduce a simple test utils file where we can store (testfunctions that are used across several different tests
* test: Introduce a single location where we can store mocks / stubs to keep the mental burden of the main test files to a reasonable level and avoid cluttering those tests
* feat: Added the models used for the error tracking API endpoint, adhered to the style that was present in the other enqueue-able objects
* tests: Added tests for the newly introduced error tracking models to cover the validation logic
* chore: Add functional options to configure the slog logger
* feat: Added a slog wrapper which will mirror exceptions to the PostHog cloud
* test: Added tests for the slog logger wrapper
* feat: Added stack trace retrievers to enrich the exception in the UI
* test: Added a test to cover the newly added stack trace logic
* fix: Safeguarding for cases where Func is nil
* feat: Use raw frames instead of resolved frames now that the API supports it
---------
Co-authored-by: Akatchi <[email protected]>
Co-authored-by: Oliver Browne <[email protected]>