From 6de70559675ec9e80677b177a1e6b338f55a94bf Mon Sep 17 00:00:00 2001 From: Koichi Shiraishi Date: Sun, 12 Mar 2023 18:58:06 +0900 Subject: [PATCH] Update go version to 1.20 Signed-off-by: Koichi Shiraishi --- detectors/gcp/go.mod | 2 +- e2e-test-server/cloud_functions/go.mod | 2 +- e2e-test-server/go.mod | 2 +- example/metric/example.go | 7 +++---- example/metric/go.mod | 2 +- example/trace/http/go.mod | 2 +- exporter/collector/go.mod | 2 +- exporter/collector/googlemanagedprometheus/go.mod | 2 +- exporter/collector/integrationtest/go.mod | 2 +- exporter/metric/go.mod | 2 +- exporter/trace/go.mod | 2 +- go.mod | 2 +- internal/cloudmock/go.mod | 2 +- internal/resourcemapping/go.mod | 2 +- propagator/go.mod | 2 +- tools/go.mod | 2 +- 16 files changed, 18 insertions(+), 19 deletions(-) diff --git a/detectors/gcp/go.mod b/detectors/gcp/go.mod index f3f4bebb1..5f253a501 100644 --- a/detectors/gcp/go.mod +++ b/detectors/gcp/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp -go 1.19 +go 1.20 require ( cloud.google.com/go/compute v1.10.0 diff --git a/e2e-test-server/cloud_functions/go.mod b/e2e-test-server/cloud_functions/go.mod index 23bf94d3c..ce4efd52f 100644 --- a/e2e-test-server/cloud_functions/go.mod +++ b/e2e-test-server/cloud_functions/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/e2e-test-server/cloudfunctions -go 1.19 +go 1.20 require ( cloud.google.com/go/pubsub v1.28.0 diff --git a/e2e-test-server/go.mod b/e2e-test-server/go.mod index 4a723e449..70846e534 100644 --- a/e2e-test-server/go.mod +++ b/e2e-test-server/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/e2e-test-server -go 1.19 +go 1.20 require ( cloud.google.com/go/iam v0.8.0 // indirect diff --git a/example/metric/example.go b/example/metric/example.go index f340b40cf..121186dba 100644 --- a/example/metric/example.go +++ b/example/metric/example.go @@ -109,14 +109,13 @@ func main() { // Add measurement once an every 10 second. timer := time.NewTicker(10 * time.Second) + rng := rand.New(rand.NewSource(time.Now().UnixNano())) for range timer.C { - rand.Seed(time.Now().UnixNano()) - - r := rand.Int63n(100) + r := rng.Int63n(100) cv := 100 + r counter.Add(ctx, cv, clabels...) - r2 := rand.Int63n(100) + r2 := rng.Int63n(100) hv := float64(r2) / 20.0 histogram.Record(ctx, hv, clabels...) ov := 12.34 + hv diff --git a/example/metric/go.mod b/example/metric/go.mod index e588b0e31..cc28b9c5a 100644 --- a/example/metric/go.mod +++ b/example/metric/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/example/metric -go 1.19 +go 1.20 require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.35.2 diff --git a/example/trace/http/go.mod b/example/trace/http/go.mod index 0b3370310..9988da99b 100644 --- a/example/trace/http/go.mod +++ b/example/trace/http/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/example/trace/http -go 1.19 +go 1.20 require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.11.2 diff --git a/exporter/collector/go.mod b/exporter/collector/go.mod index b37610ba3..f7827d573 100644 --- a/exporter/collector/go.mod +++ b/exporter/collector/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector -go 1.19 +go 1.20 require ( cloud.google.com/go/logging v1.6.1 diff --git a/exporter/collector/googlemanagedprometheus/go.mod b/exporter/collector/googlemanagedprometheus/go.mod index b3e61b030..f05c6c354 100644 --- a/exporter/collector/googlemanagedprometheus/go.mod +++ b/exporter/collector/googlemanagedprometheus/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus -go 1.19 +go 1.20 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.73.0 diff --git a/exporter/collector/integrationtest/go.mod b/exporter/collector/integrationtest/go.mod index 7b6ac7956..caaf13ede 100644 --- a/exporter/collector/integrationtest/go.mod +++ b/exporter/collector/integrationtest/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/internal/integrationtest -go 1.19 +go 1.20 require ( cloud.google.com/go/logging v1.6.1 diff --git a/exporter/metric/go.mod b/exporter/metric/go.mod index 258401047..5b2cd9dbd 100644 --- a/exporter/metric/go.mod +++ b/exporter/metric/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric -go 1.19 +go 1.20 require ( cloud.google.com/go/monitoring v1.12.0 diff --git a/exporter/trace/go.mod b/exporter/trace/go.mod index 6d6816228..988158931 100644 --- a/exporter/trace/go.mod +++ b/exporter/trace/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace -go 1.19 +go 1.20 require ( cloud.google.com/go/trace v1.8.0 diff --git a/go.mod b/go.mod index 52854080b..afc4ce67e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go -go 1.19 +go 1.20 retract ( v1.8.0 diff --git a/internal/cloudmock/go.mod b/internal/cloudmock/go.mod index c436aa8dd..40b275ef4 100644 --- a/internal/cloudmock/go.mod +++ b/internal/cloudmock/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock -go 1.19 +go 1.20 require ( google.golang.org/genproto v0.0.0-20221018160656-63c7b68cfc55 diff --git a/internal/resourcemapping/go.mod b/internal/resourcemapping/go.mod index cd9080654..f4ca2b390 100644 --- a/internal/resourcemapping/go.mod +++ b/internal/resourcemapping/go.mod @@ -1,5 +1,5 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping -go 1.19 +go 1.20 require go.opentelemetry.io/otel v1.15.0-rc.1 diff --git a/propagator/go.mod b/propagator/go.mod index 7d0f09b10..646f2f65e 100644 --- a/propagator/go.mod +++ b/propagator/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/propagator -go 1.19 +go 1.20 require ( github.com/google/go-cmp v0.5.9 diff --git a/tools/go.mod b/tools/go.mod index 1c5be2942..47a431b44 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module github.com/GoogleCloudPlatform/opentelemetry-operations-go/tools -go 1.19 +go 1.20 require ( github.com/client9/misspell v0.3.4