Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into mvg/instrument_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
MadVikingGod committed Sep 20, 2022
2 parents dd156c2 + b6d4335 commit a316885
Show file tree
Hide file tree
Showing 45 changed files with 63 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
env:
DEFAULT_GO_VERSION: 1.17
DEFAULT_GO_VERSION: 1.18
jobs:
benchmark:
name: Benchmarks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
compatibility-test:
strategy:
matrix:
go-version: [1.19, 1.18, 1.17]
go-version: [1.19, 1.18]
os: [ubuntu-latest, macos-latest, windows-latest]
# GitHub Actions does not support arm* architectures on default
# runners. It is possible to acomplish this with a self-hosted runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v3
with:
go-version: '^1.17.0'
go-version: '^1.18.0'
- uses: evantorrie/mott-the-tidier@v1-beta
id: modtidy
with:
Expand Down
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Changed

- Add caching to instrument creation (#3181)

## [0.32.0] Revised Metric SDK (Alpha) - 2022-09-18

### Changed

- The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification.
Please see the package documentation for how the new SDK is initialized and configured. (#3175)
- Add caching to instrument creation (#3181)
- Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179)

### Removed

Expand Down Expand Up @@ -226,7 +232,7 @@ Code instrumented with the `go.opentelemetry.io/otel/metric` will need to be mod
- `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT`
- `OTEL_SPAN_LINK_COUNT_LIMIT`
- `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT`

If the provided environment variables are invalid (negative), the default values would be used.
- Rename the `gc` runtime name to `go` (#2560)
- Add resource container ID detection. (#2418)
Expand Down Expand Up @@ -1942,7 +1948,8 @@ It contains api and sdk for trace and meter.
- CircleCI build CI manifest files.
- CODEOWNERS file to track owners of this project.

[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.10.0...HEAD
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/sdk/metric/v0.32.0...HEAD
[0.32.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.0
[1.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.10.0
[1.9.0/0.0.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.9.0
[1.8.0/0.31.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.8.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ go-mod-tidy/%: DIR=$*
go-mod-tidy/%: | crosslink
@echo "$(GO) mod tidy in $(DIR)" \
&& cd $(DIR) \
&& $(GO) mod tidy -compat=1.17
&& $(GO) mod tidy -compat=1.18

.PHONY: lint-modules
lint-modules: go-mod-tidy
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,14 @@ Currently, this project supports the following environments.
| ------- | ---------- | ------------ |
| Ubuntu | 1.19 | amd64 |
| Ubuntu | 1.18 | amd64 |
| Ubuntu | 1.17 | amd64 |
| Ubuntu | 1.19 | 386 |
| Ubuntu | 1.18 | 386 |
| Ubuntu | 1.17 | 386 |
| MacOS | 1.19 | amd64 |
| MacOS | 1.18 | amd64 |
| MacOS | 1.17 | amd64 |
| Windows | 1.19 | amd64 |
| Windows | 1.18 | amd64 |
| Windows | 1.17 | amd64 |
| Windows | 1.19 | 386 |
| Windows | 1.18 | 386 |
| Windows | 1.17 | 386 |

While this project should work for other systems, no compatibility guarantees
are made for those systems currently.
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/bridge/opencensus

go 1.17
go 1.18

require (
go.opencensus.io v0.22.6-0.20201102222123-380f4078db9f
Expand Down
4 changes: 2 additions & 2 deletions bridge/opencensus/opencensusmetric/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.18
require (
go.opencensus.io v0.23.0
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/metric v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/sdk/metric v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/metric v0.32.0
go.opentelemetry.io/otel/sdk/metric v0.32.0
)

require (
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/bridge/opencensus/test

go 1.17
go 1.18

require (
go.opencensus.io v0.23.0
Expand Down
2 changes: 1 addition & 1 deletion bridge/opentracing/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/bridge/opentracing

go 1.17
go 1.18

replace go.opentelemetry.io/otel => ../..

Expand Down
2 changes: 1 addition & 1 deletion example/fib/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/fib

go 1.17
go 1.18

require (
go.opentelemetry.io/otel v1.10.0
Expand Down
2 changes: 1 addition & 1 deletion example/jaeger/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/jaeger

go 1.17
go 1.18

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion example/namedtracer/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/namedtracer

go 1.17
go 1.18

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion example/otel-collector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/otel-collector

go 1.17
go 1.18

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion example/passthrough/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/passthrough

go 1.17
go 1.18

require (
go.opentelemetry.io/otel v1.10.0
Expand Down
6 changes: 3 additions & 3 deletions example/prometheus/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.18
require (
github.com/prometheus/client_golang v1.13.0
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/exporters/prometheus v0.31.0
go.opentelemetry.io/otel/metric v0.31.0
go.opentelemetry.io/otel/sdk/metric v0.31.0
go.opentelemetry.io/otel/exporters/prometheus v0.32.0
go.opentelemetry.io/otel/metric v0.32.0
go.opentelemetry.io/otel/sdk/metric v0.32.0
)

require (
Expand Down
2 changes: 1 addition & 1 deletion example/zipkin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.17-alpine
FROM golang:1.18-alpine
COPY . /go/src/github.com/open-telemetry/opentelemetry-go/
WORKDIR /go/src/github.com/open-telemetry/opentelemetry-go/example/zipkin/
RUN go install ./main.go
Expand Down
2 changes: 1 addition & 1 deletion example/zipkin/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/zipkin

go 1.17
go 1.18

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion exporters/jaeger/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/jaeger

go 1.17
go 1.18

require (
github.com/google/go-cmp v0.5.8
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/internal/retry/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/internal/retry

go 1.17
go 1.18

require (
github.com/cenkalti/backoff/v4 v4.1.3
Expand Down
4 changes: 2 additions & 2 deletions exporters/otlp/otlpmetric/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0
go.opentelemetry.io/otel/metric v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/metric v0.32.0
go.opentelemetry.io/otel/sdk v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/sdk/metric v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/sdk/metric v0.32.0
go.opentelemetry.io/proto/otlp v0.19.0
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.27.1
Expand Down
6 changes: 3 additions & 3 deletions exporters/otlp/otlpmetric/otlpmetricgrpc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ require (
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0
go.opentelemetry.io/otel/metric v0.31.0
go.opentelemetry.io/otel/sdk/metric v0.31.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.32.0
go.opentelemetry.io/otel/metric v0.32.0
go.opentelemetry.io/otel/sdk/metric v0.32.0
go.opentelemetry.io/proto/otlp v0.19.0
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1
google.golang.org/grpc v1.46.2
Expand Down
6 changes: 3 additions & 3 deletions exporters/otlp/otlpmetric/otlpmetrichttp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.18
require (
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.31.0
go.opentelemetry.io/otel/metric v0.31.0
go.opentelemetry.io/otel/sdk/metric v0.31.0
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.32.0
go.opentelemetry.io/otel/metric v0.32.0
go.opentelemetry.io/otel/sdk/metric v0.32.0
go.opentelemetry.io/proto/otlp v0.19.0
google.golang.org/protobuf v1.28.0
)
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlptrace

go 1.17
go 1.18

require (
github.com/google/go-cmp v0.5.8
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/otlptracegrpc/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc

go 1.17
go 1.18

require (
github.com/stretchr/testify v1.7.1
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/otlptracehttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp

go 1.17
go 1.18

require (
github.com/stretchr/testify v1.7.1
Expand Down
4 changes: 2 additions & 2 deletions exporters/prometheus/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ func getAttrs(attrs attribute.Set) ([]string, []string) {
kv := itr.Attribute()
key := strings.Map(sanitizeRune, string(kv.Key))
if _, ok := keysMap[key]; !ok {
keysMap[key] = []string{kv.Value.AsString()}
keysMap[key] = []string{kv.Value.Emit()}
} else {
// if the sanitized key is a duplicate, append to the list of keys
keysMap[key] = append(keysMap[key], kv.Value.AsString())
keysMap[key] = append(keysMap[key], kv.Value.Emit())
}
}

Expand Down
2 changes: 2 additions & 0 deletions exporters/prometheus/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ func TestPrometheusExporter(t *testing.T) {
attrs := []attribute.KeyValue{
attribute.Key("A").String("B"),
attribute.Key("C").String("D"),
attribute.Key("E").Bool(true),
attribute.Key("F").Int(42),
}
counter, err := meter.SyncFloat64().Counter("foo", instrument.WithDescription("a simple counter"))
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions exporters/prometheus/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/prometheus/client_golang v1.13.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/metric v0.31.0
go.opentelemetry.io/otel/sdk/metric v0.31.0
go.opentelemetry.io/otel/metric v0.32.0
go.opentelemetry.io/otel/sdk/metric v0.32.0
)

require (
Expand Down
2 changes: 1 addition & 1 deletion exporters/prometheus/testdata/counter.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# HELP foo a simple counter
# TYPE foo counter
foo{A="B",C="D"} 24.3
foo{A="B",C="D",E="true",F="42"} 24.3
4 changes: 2 additions & 2 deletions exporters/stdout/stdoutmetric/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ go 1.18
require (
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/otel v1.10.0
go.opentelemetry.io/otel/metric v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/metric v0.32.0
go.opentelemetry.io/otel/sdk v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/sdk/metric v0.0.0-00010101000000-000000000000
go.opentelemetry.io/otel/sdk/metric v0.32.0
)

require (
Expand Down
2 changes: 1 addition & 1 deletion exporters/stdout/stdouttrace/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/stdout/stdouttrace

go 1.17
go 1.18

replace (
go.opentelemetry.io/otel => ../../..
Expand Down
2 changes: 1 addition & 1 deletion exporters/zipkin/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/zipkin

go 1.17
go 1.18

require (
github.com/google/go-cmp v0.5.8
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel

go 1.17
go 1.18

require (
github.com/go-logr/logr v1.2.3
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/internal/tools

go 1.17
go 1.18

require (
github.com/client9/misspell v0.3.4
Expand Down
2 changes: 1 addition & 1 deletion metric/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/metric

go 1.17
go 1.18

require (
github.com/stretchr/testify v1.7.1
Expand Down
2 changes: 1 addition & 1 deletion schema/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/schema

go 1.17
go 1.18

require (
github.com/Masterminds/semver/v3 v3.1.1
Expand Down
2 changes: 1 addition & 1 deletion sdk/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/sdk

go 1.17
go 1.18

replace go.opentelemetry.io/otel => ../

Expand Down
3 changes: 0 additions & 3 deletions sdk/metric/aggregation/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build go1.17
// +build go1.17

// Package aggregation contains configuration types that define the
// aggregation operation used to summarizes recorded measurements.
package aggregation // import "go.opentelemetry.io/otel/sdk/metric/aggregation"
Expand Down

0 comments on commit a316885

Please sign in to comment.