Skip to content

feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers#214

Open
xytan0056 wants to merge 1 commit into
mainfrom
pr1-emitter-core
Open

feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers#214
xytan0056 wants to merge 1 commit into
mainfrom
pr1-emitter-core

Conversation

@xytan0056

@xytan0056 xytan0056 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the observability/metrics package per the merged design doc (docs/observability/metrics.md, #158): a thin, concrete wrapper over tally.Scope pinning the path shape <scope>.<op>.<name>.

  • emitter.goEmitter (New/Nop/Tagged/Counter/DurationHistogram/ValueHistogram) plus the Begin/Complete lifecycle helpers over an Op handle.
  • names.go — shared op / tag-key / result-value constants and Outcome(err) (only context.Canceled → cancelled; DeadlineExceeded → failure, a genuine timeout).

Test plan

CI

@xytan0056
xytan0056 requested review from a team as code owners July 17, 2026 06:35
@xytan0056 xytan0056 changed the title feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers [WIP] feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers Jul 17, 2026
@xytan0056 xytan0056 changed the title [WIP] feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers Jul 17, 2026
@xytan0056 xytan0056 changed the title feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers [WIP] feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers Jul 17, 2026
@xytan0056 xytan0056 changed the title [WIP] feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers feat(observability/metrics): add Emitter and Begin/Complete lifecycle helpers Jul 17, 2026
… helpers

Introduces the observability/metrics package per docs/observability/metrics.md:
a thin, concrete wrapper over tally.Scope pinning the path shape
<scope>.<op>.<name>.

- emitter.go: Emitter (New/Nop/Tagged/Counter/DurationHistogram/
  ValueHistogram) plus the Begin/Complete lifecycle helpers over an Op handle
- names.go: shared op/tag-key/result-value constants and Outcome(err)
  (context.Canceled -> cancelled; DeadlineExceeded -> failure)
- emitter_test.go: path-shape, tag isolation/composition, Begin/Complete
  result tagging, and Outcome classification
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