event/otel: metrics

Add an event handler for OpenTelemetry metrics.

The first time it sees an event.Metric, the handler creates a matching
otel instrument and caches it. On each call, it uses the instrument to
record the metric value.

Change-Id: I07d6f40601c7d2a801ed9fbe3cf7c24d5698f3f1
Reviewed-on: https://go-review.googlesource.com/c/exp/+/320350
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
8 files changed
tree: f036aa54df6790ba7496bc5f2966aa6e8593dd43
  1. apidiff/
  2. cmd/
  3. constraints/
  4. ebnf/
  5. ebnflint/
  6. errors/
  7. event/
  8. fsnotify/
  9. inotify/
  10. internal/
  11. io/
  12. jsonrpc2/
  13. maps/
  14. mmap/
  15. rand/
  16. shiny/
  17. shootout/
  18. slices/
  19. sumdb/
  20. utf8string/
  21. vulncheck/
  22. vulndb/
  23. winfsnotify/
  24. .gitattributes
  25. .gitignore
  26. AUTHORS
  27. codereview.cfg
  28. CONTRIBUTING.md
  29. CONTRIBUTORS
  30. go.mod
  31. go.sum
  32. LICENSE
  33. PATENTS
  34. README.md
README.md

exp

PkgGoDev

This subrepository holds experimental and deprecated (in the old directory) packages.

The idea for this subrepository originated as the pkg/exp directory of the main repository, but its presence there made it unavailable to users of the binary downloads of the Go installation. The subrepository has therefore been created to make it possible to go get these packages.

Warning: Packages here are experimental and unreliable. Some may one day be promoted to the main repository or other subrepository, or they may be modified arbitrarily or even disappear altogether.

In short, code in this subrepository is not subject to the Go 1 compatibility promise. (No subrepo is, but the promise is even more likely to be violated by go.exp than the others.)

Caveat emptor.