-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added version.go and test file for issue 2143 #3677
Conversation
ChillOrb
commented
Feb 5, 2023
- As per Update which Go Modules have a version() func #2143 , added un-exported func version() for sdk/metrics and sdk/trace and added test cases in the same sdk module.
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3677 +/- ##
=======================================
- Coverage 82.8% 82.8% -0.1%
=======================================
Files 177 179 +2
Lines 13494 13498 +4
=======================================
+ Hits 11178 11180 +2
- Misses 2095 2097 +2
Partials 221 221
|
Added license info in sdk/metric/version_test.go |
goimport file linting
@open-telemetry/go-instrumentaiton-maintainers I think this is good to merge. |
Signed-off-by: ChillOrb <[email protected]>
Signed-off-by: ChillOrb <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: ChillOrb <[email protected]>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/XSAM/otelsql](https://github.com/XSAM/otelsql) | require | minor | `v0.21.0` -> `v0.23.0` | | [go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin](https://github.com/open-telemetry/opentelemetry-go-contrib) | require | minor | `v0.40.0` -> `v0.42.0` | | [go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho](https://github.com/open-telemetry/opentelemetry-go-contrib) | require | minor | `v0.40.0` -> `v0.42.0` | | [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/exporters/jaeger](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/exporters/stdout/stdouttrace](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/trace](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.14.0` -> `v1.16.0` | --- ### Release Notes <details> <summary>XSAM/otelsql</summary> ### [`v0.23.0`](https://github.com/XSAM/otelsql/releases/tag/v0.23.0) [Compare Source](https://github.com/XSAM/otelsql/compare/v0.22.0...v0.23.0) #### 0.23.0 - 2023-05-22 ##### Changed - Upgrade OTel to version `1.16.0/0.39.0`. ([#​170](https://github.com/XSAM/otelsql/issues/170)) ### [`v0.22.0`](https://github.com/XSAM/otelsql/releases/tag/v0.22.0) [Compare Source](https://github.com/XSAM/otelsql/compare/v0.21.0...v0.22.0) #### 0.22.0 - 2023-04-28 #####⚠️ Notice⚠️ The minimum supported Go version is `1.19`. ##### Changed - Upgrade OTel to version `1.15.0/0.38.0`. ([#​163](https://github.com/XSAM/otelsql/issues/163)) ##### Removed - Support for Go `1.18`. Support is now only for Go `1.19` and Go `1.20`. ([#​164](https://github.com/XSAM/otelsql/issues/164)) </details> <details> <summary>open-telemetry/opentelemetry-go</summary> ### [`v1.16.0`](https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0): /v0.39.0 -- Stable Metric API [Compare Source](https://github.com/open-telemetry/opentelemetry-go/compare/v1.15.1...v1.16.0) This release contains the first stable release of the OpenTelemetry Go [metric API]. Our project stability guarantees now apply to the `go.opentelemetry.io/otel/metric` package. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ##### What's Changed ##### Added - The `go.opentelemetry.io/otel/semconv/v1.19.0` package. The package contains semantic conventions from the `v1.19.0` version of the OpenTelemetry specification. ([#​3848](https://github.com/open-telemetry/opentelemetry-go/issues/3848)) - The `go.opentelemetry.io/otel/semconv/v1.20.0` package. The package contains semantic conventions from the `v1.20.0` version of the OpenTelemetry specification. ([#​4078](https://github.com/open-telemetry/opentelemetry-go/issues/4078)) ##### Changed - Use `strings.Cut()` instead of `string.SplitN()` for better readability and memory use. ([#​4049](https://github.com/open-telemetry/opentelemetry-go/issues/4049)) ##### Removed - The deprecated `go.opentelemetry.io/otel/metric/instrument` package is removed. Use `go.opentelemetry.io/otel/metric` instead. ([#​4055](https://github.com/open-telemetry/opentelemetry-go/issues/4055)) ##### Fixed - Fix build for BSD based systems in `go.opentelemetry.io/otel/sdk/resource`. ([#​4077](https://github.com/open-telemetry/opentelemetry-go/issues/4077)) ##### New Contributors - [@​tsloughter](https://github.com/tsloughter) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/3848](https://github.com/open-telemetry/opentelemetry-go/pull/3848) - [@​Tijmen34](https://github.com/Tijmen34) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4074](https://github.com/open-telemetry/opentelemetry-go/pull/4074) - [@​ChillOrb](https://github.com/ChillOrb) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/3677](https://github.com/open-telemetry/opentelemetry-go/pull/3677) - [@​ChenX1993](https://github.com/ChenX1993) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4043](https://github.com/open-telemetry/opentelemetry-go/pull/4043) - [@​andrew-womeldorf](https://github.com/andrew-womeldorf) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4086](https://github.com/open-telemetry/opentelemetry-go/pull/4086) **Full Changelog**: open-telemetry/opentelemetry-go@v1.15.1...v1.16.0 [metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric ### [`v1.15.1`](https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.1): /v0.38.1 [Compare Source](https://github.com/open-telemetry/opentelemetry-go/compare/v1.15.0...v1.15.1) ##### What's Changed ##### Fixed - Remove unused imports from `sdk/resource/host_id_bsd.go` which caused build failures. ([#​4040](https://github.com/open-telemetry/opentelemetry-go/issues/4040), [#​4041](https://github.com/open-telemetry/opentelemetry-go/issues/4041)) ##### New Contributors - [@​Achooo](https://github.com/Achooo) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4041](https://github.com/open-telemetry/opentelemetry-go/pull/4041) **Full Changelog**: open-telemetry/opentelemetry-go@v1.15.0...v1.15.1 ### [`v1.15.0`](https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0): /v0.38.0 [Compare Source](https://github.com/open-telemetry/opentelemetry-go/compare/v1.14.0...v1.15.0) ##### Added - The `go.opentelemetry.io/otel/metric/embedded` package. ([#​3916](https://github.com/open-telemetry/opentelemetry-go/issues/3916)) - The `Version` function to `go.opentelemetry.io/otel/sdk` to return the SDK version. ([#​3949](https://github.com/open-telemetry/opentelemetry-go/issues/3949)) - Add a `WithNamespace` option to `go.opentelemetry.io/otel/exporters/prometheus` to allow users to prefix metrics with a namespace. ([#​3970](https://github.com/open-telemetry/opentelemetry-go/issues/3970)) - The following configuration types were added to `go.opentelemetry.io/otel/metric/instrument` to be used in the configuration of measurement methods. ([#​3971](https://github.com/open-telemetry/opentelemetry-go/issues/3971)) - The `AddConfig` used to hold configuration for addition measurements - `NewAddConfig` used to create a new `AddConfig` - `AddOption` used to configure an `AddConfig` - The `RecordConfig` used to hold configuration for recorded measurements - `NewRecordConfig` used to create a new `RecordConfig` - `RecordOption` used to configure a `RecordConfig` - The `ObserveConfig` used to hold configuration for observed measurements - `NewObserveConfig` used to create a new `ObserveConfig` - `ObserveOption` used to configure an `ObserveConfig` - `WithAttributeSet` and `WithAttributes` are added to `go.opentelemetry.io/otel/metric/instrument`. They return an option used during a measurement that defines the attribute Set associated with the measurement. ([#​3971](https://github.com/open-telemetry/opentelemetry-go/issues/3971)) - The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` to return the OTLP metrics client version. ([#​3956](https://github.com/open-telemetry/opentelemetry-go/issues/3956)) - The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlptrace` to return the OTLP trace client version. ([#​3956](https://github.com/open-telemetry/opentelemetry-go/issues/3956)) ##### Changed - The `Extrema` in `go.opentelemetry.io/otel/sdk/metric/metricdata` is redefined with a generic argument of `[N int64 | float64]`. ([#​3870](https://github.com/open-telemetry/opentelemetry-go/issues/3870)) - Update all exported interfaces from `go.opentelemetry.io/otel/metric` to embed their corresponding interface from `go.opentelemetry.io/otel/metric/embedded`. This adds an implementation requirement to set the interface default behavior for unimplemented methods. ([#​3916](https://github.com/open-telemetry/opentelemetry-go/issues/3916)) - Move No-Op implementation from `go.opentelemetry.io/otel/metric` into its own package `go.opentelemetry.io/otel/metric/noop`. ([#​3941](https://github.com/open-telemetry/opentelemetry-go/issues/3941)) - `metric.NewNoopMeterProvider` is replaced with `noop.NewMeterProvider` - Add all the methods from `"go.opentelemetry.io/otel/trace".SpanContext` to `bridgeSpanContext` by embedding `otel.SpanContext` in `bridgeSpanContext`. ([#​3966](https://github.com/open-telemetry/opentelemetry-go/issues/3966)) - Wrap `UploadMetrics` error in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/` to improve error message when encountering generic grpc errors. ([#​3974](https://github.com/open-telemetry/opentelemetry-go/issues/3974)) - The measurement methods for all instruments in `go.opentelemetry.io/otel/metric/instrument` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. ([#​3971](https://github.com/open-telemetry/opentelemetry-go/issues/3971)) - The `Int64Counter.Add` method now accepts `...AddOption` - The `Float64Counter.Add` method now accepts `...AddOption` - The `Int64UpDownCounter.Add` method now accepts `...AddOption` - The `Float64UpDownCounter.Add` method now accepts `...AddOption` - The `Int64Histogram.Record` method now accepts `...RecordOption` - The `Float64Histogram.Record` method now accepts `...RecordOption` - The `Int64Observer.Observe` method now accepts `...ObserveOption` - The `Float64Observer.Observe` method now accepts `...ObserveOption` - The `Observer` methods in `go.opentelemetry.io/otel/metric` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. ([#​3971](https://github.com/open-telemetry/opentelemetry-go/issues/3971)) - The `Observer.ObserveInt64` method now accepts `...ObserveOption` - The `Observer.ObserveFloat64` method now accepts `...ObserveOption` - Move global metric back to `go.opentelemetry.io/otel/metric/global` from `go.opentelemetry.io/otel`. ([#​3986](https://github.com/open-telemetry/opentelemetry-go/issues/3986)) ##### Fixed - `TracerProvider` allows calling `Tracer()` while it's shutting down. It used to deadlock. ([#​3924](https://github.com/open-telemetry/opentelemetry-go/issues/3924)) - Use the SDK version for the Telemetry SDK resource detector in `go.opentelemetry.io/otel/sdk/resource`. ([#​3949](https://github.com/open-telemetry/opentelemetry-go/issues/3949)) - Fix a data race in `SpanProcessor` returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace`. ([#​3951](https://github.com/open-telemetry/opentelemetry-go/issues/3951)) - Automatically figure out the default aggregation with `aggregation.Default`. ([#​3967](https://github.com/open-telemetry/opentelemetry-go/issues/3967)) ##### Deprecated - The `go.opentelemetry.io/otel/metric/instrument` package is deprecated. Use the equivalent types added to `go.opentelemetry.io/otel/metric` instead. ([#​4018](https://github.com/open-telemetry/opentelemetry-go/issues/4018)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/infratographer/x). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS45OC40IiwidXBkYXRlZEluVmVyIjoiMzUuOTguNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v0.38.0` -> `v0.39.0` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.15.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v1.15.0` -> `v1.16.0` | | [go.opentelemetry.io/otel/exporters/prometheus](https://github.com/open-telemetry/opentelemetry-go) | require | minor | `v0.38.0` -> `v0.39.0` | --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-go</summary> ### [`v1.16.0`](https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0): /v0.39.0 -- Stable Metric API [Compare Source](https://github.com/open-telemetry/opentelemetry-go/compare/v1.15.1...v1.16.0) This release contains the first stable release of the OpenTelemetry Go [metric API]. Our project stability guarantees now apply to the `go.opentelemetry.io/otel/metric` package. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ##### What's Changed ##### Added - The `go.opentelemetry.io/otel/semconv/v1.19.0` package. The package contains semantic conventions from the `v1.19.0` version of the OpenTelemetry specification. ([#​3848](https://github.com/open-telemetry/opentelemetry-go/issues/3848)) - The `go.opentelemetry.io/otel/semconv/v1.20.0` package. The package contains semantic conventions from the `v1.20.0` version of the OpenTelemetry specification. ([#​4078](https://github.com/open-telemetry/opentelemetry-go/issues/4078)) ##### Changed - Use `strings.Cut()` instead of `string.SplitN()` for better readability and memory use. ([#​4049](https://github.com/open-telemetry/opentelemetry-go/issues/4049)) ##### Removed - The deprecated `go.opentelemetry.io/otel/metric/instrument` package is removed. Use `go.opentelemetry.io/otel/metric` instead. ([#​4055](https://github.com/open-telemetry/opentelemetry-go/issues/4055)) ##### Fixed - Fix build for BSD based systems in `go.opentelemetry.io/otel/sdk/resource`. ([#​4077](https://github.com/open-telemetry/opentelemetry-go/issues/4077)) ##### New Contributors - [@​tsloughter](https://github.com/tsloughter) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/3848](https://github.com/open-telemetry/opentelemetry-go/pull/3848) - [@​Tijmen34](https://github.com/Tijmen34) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4074](https://github.com/open-telemetry/opentelemetry-go/pull/4074) - [@​ChillOrb](https://github.com/ChillOrb) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/3677](https://github.com/open-telemetry/opentelemetry-go/pull/3677) - [@​ChenX1993](https://github.com/ChenX1993) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4043](https://github.com/open-telemetry/opentelemetry-go/pull/4043) - [@​andrew-womeldorf](https://github.com/andrew-womeldorf) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4086](https://github.com/open-telemetry/opentelemetry-go/pull/4086) **Full Changelog**: open-telemetry/opentelemetry-go@v1.15.1...v1.16.0 [metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric ### [`v1.15.1`](https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.1): /v0.38.1 [Compare Source](https://github.com/open-telemetry/opentelemetry-go/compare/v1.15.0...v1.15.1) ##### What's Changed ##### Fixed - Remove unused imports from `sdk/resource/host_id_bsd.go` which caused build failures. ([#​4040](https://github.com/open-telemetry/opentelemetry-go/issues/4040), [#​4041](https://github.com/open-telemetry/opentelemetry-go/issues/4041)) ##### New Contributors - [@​Achooo](https://github.com/Achooo) made their first contribution in [https://github.com/open-telemetry/opentelemetry-go/pull/4041](https://github.com/open-telemetry/opentelemetry-go/pull/4041) **Full Changelog**: open-telemetry/opentelemetry-go@v1.15.0...v1.15.1 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/flagd). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43NS4wIiwidXBkYXRlZEluVmVyIjoiMzUuMTMxLjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>