Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Update prometheus/prometheus to v0.35.0 (#302)
Browse files Browse the repository at this point in the history
* udpate prometheus/prometheus to v0.35.0
  • Loading branch information
dashpole committed May 5, 2022
1 parent e781cdd commit 5a007e3
Show file tree
Hide file tree
Showing 11 changed files with 1,245 additions and 46 deletions.
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
steps:
- name: golang:1.14
- name: golang:1.17
args: ["make", "install-tools", "ci"]
logsBucket: gs://opentelemetry-ops-e2e-cloud-build-logs
3 changes: 2 additions & 1 deletion equivalence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"go.opencensus.io/metric/metricdata"
"google.golang.org/api/option"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
resourcepb "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
Expand Down Expand Up @@ -133,7 +134,7 @@ func TestEquivalenceStatsVsMetricsUploads(t *testing.T) {
defer doneFn()

// Now create a gRPC connection to the fake Stackdriver server.
conn, err := grpc.Dial(addr, grpc.WithInsecure())
conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("Failed to make a gRPC connection to the server: %v", err)
}
Expand Down
39 changes: 27 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
module contrib.go.opencensus.io/exporter/stackdriver

go 1.15
go 1.17

require (
cloud.google.com/go v0.97.0
cloud.google.com/go/compute v1.5.0
cloud.google.com/go/monitoring v1.1.0
cloud.google.com/go/trace v1.0.0
github.com/aws/aws-sdk-go v1.37.0
github.com/aws/aws-sdk-go v1.43.31
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/golang/protobuf v1.5.2
github.com/google/go-cmp v0.5.6
github.com/google/go-cmp v0.5.7
github.com/jstemmer/go-junit-report v0.9.1
github.com/prometheus/prometheus v2.5.0+incompatible
github.com/prometheus/prometheus v0.35.0
github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2
go.opencensus.io v0.23.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
golang.org/x/tools v0.1.5
google.golang.org/api v0.59.0
google.golang.org/genproto v0.0.0-20211018162055-cf77aa76bad2
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
golang.org/x/net v0.0.0-20220325170049-de3da57026de
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a
golang.org/x/tools v0.1.10
google.golang.org/api v0.74.0
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb
google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.28.0
honnef.co/go/tools v0.0.1-2020.1.4
)

require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/googleapis/gax-go/v2 v2.2.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
)
1,229 changes: 1,203 additions & 26 deletions go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion internal/testpb/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"go.opencensus.io/plugin/ocgrpc"
"go.opencensus.io/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

type testServer struct{}
Expand Down Expand Up @@ -82,7 +83,7 @@ func NewTestClient(l *testing.T) (client FooClient, cleanup func()) {
// Initialize client.
clientConn, err := grpc.Dial(
listener.Addr().String(),
grpc.WithInsecure(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithStatsHandler(&ocgrpc.ClientHandler{}),
grpc.WithBlock())

Expand Down
1 change: 1 addition & 0 deletions internal/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ package internal

import (
_ "github.com/jstemmer/go-junit-report"
_ "github.com/rakyll/embedmd"
_ "golang.org/x/lint/golint"
_ "golang.org/x/tools/cmd/goimports"
_ "honnef.co/go/tools/cmd/staticcheck"
Expand Down
3 changes: 2 additions & 1 deletion metrics_batcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
googlemetricpb "google.golang.org/genproto/googleapis/api/metric"
monitoringpb "google.golang.org/genproto/googleapis/monitoring/v3"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

func TestWorkers(t *testing.T) {
Expand Down Expand Up @@ -79,7 +80,7 @@ func TestWorkers(t *testing.T) {
}

func makeClient(addr string) (*monitoring.MetricClient, error) {
conn, err := grpc.Dial(addr, grpc.WithInsecure())
conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion metrics_proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
resourcepb "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
timestamppb "github.com/golang/protobuf/ptypes/timestamp"
promvalue "github.com/prometheus/prometheus/pkg/value"
promvalue "github.com/prometheus/prometheus/model/value"
distributionpb "google.golang.org/genproto/googleapis/api/distribution"
labelpb "google.golang.org/genproto/googleapis/api/label"
googlemetricpb "google.golang.org/genproto/googleapis/api/metric"
Expand Down
3 changes: 2 additions & 1 deletion metrics_proto_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (

"github.com/golang/protobuf/ptypes/empty"
"google.golang.org/api/option"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/testing/protocmp"
Expand Down Expand Up @@ -372,7 +373,7 @@ func TestExportMaxTSPerRequestAcrossTwoMetrics(t *testing.T) {
}

func createConn(t *testing.T, addr string) *grpc.ClientConn {
conn, err := grpc.Dial(addr, grpc.WithInsecure())
conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("Failed to make a gRPC connection to the server: %v", err)
}
Expand Down
3 changes: 2 additions & 1 deletion metrics_proto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres"
monitoringpb "google.golang.org/genproto/googleapis/monitoring/v3"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/protobuf/testing/protocmp"

metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
Expand All @@ -42,7 +43,7 @@ func TestExportTimeSeriesWithDifferentLabels(t *testing.T) {
defer doneFn()

// Now create a gRPC connection to the agent.
conn, err := grpc.Dial(addr, grpc.WithInsecure())
conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("Failed to make a gRPC connection to the agent: %v", err)
}
Expand Down
3 changes: 2 additions & 1 deletion stackdriver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
"golang.org/x/net/context/ctxhttp"
"google.golang.org/api/option"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

var (
Expand Down Expand Up @@ -156,7 +157,7 @@ func TestClose(t *testing.T) {
t.Skip("STACKDRIVER_TEST_PROJECT_ID not set")
}

conn, err := grpc.Dial("monitoring.googleapis.com:443", grpc.WithInsecure())
conn, err := grpc.Dial("monitoring.googleapis.com:443", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
t.Fatalf("cannot configure grpc conn: %v", err)
}
Expand Down

0 comments on commit 5a007e3

Please sign in to comment.