* Add the experimental exemplar feature
* Add exemplars to EXPERIMENTAL.md
* Add changelog entry
* Fix hist buckets > 1 detection
* Collect instead of Flush res about to be deleted
* Add e2e test
* Do not pre-alloc ResourceMetrics
This only has a single use.
* Fix grammatical error in comment
* Add test cases
Default and invalid OTEL_METRICS_EXEMPLAR_FILTER.
Test sampled and non-sampled context for trace_based.
* Comment nCPU
* Doc OTEL_METRICS_EXEMPLAR_FILTER
* fix: Fix stdouttrace/example_test to make the trace_id same.
* fix: restore Example
---------
Co-authored-by: Damien Mathieu <damien.mathieu@elastic.co>
* Add the random fixed size exemplar reservoir
* Rename fixed.go to storage.go
* Update sdk/metric/internal/exemplar/rand.go
Co-authored-by: David Ashpole <dashpole@google.com>
* Remove stale ref to spec recommendation
* Add comments to clarify the reset/advance/Collect methods
* Apply comment from feedback
* Add random func to gen rand float64 on (0,1)
* Use random in TestFixedSizeSamplingCorrectness
* Add clarifying algorithm comments
Include a high-level overview of the algorithm implemented and clarify
parameter names to be consistent.
* Fix duplicate word
* Update sdk/metric/internal/exemplar/rand.go
* Comment TestFixedSizeSamplingCorrectness
* Update test delta
* Test collect less than cap
* Remove measurement.Valid method
---------
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump peter-evans/create-issue-from-file from 4 to 5
Bump benchmark-action/github-action-benchmark from 1.18.0 to 1.19.2
Bump lycheeverse/lychee-action from 1.9.1 to 1.9.2
Bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /bridge/opentracing/test
Bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump golang.org/x/vuln from 1.0.1 to 1.0.3 in /internal/tools
Bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /exporters/otlp/otlptrace/otlptracehttp
Bump google.golang.org/grpc from 1.60.1 to 1.61.0 in /example/otel-collector
This Reservoir implementaiton is used at the MeterProvider level to
pre-filter measurements offered to a wrapped Reservoir.
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Add the sdk/metric/internal/exemplar pkg
* Rename testReservoir to ReservoirTest
This is a test helper function that is not exported outside of testing
for the package. Use the exported name so the CI system doesn't complain
about it not being used. It will be used in follow-up PRs.
* Run go mod tidy
* Update versions.yaml
Move experimental-metrics modules that are stbilizing to the stable-v1
module-set.
* Prepare stable-v1 for version v1.23.0-rc.1
* Update changelog
* Add David Ashpole as a maintainer
* Sort the maintiners by surname.
Co-authored-by: Robert Pająk <pellared@hotmail.com>
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Optimize Set.Filter for no filtered case
When all elements of the Set are kept during a call to Filter, do not
allocate a new Set and the dropped attributes slice. Instead, return the
immutable Set and nil.
To achieve this the functionality of filterSet is broken down into a
more generic filteredToFront function.
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Rename run to benchFn based on review feedback
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 in /exporters/prometheus
Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 in /example/prometheus
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 in /sdk/metric
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/prometheus
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 in /sdk
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlptrace/otlptracehttp
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlptrace/otlptracehttp
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /bridge/opentracing/test
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlptrace
Bump github.com/go-logr/logr from 1.3.0 to 1.4.1 in /exporters/zipkin
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /example/otel-collector
Bump google.golang.org/grpc from 1.60.0 to 1.60.1 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/protobuf from 1.31.0 to 1.32.0 in /exporters/otlp/otlptrace/otlptracegrpc
* Add agg limiting func
* Add unit test for limitAttr
* Add limiting to aggregate types
* Add internal x pkg for experimental feature-flagging
* Connect cardinality limit to metric SDK
* Replace limitAttr fn with limiter type
The Attribute method is still inlinable.
* Use x.CardinalityLimit directly
* Simplify limiter test
* Add limiter benchmark
* Document the AggregationLimit field
* Test sum limits
* Test limit for last value
* Test histogram limit
* Refactor expo hist test to use existing fixtures
The tests for the exponential histogram create their own testing
fixtures. There is nothing these new fixtures do that cannot already be
done with the existing testing fixtures used by all the other aggregate
functions. Unify the exponential histogram testing to use the existing
fixtures.
* Test the ExponentialHistogram limit
* Fix lint
* Add docs
* Rename aggregation field to aggLimit
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>