* Bump module versions
* Prepare stable-v1 for version v1.11.1
* Prepare experimental-metrics for version v0.33.0
* Update the changelog
* Update CHANGELOG.md
* Update Asynchronous API docs
Clarify the Counter and UpDownCounter Observe values are the exact
counter value, not increments to the previous measurements.
* Add the pre-computed sum Aggregator
* Test the PreComputedSum
* Use the PrecomputedSum for async counters
* Add changes to changelog
* Ignore false-positive lint error
* Split NewPrecomputedSum into delta/cumulative vers
* Decode values from OTEL_RESOURCE_ATTRIBUTES
The W3C spec specifies that values must be percent-encoded so when
reading the environment variable `OTEL_RESOURCE_ATTRIBUTES` the SDK
should decode them.
This is done by the `baggage` package, but its behaviour in case of
errors is slightly different from the current implementation of the SDK,
more specifically in cases where a key is missing a value. The SDK
returns a partial resource while the `bagage` package returns nil.
This may be considered a breaking change, so this commit fixes the
current implementation instead of using `baggage.Parse`.
* Add changelog entry for #2963
* Use otel.Handle on OTEL_RESOURCE_ATTRIBUTES decode error
* retain original value when decoding fails
* docs: update CHANGELOG
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Fix baggage.NewMember to decode the accepted value
`value` is decoded and stored after validating the input parameters.
Corresponding test cases are modified so that we can make sure `value` is properly encoded before creating Member.
* fix md lint
* add function document to NewMember for value encoding and decoding
* remove redundant comments and fix CHANGELOG.md
* fix wrong PR number in the changelog
* fix wrong PR number
* fix md-lint
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/internal/retry
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /schema
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/zipkin
Bump github.com/openzipkin/zipkin-go from 0.4.0 to 0.4.1 in /exporters/zipkin
Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/zipkin
Bump google.golang.org/grpc from 1.46.2 to 1.50.1 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.46.2 to 1.50.1 in /exporters/otlp/otlptrace
Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlptrace
Bump google.golang.org/protobuf from 1.27.1 to 1.28.1 in /exporters/otlp/otlpmetric
Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/otlp/otlptrace
Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlptrace
Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/otlp/otlpmetric
Bump google.golang.org/grpc from 1.42.0 to 1.50.1 in /exporters/otlp/otlpmetric
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/stdout/stdouttrace
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/prometheus
Bump google.golang.org/protobuf from 1.28.0 to 1.28.1 in /exporters/otlp/otlptrace/otlptracegrpc
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlpmetric
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.46.2 to 1.50.1 in /exporters/otlp/otlptrace/otlptracegrpc
Bump go.uber.org/goleak from 1.1.12 to 1.2.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /exporters/jaeger
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /trace
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/jaeger
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /metric
Bump github.com/stretchr/testify from 1.7.1 to 1.8.0 in /exporters/otlp/otlptrace/otlptracehttp
Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 in /trace
Co-authored-by: Aneurysm9 <Aneurysm9@users.noreply.github.com>
* Fix HistogramDataPoints transform in otlpmetric
Fixes#3284
The transform uses the same reference a histogram datapoint sum value
for all transformed metrics. This results in all transformed metrics
being exported with the same sum (see #3284). This changes the transform
to correctly reference a unique sum for each datapoint.
This change will automatically register a created exporter with a prometheus registerer, if none are provided it will use prometheus' DefaultRegisterer.
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Bump stable-v1 and experimental-metrics vers
* Prepare stable-v1 for version v1.11.0
* Prepare experimental-metrics for version v0.32.3
* Update changelog for release
* Retract v0.32.2 of otlpmetric{http,grpc}
* Add the cache type
* Add cache unit tests
* Test cache concurrency
* Add the instrumentCache
* Use the instrumentCache to deduplicate creation
* Drop unique check from addAggregator
* Fix aggregatorCache* docs
* Update cachedAggregator and aggregator method docs
* Remove unnecessary type constraint
* Remove unused errAlreadyRegistered
* Rename to not shadow imports
* Add changes to changelog
* Fix changelog English
* Store resolvers in the meter instead of caches
* Test all Aggregator[N] impls are comparable
* Fix lint
* Add documentation that Aggregators need to be comparable
* Update sdk/metric/internal/aggregator.go
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update sdk/metric/instrument.go
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update sdk/metric/instrument.go
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update sdk/metric/internal/aggregator_test.go
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Fix pipeline_test.go use of newInstrumentCache
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Use default view if inst matches no other
Fix#3224
* Test default view applied if no match
* Add changes to changelog
* Remove unneeded views len check in WithReader
* Do not return agg if adding err-ed
* Revert "Do not return agg if adding err-ed"
This reverts commit b56efb06a7.
* update bucket default bounds to match the specification
* add changelog entry
* test custom boundaries with valid histogram
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Add views field to pipeline
Redundant maps tracking readers to views and readers to pipelines exist
in the pipelineRegistry. Unify these maps by tracing views in pipelines.
* Rename newPipelineRegistries->newPipelineRegistry
* Add Reader as field to pipeline
* Replace createAggregators with resolver facilitator
* Replace create agg funcs with inserter facilitator
* Correct documentation
* Replace pipelineRegistry with []pipeline type
* Rename newPipelineRegistry->newPipelines
* Fix pipeline_registry_test
* Flatten isMonotonic into only use
* Update FIXME into TODO
* Rename instrument provider resolver field to resolve
* Fix comment English
* Fix drop aggregator detection
* Bump golang.org/x/sys/unix
Fix#3234
Address GO-2022-0493 by upgrading golang.org/x/sys/unix from
v0.0.0-20210423185535-09eb48e85fd7 to
v0.0.0-20220919091848-fb04ddd9f9c8.
* Add changes to changelog
* Flush pending telemetry when ForceFlush called
* Test flush of periodic reader
* Flush pending telemetry on Shutdown
* Fix things
* Rename pHolder to p
* Add testing for Shutdown
* Fix doc for collect method
* Fix collectAndExport doc
* Fix collectAndExport English
* Remove stdoutmetric example expected output
* Add changes to changelog
* Revert inadvertent change to golangci conf
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Add an example of view
* Update meter name in view example
Co-authored-by: Sam Xie <sam@samxie.me>
* Update dependabot and versions.yaml
* Fix code review and add CHANGELOG
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* update the metric mod version to latest
* update additional go.mods
* Unify the Fixed section of Unreleased
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>