Sam Xie
3429e15b9a
Revert Cleanup interaction of exemplar and aggregation ( #5913 )
...
Topic: #5249
This reverts commit 8041156518ee2f31ec9b36852fdc29f093d0f468 (PR: #5899 )
due to the performance degradation found by Benchmarks CI
https://github.com/open-telemetry/opentelemetry-go/actions/runs/11447364022/job/31848519243
Here is the benchmark test on my machine:
```
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/otel/sdk/metric
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
Instrument/instrumentImpl/aggregate-10 3.378µ ± 3% 49.366µ ± 1% +1361.40% (p=0.000 n=10)
Instrument/observable/observe-10 2.288µ ± 2% 37.791µ ± 1% +1551.73% (p=0.000 n=10)
geomean 2.780µ 43.19µ +1453.65%
│ old.txt │ new.txt │
│ B/op │ B/op vs base │
Instrument/instrumentImpl/aggregate-10 1.245Ki ± 1% 22.363Ki ± 0% +1696.08% (p=0.000 n=10)
Instrument/observable/observe-10 823.0 ± 1% 17432.5 ± 0% +2018.17% (p=0.000 n=10)
geomean 1.000Ki 19.51Ki +1850.48%
│ old.txt │ new.txt │
│ allocs/op │ allocs/op vs base │
Instrument/instrumentImpl/aggregate-10 1.000 ± 0% 21.000 ± 0% +2000.00% (p=0.000 n=10)
Instrument/observable/observe-10 1.000 ± 0% 16.000 ± 0% +1500.00% (p=0.000 n=10)
```
2024-10-23 10:48:07 -07:00
David Ashpole
8041156518
Cleanup interaction of exemplar and aggregation ( #5899 )
...
Follow-up to
https://github.com/open-telemetry/opentelemetry-go/pull/5861 . This is an
attempt to:
* Limit the API surface of the aggregate package
* Try to use predefined types (e.g. exemplar.Filter) over custom
functions where possible.
* Avoid using nil, and use No-Ops where it makes sense
This makes `aggregate.NewFilteredExemplarReservoir` no longer exported,
removes the `aggregate.FilteredExemplarReservoir` interface, and removes
the `aggregate.dropReservoir`.
2024-10-21 15:37:32 -04:00
Tyler Yahn
dafe137bbe
Add the synchronous gauge to the metric API and SDK ( #5304 )
...
Resolve #5225
The specification has [added a synchronous gauge
instrument](https://github.com/open-telemetry/opentelemetry-specification/pull/3540 ).
That instrument has now been
[stabilized](https://github.com/open-telemetry/opentelemetry-specification/pull/4019 ),
and that stabilization is included in the [next
release](https://github.com/open-telemetry/opentelemetry-specification/pull/4034 ).
This adds the new synchronous gauge instrument to the metric API and all
implementation we publish.
This change will be a breaking change for any SDK developer. The
`embedded` package is updated to ensure our compatibility guarantees are
meet.
---------
Co-authored-by: David Ashpole <dashpole@google.com>
2024-05-16 09:56:40 -07:00
Tyler Yahn
69800ee189
Support Delta & Cumulative temporality for LastValue aggregates ( #5305 )
...
* Add delta/cumulative/precomputed LastValue agg
* Add cumulative testing
* Add precomputed testing
* Add changelog entry
2024-05-10 07:19:46 -07:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Tyler Yahn
d18f20179e
Replace internal aggregate Aggregator with Measure/ComputeAggregation and a Builder ( #4304 )
2023-07-17 16:15:50 +02:00
Tyler Yahn
10c3445543
Move aggs to internal/aggregate ( #4283 )
2023-07-03 10:53:00 +02:00
Tyler Yahn
f8fcfda872
Add options to measurement methods ( #3971 )
...
* Add options to measurement methods
* Update noop
* Update global impl
* Update SDK impl
* Fix metric API example
* Update prometheus exporter tests
* Update examples
* WithAttributes and WithAttributeSet
* Add changes to changelog
* Accept slice instead of variadic to new conf funcs
* Clarify WithAttributes performance in docs
* Address feedback about WithAttributes comment
* Add changelog entry for WithAttribute{s,Set}
* Remove number scope from measure opts
* Update changelog
* Remove left-over test cases
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-04-18 07:16:06 -07:00
Tyler Yahn
b62eb2ca88
Pool sortables used to create attribute sets ( #3832 )
...
* Pool sortables used to create attribute sets
* Move sync pool to attribute pkg
* Add change to changelog
* Fix comment
* Apply suggestions from code review
Co-authored-by: Peter Liu <lpfvip2008@gmail.com>
* Update sdk/metric/instrument.go
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Update comment based on feedback
* Apply feedback
---------
Co-authored-by: Peter Liu <lpfvip2008@gmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-03-13 11:19:28 -07:00