Skip to content

Add DogStatsD metrics emission#71

Closed
revied wants to merge 1 commit intoblock:mainfrom
revied:drevie/emit-datadog-metrics
Closed

Add DogStatsD metrics emission#71
revied wants to merge 1 commit intoblock:mainfrom
revied:drevie/emit-datadog-metrics

Conversation

@revied
Copy link
Copy Markdown
Contributor

@revied revied commented Apr 30, 2026

Summary

Adds optional DogStatsD metrics emission for Version Guard scan and inventory metrics.

  • Adds a MetricsEmitter abstraction with a no-op default and DogStatsD implementation
  • Emits version_guard.findings.*, version_guard.compliance_percentage, version_guard.detection.duration_ms, version_guard.inventory.fetch, version_guard.inventory.resources, and version_guard.scan.completed
  • Wires metrics into inventory fetch and detection summary activities without requiring Datadog for local/OSS users
  • Adds METRICS_BACKEND, DOGSTATSD_ADDR, and METRICS_TAGS config plus docs/env examples

Testing

  • go test ./cmd/server ./pkg/emitters ./pkg/workflow/detection
  • make lint
  • make test
  • make build-all
  • git diff --check

@revied revied requested a review from a team as a code owner April 30, 2026 17:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 68.26923% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/emitters/metrics.go 68.18% 18 Missing and 3 partials ⚠️
pkg/workflow/detection/activities.go 67.56% 9 Missing and 3 partials ⚠️
Files with missing lines Coverage Δ
pkg/workflow/detection/workflow.go 84.52% <100.00%> (ø)
pkg/workflow/detection/activities.go 84.06% <67.56%> (ø)
pkg/emitters/metrics.go 68.18% <68.18%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@revied
Copy link
Copy Markdown
Contributor Author

revied commented Apr 30, 2026

Closing this approach; we only want to enable Temporal SDK metrics rather than add custom Version Guard metrics emission.

@revied revied closed this Apr 30, 2026
@revied revied deleted the drevie/emit-datadog-metrics branch April 30, 2026 20:10
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