1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-10 09:50:58 +02:00
Commit Graph

858 Commits

Author SHA1 Message Date
Robert Pająk
8cddf8cf1f
sdk/metric: Log empty meter name (#4153)
* sdk/metric: Log empty meter name

* Avoid magic numbers

* Lint

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update log message

* Apply suggestion

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-06-01 09:56:17 +02:00
Robert Pająk
f9565872df
sdk/metrics: Fix MeterProvider.Meter Go doc (#4152) 2023-06-01 09:28:29 +02:00
Tyler Yahn
e0852d609c
Release v1.16.0/v0.39.0 -- Stable Metric API (#4100)
* Update versions

* Prepare stable-v1 for version v1.16.0

* Prepare experimental-metrics for version v0.39.0

* Update changelog
2023-05-22 12:06:21 -07:00
OpenTelemetry Bot
3fca55af7a
dependabot updates Sun May 21 15:20:04 UTC 2023 (#4126)
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/zipkin
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /bridge/opentracing/test
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /schema
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/otlp/internal/retry
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/prometheus
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/stdout/stdoutmetric
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/otlp/otlptrace
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/otlp/otlpmetric
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/otlp/otlptrace/otlptracegrpc
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/stdout/stdouttrace
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/otlp/otlptrace/otlptracehttp
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /metric
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /trace
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /exporters/jaeger
Bump codecov/codecov-action from 3.1.3 to 3.1.4
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /sdk/metric
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /bridge/opencensus
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /bridge/opentracing
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 in /sdk
Bump github.com/stretchr/testify from 1.8.2 to 1.8.3
2023-05-21 08:45:32 -07:00
Andrew Womeldorf
987422d55f
sdk/metric: Fix import comments (#4086)
* Resolve inconsistent import comments in sdk/metric

* update changelog

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update CHANGELOG.md

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-05-19 09:25:11 -07:00
Mikhail Mazurskiy
f95bee22b9
Use strings.Cut() instead of string.SplitN() (#4049)
strings.Cut() generates less garbage as it does not allocate the slice to hold parts.
2023-05-17 09:28:44 -07:00
Chen Xu
fadd3d6a63
[SDK][Trace] Add tests for default id generator (#4043)
Signed-off-by: Chen Xu <chen.x@uber.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-15 07:18:43 -07:00
Robert Pająk
24e8d2e574
sdk/resource: Add Telemetry Stability label (#4080)
* Add Telemetry Stability label

* Update sdk/resource/doc.go

* Update doc.go

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-05-11 07:25:32 -07:00
Robert Pająk
7dea2225a2
sdk/resource: Fix build for BSD OSes (#4077)
* sdk/resource: Fix build for BSD OSes

* Add changelog

* Update header in changelog

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-10 07:47:41 -07:00
Robert Pająk
4d473d105a
[chore] Pin otel-specification hyperlinks (#4033)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-09 08:45:39 -07:00
Rakshit Parashar
c338d8eb8a
added version.go and test file for issue 2143 (#3677)
* added version.go and test file for issue 2143

* added license in metric versiont_test

* goimport file linting

* update trace version to v.1.13.0 and metric to 0.36.0

* Update sdk/metric/version.go

Co-authored-by: Robert Pająk <pellared@hotmail.com>

* using asser.Regxp

* changing regex string as per recommendations

Signed-off-by: ChillOrb <rakshitparashar1@gmail.com>

* changing regex string as per recommendations

Signed-off-by: ChillOrb <rakshitparashar1@gmail.com>

* reverting go mod and go sum changes

Signed-off-by: ChillOrb <rakshitparashar1@gmail.com>

* trace and metric version bump up

Signed-off-by: ChillOrb <rakshitparashar1@gmail.com>

* version update in sdk/metric , sdk/trace

Signed-off-by: ChillOrb <rakshitparashar1@gmail.com>

* doc typo fix

Signed-off-by: ChillOrb <rakshitparashar1@gmail.com>

* Apply suggestions from code review

---------

Signed-off-by: ChillOrb <rakshitparashar1@gmail.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-05-09 08:29:19 -07:00
OpenTelemetry Bot
1b04bbc681
dependabot updates Sun May 7 14:59:33 UTC 2023 (#4072)
Bump google.golang.org/grpc from 1.54.0 to 1.55.0 in /bridge/opentracing/test
Bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1 in /example/view
Bump github.com/prometheus/client_model from 0.3.0 to 0.4.0 in /exporters/prometheus
Bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1 in /exporters/prometheus
Bump google.golang.org/grpc from 1.54.0 to 1.55.0 in /exporters/otlp/otlptrace
Bump google.golang.org/grpc from 1.54.0 to 1.55.0 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump google.golang.org/grpc from 1.54.0 to 1.55.0 in /exporters/otlp/otlptrace/otlptracegrpc
Bump google.golang.org/grpc from 1.54.0 to 1.55.0 in /exporters/otlp/otlpmetric
Bump google.golang.org/grpc from 1.54.0 to 1.55.0 in /example/otel-collector
Bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1 in /example/prometheus
Bump golang.org/x/sys from 0.7.0 to 0.8.0 in /sdk
2023-05-07 08:11:23 -07:00
Tyler Yahn
e6839571d2
Release v1.16.0-rc.1/v0.39.0-rc.1 (#4048)
* Bump versions

* Prepare stable-v1 for version v1.16.0-rc.1

* Prepare experimental-metrics for version v0.39.0-rc.1

* Update changelog

* Update CHANGELOG.md
2023-05-03 19:39:01 -07:00
Tyler Yahn
17903bcdb6
Revert "Move global metric back to otel/metric/global for minor release (#3986)" (#4039)
* Revert "Move global metric back to `otel/metric/global` for minor release (#3986)"

This reverts commit 8dba38e02f.

* Add changes to changelog

* Fix versions and go mod tidy

* Run go-mod-tidy
2023-05-02 11:15:39 -07:00
Tyler Yahn
fc96138629
Release v1.15.1/v0.38.1 (#4046)
* Bump versions

* Prepare stable-v1 for version v1.15.1

* Prepare experimental-metrics for version v0.38.1

* Update changelog
2023-05-02 10:18:20 -07:00
Ashvitha
dde1930477
Remove unused imports in host_id_bsd.go (#4041)
* remove unused imports in host_id_bsd.go

* Add changelog entry

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-05-01 08:07:05 -07:00
Tyler Yahn
8e76ab23b4
Release v1.15.0/v0.38.0 (#4035)
* Bump versions

* Prepare stable-v1 for version v1.15.0

* Prepare experimental-metrics for version v0.38.0

* Fix otlpmetric tests

Check pre 1.0 as well

* Update the chagelog
2023-04-28 07:48:08 -07:00
Robert Pająk
180b35513a
Move readFile and execCommand to seperate files (#4015)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-04-27 11:39:09 -07:00
Tyler Yahn
15d6ba2921
Unify metric API into the one otel/metric package (#4018)
* Move instrument into metric

* Update metric docs to include instrument

* Update package names

* Update all imports of sdk/metric/instrument

* Rename Option to InstrumentOption

* Deprecate otel/metric/instrument

* Add changelog entry
2023-04-27 11:25:48 -07: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
4b5abe06d2
Refactor the metric SDK benchmarks (#3992)
Benchmark all instruments, not just an int64 counter.

Include benchmarks for all synchronous measurement methods.

Include benchmarks for all collections.
2023-04-14 07:51:10 -07:00
Remy Chantenay
cf8367f711
Fix Version test in otel/sdk (#3994)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-04-14 07:41:27 -07:00
Kaushal Shah
37388599eb
Fixed race condition in OnEnd and added a unit test (#3951)
* Fixed race condition in OnEnd and added a test

* fixed code review comments

* fixed lint

* Update CHANGELOG.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

* Update sdk/trace/simple_span_processor_test.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update sdk/trace/simple_span_processor_test.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update sdk/trace/simple_span_processor_test.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* fixed panic check

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-04-14 07:23:47 -07:00
Tyler Yahn
8dba38e02f
Move global metric back to otel/metric/global for minor release (#3986)
* Revert "Remove the deprecated `otel/metric/global` pkg (#3829)"

This reverts commit 60f7d42d1e.

* Revert "Support a global MeterProvider in `go.opentelemetry.io/otel` (#3818)"

This reverts commit 813936187e.

* Remove top level metric global

* Add change to changelog
2023-04-13 07:39:39 -07:00
Charlie Le
1b55281859
docs(typos): Run codespell to fix typos (#3980)
* docs(typos): Run codespell to fix typos

There were a lot of typos through the repository, so I ran
[codespell][], a tool for automatically fixing typos, to fix them.

```console
make codespell
```

There's already a tool called [misspell][] that's supposed to take care
of this, but misspell hasn't been updated for 6 years, and it doesn't
seem to be catching any of the typos that codespell can.

[codespell]: https://github.com/codespell-project/codespell
[misspell]: https://github.com/client9/misspell

* Revert and ignore spelling for Consequentially

* Add GH workflow for codespell

* Revert GH Workflow and Makefile for codespell

Per @pellared, since there's no instructions for setting up codespell,
it was suggested that the changes for setting up a workflow and section
in Makefile include instructions for setting up codespell as well.

* Revert spelling on consequently

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-04-11 17:28:13 -07:00
Remy Chantenay
1b97d78324
Add Version func to otlpmetric and otlptrace (#3956)
* Add Version func to otel/exporters/otlp/otlpmetric

* Add Version func to otel/exporters/otlp/otlptrace

* Remove Version func from otel/exporters/otlp/internal

* Update CHANGELOG.md

* Add nolint rule to hostid readFile

* Move GetUserAgentHeader to internal packages

* Update exporters/otlp/otlpmetric/version.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update exporters/otlp/otlptrace/version.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-04-10 14:19:49 -07:00
OpenTelemetry Bot
a261a0f869
dependabot updates Sun Apr 9 14:31:33 UTC 2023 (#3979)
Bump golang.org/x/tools from 0.7.0 to 0.8.0 in /internal/tools
Bump golang.org/x/sys from 0.6.0 to 0.7.0 in /sdk
2023-04-09 07:43:00 -07:00
Damien Mathieu
02fa1e2a8d
Fix aggregation.Default to properly return the default one (#3967)
* fix aggregation.Default to properly return the default one

* add changelog entry

* default aggregation does not error anymore

* test all instrument kinds
2023-04-05 07:44:48 -07:00
Tyler Yahn
65ebe5e50f
Add embedded private method interfaces in metric API (#3916)
* PoC of embedded private method ifaces

* Rename embed to embedded

* Add an embedded iface for all instruments

* Fix metric/instrument tests

* Fix global and otel

* Fix SDK

* Comment the embedded pkg types

* Update the embedded pkg docs

* Update otel/metric docs about impls

* Update otel/metric type docs on impl

* Update docs in otel/metric/instrument on default

* Add changes to changelog

* Apply suggestions from code review

Co-authored-by: Robert Pająk <pellared@hotmail.com>

* Apply feedback on URLs

* Reword based on feedback

* Make it clear we only recommended embedding noop

* Ignore links with godot linter

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-04-03 07:33:19 -07:00
OpenTelemetry Bot
5f13db5ca6
dependabot updates Sun Apr 2 15:32:08 UTC 2023 (#3963)
Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 in /exporters/zipkin
Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 in /exporters/jaeger
Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 in /sdk/metric
Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 in /sdk
Bump github.com/go-logr/logr from 1.2.3 to 1.2.4
2023-04-02 12:10:19 -04:00
Mikhail Mazurskiy
22fd10447d
Unify TracerProvider span processor lookups (#3942)
* Pre-allocate spanProcessorStates slice

* Make sync.Once a non-pointer

It doesn't need to be a pointer, can be part of the struct to avoid allocating a separate object for it

* getSpanProcessors() helper

* Add tests for UnregisterSpanProcessor()
2023-04-01 07:57:35 -07:00
Tyler Yahn
271df1dc01
Add Version func to otel/sdk (#3949)
* Add Version func to otel/sdk

* Update sdk/resource to use sdk version

* Remove unused UserAgent from sdk/internal

* Add changes to changelog

* Update CHANGELOG.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-03-30 12:49:39 -07:00
Tyler Yahn
f4a9d78e7f
Update Histogram Extrema and Sum to be generic (#3870)
* Update Histogram Extrema and Sum to be generic

* Update metric SDK

* Update exporters

* Add changes to changelog
2023-03-29 11:24:25 -07:00
Mikhail Mazurskiy
c4940f3b43
TracerProvider allows calling Tracer() while it's shutting down (#3924) 2023-03-27 17:05:44 -07:00
Damien Mathieu
ae90c4402e
switch atomic.Value to atomic.Pointer for spanProcessorStates (#3926)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-03-27 09:38:47 -07:00
Eduardo Bonzi da Conceição
b73a33c487
Warn on intitialization of Simple SpanProcessor (#3854)
* add warning log about using simpleSpanProcessor in production

* add changelog entry

* fix changelog

* switch to using the new Warn logging function

* revert alignment formatting in changelog

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-03-24 08:29:52 -07:00
Tyler Yahn
7ad0ae4da1
Release v1.15.0-rc.2/v0.38.0-rc.2 (#3923)
* Bump versions

* Prepare stable-v1 for version v1.15.0-rc.2

* Prepare experimental-metrics for version v0.38.0-rc.2

* Update changelog

* Update CHANGELOG.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-03-23 07:47:46 -07:00
Mikhail Mazurskiy
e4cc478c02
TracerProvider doesn't allow to register a SpanProcessor after shutdown (#3845) 2023-03-22 09:47:42 -07:00
Matthew Wear
282a47e3d3
add host.id to resource auto-detection (#3812)
* add platform specific hostIDReaders

* add WithHostID option to Resource

* add changelog entry

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* linting

* combine platform specific readers and tests

This allows us to run tests for the BSD, Darwin, and Linux readers
on all platforms.

* add todo to use assert.AnError after resource.Detect error handling is updated

* move HostID test utilities to host_id_test

* return assert.AnError from mockHostIDProviderWithError

* use assert.ErrorIs

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2023-03-21 14:45:30 -05:00
Tyler Yahn
90df52586b
Split metric configuration down to instrument (#3895)
* Split metric configuration down to instrument

* Rename *ObserverOptions to *ObservableOption

* Update option docs with links
2023-03-21 08:16:57 -05:00
Tyler Yahn
b7b53bba40
Remove Synchronous and rename Asynchronous (#3892)
* Remove the Synchronous interface

* Rename Asynchronous to Observable

* Update PR number
2023-03-20 13:26:17 -07:00
Sinan Ülker
7fc24d2b14
Update the metric Export interface to accept a *ResourceMetrics instead of ResourceMetrics (#3853)
* Change the signature of Export method

* Pass tests for otlp exporter

* Pass tests for otlp grpc and http packages

* Update opencensus bridge

* Refactor and pass tests for stdoutmetric package

* Update periodic reader tests

* Update changelog

* Apply suggestions

* Apply suggestions

* Update CHANGELOG.md

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-03-16 10:58:43 -07:00
Mori
3a40e65a38
Update go directive value in go.mod files to 1.19 (#3850)
* remove go 1.18 in go.mod, add go 1.19

* revert //+build directives

* remove +build directives

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-03-15 09:52:04 -07:00
Tyler Yahn
01b8f15a72
Add Exemplar to metricdata package (#3849)
* Add Exemplar to metricdata pkg

* Update histogram Aggregator

* Update opencensus bridge

* Update prometheus exporter

* Update OTLP exporter

* Update stdoutmetric exporter

* Add changes to changelog

* Update fail tests

* Add tests for IgnoreExemplars

* Fix merge
2023-03-14 07:56:18 -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
Aaron Clawson
e463505da7
Reuse memory in metric pipelines (#3760)
* Have pipelines reuse memory

* truncate Metric slice

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Use rm pool on periodic shutdown.

* zero out RM on ctx error

* Update sdk/metric/pipeline.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Peter Liu <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Fix lint

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Peter Liu <lpfvip2008@gmail.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2023-03-09 09:43:16 -08:00
Tyler Yahn
7dc7b30405
Remove unneeded type argument from metric SDK (#3831)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-03-09 07:33:18 -08:00
Tyler Yahn
1626ff746f
Wrap errors returned from Detect and New in sdk/resource (#3844)
* Update Detect and New to wrap errors

* Add TestNewWrapedError

Test that New returns an error that can be unwrapped.

* Add changes to changelog

* Clarify and simplify errors
2023-03-08 15:15:27 -08:00
OpenTelemetry Bot
3df561e644
dependabot updates Mon Mar 6 15:33:46 UTC 2023 (#3840)
Bump github.com/itchyny/gojq from 0.12.11 to 0.12.12 in /internal/tools
Bump golang.org/x/sys from 0.5.0 to 0.6.0 in /sdk
2023-03-06 07:40:41 -08:00
Tyler Yahn
34aacd95ff
Release v1.15.0-rc.1 (#3825)
* Bump module set versions

* Prepare stable-v1 for version v1.15.0-rc.1

* Prepare experimental-metrics for version v0.38.0-rc.1

* Update changelog
2023-03-02 07:43:27 -08:00
Tyler Yahn
813936187e
Support a global MeterProvider in go.opentelemetry.io/otel (#3818)
* Move ErrorHandler impl to internal

To avoid the import cycle, the otel/metric package needs to not import
otel. To achieve this, the error handling implementation is moved to the
otel/internal/global package where both can import the needed
functionality.

* Add global metric to go.opentelemetry.io/otel

* Crosslink and update to global metric in otel

* Add changes to changelog

* Set PR number in changelog

* Add global metric unit tests

* Rename MeterProivder() to GetMeterProivder()

* Add TODO to remove nolint comments
2023-03-01 11:16:03 -08:00
Robert Pająk
d0e4a438ef
Handle empty env vars as it they were not set (#3764)
* Handle empty env vars as it they were not set

* Add changelog entry

* Add missing unit test
2023-02-28 12:43:48 -08:00
Tyler Yahn
2e54fbb3fe
Release v1.14.0/v0.37.0/v0.0.4 (#3810)
* Bump mod versions

* Add bridge/opentracing/test to versions.yaml

* Prepare stable-v1 for version v1.14.0

* Prepare experimental-metrics for version v0.37.0

* Prepare experimental-schema for version v0.0.4

* Update changelog
2023-02-27 13:57:23 -08:00
Tyler Yahn
fe6856e804
Deprecate metric/unit and use a string for units in the metric API/SDK (#3776)
* Replace Unit from metric/unit with string

Deprecate the units package. This package will not be included in the
metric GA.

* Add changes to changelog
2023-02-27 08:10:56 -08:00
Aaron Clawson
17e5d0f549
Do not wrap error if multierror does not have one. (#3772) 2023-02-27 09:10:55 -06:00
OpenTelemetry Bot
0a75c5bd8a
dependabot updates Sun Feb 26 15:49:13 UTC 2023 (#3804)
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /bridge/opentracing/test
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/otlp/internal/retry
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /schema
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/otlp/otlpmetric/otlpmetrichttp
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/prometheus
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /metric
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/jaeger
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/otlp/otlpmetric/otlpmetricgrpc
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/zipkin
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /trace
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/otlp/otlpmetric
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/stdout/stdouttrace
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/otlp/otlptrace/otlptracegrpc
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/otlp/otlptrace
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/otlp/otlptrace/otlptracehttp
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /exporters/stdout/stdoutmetric
Bump github.com/golangci/golangci-lint from 1.51.1 to 1.51.2 in /internal/tools
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /sdk/metric
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /bridge/opencensus
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /sdk
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Bump golang.org/x/sys from 0.0.0-20220919091848-fb04ddd9f9c8 to 0.5.0 in /sdk
Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 in /bridge/opentracing
Bump lycheeverse/lychee-action from 1.5.4 to 1.6.1
2023-02-26 07:58:24 -08:00
Robert Pająk
1d6704c8fc
Support OTEL_METRIC_EXPORT_INTERVAL and OTEL_METRIC_EXPORT_TIMEOUT (#3763)
* Support OTEL_METRIC_EXPORT_INTERVAL and OTEL_METRIC_EXPORT_TIMEOUT

* Fix non-positive duration error log


Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-02-24 09:26:47 -06:00
Tyler Yahn
f78f72d66c
Merge instrument cache to inserter (#3724)
* Merge instrument cache to inserter

The current pipeline resolution path will only add the resolved
aggregators to the pipeline when it creates one (cache miss). It will
not add it if there is a cache hit. This means (since we cache
instruments at the meter level, not the pipeline level) the first reader
in a multiple-reader setup is the only one that will collect data for
that aggregator. All other readers will have a cache hit and nothing is
added to the pipeline. This is causing #3720.

This resolves #3720 by moving the instrument caching into the inserter.
This means aggregators are cached at the reader level, not the meter.

* Rename aggCV to aggVal

---------

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-02-21 08:07:37 -08:00
Aaron Clawson
cc8bdaaad4
Change the Reader.Collect Signature. (#3732)
* Changes the signature of Collect().

This DOES NOT make the SDK reuse memory, but it does enable it to be added.
2023-02-21 09:04:27 -06:00
Tyler Yahn
0252734309
Rename instrumentID to streamID in metric SDK (#3735)
An instrument is defined by a name, description, unit, and kind. The
instrumentID contains more identifying information than these fields.
The additional information it contains relate to what the OTel metric
data-model calls a stream. Match the terminology and remove using the
instrumentID name in case we want to use it for something else (say,
when caching instruments).
2023-02-16 13:33:56 -08:00
Anthony Regeda
441a173514
No memory leakage in attributes filter (#3695)
The attributes filter collects seen attributes in order to avoid
filtration on the same attribute set. However, the `attribute.Set` is
not comparable type and new allocations of sets with same attributes will be
considered as new sets.

Metrics with a high cardinality of attributes consume a lot of memory
even if we set a filter to reduce that cardinality.

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-02-13 08:07:06 -08:00
Mackenzie
e9bdda0e68
WithContainerID: Document ECS limitation. (#3639)
* WithContainerID: Document ECS limitation.

WithContainerID is not able to extract the correct container id in an ECS environment. The ECS resource detector should be used instead (https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/aws/ecs).
See #3633.

* fix lint

* Update sdk/resource/config.go

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-02-09 11:03:39 -08:00
Tyler Yahn
ddf393886c
Use semconv creation functions (#3683) 2023-02-07 13:42:47 -08:00
Anthony Mirabella
f2fd476f43
Prepare v1.13.0/v0.36.0 release (#3688)
* update versions.yaml for release

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare stable-v1 for version v1.13.0

* Prepare experimental-metrics for version v0.36.0

* Update CHANGELOG

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

---------

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2023-02-07 14:34:41 -05:00
Aaron Clawson
5e8eb855bf
Add a benchmark for histogram allocations (#3635)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-02-02 10:16:25 -08:00
Tyler Yahn
6cb5718eaa
Release v1.12.0/v0.35.0 (#3623)
* Update module versions

* Prepare stable-v1 for version v1.12.0

* Prepare experimental-metrics for version v0.35.0

* Prepare experimental-schema for version v0.0.4

* Update the CHANGELOG

* Undo bump to experimental-schema

Revert to original version as nothing has changed.

* Fix PR number in changelog

* Move change from #3497 into current release
2023-01-29 07:41:22 -08:00
Tyler Yahn
7f4d76ab7a
Use Extrema type for Histogram min/max (#3550)
* Use Extrema type for Histogram min/max

* Add case for Extrema in AssertHasAttributes

* Add changes to changelog

* Add NewExtrema

* Add metricdatatest tests

* Use getter for Extrema

* Fix Extrema doc language

* Correct dataset to be one word

* Ensure multiple extrema are tested in a dataset
2023-01-26 10:49:58 -08:00
Tyler Yahn
c0fb8dec4c
Remove the unneeded Observe method from the async instruments (#3586)
* Update RegisterCallback and Callback decls

RegisterCallback accept variadic Asynchronous instruments instead of a
slice.

Callback accept an observation result recorder to ensure instruments
that are observed by a callback.

* Update global impl

* Update noop impl

* Update SDK impl

* Fix prometheus example

* Fix metric API example_test

* Remove unused registerabler

* Rename ObservationRecorder to MultiObserver

* Update Callback documentation about MultiObserver

* Remove the Observe method from async inst

* Revert to iface for Observers

* Fix async inst docs

* Update global async delegate race test

* Restore removed observe doc

* Remove TODO

* Remove stale comment

* Update changelog
2023-01-25 12:58:09 -08:00
Tyler Yahn
c7e2679529
Generate the semconv/v1.17.0 package (#3599)
* Generate semconv/v1.17.0

* Update all semconv use to v1.17

* Add changes to changelog
2023-01-24 08:10:41 -08:00
Tyler Yahn
828892954b
Update the RegisterCallback of the SDK meter (#3604) 2023-01-24 07:56:11 -08:00
Tyler Yahn
a1ce7e5f0d
Combine precomputed values of filtered attribute sets (#3549)
* Combine spatially aggregated precomputed vals

Fix #3439

When an attribute filter drops a distinguishing attribute during the
aggregation of a precomputed sum add that value to existing, instead of
just setting the value as an override (current behavior).

* Ignore false positive lint error and test method

* Add fix to changelog

* Handle edge case of exact set after filter

* Fix filter and measure algo for precomp

* Add tests for precomp sums

* Unify precomputedMap

* Adds example from supplimental guide

* Fixes for lint

* Update sdk/metric/meter_example_test.go

* Fix async example test

* Reduce duplicate code in TestAsynchronousExample

* Clarify naming and documentation

* Fix spelling errors

* Add a noop filter to default view

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2023-01-20 09:54:42 -08:00
Tyler Yahn
88f6000318
Remove the unused produceKey and callbackKey (#3602)
Following #3584, this value and type are no longer used.
2023-01-20 09:44:25 -08:00
Tyler Yahn
69b18e62a7
Redesign RegisterCallback API (#3584)
* Update RegisterCallback and Callback declerations

RegisterCallback accepts variadic Asynchronous instruments instead of a
slice.

Callback accepts an observation result recorder to ensure instruments
that are observed by a callback.

* Update global, noop, SDK implementations
* Fix examples
* Add changes to changelog
* Test RegisterCallback for invalid observers
* Test callbacks from foreign sources not collected
* Support registering delegating instruments
2023-01-19 08:18:26 -06:00
Tyler Yahn
f941b3a8df
Restructure RegisterCallback method (#3587)
* Restructure RegisterCallback method

Instead of accepting instruments to register the callback with as a
slice, accept them as variadic arguments.

* Add changes to changelog

* Add PR number to changes
2023-01-13 08:31:14 -08:00
Tyler Yahn
36904e4463
Deprecate the syncint64/syncfloat64/asyncint64/asyncfloat64 packages (#3575)
* Dep async/sync pkgs for new inst in instrument pkg

* Replace use of deprecated instruments

* Add changelog entry

* Update changelog entry PR number
2023-01-10 15:06:24 -08:00
Tyler Yahn
78a55822f8
Upgrade all semconv dependencies to v1.16.0 (#3581)
* Upgrade all semconv ref to v1.16.0

* Add changes to changelog
2023-01-10 10:57:28 -08:00
Tyler Yahn
82882dfbd3
Have multi-instrument callback return an error (#3576)
* Have multi-inst callback return an error

* Update PR number in changelog entry

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-01-08 07:53:07 -08:00
Tyler Yahn
1f9cc3036b
Add single instrument callback and split metric instrument configuration (#3507)
* Split metric inst config

Instead of having the same configuration for both the Synchronous and
Asynchronous instruments, use specific options for both.

* Use Async/Sync opt for appropriate inst

* Update noop inst providers

* Update internal global impl

* Update sdk

* Remove unused method for callbackOption

* Test instrument configuration

* Lint imports

* Add changes to changelog

* Refactor callbacks and further split opts

Define callbacks to return the value observed. Because of the different
types returned for different observables, the callbacks and options are
move to the sync/async packages.

* Update noop impl

* Fix example_test.go

* Fix internal impl

* Update Callbacks

Return observations for distinct attr sets.

* Refactor common code in sdk/metric inst provider

* Update examples and prom exporter

* Generalize callback

* Update changelog

* Add unit tests for callback

* Add meter tests for cbacks on creation

* Rename Observations to Measurements

* Update Callback to accept an Observer

* Update SDK impl

* Move conf to instrument pkg

* Apply suggestions from code review
2023-01-06 09:20:49 -08:00
Tyler Yahn
e368276257
Create metric API Callback type (#3564)
* Create metric API Callback type

Document the type according the OTel specification requirements.

* Update all impls of the metric API with new type

* Add changes to changelog

* Update PR number in changelog entry
2023-01-05 14:22:06 -08:00
Tyler Yahn
4607516316
Rename metric SDK instrument kind to match API (#3562)
* Rename metric SDK instrument kind to match API

Follow up to #3530.

* Update CHANGELOG

Fix trailing spaces and update PR number.
2023-01-04 12:47:18 -08:00
Tyler Yahn
a54167d2c9
Remove metric instrument provider API (#3530)
* Remove all InstrumentProvider APIs

* Fix noop impl

* Fix metric/example_test.go

* Update global impl

* Update sdk/metric impl

* Fix examples

* Fix prometheus exporter

* Add changes to changelog

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2023-01-03 10:34:10 -08:00
Ziqi Zhao
c82dbddc31
TracerProvider shutdown release resources (#3551)
* TracerProvider shutdown release resources

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* add changelog

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* Update CHANGELOG.md

Co-authored-by: David Ashpole <dashpole@google.com>

* prevent registered span processors after shutdown

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2023-01-03 09:51:56 -08:00
Tyler Yahn
ad4d54e0f1
Warn metric Exporters of ResourceMetrics reuse (#3556)
To potentially optimize the collection code path (#3047) ResourceMetrics
sent to the Exporter may be reused in the future. Warn users of this.

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2023-01-03 08:15:07 -08:00
Daniel Metz
9d633d2ed5
traceIDRatioSampler: use rightmost bits (#3557)
* use bottom bits

* add changelog entry

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-12-30 14:06:06 -05:00
darkfeline
69e44a337b
Fix ParentBased comment formatting (#3553)
godoc doesn't have an unordered list syntax
2022-12-24 10:16:11 -08:00
Tyler Yahn
4014204d42
Allow multi-instrument callbacks to be unregistered (#3522)
* Update Meter RegisterCallback method

Return a Registration from the method that can be used by the caller to
unregister their callback.

Update documentation of the method to better explain expectations of
use and implementation.

* Update noop impl

* Update global impl

* Test global Unregister concurrent safe

* Use a map to track reg in global impl

* Update sdk impl

* Use a list for global impl

* Fix prom example

* Lint metric/meter.go

* Fix metric example

* Placeholder for changelog

* Update PR number in changelog

* Update sdk/metric/pipeline.go

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add test unregistered callback is not called

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2022-12-16 12:02:42 -08:00
David Ashpole
14a17b3ad6
Add Metric Producer as a new interface, which returns scope metrics (#3524)
* add RegisterProducer method and metric.Producer interface

* rename testProducer to testSDKProducer

* rename testMetrics to testResourceMetrics

* add testExternalProducer for testing bridges

* add test data for testing external producers

* clean up help text

* unit tests for external Producer

* changelog

* improve test coverage

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* support partial errors

* fix lint

* add additional test

* unallocate producers on shutdown

* don't register Producers after shutdown

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-12-15 07:50:45 -08:00
Tyler Yahn
9c61547163
Remove the deprecated view package (#3520)
* Remove the deprecated view package

* Add change to changelog

* Fix changelog header
2022-12-07 11:38:22 -08:00
Aaron Clawson
bc5cf7eb26
Release v1.11.2/v0.34.0 (#3512)
* Update Versions

Signed-off-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Prepare stable-v1 for version v1.11.2

* Prepare experimental-metrics for version v0.34.0

* Update Changelog

Signed-off-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Update CHANGELOG version.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Signed-off-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-12-05 13:43:20 -06:00
Aaron Clawson
e97704c1ec
Fix a typo in the manual reader (#3509)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-12-05 07:56:48 -08:00
Aaron Clawson
289a612e6a
Adds an Attribute assertion to metric data test (#3487)
* Adds an Attribute assertion to metric data test

Signed-off-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2022-11-29 14:32:15 -06:00
Tyler Yahn
c4333a9687
Deprecate the sdk/metric/view package (#3476)
* Deprecate the sdk/metric/view package

* Add deprecation to changelog
2022-11-21 08:05:07 -08:00
Tyler Yahn
dbf960c8e1
Add view example tests (#3460)
* 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>
2022-11-21 07:45:47 -08:00
Tyler Yahn
037719b646
Replace view use from sdk/metric/view to sdk/metric (#3461)
* 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
2022-11-19 09:05:20 -08:00
Tyler Yahn
2e780d8e39
Add View, NewView, Instrument, Stream, and InstrumentKind to sdk/metric with unit tests (#3459)
* 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>
2022-11-16 08:18:02 -08:00
Tyler Yahn
308d0362e6
Only registers callbacks if non-drop aggregation is used (#3408)
* 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>
2022-11-11 09:10:59 -08:00
Tyler Yahn
d091ba88e4
Do not export aggregations without any data points (#3436)
* 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
2022-11-11 07:22:27 -08:00
Tyler Yahn
acd87773e2
Restructure instrument creation code paths (#3256)
* Add BenchmarkInstrumentCreation

* Unify instrument provider

* Resolve import shadow

* Update sdk/metric/pipeline.go

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Punctuate to fix lint

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-11-10 16:04:53 -08:00
Aaron Clawson
c21b6b6bb3
Adds attribute filter logic (#3396)
* Adds attribute filter logic

* Apply PR feedback

* Use updated MP options

* Update Changelog and TODO numbers

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-11-08 07:45:23 -08:00
Joshua MacDonald
49b62aef66
New benchmark derived from otel-launcher-go (#3395)
* New benchmark derived from otel-launcher-go

* edit

* refactoring from PR feedback

* refactoring from PR feedback

* update for upstream main

* revert view change

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-11-01 08:50:49 -07:00
Tyler Yahn
48a05478e2
Move Aggregation/Temporality selection to the Exporter interface (#3260)
* Add Aggregation/Temporality to Exporter iface

* Use Exporter selectors in periodic reader

* Move selector opts to just manual reader

* Simplify periodic reader ref to Exporter selectors

* Fix the periodic reader tests

* Add Aggregation/Temporality method to stdoutmetric

* Add Temporality/Aggregation to otlpmetric exp

* Add Temporality/Aggregation to http/grpc otlp clients

* Add oconf tests for selector opts

* Add tests to stdoutmetric for opts

* Correct comment subject

* Add changes to changelog

* Fix otest test client
2022-11-01 07:56:18 -07:00
Tyler Yahn
8a390acc34
Recommend not recording cumulative explicit histogram min/max (#3403)
* Recommend not recording cumulative hist min/max

* Update sdk/metric/aggregation/aggregation.go

Co-authored-by: David Ashpole <dashpole@google.com>

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: David Ashpole <dashpole@google.com>
2022-10-31 18:59:05 -07:00
github-actions[bot]
cc1eaec683
dependabot updates Mon Oct 31 15:24:02 UTC 2022 (#3433)
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>
2022-10-31 08:54:41 -07:00
Tyler Yahn
d1aca7b167
Associate views with MeterProvider instead of Reader (#3387)
* 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
2022-10-31 07:55:54 -07:00
github-actions[bot]
667a2017ae
dependabot updates Thu Oct 27 19:57:51 UTC 2022 (#3404)
* 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>
2022-10-27 14:21:32 -07:00
Tyler Yahn
40f19009b0
Calculate delta sums for delta async counter/up-down-counter types (#3398)
* 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
2022-10-27 08:47:27 -07:00
Tyler Yahn
2fe8861a24
Release v1.11.1/v0.33.0 (#3367)
* 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
2022-10-19 12:55:44 -07:00
Tyler Yahn
715631d35f
Fix Asynchronous Counters Recording (#3350)
* 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
2022-10-19 10:35:13 -07:00
Luiz Aoqui
05aca23c19
Decode values from OTEL_RESOURCE_ATTRIBUTES (#2963)
* 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>
2022-10-19 09:13:20 -07:00
github-actions[bot]
1cbd4c2b77
dependabot updates Mon Oct 17 16:17:28 UTC 2022 (#3348)
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>
2022-10-17 12:25:56 -04:00
Ziqi Zhao
a8b9ddc7f6
attribute: fix slice related function bug (#3252)
* attribute: fix slice related function bug

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-10-13 09:34:02 -05:00
Bogdan Drutu
e4bdfe7b56
Fix sdktrace.TraceProvider Shutdown/ForceFlush when no processor register (#3268)
* Fix sdktrace.TraceProvider Shutdown/ForceFlush when no processor register

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-10-12 13:44:18 -07:00
Tyler Yahn
4a3adaafd4
Replace meterRegistry with cache (#3255) 2022-10-12 12:54:51 -07:00
Tyler Yahn
ff18552791
Release v1.11.0/v0.32.3 (#3275)
* 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}
2022-10-12 10:19:51 -07:00
Tyler Yahn
29511a0078
Release Metric v0.32.2 (#3270)
* Bump experimental-metrics version to v0.32.2

* Prepare experimental-metrics for version v0.32.2

* Update changelog
2022-10-11 14:55:18 -07:00
Tyler Yahn
b5292b8459
Handle duplicate Aggregators and log instrument conflicts (#3251)
* 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>
2022-10-11 15:41:47 -04:00
Tyler Yahn
c5ebbc4d4b
Use default view if instrument does not match any pipeline view (#3237)
* 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.
2022-10-07 00:40:54 -04:00
Damien Mathieu
697d245b9c
Update bucket default bounds (#3222)
* 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>
2022-10-04 15:41:18 -07:00
Tyler Yahn
3675379e73
Remove the unused Resource field from the MeterProvider (#3253) 2022-10-03 09:57:27 -07:00
Tyler Yahn
aca054b075
Refactor Pipeline (#3233)
* 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
2022-09-28 08:47:20 -07:00
Tyler Yahn
12e16d41e7
Bump golang.org/x/sys/unix (#3235)
* 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
2022-09-27 09:08:34 -07:00
Tyler Yahn
111a1d7bbd
Flush pending telemetry when ForceFlush or Shutdown are called on a PeriodicReader (#3220)
* 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>
2022-09-27 08:05:41 -07:00
Tyler Yahn
529049bd03
Remove unused meterRegistry Range method (#3230)
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-09-26 07:33:57 -07:00
wdullaer
b369e59ba1
Improve trace status handling (#3214)
* Implement specification compliant trace status handling

* Update trace/trace.go

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* chore: Make linter happy

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-09-23 11:39:53 -07:00
Aaron Clawson
d7bfe6675f
Prerelease metrics/v0.32.1 (#3228)
* Prepare for v0.32.1 release

* Prepare experimental-metrics for version v0.32.1

* Update Changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-09-22 14:47:08 -05:00
Aaron Clawson
c979be08e4
Update sdk/metric go.mod version to latest (#3216)
* 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>
2022-09-22 09:36:24 -07:00
Tyler Yahn
4eea5db998
Set MeterProvider resource for all pipelines (#3218)
* Set MeterProvider resource for all pipelines

Resolves #3208

* Add change to changelog
2022-09-22 09:18:18 -07:00
Bogdan Drutu
f535b1e65f
Remove unnecessary build restrictions for go1.18 (#3197)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-09-21 10:00:00 -07:00
Aaron Clawson
b6d4335a72
Removes go1.17, replaces with go1.18 (#3179)
* Removes go1.17, replaces with go1.18

* Update Changelog

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-09-19 17:22:40 -07:00
Tyler Yahn
f215b8dbe6
Release v0.32.0 -- Revised Metric SDK (Alpha) (#3184)
* Bump experimental-metrics to v0.32.0

* Update opencensus bridge modules in versions.yaml

* Prepare experimental-metrics for version v0.32.0

* Add changelog update

* Remove changes to unreleased code
2022-09-19 10:28:37 -07:00
Tyler Yahn
b1e5e35b5c
Merge metric SDK development branch "new_sdk/main" into "main" (#3175)
* Remove Old SDK and dependent code on that SDK (#2802)

* Remove prometheus example code

* Remove prometheus exporter code

* Remove stdoutmetric code

* Remove sdk/metric/* packages

* Remove opencensus example code

* Remove otlpmetric exporter code

* Remove OpenCensus bridge code

* go mod tidy

* Remove empty modules

* Remove the number and aggregator from the metric SDK (#2840)

* Add MeterProvider/meter structure to new SDK (#2822)

* Remove prometheus example code

* Remove prometheus exporter code

* Remove stdoutmetric code

* Remove sdk/metric/* packages

* Remove opencensus example code

* Remove otlpmetric exporter code

* Remove OpenCensus bridge code

* go mod tidy

* Remove empty modules

* Add MeterProvider/meter structure to new SDK

* Add vanity imports

* go mod tidy

* Add MeterProvider Flush/Shutdown required by spec

* Cast nil ptr instead of alloc for comp time check

* Apply suggestions from code review

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Apply suggested Shutdown comment

* Apply fixes from feedback

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add sdk/metric/view structure (#2838)

* Add sdk/metric/view package structure

* Vanity import

* Define the reader interface, and create a manual reader  (#2885)

* Add the manual reader to the sdk.

* Incoperate feedback from PR.

* additional PR comments

* Fix lint

* Fixes for PR.

* Unexport ManualReader
fix a few comments

* Refactor reader testing into a harness (#2910)

* Refactor reader testing into a harness

* Run lint

* Removed merge leftover

* Use opentracing bridge from main

* go mod tidy

* crosslink

* Remove Prometheus exporter from README for now

* Run make with new tool set

* Replace testReaderHarness with testify suite (#2915)

* Add the periodic reader (#2909)

* Add the metric.Exporter interface

* Move the reader errors to reader.go

* Update Reader.Collect docs

Remove TODO being addressed in this PR and restate purpose of method.

* Initial draft of the periodic reader

* Refer to correct config in periodic reader opts

* Refactor reader testing into a harness

* Move wait group handling out of run

* Refactor ticker creation to allow testing

* Honor export timeout in run

* Fix wait group wait bug

* Add periodic reader tests

* Fix lint

* Update periodic reader comments

* Add concurrency test for readers

* Simplify the ticker stop deferral

* Only register once

* Restrict build of metric sdk to Go>1.16

* Clean up ShutdownBeforeRegister test

* Test duplicate Reader registration (#2914)

The specification requires the SDK prevent duplicate registrations for
readers. This adds a test for that and fixes this for the manualReader.

* Add WithReader and WithResource Options (#2905)

* Add WithReader and WithResource Options

* Run lint

* Update WithReader fn signature based on feedback

* crosslink

* Remove zero-len check in unify

* Restrict build to Go > 1.16

* Add bench test for reader collect methods (#2922)

* Unify reader implementations (#2923)

* Unify reader implementations

Use an atomic.Value to manage concurrency without a lock.

* Lint

* Merge main into new sdk main (#2925)

* Use already enabled revive linter and add depguard (#2883)

* Refactor golangci-lint conf

Order settings alphabetically.

* Add revive settings to golangci conf

* Check blank imports

* Check bool-literal-in-expr

* Check constant-logical-expr

* Check context-as-argument

* Check context-key-type

* Check deep-exit

* Check defer

* Check dot-imports

* Check duplicated-imports

* Check early-return

* Check empty-block

* Check empty-lines

* Check error-naming

* Check error-return

* Check error-strings

* Check errorf

* Stop ignoring context first arg in tests

* Check exported comments

* Check flag-parameter

* Check identical branches

* Check if-return

* Check increment-decrement

* Check indent-error-flow

* Check deny list of go imports

* Check import shadowing

* Check package comments

* Check range

* Check range val in closure

* Check range val address

* Check redefines builtin id

* Check string-format

* Check struct tag

* Check superfluous else

* Check time equal

* Check var naming

* Check var declaration

* Check unconditional recursion

* Check unexported return

* Check unhandled errors

* Check unnecessary stmt

* Check unnecessary break

* Check waitgroup by value

* Exclude deep-exit check in example*_test.go files

* Move the minimum version to go 1.17 (#2917)

* Move the minimum version to go 1.17

* Update readme and changelog

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Make lint

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Add view to metrics. (#2926)

* WIP views public

* Add attribute filters and comments.

* Fixes for lint

* Address comments

* Fix lint

* Changed view matching to expand end

Removed the dscriptor, it was moved in previous patch

* change wildcards into regex

* Update comments

* address comments.

* Address more PR comments

* renamed WithDescription to WithSetDescription.

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Implement MeterProvider's Meter method (#2945)

* Implement stubbed meter create method

* Rename return value to avoid comment

* Encapsulate meterRegistry tests with identifying name

* Run lint fix

* Comment meterRegistry being concurrent safe

* Remove ordered meter tracking in the meterRegistry

* Test range completeness instead of order

* Remove provider field from meter

* Initialize MeterProvider readers field for new (#2948)

* Introduce Temporality, WithTemporality Reader options and InstrumentKind (#2949)

* Introduce Temporality and InstrumentKind

Because Temporality is the responsibility of the Reader additional methods
are added to the Reader interface.  And New options are created to
configure the temporality selector.

* Addresses comments, and adds tests.

* Fix addition PR comment

* Add aggregation package and reader/view options (#2958)

* Add aggregation pkg and options

* Update documentation for the aggregation pkg

* Test Aggregation.Err

* Fix aggregation pkg comment

* Add WithAggregation comment

* Add default aggregation

* Rename WithAggregation and add AggregationSelector

* Fix DefaultAggregationSelector use and decl

* Replace Aggregation struct with iface

* Add Copy method to hist and fix Err method

* Additional test for monotonic bounds

* Add aggregation method to Reader

* Use AggregationSelector instead of inline func type

* Switch RecordMinMax to NoMinMax

* Deep copy and validate in options

* Test the DefaultAggregationSelector

* nolint for import-shadow of method

* Fix Default aggregation comment

* Test the explicit bucket histogram deep copy

* Update temporality selector option (#2967)

Match the WithAggregationSelector option pattern: define a
TemporalitySelector type, export the DefaultTemporalitySelector
function, and name the option with a Selector suffix.

* Minor NewMeterProvider and producer docs fix (#2983)

* Add internal package structure for aggregation (#2954)

* Add the aggtor package

* Restrict to Go 1.18

* Add missing build block to view_test.go

* Comment Aggregator iface

* Use Go 1.18 as the default ci version

* Update Aggregator iface from feedback

* Accept hist conf

* Flatten aggtor into just internal

* Add Cycler interface

Separate the duties of aggregation and maintaining state across
aggregation periods.

* Remove build flags for doc.go

* Clarify Cycler documentation

* Remove aggregation fold logic

* Rename Number to Atomic

* Add tests for Atomic impls

* Remove unneeded Atomic implementation

Add back when filling in structures.

* Fix article in Float64 docs

* Remove Atomic

This is an implementation detail.

* Add aggregator_example_test

* Fix hist example

* Add issue numbers to all TODO and FIXME

* Remove zero parameter comment

* Combine the cycler into the aggregators

* Remove the drop aggregator

* Fix lint

* Use attribute.Set instead of ptr to it

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Merge main into new_sdk/main (#2996)

* Use already enabled revive linter and add depguard (#2883)

* Refactor golangci-lint conf

Order settings alphabetically.

* Add revive settings to golangci conf

* Check blank imports

* Check bool-literal-in-expr

* Check constant-logical-expr

* Check context-as-argument

* Check context-key-type

* Check deep-exit

* Check defer

* Check dot-imports

* Check duplicated-imports

* Check early-return

* Check empty-block

* Check empty-lines

* Check error-naming

* Check error-return

* Check error-strings

* Check errorf

* Stop ignoring context first arg in tests

* Check exported comments

* Check flag-parameter

* Check identical branches

* Check if-return

* Check increment-decrement

* Check indent-error-flow

* Check deny list of go imports

* Check import shadowing

* Check package comments

* Check range

* Check range val in closure

* Check range val address

* Check redefines builtin id

* Check string-format

* Check struct tag

* Check superfluous else

* Check time equal

* Check var naming

* Check var declaration

* Check unconditional recursion

* Check unexported return

* Check unhandled errors

* Check unnecessary stmt

* Check unnecessary break

* Check waitgroup by value

* Exclude deep-exit check in example*_test.go files

* Move the minimum version to go 1.17 (#2917)

* Move the minimum version to go 1.17

* Update readme and changelog

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Use ByteSliceToString from golang.org/x/sys/unix (#2924)

Use unix.ByteSliceToString to convert Utsname []byte fields to strings.

This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* docs: fix typo (#2935)

* add timeout to grpc connection in otel-collector example (#2939)

* Closes: #2951 (#2952)

This PR updates the example listed in the getting started doc
so that it will compile without error.  It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* fix data-model link (#2955)

* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)

* Move to using Instrumentation Scope (#2976)

* Move to using Instrumentation Scope

* Use type alias, not definition

* Add a changelog entry

* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)

* docs(website_docs): fix toc

* docs(website_docs): fix toc

* update exporting_data.md for rerun check-links

* update exporting_data.md for rerun check-links

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update getting-started.md (#2984)

grammar edit for line 175 of readme

* fix typo (#2986)

* fix typo

* spell fix

* typo fix (#2991)

* added traces.txt to gitignore for fib (#2993)

* Deprecate Library and move all uses to Scope (#2977)

* Deprecate Library and move all uses to Scope

* Add PR number to changelog

* Don't change signatures in stable modules

* Revert some changes

* Rename internal struct names

* A bit more renaming

* Update sdk/trace/span.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update based on feedback

* Revert change

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Feat/bridge support text map (#2911)

* feat: support TextMap

* doc: add comment

* test: support for ot.TextMap

* Retrieve lost code due to merge

* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders

* go mod tidy

* Optimized code style, add changelog

* doc: Restore comments

* wip: add test cases

* test: fix args error

* delete empty line

* Fix syntax and changelog errors

* Fix formatting errors

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Add a release template (#2863)

* Add a release template

* Update the about field

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Fix linting Issues

* Add ignore for template link

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Fix merge of CHANGELOG.md

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>

* Add structure to the export data. (#2961)

* Add structure to the export data.

* Fix comments.

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Address PR comments.

* Updated optional historgram parameters.

* Address PR comments.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Use export.Aggregation instead of internal.Aggregation (#3007)

* Use export.Aggregation instead of internal

* Return an export.Aggregation instead of a slice

* Use attribute Sets instead of KeyValues for export data (#3012)

Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.

Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.

* Change Instrument Library to Instrument Scope (#3016)

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* move temporality to export/temporality (#3017)

* move temporality to export/temporality

* fix lint errors

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Rename Package sdk/metric/export into sdk/metric/metricdata (#3014)

* fix unrelated changes

* fix quote code

* fix format

* rebase pr

* rebase pr

* change usage of export to metricdata

* Add metricdatatest package (#3025)

* Use export.Aggregation instead of internal

* Return an export.Aggregation instead of a slice

* Use attribute Sets instead of KeyValues for export data

Attribute Sets have stronger guarantees about the uniqueness of their
keys and more functionality. We already ensure attributes are stored as
Sets by the aggregator which will produce these data types. Instead of
converting to a KeyValue slice, keep the data as a Set.

Any user of the data can always call the ToSlice method to use the data
as a slice of KeyValues.

* Add export data type comparison testing API

* Add Aggregation and Value comparison funcs

* Move export testing to own pkg

* Move exporttest to metricdatatest

* Add licenses headers to files missing them

* Use metricdata instead of export

Fix merge of new_sdk/main

* Rename exporttest pkg to metricdatatest

* Fix spelling errors

* Fix lint issues

* Use testing pkg to error directly

Include Helper() method calls to correct the call-stack.

* Fix CompareAggregations

Set equal to true by default

* Generalize assertions and unexport equal checks

* Abstract assert tests

* Rename all exp var to r

* Test AssertAggregationsEqual

* Comment why Value and Aggregation are separate

* Test AssertValuesEqual

* Revert changes to metricdata/temporality.go

* Expand pkg doc sentence

* Add license header to assertion.go

* Update assertion docs

* Consolidate comparisons funcs into one file

* Consolidate and fix docs

* Consolidate assertion.go

* Consolidate comparisons.go

* make lint

* Test with relatively static times

* Update sdk/metric/metricdata/metricdatatest/comparisons.go

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Drop equal return from comparison funcs

* Refactor AssertEqual

* Remove reasN from testDatatype func params

* Consolidate AssertEqual type conversions

* Fix assertion error message

* Add assertion failure tests

* Remove unneeded strings join

* Make comment include a possessive

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Adds a pipeline for creating reader's output (#3026)

* Adds a pipeline for creating reader's output

* fix metricdata move

* fix lint

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Address PR comments

* Added resource test

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Use generic Sum, Gauge, and DataPoint value removing Value, Int64, and Float64 from metricdata (#3036)

* Use generic DataPoint value

* Fix assertion_fail_test.go

* Declare Sum and DataPoints type in pipeline_test

* Add MatchInstrumentKind filter for Views. (#3037)

* Move InstrumentKind to view, Add view filter

* remove TODO

* Add the Option function, fix lint

* use local var over 0

* Fix missing undefinedInstrumnet

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Change View Attribute Filter to detect if not set. (#3039)

* Change View Attribute Filter to detect if not set.

* Fix PR comments.

* Rework test for no filter logic.

* Add implementation of last-value aggregator (#3008)

* Add last-value aggregator

* Add test of last-value reset of unseen attrs

* Add benchmark

* Use generic DataPoint value

* Fix assertion_fail_test.go

* Fix tests

* Remove unused test increment values

* View.New() miss InstrumentKind check (#3043)

Signed-off-by: liupengfei <lpfvip2008@gmail.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Add delta/cumulative histogram implementation (#3045)

* Add delta/cumulative histogram implementation

* Add histogram unit tests

* Fix histValues Aggregate

Store the new buckets value back to the values map.

Ensure min/max are measured values, not zero values.

* Fix lint

* Add benchmarks

* Test histograms internal functionality

* Fix lint

* Add TODO to look at memory use for cumu hist

* Update sdk/metric/internal/histogram.go

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* use TemporalitySelector (#3050)

Signed-off-by: Petrie <lpfvip2008@gmail.com>

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add implementation of Sum aggregators (#3000)

* Implement the sum aggregators

* Add unit tests for delta/cumulative sums

* Add benchmarks

* Merge sum tests into one

* Remove unused start time from cumulative sum

* Refactor benchmark tests

Split benchmarks for the Aggregations and Aggregate methods so
computational resource use can be determined.

* goimports

* Move timestamp out of lock

* Refactor testing

* Fix spelling mistake

* Name param of expectFunc

* Reset delta sum to zero instead of delete

* Revert to deleting unused attr sets

* Refactor testing to allow use across other aggs

* Add TODO to bound cumulative sum mem usage

* Fix misspelling

* Unify aggregator benchmark code in aggregator_test

* Use generic DataPoint value

* Fix assertion_fail_test.go

* Use generic metricdata types

* Fix tests

* Fix benchmarks

* Fix lint

* Update sum documentation

* Remove leftover encapsulating test run

* Use t.Cleanup to mock time

* Consolidate expecter logic into funcs

* Move errNegVal closer to use

* Run the agg test

* Add tests for monotonic sum Aggregate err

* Run make lint

* Make monotonic an arg of creation funcs

* Remove Aggregate monotonic validation

* Rename sum to valueMap

The term sum is a good variable name that we do not want to take and
valueMap better describes the type as the storage of the aggregator.

* Adds a filter Aggregator. (#3040)

* Adds a filter Aggregator.

* Add lock and tests

* Add Concurrency tests

* fix lint errors

* Add memory constrained todo.

* Update filter comment.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Add back the stdoutmetric exporter (#3057)

* PoC stdoutmetric exporter

* Use stringer to generate String for Temporality

* Add vanity imports

* Update Temporality string expected output

* Do not return error from newConfig

* Add shutdown unit tests

* Fix spelling error

* Unify testing of ctx errors and test ForceFlush

* Add unit test for Export handle of ctx errs

* Clarify documentation about alt OTLP exporter

* Remove unused ErrUnrecognized

A third party encoder can produce their own errors. This code does
nothing unique with this error, therefore, it is removed.

* Lint exporter_test.go

* Refactor example_test.go removing FIXME

* Add test for Export shutdown err

* Add a discard encoder for testing

* Acknowledged error is returned from Shutdown

* Remove unexpected SchemaURL from stdouttrace test

* Remove unneeded *testing.T arg from testEncoderOption

* Fix the location of now

* Revise and edit docs

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Remove stale TODO from metricdata/data.go (#3064)

* Merge main into new_sdk/main (#3082)

* Use already enabled revive linter and add depguard (#2883)

* Refactor golangci-lint conf

Order settings alphabetically.

* Add revive settings to golangci conf

* Check blank imports

* Check bool-literal-in-expr

* Check constant-logical-expr

* Check context-as-argument

* Check context-key-type

* Check deep-exit

* Check defer

* Check dot-imports

* Check duplicated-imports

* Check early-return

* Check empty-block

* Check empty-lines

* Check error-naming

* Check error-return

* Check error-strings

* Check errorf

* Stop ignoring context first arg in tests

* Check exported comments

* Check flag-parameter

* Check identical branches

* Check if-return

* Check increment-decrement

* Check indent-error-flow

* Check deny list of go imports

* Check import shadowing

* Check package comments

* Check range

* Check range val in closure

* Check range val address

* Check redefines builtin id

* Check string-format

* Check struct tag

* Check superfluous else

* Check time equal

* Check var naming

* Check var declaration

* Check unconditional recursion

* Check unexported return

* Check unhandled errors

* Check unnecessary stmt

* Check unnecessary break

* Check waitgroup by value

* Exclude deep-exit check in example*_test.go files

* Move the minimum version to go 1.17 (#2917)

* Move the minimum version to go 1.17

* Update readme and changelog

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Use ByteSliceToString from golang.org/x/sys/unix (#2924)

Use unix.ByteSliceToString to convert Utsname []byte fields to strings.

This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* docs: fix typo (#2935)

* add timeout to grpc connection in otel-collector example (#2939)

* Closes: #2951 (#2952)

This PR updates the example listed in the getting started doc
so that it will compile without error.  It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* fix data-model link (#2955)

* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)

* Move to using Instrumentation Scope (#2976)

* Move to using Instrumentation Scope

* Use type alias, not definition

* Add a changelog entry

* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)

* docs(website_docs): fix toc

* docs(website_docs): fix toc

* update exporting_data.md for rerun check-links

* update exporting_data.md for rerun check-links

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update getting-started.md (#2984)

grammar edit for line 175 of readme

* fix typo (#2986)

* fix typo

* spell fix

* typo fix (#2991)

* added traces.txt to gitignore for fib (#2993)

* Deprecate Library and move all uses to Scope (#2977)

* Deprecate Library and move all uses to Scope

* Add PR number to changelog

* Don't change signatures in stable modules

* Revert some changes

* Rename internal struct names

* A bit more renaming

* Update sdk/trace/span.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update based on feedback

* Revert change

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Feat/bridge support text map (#2911)

* feat: support TextMap

* doc: add comment

* test: support for ot.TextMap

* Retrieve lost code due to merge

* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders

* go mod tidy

* Optimized code style, add changelog

* doc: Restore comments

* wip: add test cases

* test: fix args error

* delete empty line

* Fix syntax and changelog errors

* Fix formatting errors

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Add a release template (#2863)

* Add a release template

* Update the about field

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Fix linting Issues

* Add ignore for template link

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Add workflow to automate bundling dependabot PRs (#2997)

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Release prep 1.8.0 (#3001)

* Update CHANGELOG and versions.yaml for 1.8.0 release

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update go-build-tools

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare stable-v1 for version v1.8.0

* Prepare experimental-metrics for version v0.31.0

* Prepare bridge for version v0.31.0

* `make go-mod-tidy` should use `-compat=1.17` now

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Add benchmark metric test for UpDownCounter (#2655)

* add benchmark metric test for UpDownCounter

* move counter annotation up

* fix syncFloat64 to syncInt64

* fix syncFloat64 to syncInt64

* fix go-lint err

* Add semconv/v1.11.0 (#3009)

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add semconv/v1.12.0 (#3010)

* Add semconv/v1.12.0

* Update all semconv use to v1.12.0

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add http.method attribute to http server metric (#3018)

* Add http.method attribute to http server metric

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix lint

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix lint

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix for reviews

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* add changelog entry

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* Add tests and fix opentracing bridge defer warning (#3029)

* add tests and fix opentracing bridge defer warning

* add changelog entry

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update bridge/opentracing/bridge_test.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Introduce "split" metric schema transformation (#2999)

This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.

An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617

This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653

This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.

* Release v1.9.0 (#3052)

* Bump versions in versions.yaml

* Prepare stable-v1 for version v1.9.0

* Prepare experimental-schema for version v0.0.3

* Update changelog for release

* Replace ioutil with io and os (#3058)

* Make several vars into consts (#3068)

* Add support for Go 1.19 (#3077)

* Add support for Go 1.19

* Update CHANGELOG.md

Co-authored-by: Sam Xie <sam@samxie.me>

Co-authored-by: Sam Xie <sam@samxie.me>

* Update compatibility documentation (#3079)

Remove 3 month timeline for backwards support of old versions of Go.

Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>

* Adds the option to ignore timestamps in metric data tests. (#3076)

* Adds the option to ignore timestamps in metric data tests

* use config over bool

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Adds a pipelineRegistry to manage creating aggregators. (#3044)

* Adds a pipelineRegistry to manage creating aggregators.

* Made pipeline generic
* Add aggregation filter to the registry.

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Remove stale TODO (#3083)

The aggregation transform function was added in #2958.

* Add back the otlpmetric transforms (#3065)

* Add otlpmetric transforms

* Split aggregation transforms to own file

* Rename Iterator to AttrIter

* Update pkg docs

These are internal docs use developer based language.

* Document all exported funcs

* Unify metricdata type transforms into one file

* Rename metrics.go to metricdata.go

* Copy back attribute tests

* Copy back in Iterator test

* Refactor attribute tests

* Add tests for metricdata transforms

* Add multiErr support for digestible transform errs

* Test transform errors

* go mod tidy

* Use key field

* goimported

* gofmt-ed

* Fix error documentation

* go mod tidy

* Changes instruments uniqueness in pipeline. (#3071)

* Changes instruments uniquness in pipeline.

* Fix lint

* Update sdk/metric/pipeline.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Restore the exporters/otlp/otlpmetric/internal/otelconfig package (#3090)

* Restore otlpmetric/otlpconfig from main

* Rename otlpconfig to oconf

* Remove the empty envconfig_test.go

* Update import of otlpconfig in oconf_test

* go mod tidy

* Run make

* add internal OpenCensus metric translation library (#3099)

* reintroduce opencensus trace bridge (#3098)

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Document the sdk/metric/view package (#3086)

* Add package documentation for sdk/metric/view

* Refer to views not configs in WithReader docs

* Fix vanity url for view_test.go

* Add example tests for view options

* Add package example

* Fix view type docs

* Remove build constraint for doc.go

* Fix lint

* Adds async instruments and providers. (#3084)

* Adds instrument providers and instruments.

* Don't return nil instrument, return with error

* removed sync

* Added a number of tests.

Signed-off-by: GitHub <noreply@github.com>

* Address PR comments

* fix error messages

* fixes typo in test name

Signed-off-by: GitHub <noreply@github.com>

* Fix lint issues

* moved the testCallback into the TestMeterCreateInstrument

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Merge branch 'main' into new_sdk/main (#3111)

* Use already enabled revive linter and add depguard (#2883)

* Refactor golangci-lint conf

Order settings alphabetically.

* Add revive settings to golangci conf

* Check blank imports

* Check bool-literal-in-expr

* Check constant-logical-expr

* Check context-as-argument

* Check context-key-type

* Check deep-exit

* Check defer

* Check dot-imports

* Check duplicated-imports

* Check early-return

* Check empty-block

* Check empty-lines

* Check error-naming

* Check error-return

* Check error-strings

* Check errorf

* Stop ignoring context first arg in tests

* Check exported comments

* Check flag-parameter

* Check identical branches

* Check if-return

* Check increment-decrement

* Check indent-error-flow

* Check deny list of go imports

* Check import shadowing

* Check package comments

* Check range

* Check range val in closure

* Check range val address

* Check redefines builtin id

* Check string-format

* Check struct tag

* Check superfluous else

* Check time equal

* Check var naming

* Check var declaration

* Check unconditional recursion

* Check unexported return

* Check unhandled errors

* Check unnecessary stmt

* Check unnecessary break

* Check waitgroup by value

* Exclude deep-exit check in example*_test.go files

* Move the minimum version to go 1.17 (#2917)

* Move the minimum version to go 1.17

* Update readme and changelog

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Use ByteSliceToString from golang.org/x/sys/unix (#2924)

Use unix.ByteSliceToString to convert Utsname []byte fields to strings.

This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* docs: fix typo (#2935)

* add timeout to grpc connection in otel-collector example (#2939)

* Closes: #2951 (#2952)

This PR updates the example listed in the getting started doc
so that it will compile without error.  It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* fix data-model link (#2955)

* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)

* Move to using Instrumentation Scope (#2976)

* Move to using Instrumentation Scope

* Use type alias, not definition

* Add a changelog entry

* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)

* docs(website_docs): fix toc

* docs(website_docs): fix toc

* update exporting_data.md for rerun check-links

* update exporting_data.md for rerun check-links

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update getting-started.md (#2984)

grammar edit for line 175 of readme

* fix typo (#2986)

* fix typo

* spell fix

* typo fix (#2991)

* added traces.txt to gitignore for fib (#2993)

* Deprecate Library and move all uses to Scope (#2977)

* Deprecate Library and move all uses to Scope

* Add PR number to changelog

* Don't change signatures in stable modules

* Revert some changes

* Rename internal struct names

* A bit more renaming

* Update sdk/trace/span.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update based on feedback

* Revert change

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Feat/bridge support text map (#2911)

* feat: support TextMap

* doc: add comment

* test: support for ot.TextMap

* Retrieve lost code due to merge

* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders

* go mod tidy

* Optimized code style, add changelog

* doc: Restore comments

* wip: add test cases

* test: fix args error

* delete empty line

* Fix syntax and changelog errors

* Fix formatting errors

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Add a release template (#2863)

* Add a release template

* Update the about field

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Fix linting Issues

* Add ignore for template link

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Add workflow to automate bundling dependabot PRs (#2997)

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Release prep 1.8.0 (#3001)

* Update CHANGELOG and versions.yaml for 1.8.0 release

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update go-build-tools

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare stable-v1 for version v1.8.0

* Prepare experimental-metrics for version v0.31.0

* Prepare bridge for version v0.31.0

* `make go-mod-tidy` should use `-compat=1.17` now

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Add benchmark metric test for UpDownCounter (#2655)

* add benchmark metric test for UpDownCounter

* move counter annotation up

* fix syncFloat64 to syncInt64

* fix syncFloat64 to syncInt64

* fix go-lint err

* Add semconv/v1.11.0 (#3009)

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add semconv/v1.12.0 (#3010)

* Add semconv/v1.12.0

* Update all semconv use to v1.12.0

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add http.method attribute to http server metric (#3018)

* Add http.method attribute to http server metric

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix lint

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix lint

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix for reviews

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* add changelog entry

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* Add tests and fix opentracing bridge defer warning (#3029)

* add tests and fix opentracing bridge defer warning

* add changelog entry

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update bridge/opentracing/bridge_test.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Introduce "split" metric schema transformation (#2999)

This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.

An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617

This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653

This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.

* Release v1.9.0 (#3052)

* Bump versions in versions.yaml

* Prepare stable-v1 for version v1.9.0

* Prepare experimental-schema for version v0.0.3

* Update changelog for release

* Replace ioutil with io and os (#3058)

* Make several vars into consts (#3068)

* Add support for Go 1.19 (#3077)

* Add support for Go 1.19

* Update CHANGELOG.md

Co-authored-by: Sam Xie <sam@samxie.me>

Co-authored-by: Sam Xie <sam@samxie.me>

* Update compatibility documentation (#3079)

Remove 3 month timeline for backwards support of old versions of Go.

* Fix `opentracing.Bridge` where it miss identifying the spanKind  (#3096)

* Fix opentracing.Bridge where it was not identifying the spanKinf correctly

* fix test

* changelog

* Keeping backward comppatibillity

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* replace `required` by `requirementlevel` (#3103)

* Change the inclusivity of exponential histogram bounds (#2982)

* Use lower-inclusive boundaries

* make exponent and logarithm more symmetric

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Update golangci-lint to v1.48.0 (#3105)

* Update golangci-lint to v1.48.0

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)

* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>

* Add otlpmetric exporter (#3089)

* Add otlpmetric package doc

* Add Client interface

* Add the Exporter

Have the Exporter ensure synchronous access to all client methods.

* Add race detection test for Exporter

* Expand New godocs

* Fix lint

* Merge transform and upload errors

* Fix ineffectual increment

* Make pipelineRegistry non-generic (#3115)

* Make pipelineRegistry non-generic

* Add Synchronous instruments (#3124)

* Add Synchronous instruments

* remove duplicate code in instrument

* Fixes to Histogram comments

* Add back the otlpmetricgrpc exporter (#3094)

* Add otlpmetric package doc

* Add Client interface

* Add the Exporter

Have the Exporter ensure synchronous access to all client methods.

* Add race detection test for Exporter

* Expand New godocs

* Fix lint

* Add the otlpmetricgrpc Go module

* Restore otlpmetricgrpc from main

* Remove integration testing from otlpmetricgrpc

* Fix import of otlpconfig to oconf

* Update client

Add ForceFlush method to satisfy otlpmetric.Client, unexport Start, and
restructure NewClient to return a started client.

* Update otlpmetricgrpc New functions

Remove NewUnstarted and only export New.

* Remove unneeded client sync

The exporter handle the synchronization of client method calls.

* Update example_test.go

* Update client_unit_test.go

* Rename client_unit_test.go to client_test.go

* Rename options.go to config.go

* Add package doc

* Unify exporter.go and doc.go into client.go

* Unexport NewClient

* Correct option documentation

* Add env config documentation

* go mod tidy

* Restrict build to Go 1.18

* Update client.go

Fix copied UploadMetrics documentation.

* Run make

* Close client conn even if context deadline reached

* Add sdk/metric Go pkg docs and example (#3139)

* Add sdk/metric Go pkg docs

* Add example_test.go

* Add Go 1.18 build guard to example_test.go

* Merge main into new_sdk/main (#3141)

* Use already enabled revive linter and add depguard (#2883)

* Refactor golangci-lint conf

Order settings alphabetically.

* Add revive settings to golangci conf

* Check blank imports

* Check bool-literal-in-expr

* Check constant-logical-expr

* Check context-as-argument

* Check context-key-type

* Check deep-exit

* Check defer

* Check dot-imports

* Check duplicated-imports

* Check early-return

* Check empty-block

* Check empty-lines

* Check error-naming

* Check error-return

* Check error-strings

* Check errorf

* Stop ignoring context first arg in tests

* Check exported comments

* Check flag-parameter

* Check identical branches

* Check if-return

* Check increment-decrement

* Check indent-error-flow

* Check deny list of go imports

* Check import shadowing

* Check package comments

* Check range

* Check range val in closure

* Check range val address

* Check redefines builtin id

* Check string-format

* Check struct tag

* Check superfluous else

* Check time equal

* Check var naming

* Check var declaration

* Check unconditional recursion

* Check unexported return

* Check unhandled errors

* Check unnecessary stmt

* Check unnecessary break

* Check waitgroup by value

* Exclude deep-exit check in example*_test.go files

* Move the minimum version to go 1.17 (#2917)

* Move the minimum version to go 1.17

* Update readme and changelog

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Use ByteSliceToString from golang.org/x/sys/unix (#2924)

Use unix.ByteSliceToString to convert Utsname []byte fields to strings.

This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* docs: fix typo (#2935)

* add timeout to grpc connection in otel-collector example (#2939)

* Closes: #2951 (#2952)

This PR updates the example listed in the getting started doc
so that it will compile without error.  It also makes this
example consistent with the code found in
https://github.com/open-telemetry/opentelemetry-go/blob/main/example/fib/main.go

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* fix data-model link (#2955)

* Bump go.opentelemetry.io/proto/otlp from v0.16.0 to v0.18.0 (#2960)

* Move to using Instrumentation Scope (#2976)

* Move to using Instrumentation Scope

* Use type alias, not definition

* Add a changelog entry

* docs(website_docs): fix exporting_data.md and getting-started.md toc (#2930)

* docs(website_docs): fix toc

* docs(website_docs): fix toc

* update exporting_data.md for rerun check-links

* update exporting_data.md for rerun check-links

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update getting-started.md (#2984)

grammar edit for line 175 of readme

* fix typo (#2986)

* fix typo

* spell fix

* typo fix (#2991)

* added traces.txt to gitignore for fib (#2993)

* Deprecate Library and move all uses to Scope (#2977)

* Deprecate Library and move all uses to Scope

* Add PR number to changelog

* Don't change signatures in stable modules

* Revert some changes

* Rename internal struct names

* A bit more renaming

* Update sdk/trace/span.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update based on feedback

* Revert change

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Feat/bridge support text map (#2911)

* feat: support TextMap

* doc: add comment

* test: support for ot.TextMap

* Retrieve lost code due to merge

* fix: retrieve lost code due to merge. test: support for ot.HTTPHeaders

* go mod tidy

* Optimized code style, add changelog

* doc: Restore comments

* wip: add test cases

* test: fix args error

* delete empty line

* Fix syntax and changelog errors

* Fix formatting errors

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Add a release template (#2863)

* Add a release template

* Update the about field

Co-authored-by: Damien Mathieu <42@dmathieu.com>

* Fix linting Issues

* Add ignore for template link

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Add workflow to automate bundling dependabot PRs (#2997)

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Release prep 1.8.0 (#3001)

* Update CHANGELOG and versions.yaml for 1.8.0 release

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update go-build-tools

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare stable-v1 for version v1.8.0

* Prepare experimental-metrics for version v0.31.0

* Prepare bridge for version v0.31.0

* `make go-mod-tidy` should use `-compat=1.17` now

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Add benchmark metric test for UpDownCounter (#2655)

* add benchmark metric test for UpDownCounter

* move counter annotation up

* fix syncFloat64 to syncInt64

* fix syncFloat64 to syncInt64

* fix go-lint err

* Add semconv/v1.11.0 (#3009)

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add semconv/v1.12.0 (#3010)

* Add semconv/v1.12.0

* Update all semconv use to v1.12.0

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add http.method attribute to http server metric (#3018)

* Add http.method attribute to http server metric

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix lint

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix lint

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* fix for reviews

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* add changelog entry

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

* Add tests and fix opentracing bridge defer warning (#3029)

* add tests and fix opentracing bridge defer warning

* add changelog entry

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update bridge/opentracing/bridge_test.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Introduce "split" metric schema transformation (#2999)

This is a new transformation type that allows to describe a change
where a metric is converted to several other metrics by eliminating
an attribute.

An example of such change that happened recently is this:
https://github.com/open-telemetry/opentelemetry-specification/pull/2617

This PR implements specification change https://github.com/open-telemetry/opentelemetry-specification/pull/2653

This PR creates package v1.1 for the new functionality. The old package v1.0
remains unchanged.

* Release v1.9.0 (#3052)

* Bump versions in versions.yaml

* Prepare stable-v1 for version v1.9.0

* Prepare experimental-schema for version v0.0.3

* Update changelog for release

* Replace ioutil with io and os (#3058)

* Make several vars into consts (#3068)

* Add support for Go 1.19 (#3077)

* Add support for Go 1.19

* Update CHANGELOG.md

Co-authored-by: Sam Xie <sam@samxie.me>

Co-authored-by: Sam Xie <sam@samxie.me>

* Update compatibility documentation (#3079)

Remove 3 month timeline for backwards support of old versions of Go.

* Fix `opentracing.Bridge` where it miss identifying the spanKind  (#3096)

* Fix opentracing.Bridge where it was not identifying the spanKinf correctly

* fix test

* changelog

* Keeping backward comppatibillity

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* replace `required` by `requirementlevel` (#3103)

* Change the inclusivity of exponential histogram bounds (#2982)

* Use lower-inclusive boundaries

* make exponent and logarithm more symmetric

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Update golangci-lint to v1.48.0 (#3105)

* Update golangci-lint to v1.48.0

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107)

* Bump go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Update tracer to guard for a nil ctx (#3110)

* Update tracer to guard for a nil ctx

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Fix sdk/instrumentation pkg docs (#3130)

* Add instrumentation scope attributes (#3131)

* Add WithScopeAttributes TracerOption to trace API

* Add Attributes field to instrumentation Scope

* Use scope attributes for new Tracer

* Fix stdouttrace expected test output

* Allow unexported Set fields in sdk/trace test

* Export instrumentation scope attrs in OTLP

* Add changes to the changelog

* Fix imports with make lint

* Add unit tests for WithScopeAttributes

* Fix English in Scope documentation

* Add WithScopeAttributes MeterOption to metric API package (#3132)

* Add WithScopeAttributes MeterOption to metric pkg

* Add MeterConfig unit tests

* Add changes to changelog

* Fix import linting

* Update MeterProvider documentation

Include information about how to use WithScopeAttributes.

* Refactor TracerProvider documentation (#3133)

* Refactor TracerProvider documentation

* Fix English article

* Grammar fixes

* consistency-of:  Changed signal names for website docs (#3137)

* Shut down all processors even on error (#3091)

* Fix stdoutmetric example test

The merged instrumentation Scope includes SchemaURL and Attributes now,
add them to the expected output.

Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>

* Remove empty metrictest pkg (#3148)

* Add exporters/otlp/otlpmetric/internal/otest (#3125)

* Add otlpmetric package doc

* Add Client interface

* Add the Exporter

Have the Exporter ensure synchronous access to all client methods.

* Add race detection test for Exporter

* Expand New godocs

* Fix lint

* Restore otlpmetrictest from main

* Rename otlpmetrictest to otest

* Remove data.go

The functions and types it contains are no longer relevant to the SDK.

* Update client context error tests

Remove multiple shutdown tests. The Client interface states this should
never happen.

* Remove collector.go and otlptest.go

* Expand client tests with ctx and force-flush

* Add UploadMetrics tests

* Test the tests with a trivial client

* Condense all to client.go

* Example of how to run RunClientTests

* Add client integration testing

* Add GRPCCollector

* Remove GRPCCollector to limit scope of PR

* Add back the otlpmetrichttp exporter (#3097)

* Add otlpmetric package doc

* Add Client interface

* Add the Exporter

Have the Exporter ensure synchronous access to all client methods.

* Add race detection test for Exporter

* Expand New godocs

* Fix lint

* Add back the otlpmetrichttp pkg from main

* Restrict to Go 1.18 and above

* Remove integration testing

* Rename client_unit_test.go to client_test.go

* Rename options.go to config.go

* Remove the NewUnstarted func

* Remove Start method from client

* Add no-op ForceFlush method to client

* Update otlpconfig pkg name to oconf

* Rename Stop method to Shutdown

Match the otlpmetric.Client interface.

* Update creation functions to compile

* Remove name field from client

* Remove sync of methods from client

This is handled by the exporter.

* Remove unused generalCfg field from client

* Replace cfg client field with used conf vals

* Use a http request instead of url/header fields

* Remove NewClient and move New into client.go

* Rename client.client field to client.httpClient

* Update client tests

Remove test of a retry config and add functional tests of the client
methods honoring a context.

* Remove deprecated WithMaxAttempts and WithBackoff

* Update option docs

Include info on envvars.

* Fix lint

* Fix lint errors

* Revert New to accept a context

* Add example test

* Update pkg docs

* go mod tidy

* Use url.URL to form HTTP request URL

* Remove stale TODO in sdk/view (#3149)

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Use unique metric testing data in reader_test (#3151)

Address unresolved TODO.

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Add new metric SDK changes to changelog (#3150)

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>

* Add integration and config testing to otlpmetricgrpc (#3126)

* Add the GRPCCollector to otest

* Use otest to test otlpmetricgrpc Client

* Add WithHeaders and WithTimeout tests

* Add integration and config testing to otlpmetrichttp (#3155)

* Add HTTPCollector to otest

* Add integration testing for otlpmetrichttp

* Fix NewHTTPCollector docs

* Add config tests

* Fix lint

* Add WithURLPath test

* Add WithTLSClientConfig test

* Ignore depguard for crypto/x509/pkix

This is a testing package that uses the package to generate a weak
testing TLS certificate.

* Add Prometheus exporter code (#3135)

* Add Prometheus exporter example (#3168)

* Add back prom exporter to README.md

* Fix removal changes from #3154 in API

* Update CHANGELOG with PR number

Signed-off-by: Brad Topol <btopol@us.ibm.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tobias Klauser <tobias.klauser@gmail.com>
Co-authored-by: petrie <244236866@qq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Brad Topol <btopol@us.ibm.com>
Co-authored-by: Craig Pastro <pastro.craig@gmail.com>
Co-authored-by: Kshitija Murudi <kmurudi@ncsu.edu>
Co-authored-by: Petrie Liu <lpfvip2008@gmail.com>
Co-authored-by: Guangya Liu <gyliu513@gmail.com>
Co-authored-by: Craig Pastro <craig.pastro@auth0.com>
Co-authored-by: ttoad <qq530901331@outlook.com>
Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
Co-authored-by: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com>
Co-authored-by: Håvard Anda Estensen <haavard.ae@gmail.com>
Co-authored-by: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Co-authored-by: Sam Xie <sam@samxie.me>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: Mitch Usher <cull.methi@gmail.com>
Co-authored-by: Gaurang Patel <mr.patelgaurang@gmail.com>
Co-authored-by: Mike Dame <mikedame@google.com>
2022-09-15 18:41:24 -07:00
Aaron Clawson
0e6f9c29c1
Prerelease v1.10.0 (#3158)
* update version file

* Prepare stable-v1 for version v1.10.0

* Update changelog
2022-09-12 15:19:11 -05:00
Joshua MacDonald
49a653682f
Safely truncate over-length string attributes (#3156)
* Safely truncate over-length string attributes

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-09-12 09:54:58 -05:00
Aaron Clawson
7aba25d651
Revert Adding attributes to the instrumentation scope.
Revert "Add instrumentation scope attributes (#3131)" (#3154)

This reverts commit 0078faeb0e.

Revert "Add WithScopeAttributes MeterOption to metric API package (#3132)"

This reverts commit 81a9bab814.
2022-09-09 09:06:58 -05:00
Mikhail Mazurskiy
13ddf7d31e
Shut down all processors even on error (#3091) 2022-09-02 11:50:44 -05:00
Tyler Yahn
0078faeb0e
Add instrumentation scope attributes (#3131)
* Add WithScopeAttributes TracerOption to trace API

* Add Attributes field to instrumentation Scope

* Use scope attributes for new Tracer

* Fix stdouttrace expected test output

* Allow unexported Set fields in sdk/trace test

* Export instrumentation scope attrs in OTLP

* Add changes to the changelog

* Fix imports with make lint

* Add unit tests for WithScopeAttributes

* Fix English in Scope documentation
2022-08-31 15:19:50 -07:00
Tyler Yahn
454d57b720
Fix sdk/instrumentation pkg docs (#3130) 2022-08-31 12:01:02 -07:00
Mitch Usher
55b49c407e
Update tracer to guard for a nil ctx (#3110)
* Update tracer to guard for a nil ctx

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-08-26 08:53:33 -05:00
Aaron Clawson
8423364f5a
Update golangci-lint to v1.48.0 (#3105)
* Update golangci-lint to v1.48.0

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-08-24 21:42:28 -05:00
Joshua MacDonald
09bf345912
Change the inclusivity of exponential histogram bounds (#2982)
* Use lower-inclusive boundaries

* make exponent and logarithm more symmetric

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2022-08-24 13:09:37 -05:00
Håvard Anda Estensen
eb55e60d3b
Replace ioutil with io and os (#3058) 2022-08-03 14:45:05 -07:00
Tyler Yahn
e99a0ac0b5
Release v1.9.0 (#3052)
* Bump versions in versions.yaml

* Prepare stable-v1 for version v1.9.0

* Prepare experimental-schema for version v0.0.3

* Update changelog for release
2022-08-02 08:02:33 -07:00
Tyler Yahn
5568a30723
Add semconv/v1.12.0 (#3010)
* Add semconv/v1.12.0

* Update all semconv use to v1.12.0

Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
2022-07-13 09:55:43 -04:00
Chester Cheung
f7395695b7
Add benchmark metric test for UpDownCounter (#2655)
* add benchmark metric test for UpDownCounter

* move counter annotation up

* fix syncFloat64 to syncInt64

* fix syncFloat64 to syncInt64

* fix go-lint err
2022-07-12 12:12:58 -07:00
Anthony Mirabella
08ff959fc4
Release prep 1.8.0 (#3001)
* Update CHANGELOG and versions.yaml for 1.8.0 release

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update go-build-tools

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare stable-v1 for version v1.8.0

* Prepare experimental-metrics for version v0.31.0

* Prepare bridge for version v0.31.0

* `make go-mod-tidy` should use `-compat=1.17` now

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-07-08 14:23:16 -04:00
Craig Pastro
575e1bb270
Deprecate Library and move all uses to Scope (#2977)
* Deprecate Library and move all uses to Scope

* Add PR number to changelog

* Don't change signatures in stable modules

* Revert some changes

* Rename internal struct names

* A bit more renaming

* Update sdk/trace/span.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update based on feedback

* Revert change

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-07-06 14:55:46 -04:00
Craig Pastro
5fabad69e3
Move to using Instrumentation Scope (#2976)
* Move to using Instrumentation Scope

* Use type alias, not definition

* Add a changelog entry
2022-06-24 14:17:33 -07:00
Damien Mathieu
a9ab7e0a88
fix data-model link (#2955) 2022-06-14 06:49:05 -07:00
Tobias Klauser
4155b35624
Use ByteSliceToString from golang.org/x/sys/unix (#2924)
Use unix.ByteSliceToString to convert Utsname []byte fields to strings.

This also allows to drop the charsToString helper which serves the same
purpose and matches ByteSliceToString's implementation.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-05-26 07:31:35 -07:00
Aaron Clawson
7458aa961b
Move the minimum version to go 1.17 (#2917)
* Move the minimum version to go 1.17

* Update readme and changelog

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-05-25 08:04:56 -07:00
Tyler Yahn
1f5b159161
Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf

Order settings alphabetically.

* Add revive settings to golangci conf

* Check blank imports

* Check bool-literal-in-expr

* Check constant-logical-expr

* Check context-as-argument

* Check context-key-type

* Check deep-exit

* Check defer

* Check dot-imports

* Check duplicated-imports

* Check early-return

* Check empty-block

* Check empty-lines

* Check error-naming

* Check error-return

* Check error-strings

* Check errorf

* Stop ignoring context first arg in tests

* Check exported comments

* Check flag-parameter

* Check identical branches

* Check if-return

* Check increment-decrement

* Check indent-error-flow

* Check deny list of go imports

* Check import shadowing

* Check package comments

* Check range

* Check range val in closure

* Check range val address

* Check redefines builtin id

* Check string-format

* Check struct tag

* Check superfluous else

* Check time equal

* Check var naming

* Check var declaration

* Check unconditional recursion

* Check unexported return

* Check unhandled errors

* Check unnecessary stmt

* Check unnecessary break

* Check waitgroup by value

* Exclude deep-exit check in example*_test.go files
2022-05-19 15:15:07 -05:00
bryan-aguilar
b51c22123a
Integrate go-build-tools crosslink (#2886)
* Add crosslink build tool to makefile

* Execute crosslink prune

* Remove internal crosslink tool

* Add go-build-tools crosslink

* Fix crosslink target

* Execute make crosslink to clean up go.mod files

* Update CHANGELOG

* Misc go.sum update from make precommit

* Update CHANGELOG PR number

* Update crosslink target to include prune
2022-05-06 07:40:59 -07:00
dependabot[bot]
c7cf945d8e
Bump github.com/google/go-cmp from 0.5.7 to 0.5.8 (#2875)
* Bump github.com/google/go-cmp from 0.5.7 to 0.5.8

Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.7 to 0.5.8.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.7...v0.5.8)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

* go mod tidy

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2022-05-02 08:19:09 -07:00
Bogdan Drutu
a9a519277a
Move metric no-op implementation to metric package (#2866)
* Move metric no-op implementation to metric package

This is to be consistent with trace package.

Fixes: https://github.com/open-telemetry/opentelemetry-go/issues/2767

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update metric/noop.go

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Update noop.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-04-28 12:52:10 -07:00
Tyler Yahn
a50cf6aadd
Release v1.7.0 (#2869)
* Bump versions

* Prepare stable-v1 for version v1.7.0

* Prepare experimental-metrics for version v0.30.0

* Prepare bridge for version v0.30.0

* Update changelog
2022-04-28 08:51:40 -07:00
Tyler Yahn
776accd250
Remove unneeded metrictest types (#2864)
* Remove unneeded metrictest types

* Add changes to changelog

* Revert removal of NewDescriptor
2022-04-27 11:38:54 -07:00
Tyler Yahn
fdfc821bac
Add godot linter to golangci (#2845)
Comment should be complete sentences outside of lists with sentence
fragments. This adds the godot linter to check these complete sentences
end with punctuation. If they do not, running fix will append a period.
2022-04-25 13:22:49 -07:00
Aaron Clawson
8982a14707
Create an Inmemory Exporter for test (#2776)
* in memory exporter

* Add comments

* Split tests and address PR comments

* address PR comments.

* Changelog

* fix Changelog.

* Apply suggestions from code review

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>

* Add numberkind

* Made the tests require.NoError

* fix the Label changing

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2022-04-24 07:49:09 -07:00
Tyler Yahn
c05c3e237d
Add semconv/v1.10.0 (#2842)
* Add the semconv/v1.10.0 package

* Upgrade semconv used to v1.10.0

* Add changes to changelog
2022-04-22 07:41:28 -07:00
Brad Topol
8574d43509
Add semconv/v1.9.0 package (#2792)
* Add semconv/v1.9.0 package
Closes: #2756

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* Updated PR number in CHANGELOG

Signed-off-by: Brad Topol <btopol@us.ibm.com>
2022-04-18 10:38:55 -07:00
Tyler Yahn
a8ea3dbb46
Replace use of old term label with attribute (#2790)
* Replace use of old term label with attribute

The specification has unified on the term attribute to describe
key-value pairs. There exist still many hold-overs of the use of the
term label. This updates those uses or deprecates exported types and
functions in favor of renamed forms.

* fix infinite recursion

* Remove backticks from attribute set docs

* Remove LabelFilterSelector entirely

* Remove Metadata.Labels instead of deprecate

* Update changelog with public changes

* Revert OC err msg
2022-04-18 07:31:31 -07:00
Tyler Yahn
1884de2b4b
Add semconv/v1.8.0 (#2763)
* No wrap RELEASING Semantic Convention Generation section

* Initial generator

* Update template render

* Add exception and schema templates

* Add semconv/internal http unification

* Add http template

* Add licenses header

* Embed the templates

* Update static version in schema tmpl

* Add semconv-generate target to Makefile

Use this target to generate versions of the semconv packages.

* Generate semconv packages

* Update RELEASING to use make semconv-generate

* Add comments to semconvkit

* Generate semconv/v1.8.0

* Use new version of semconv

* Add changes to changelog

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-04-16 01:58:24 -04:00
Aaron Clawson
46a10bba88
Fix for delayed global registration (#2784)
* Fix for delayed global registration

* Changelog

* Fix license

* Fix ChangeLog
2022-04-13 19:49:06 -05:00
Anthony Mirabella
33a4673444
Release prep for metric/v0.29.0 (#2782)
* Update changelog and versions for metric/v0.29.0 release

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare experimental-metrics for version v0.29.0

* Prepare bridge for version v0.29.0
2022-04-11 19:46:26 -04:00
Tyler Yahn
8c0951ea94
Release v1.6.3 (#2775)
* Update stable-v1 version in versions.yaml

* Update changelog for release

* Prepare stable-v1 for version v1.6.3
2022-04-07 13:40:14 -07:00
Anthony Mirabella
f08bac5259
Release prep v1.6.2 (#2770)
* update changelog and versions for 1.6.2 release

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare stable-v1 for version v1.6.2

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2022-04-06 17:44:27 -04:00
Brad Topol
c91da4181d
Bring back the metric global package (#2764)
* This PR brings back the metric global package
Closes: 2752

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* updated CHANGELOG.md

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* reformatted CHANGELOG.md

Signed-off-by: Brad Topol <btopol@us.ibm.com>

* Updated change log and removed unnecessary variable declaration

Signed-off-by: Brad Topol <btopol@us.ibm.com>
2022-04-05 07:35:16 -07:00
Tyler Yahn
bbcdc75ede
Remove sdk/export/metric module (#2720)
* Remove the sdk/export/metric module

* Add change to changelog

* Update PR number

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2022-03-29 07:31:09 -07:00
Tyler Yahn
8747a29580
Release v1.6.1 (#2746)
* Upgrade stable-v1 to v1.6.1

* Prepare stable-v1 for version v1.6.1

* Update changelog
2022-03-28 09:50:10 -07:00
Tyler Yahn
0a7cf5abf1
Document Resource options that potentially leak secrets (#2727)
The WithProcess and WithProcessCommandArgs options contain command line
arguments as resource attributes. These could potentially expose user
secrets. Document this fact so users better understand the implications
of using these options.
2022-03-28 07:35:09 -07:00
Tyler Yahn
17667f5eef
Release v1.6.0/v0.28.0 (#2718)
* Update versions.yaml

* Bump version in changelog

* Prepare stable-v1 for version v1.6.0

* Prepare experimental-metrics for version v0.28.0

* Prepare bridge for version v0.28.0

* Update changelog language
2022-03-23 14:24:14 -07:00
Joshua MacDonald
07ad32dc38
Exponential Histogram mapping functions for public use (#2502)
* Exponential Histogram mapping functions for public use

* pr num

* Apply suggestions from code review

👍

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* mapping interface comments

* missed add

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-03-22 12:44:10 -07:00
Vibhav Pant
fdbcf71c8f
Allow setting the Sampler via environment variables (#2517)
* Allow setting the Sampler via environment variables (#2305)

* Add changelog entry.

* Replace t.Setenv with internaltest/SetEnvVariables for Go <= 1.6.

* Handle the lack of a sampler argument without logging errors.

* Add additional test cases and error checks.

* Refactor documentation.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>

* emitBatchOverhead should only be used for splitting spans into batches (#2512)

* emitBatchOverhead should only be used for splitting spans into batches (#2503)

* limit max packet size parameter

* Add additional errors types, simplify abstractions and error handling

* Make error comparisons less fragile.

* Fix typo in jaeger example (#2524)

* Fix some typos in docs for Go libraries (#2520)

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Fix getting-started.md Run function (#2527)

* Fix getting-started.md Run function, it assigns this new context to a variable shared between connections in to accept loop. Thus creating a growing chain of contexts. so every calculate fibonacci request, all spans in a trace.

* add a comment explaining the reason for that new variable

* update example fib

* Bump github.com/google/go-cmp from 0.5.6 to 0.5.7 across the project (#2545)

* update go-cmp to 0.5.7

* fixes go.sums

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>

* Un-escape url coding when parsing baggage. (#2529)

* un-escape url coding when parsing baggage.

* Added changelog

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Bump go.opentelemetry.io/proto/otlp from 0.11.0 to 0.12.0 (#2546)

* Update go.opentelemetry.io/proto/otlp to v0.12.0

* Changelog

* Update CHANGELOG.md

Fix's md linting

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Remove unused sdk/internal/santize (#2549)

* Add links to code examples and docs (#2551)

* Bump github.com/prometheus/client_golang from 1.11.0 to 1.12.0 in /exporters/prometheus (#2541)

* Bump github.com/prometheus/client_golang in /exporters/prometheus

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* go mod tidy

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Optimize evictedQueue implementation and use (#2556)

* Optimize evictedQueue impl and use

Avoid unnecessary allocations in the recordingSpan by using an
evictedQueue type instead of a pointer to one.

Lazy allocate the evictedQueue queue to prevent unnecessary operations
for spans without any use of the queue.

Document the evictedQueue

* Fix grammar

* Add env support for batch span processor (#2515)

* Add env support for batch span processor

* Update changelog

* lint

* Bump golang.org/x/tools from 0.1.8 to 0.1.9 in /internal/tools (#2566)

* Bump golang.org/x/tools from 0.1.8 to 0.1.9 in /internal/tools

Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.8 to 0.1.9.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.8...v0.1.9)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>

* Bump github.com/golangci/golangci-lint from 1.43.0 to 1.44.0 in /internal/tools (#2567)

* Bump github.com/golangci/golangci-lint in /internal/tools

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>

* Bump github.com/prometheus/client_golang from 1.12.0 to 1.12.1 in /exporters/prometheus (#2570)

* Bump github.com/prometheus/client_golang in /exporters/prometheus

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>

* Fix TestBackoffRetry in otlp/internal/retry package (#2562)

* Fix TestBackoffRetry in otlp retry pkg

The delay of the retry is within two times a randomization factor (the
back-off time is delay * random number within [1 - factor, 1 + factor].
This means the waitFunc in TestBackoffRetry needs to check the delay is
within an appropriate delta, not equal to configure initial delay.

* Fix delta value

* Fix delta

Co-authored-by: Aaron Clawson <Aaron.Clawson@gmail.com>

* Bump google.golang.org/grpc from 1.43.0 to 1.44.0 in /exporters/otlp/otlptrace (#2568)

* Bump google.golang.org/grpc in /exporters/otlp/otlptrace

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>

* Bump google.golang.org/grpc from 1.43.0 to 1.44.0 in /example/otel-collector (#2565)

* Bump google.golang.org/grpc in /example/otel-collector

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>

* Bump google.golang.org/grpc from 1.43.0 to 1.44.0 in /exporters/otlp/otlpmetric (#2572)

* Bump google.golang.org/grpc in /exporters/otlp/otlpmetric

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MrAlias <MrAlias@users.noreply.github.com>

* Change Options to accept type not pointer (#2558)

* Change trace options to accept type not pointer

Add benchmark to show allocation improvement.

* Update CONTRIBUTING.md guidelines

* Update all Option iface

* Fix grammar in CONTRIBUTING

* Do not store TracerProvider or Tracer fields in SDK recordingSpan (#2575)

* Do not store TracerProvider fields in span

Instead of keeping a reference to the span's Tracer, and therefore also
it's TracerProvider, and the associated resource and spanLimits just
keep the reference to the Tracer. Refer to the TracerProvider fields
when needed instead.

* Make span refer to the inst lib via the Tracer

Instead of holding a field in the span, refer to the field in the parent
Tracer.

* [website_docs] fix page meta-links (#2580)

Contributes to https://github.com/open-telemetry/opentelemetry.io/issues/1096

/cc @cartermp @austinlparker

* Validate members once, in `NewMember` (#2522)

* use NewMember, or specify if the member is not validated when creating new ones

* expect members to already be validated when creating a new package

* add changelog entry

* add an isEmpty field to member and property for quick validation

* rename isEmpty to hasData

So by default, an empty struct really is marked as having no data

* Update baggage/baggage_test.go

Co-authored-by: Aaron Clawson <Aaron.Clawson@gmail.com>

* don't validate the member in parseMember, we alredy ran that validation

We also don't want to use NewMember, as that runs the property
validation again, making the benchmark quite slower

* move changelog entry to the fixed section

* provide the member/property data when returning an invalid error

Co-authored-by: Aaron Clawson <Aaron.Clawson@gmail.com>

* Fix link to Zipkin exporter (#2581)

Currently it is linked to the old package that was moved.

* Unexport EnvBatchSpanProcessor* constants (#2583)

* Move BSP env support to internal

* Use pkg name

* Update env test

* Use internal/env in sdk/trace

* Avoid an extra allocation in applyTracerProviderEnvConfigs.

* Add additional errors for ratio > 1.0.

* Add test cases for ratio > 1.0.

* Update CHANGELOG.md

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
Co-authored-by: jaychung <ken8203@gmail.com>
Co-authored-by: Ben Wells <b.v.wells@gmail.com>
Co-authored-by: Jeremy Kaplan <jeremy@stytch.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: thinkgo <49174849+thinkgos@users.noreply.github.com>
Co-authored-by: Aaron Clawson <Aaron.Clawson@gmail.com>
Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
Co-authored-by: Chao Weng <19381524+sincejune@users.noreply.github.com>
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2022-03-21 09:39:30 -07:00
Aaron Clawson
2f8698c3b1
Update versions of dependences (#2710)
github.com/stretchr/testify v1.7.1
github.com/go-logr/logr v1.2.3
github.com/golangci/golangci-lint v1.45.0
golang.org/x/tools v0.1.10
2022-03-21 11:05:16 -04:00
Tyler Yahn
b1c1e781e6
Support general attribute limits for spans (#2677)
* Support general attribute limits for spans

When model specific limits are not set fallback to the general ones
defined by environment variables before defaults for attribute length
and count limits. This is in compliance with the specification.

* Update env pkg unit tests

Test all environment variable helper functions.

* Add changes to changelog

* Update firstInt doc
2022-03-16 14:33:59 -07:00
Tyler Yahn
2cfc5210f2
Release v1.5.0 (#2676)
* Bump stable-v1 from v1.4.1 to v1.5.0

* Remove internal/metric module from versions file

This module was removed from the project.

* Prepare stable-v1 for version v1.5.0

* Update changelog

* Update CHANGELOG.md
2022-03-16 09:13:17 -07:00
Sam Xie
f4ec95d027
Add container id support to Resource (#2418)
* Add container id support to Resource

* Fix wrong test case name

* Add WithContainer option

* Update CHANGELOG

* Fix comments

* Update CHANGELOG

* Use regex to find container id

* Add tests for reading cgroup file

* Update sdk/resource/container.go

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>

* Update format

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-03-03 12:13:31 -05:00
Tyler Yahn
0d0a7320e6
Update span limits to comply with specification (#2637)
* PoC for span limit refactor

* Rename config.go to span_limits.go

* Add unit tests for truncateAttr

* Add unit tests for non-string attrs

* Add span limit benchmark tests

* Fix lint

* Isolate span limit tests

* Clean span limits test

* Test limits on exported spans

* Remove duplicate test code

* Fix lint

* Add WithRawSpanLimits option

* Add test for raw and orig span limits opts

* Add changes to changelog

* Add tests for span resource disabled

* Test unlimited instead of default limit

* Update docs

* Add fix to changelog

* Fix option docs

* Do no mutate attribute

* Fix truncateAttr comment

* Remake NewSpanLimits to be newEnvSpanLimits

Update and unify documentation accordingly.

* Update truncateAttr string slice update comment

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-03-03 07:56:07 -08:00
Aaron Clawson
18f4cb85ec
[API EPIC 4/4] Fix tests and examples (#2587)
* Empty All of the metrics dir

* Add instrument api with documentation

* Add a NoOp implementation.

* Updated to the new config standard

* Address PR comments

* This change moves components to sdk/metrics

The Moved components are:
- metric/metrictest
- metric/number
- metric/internal/registry
- metric/sdkapi

* The SDK changes necessary to satasify the new api

* This fixes the remaing tests.

* Update changelog

* refactor the Noop meter and instruments into one package.

* Renamed pkg.Instruments to pkg.InstrumentProvider

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
2022-03-02 09:50:29 -06:00
Chester Cheung
79f6bc1208
remove old prom-collector depandence (#2643) 2022-03-01 15:09:51 -05:00
Aaron Clawson
a1fff3c258
Add Marshaling implementations for exporters (#2578)
* Add Marshaling implementations for exporters

* Changelog

* Fix changelog

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-02-25 10:28:28 -08:00
Aaron Clawson
8eb376615e
Update BatchSpanProcessor debug message (#2640)
* update debug message

* update changelog

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-02-25 07:55:50 -08:00
Damien Mathieu
a15269a28a
change gc runtime name to go (#2560)
Per the specification: https://github.com/open-telemetry/opentelemetry-specification/pull/2262

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-02-23 09:27:52 -08:00
Will Li
98c2c9d96c
Add env support for span limits configuration (#2606)
* add env support for otel_span configuration

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* update changelog

* update changelog and some logic based on comment

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* add document about retrieve value from environment variable

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* remove trailing whitespace

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* parse environment variable before apply the options

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update sdk/trace/provider_test.go

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-02-17 08:21:13 -08:00
Tyler Yahn
065ba75c4b
Release v1.4.1/v0.27.1 (#2619)
* Update versions.yaml

* Prepare stable-v1 for version v1.4.1

* Prepare experimental-metrics for version v0.27.1

* Prepare bridge for version v0.27.1

* Update CHANGELOG

* Revert "Prepare experimental-metrics for version v0.27.1"

This reverts commit 838743af21.

* Do not release experimental-metrics with v0.27.1
2022-02-16 09:49:05 -08:00
Bogdan Drutu
2a9cedf5fe
Fix race condition in reading the dropped spans number (#2615)
* Fix race condition in reading the dropped spans number

As any race condition this should be consider an undefined behavior, and a patch release should be done.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-02-16 09:00:31 -08:00
Tyler Yahn
1bda06288e
Release v1.4.0/v0.27.0 (#2600)
* Update versions.yaml

* Update changelog

* Upgrade stable-v1 to version v1.4.0

* Upgrade experimental-metrics to version v0.27.0

* Upgrade bridge to version v0.27.0

* Update CHANGELOG.md
2022-02-11 08:29:27 -08:00
Tyler Yahn
98bb1056c0
Replace recordingSpan attributes implementation with slice of attributes (#2576)
* Replace recordingSpan attributes implementation

Instead of an LRU strategy for cap-ing span attributes, comply with the
specification and drop last added. To do this, the attributesmap is
replaced with a slice of attributes.

* Remove attributesmap files

* Refine addition algorithm

Unify duplicated code.

Fix deduplication algorithm.

Fix droppedAttributes to always be returned, even if the span has no
attributes.

* Unify span SetAttributes tests

* Doc fix to attr drop order in changelog

* Test span and snapshot attrs

* fix lint

* Add tests for recordingSpan method defaults

* Comment why pre-allocation is not done

* Correct grammar in recordingSpan allocation comment

* Update sdk/trace/tracer.go

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-02-07 12:58:05 -08:00
Tyler Yahn
b60d53d316
Unexport EnvBatchSpanProcessor* constants (#2583)
* Move BSP env support to internal

* Use pkg name

* Update env test

* Use internal/env in sdk/trace
2022-02-07 07:57:44 -08:00
Tyler Yahn
d5292e3cd1
Do not store TracerProvider or Tracer fields in SDK recordingSpan (#2575)
* Do not store TracerProvider fields in span

Instead of keeping a reference to the span's Tracer, and therefore also
it's TracerProvider, and the associated resource and spanLimits just
keep the reference to the Tracer. Refer to the TracerProvider fields
when needed instead.

* Make span refer to the inst lib via the Tracer

Instead of holding a field in the span, refer to the field in the parent
Tracer.
2022-02-01 15:20:35 -08:00
Tyler Yahn
bd817df68c
Change Options to accept type not pointer (#2558)
* Change trace options to accept type not pointer

Add benchmark to show allocation improvement.

* Update CONTRIBUTING.md guidelines

* Update all Option iface

* Fix grammar in CONTRIBUTING
2022-02-01 15:51:23 -06:00
Chao Weng
3cf35bdad6
Add env support for batch span processor (#2515)
* Add env support for batch span processor

* Update changelog

* lint
2022-01-28 10:07:21 -06:00
Tyler Yahn
d3bb03883b
Optimize evictedQueue implementation and use (#2556)
* Optimize evictedQueue impl and use

Avoid unnecessary allocations in the recordingSpan by using an
evictedQueue type instead of a pointer to one.

Lazy allocate the evictedQueue queue to prevent unnecessary operations
for spans without any use of the queue.

Document the evictedQueue

* Fix grammar
2022-01-27 13:55:21 -08:00
Tyler Yahn
6e549fe974
Remove unused sdk/internal/santize (#2549) 2022-01-26 13:27:59 -08:00
Aaron Clawson
d1b6a7d66f
Bump github.com/google/go-cmp from 0.5.6 to 0.5.7 across the project (#2545)
* update go-cmp to 0.5.7

* fixes go.sums

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
2022-01-24 08:35:53 -08:00
Aaron Clawson
f24f52aa06
Debug Logging for sdk/trace (#2500)
* Debug Logging for sdk/trace

* Fixes spelling, adds marshaling to attribute sets

Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-01-10 19:58:01 -05:00
Bogdan Drutu
9778aa328f
Remove Min/Max unused interfaces from the moved code (#2454)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-12-23 08:35:32 -08:00
Aaron Clawson
8849597744
Dependabot bump (#2477)
* Bump github.com/go-logr/stdr from 1.2.0 to 1.2.2

Bumps [github.com/go-logr/stdr](https://github.com/go-logr/stdr) from 1.2.0 to 1.2.2.
- [Release notes](https://github.com/go-logr/stdr/releases)
- [Commits](https://github.com/go-logr/stdr/compare/v1.2.0...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/go-logr/stdr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/go-logr/logr from 1.2.1 to 1.2.2

Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/go-logr/logr/releases)
- [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-logr/logr/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/go-logr/logr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/go-logr/stdr from 1.2.0 to 1.2.2 in /example/namedtracer

Bumps [github.com/go-logr/stdr](https://github.com/go-logr/stdr) from 1.2.0 to 1.2.2.
- [Release notes](https://github.com/go-logr/stdr/releases)
- [Commits](https://github.com/go-logr/stdr/compare/v1.2.0...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/go-logr/stdr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /example/otel-collector

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlpmetric/otlpmetricgrpc

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlptrace

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlptrace/otlptracegrpc

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlpmetric

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-12-20 08:54:44 -08:00
Aaron Clawson
134a610440
Fixes because of removal of exact type. (#2459)
Co-authored-by: Aaron Clawson <MadVikingGod@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-12-16 15:22:53 -05:00
Bogdan Drutu
4654d78104
Move Aggregator interface to aggregator package (#2444)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-12-15 08:13:48 -08:00