1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-12 10:04:29 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Joshua MacDonald
15e8edd498
Add the UpDownSumObserver instrument (#750)
* Add the UpDownSumObserver instrument

* Precommit

* Downcase error message
2020-05-20 10:19:51 -07:00
Joshua MacDonald
c5f2252c48
Add the SumObserver instrument (#747)
* Add the SumObserver instrument

* Lint
2020-05-19 11:49:24 -07:00
Joshua MacDonald
ee3c9ed1a5
Rename Observer to ValueObserver (#734)
* Observer -> ValueObserver

* Move wrappers into async.go
2020-05-18 11:03:43 -07:00
Joshua MacDonald
f1112a4fbb
Rearrange api/metric code layout (#724)
* Refactor api.go

* Refactor more

* Finish

* More

* Rename

* More rename

* Split observer.go common into async.go; rename common.go sync.go

* Move types a bit
2020-05-14 13:10:48 -07:00
Joshua MacDonald
fefdf59a0b
Batch Observer callback support (#717)
* api/metric changes from jmacd:jmacd/batch_obs_2

* Add an SDK test

* Use a single collector method

* Two fixes

* Comments; embed AsyncRunner

* Comments

* Comment fix

* More comments

* Renaming for clarity

* Renaming for clarity (fix)

* Lint
2020-05-13 16:27:52 -07:00
Joshua MacDonald
32ddc16e1b
Make Meter a struct, simplify the global Meter (#709)
* Tests pass

* Precommit pass

* More lint

* Remove a few interfaces

* Final edits

* Fix comments

* Indentation

* registry->unique

* Comments
2020-05-11 20:29:06 -07:00
Joshua MacDonald
e8546e3bc5
Remove Labelset (#595)
* Remove LabelSet frmo api/metric

* SDK tests pass

* Restore benchmarks

* All tests pass

* Remove all mentions of LabelSet

* Test RecordBatch

* Batch test

* Improves benchmark (some)

* Move the benchmark to match HEAD

* Align labels for GOARCH=386

* Add alignment test

* Disable the stress test fo GOARCH=386

* Fix bug

* Move atomic fields into their own file

* Add a TODO

* Comments

* Remove metric.Labels(...)

* FTB

Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-03-27 14:06:48 -07:00
Joshua MacDonald
06f833e2ae
Unique instrument checking (#580)
* Add skeleton uniqueness checker

* Fix the build w/ new code in place

* Add sync tests

* More test

* Implement global uniqueness checking

* Set the library name

* Ensure ordered global initialization

* Use proper require statement for errors

* Comment

* Apply feedback fixes

* Comment and rename from feedback
2020-03-24 10:54:08 -07:00
Joshua MacDonald
d8682c1999
Refactor the SDK helpers, create MeterImpl (#560)
* Create MeterImpl interface

* Checkpoint w/ sdk.go building

* Checkpoint working on global

* api/global builds (test fails)

* Test fix

* All tests pass

* Comments

* Add two tests

* Comments and uncomment tests

* Precommit part 1

* Still working on tests

* Lint

* Add a test and a TODO

* Cleanup

* Lint

* Interface()->Implementation()

* Apply some feedback

* From feedback

* (A)Synchronous -> (A)Sync

* Add a missing comment

* Apply suggestions from code review

Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>

* Rename a variable

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
2020-03-19 12:02:46 -07:00
Joshua MacDonald
1191a07836
Observer metric has not been specified (#222) 2019-10-17 15:35:42 -07:00
Krzesimir Nowak
388d3248fe Some metrics followup (#177)
* prevent passing observer descriptors to NewHandle

* add some test for metrics

* reword some docs
2019-10-15 09:28:36 -07:00
Joshua MacDonald
be8fb0b4e2 Golang metrics prototype (#100)
* initial metrics work

* rename cumulative to counter

* rename bidirectional to nonmonotonic

* rename unidirectional to monotonic

* rename nonnegative to signed

this changes the default semantics a bit - before the change measure
could record negative values by default, now it can't.

The specification draft currently specifies both NonNegative and
Signed, but I think it's a mistake.

* rename instrument to descriptor

* license

* rework measurement values

* make measurement value a tagged union

* simplify to one kind of metrics

* add observers

* change some interfaces to match the spec

* keep integral measurement separate from floating ones

* remove duplicated measurement type

* add checking for options

* reorder some fields and functions

* rename a function

to avoid confusion between the Handle type and the Measure type

* drop disabled field from descriptor

* add back typed API for metrics

* make metric options type safe

* merge alternatives into a single bool

* make value kind name less stuttery

* fix observation callback prototype

* drop context parameter from NewHandle

* drop useless parameter names

* make descriptor an opaque struct

* use a store helper

* handle comment fixes

* reword Alternate comment

* drop the "any value" metrics

* make measurement value simpler

* document value stuff

* add tests for values

* docs

* do not panic if there is no span ID in the event
2019-10-08 15:45:49 -07:00