* Return merged Resource on schema conflict
* Add changes to changelog
* Doc returned resource to have no schema URL
* Refactor Merge based on feedback
* Add the schema URLs to the returned error
* Ensure no schema URL when merge conflict on detect
* Replaced isErr with wantErr in TestNew
* Update sdk/resource/auto_test.go
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Update TestDetect based on feedback
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* 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
* 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
* 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>
* 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>
* add option for resource attributes in metrics for prometheus exporter
This PR adds the `WithResourceAsConstantLabels` option to the Prometheus exporter to allow users to configure resource attributes to be applied on every metric.
Fixes#4732
Signed-off-by: Alex Boten <aboten@lightstep.com>
* add test, changelog
Signed-off-by: Alex Boten <aboten@lightstep.com>
* add test for including only a subset of tags, dont use a ptr
Signed-off-by: Alex Boten <aboten@lightstep.com>
* Update exporters/prometheus/config.go
Co-authored-by: David Ashpole <dashpole@google.com>
* include feedback from review
Signed-off-by: Alex Boten <aboten@lightstep.com>
* cache results
Signed-off-by: Alex Boten <aboten@lightstep.com>
* removed map in favour of single keyVals
Signed-off-by: Alex Boten <aboten@lightstep.com>
* Update exporters/prometheus/config.go
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* move check outside the createResourceAttributes and rename func
Signed-off-by: Alex Boten <aboten@lightstep.com>
---------
Signed-off-by: Alex Boten <aboten@lightstep.com>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Remove the deprecated view example
* Update PR number in changelog
* Update versions.yaml
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Remove the deprecated NewTracer from OC bridge
* Update PR number in changelog
* Remove example test for NewTracer
---------
Co-authored-by: David Ashpole <dashpole@google.com>
* Use url.PathUnescape rather than url.QueryUnescape
I believe this addresses the majority of the cases described in
https://github.com/open-telemetry/opentelemetry-go/issues/3601
Golang's url.QueryUnescape will render url _path_ elements (e.g. /, +)
as spaces: `foo+bar` is rendered as `foo bar`. Path elements are (as I
read the spec) legal W3C baggage values, and replacing them with spaces
fails the value validation regex.
url.PathEscape allows path elements through unmolested.
Signed-off-by: Nathan J. Mehl <n@oden.io>
* Update CHANGELOG.md
address comments
Co-authored-by: Robert Pająk <pellared@hotmail.com>
---------
Signed-off-by: Nathan J. Mehl <n@oden.io>
Co-authored-by: Robert Pająk <pellared@hotmail.com>