Skip to content

Harden delta sink counter tracking#167

Merged
Areson merged 1 commit into
mainfrom
Areson/delta-sink-correctness
Jul 15, 2026
Merged

Harden delta sink counter tracking#167
Areson merged 1 commit into
mainfrom
Areson/delta-sink-correctness

Conversation

@Areson

@Areson Areson commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Why

The delta sink could lose batch metadata, collide unrelated cumulative counter series, and race when multiple goroutines transformed metrics concurrently.

What

  • Preserve the complete metrics envelope while replacing cumulative counters
  • Key counter state by domain, metric name, and unambiguous group identity
  • Synchronize transformation state without blocking Retry queueing behavior
  • Cover collisions, resets, concurrent sends, and metadata preservation

Risk Assessment

Low — the change is isolated to cumulative-counter transformation and preserves the existing Retry integration behavior. Counter reset behavior remains unchanged and is now explicitly tested.

References

  • env -u GOROOT go test ./sink -count=1 -timeout=4m
  • env -u GOROOT go test -race ./sink -count=1 -timeout=4m
  • Codex review found no actionable issues

Generated with Codex

Preserve metric batch metadata, disambiguate counter series, and protect counter state during concurrent sends without changing Retry queueing behavior.

Co-authored-by: Codex <noreply@openai.com>
Ai-assisted: true
@Areson
Areson marked this pull request as ready for review July 15, 2026 20:23
@Areson
Areson merged commit 3b7fa78 into main Jul 15, 2026
4 checks passed
@Areson
Areson deleted the Areson/delta-sink-correctness branch July 15, 2026 22:05
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.

2 participants