Skip to content

Refactor metric client, add features, CI, and docs - #3

Merged
necrophidia merged 1 commit into
mainfrom
chore/code-quality-and-features
Mar 22, 2026
Merged

necrophidia merged 1 commit into
mainfrom
chore/code-quality-and-features

Conversation

@necrophidia

Copy link
Copy Markdown
Member

Summary

  • Refactor datadog client: unexport struct fields for proper encapsulation, extract metricName()/errorMetricName() helpers to eliminate duplication, replace
    log.Fatalf with graceful degradation (log to stderr + return disabled client), simplify constructor with early return
  • Add new metric types: Close(), Gauge/GaugeError, Histogram/HistogramError to both the interface and Datadog implementation
  • Add GitHub Actions: PR validation workflow (lint, build, test) and auto-release workflow (tag bump + GitHub release)
  • Update documentation: rewrite both READMEs with full API reference, usage examples, and supported metric types table
  • Bump Go to 1.25.0 and clean up .gitignore

Test plan

  • Verify go build ./... passes
  • Verify go vet ./... and staticcheck ./... pass
  • Verify CI workflows trigger correctly on PR and merge
  • Integration test with a running Datadog agent to confirm new metric types (Gauge, Histogram) are sent correctly

- Refactor datadog client: unexport struct fields, extract metric name
  helpers, remove log.Fatalf in favor of graceful degradation, simplify
  constructor with early return
- Add Close(), Gauge, and Histogram metric types to interface and
  implementation
- Add GitHub Actions workflows for PR validation and auto-release
- Update READMEs with full API documentation and usage examples
- Bump Go version to 1.25.0
- Clean up .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@necrophidia necrophidia self-assigned this Mar 22, 2026
@necrophidia
necrophidia requested review from a team and removed request for a team March 22, 2026 07:37
@necrophidia
necrophidia merged commit 7d3182e into main Mar 22, 2026
3 checks passed
@necrophidia
necrophidia deleted the chore/code-quality-and-features branch March 22, 2026 07:38
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