* Add the InstrumentKind type and vars to sdk/metric
* Add the Instrument type to sdk/metric
* Add the Stream type to sdk/metric
* Add the View type to sdk/metric
* Add NewView to create Views matching OTel spec
* Add unit tests for NewView
* Add changes to changelog
* Apply suggestions from code review
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
* Update match and mask comments of Instrument
* Explain wildcard logic in NewView with comment
* Drop views that replace name for multi-inst match
* Comment how users are expected to match zero-vals
* Remove InstrumentKind and Scope from Stream
* Fix redundant word in NewView comment
* Add view example tests
* Update comments to examples
* Fix broken English
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Bump github.com/cenkalti/backoff/v4 from 4.1.3 to 4.2.0 in /exporters/otlp/internal/retry
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /exporters/otlp/otlpmetric
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /exporters/otlp/otlptrace
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.50.1 to 1.51.0 in /example/otel-collector
Bump lycheeverse/lychee-action from 1.5.2 to 1.5.4
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
* Replace view usage in sdk/metric
* Replace view use in stdoutmetric
* Replace view use in prometheus exporter
* Replace view use in otlpmetric exporters
* Replace view use in view example
* Add the InstrumentKind type and vars to sdk/metric
* Add the Instrument type to sdk/metric
* Add the Stream type to sdk/metric
* Add the View type to sdk/metric
* Add NewView to create Views matching OTel spec
* Add unit tests for NewView
* Add changes to changelog
* Apply suggestions from code review
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Update CHANGELOG.md
* Update match and mask comments of Instrument
* Explain wildcard logic in NewView with comment
* Drop views that replace name for multi-inst match
* Comment how users are expected to match zero-vals
* Remove InstrumentKind and Scope from Stream
* Fix redundant word in NewView comment
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Bump golang.org/x/tools from 0.2.0 to 0.3.0 in /internal/tools
Bump github.com/prometheus/client_golang from 1.13.1 to 1.14.0 in /example/view
Bump lycheeverse/lychee-action from 1.5.2 to 1.5.4
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
* Do not return an error for Drop aggs
The async instruments currently return an error if and only if there are
no aggregators returned from a resolve. Returning no aggregators means
the instrument aggregation is drop. Do not include this in the error
reporting decision.
* Only registers callbacks if non-drop agg is used
The instruments passed to RegisterCallback need to have some aggregation
defined otherwise it is implied they have a Drop aggregation. Check that
at least one instrument passed has an aggregation other than Drop before
registering the callback with the pipelines.
Also, return an error if the user passed another API implementation of
an asynchronous instrument.
* Remove unneeded TODO from pipeline
* Add changes to changelog
* Test callback not called for all drop instruments
* Test RegisterCallback returns err for non-SDK inst
* Fail gracefully for non-SDK instruments
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
* Return empty nil aggs if no meas
* Update tests with new expected behavior
* Add change to changelog
* Set PR number in changelog
* Run lint
* Fix pipeline_test
* Scope change in changelog to pkg
* Clean up init of agg types
Bump github.com/prometheus/client_golang from 1.13.0 to 1.13.1 in /example/view
Bump go.opencensus.io from 0.23.0 to 0.24.0 in /example/opencensus
Bump github.com/prometheus/client_golang from 1.13.0 to 1.13.1 in /exporters/prometheus
Bump go.opencensus.io from 0.23.0 to 0.24.0 in /bridge/opencensus/test
Bump github.com/prometheus/client_golang from 1.13.0 to 1.13.1 in /example/prometheus
Bump go.opencensus.io from 0.23.0 to 0.24.0 in /bridge/opencensus
Bump lycheeverse/lychee-action from 1.5.1 to 1.5.2
Bump benchmark-action/github-action-benchmark from 1.14.0 to 1.15.0
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
* docs(metric): document public interfaces with versioning policy
* docs(metric): remove versioning policy warning from interfaces without public method(s)
* Do not handle empty partial OTLP successes
Fix#3432.
The OTLP server will respond with empty partial success responses (i.e.
empty messages and 0 count). Treat these as equivalent to it not being
set/present like the documentation specifies in the proto:
724e427879/opentelemetry/proto/collector/trace/v1/trace_service.proto (L58)
* Fix tests
* Add changes to changelog
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/otlp/internal/retry
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /schema
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/stdout/stdouttrace
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/stdout/stdoutmetric
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/prometheus
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/zipkin
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /trace
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/otlp/otlpmetric
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/jaeger
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/otlp/otlptrace/otlptracehttp
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /metric
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/otlp/otlptrace/otlptracegrpc
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /exporters/otlp/otlptrace
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /sdk/metric
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /bridge/opencensus
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1 in /sdk
Bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
* Split WithView from WithReader
* Accept readers and views params in newPipelines
* Update MeterProvider pipes init
* Fix WithView comment
* Fix view example MeterProvider option
* Fix With{View,Reader} option in prom exporter test
* Test Reader not required to be comparable
* Add changes to changelog
* Fix changelog option name
The "deadcode", "structcheck", and "varcheck" linters are deprecated by
golangci-lint. It is recommended by that project to use "unused"
instead. The "unused" linter is already enabled, so this just removes
the deprecated linters.
* export status codes to upper case in zipkin exporter
* add test cases for status UNSET and ERROR
* Update exporters/zipkin/model.go
correct the usage of case-sensitive terms
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* change unit test cases to test exact behavior
* move this PR to unrelease section in the CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* dependabot updates Thu Oct 27 19:57:50 UTC 2022
Bump github.com/golangci/golangci-lint from 1.48.0 to 1.50.1 in /internal/tools
Bump golang.org/x/tools from 0.1.12 to 0.2.0 in /internal/tools
* Ignore errors in Prom exporter's sanitizeName
* Omit type from inferred var decl
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
* Update API docs
Update the async instrument docs for the counters types to explain that
the value recorded is assumed by implementations to be the cumulative
sum.
* Refactor precomputed delta sum aggregation
Report the delta Aggregation while supporting cumulative Aggregate
values.
* Add changes to changelog
* 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>