Skip to content

feat: standardize repository with ex configuration#1

Merged
clairevnext merged 12 commits intomainfrom
standardize-with-ex-repo
Apr 9, 2026
Merged

feat: standardize repository with ex configuration#1
clairevnext merged 12 commits intomainfrom
standardize-with-ex-repo

Conversation

@clairevnext
Copy link
Copy Markdown
Contributor

REPOSITORY STANDARDIZATION: Aligns this repository with bold-minds/ex for consistency.

Changes Applied

  • Standard OSS files: CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE, SECURITY.md
  • GitHub configuration: CODEOWNERS, dependabot.yml, issue/PR templates
  • Standardized workflow: test.yaml with GitHub App badge automation
  • Development tools: .golangci.yml, .gitignore
  • Badge automation: Placeholder badges and automation setup

Benefits

  • 🎯 Consistent configuration across all bold-minds repositories
  • 🚀 Professional OSS setup with security and contribution guidelines
  • 🤖 Automated badge generation with green status on Actions/Checks
  • 🔒 Security best practices with Dependabot and code scanning

Next Steps After Merge

  1. Configure GitHub App private key secret: BADGE_BOT_PRIVATE_KEY
  2. Add GitHub App (ID 1759509) to repository ruleset bypass (if using rulesets)
  3. Test badge automation for green status verification
  4. Customize repository-specific content as needed

This standardization enables professional, secure, and automated repository management.

- Add standard OSS files (CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, SECURITY)
- Add GitHub configuration (.github/CODEOWNERS, dependabot.yml, templates)
- Add standardized test workflow with GitHub App badge automation
- Add golangci-lint configuration and gitignore
- Setup badges directory with placeholder badges
- Configure repository for professional OSS development

This standardization aligns the repository with bold-minds/ex for consistency
across the organization and enables automated badge generation with green status.
@clairevnext
Copy link
Copy Markdown
Contributor Author

Closing: obs is too thin a wrapper around OTel to justify as a standalone OSS library. Keeping as internal tooling.

@clairevnext clairevnext closed this Apr 8, 2026
@clairevnext clairevnext reopened this Apr 8, 2026
clairevnext and others added 11 commits April 7, 2026 20:37
Replace math/rand with math/rand/v2 (thread-safe global since Go 1.22).
Remove the rng field and per-instance seeding; make shouldSampleAtRate a
package-level function. Add resetGlobal() for test isolation and 7
comprehensive tests covering concurrency, routing, boundaries, nil manager,
and runtime config updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
StartSpanWithSampling was returning oteltrace.SpanFromContext(ctx) for
unsampled operations, which is the parent span. Any attributes set on
the returned span would accumulate on the parent. Replace with
noop.NewTracerProvider().Tracer("").Start(...) so the returned span is
a genuine no-op that neither records nor propagates attributes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CRITICAL:
- Race on globalClient: protect with sync.RWMutex
- Race on Client.config: add sync.RWMutex to Client struct
- sampling.Init sync.Once silently drops second call: replace with
  SetManager that always creates a new Manager
- Nested timeout in Shutdown: remove inner timeout, honor caller's ctx
- Exporter leaked on resource.New failure: shut down exporter on error

HIGH:
- HighVolumeSampleRate validated even when no endpoints configured:
  make validation conditional on len(HighVolumeEndpoints) > 0
- Redundant string "duration" attribute: remove, keep only duration_ms
- Hardcoded db.system="neo4j": make dbSystem a parameter on
  AddDatabaseContext
- Raw Cypher in span attributes: rename to "statement", add sanitization
  warning to doc comments
- FinishSpanWithResult calls End() without documenting it: add doc

MEDIUM:
- resetGlobal in production file: move to sampling/export_test.go
- Outdated OTel v1.21.0 with transitive CVEs: upgrade to latest
- Config test assumes HighVolumeSampleRate always validated: fix test

LOW:
- Dead code: remove SimpleException/NewException from internal package
- Dead code: remove unused trackBatchEvents from examples/generic
- Dead config: remove testify from depguard allowlist
- Shutdown now nils h.tp to reflect stopped state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI runs Go 1.22-1.24 but go.mod requires go 1.25.0. GOTOOLCHAIN=auto
causes the older Go binary to download the 1.25 toolchain, but 1.25
removed prebuilt covdata from the distribution. The older Go binary
cannot build covdata on demand, causing "no such tool" failures.

Setting GOTOOLCHAIN=go1.25.0 at job level prevents the toolchain
switch and ensures covdata is built on demand by the 1.25 toolchain
directly.

Ref: golang/go#75031

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@clairevnext clairevnext merged commit c0d28ee into main Apr 9, 2026
5 checks passed
@clairevnext clairevnext deleted the standardize-with-ex-repo branch April 9, 2026 02:49
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