Skip to content

Commit

Permalink
systemtest: update opentelemetry-go
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Sep 6, 2021
1 parent 43e491f commit f9fbab2
Show file tree
Hide file tree
Showing 5 changed files with 330 additions and 50 deletions.
20 changes: 10 additions & 10 deletions systemtest/benchtest/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"os"
"testing"

"go.opentelemetry.io/otel/exporters/otlp"
"go.opentelemetry.io/otel/exporters/otlp/otlpgrpc"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

Expand Down Expand Up @@ -61,7 +61,7 @@ func NewTracer(tb testing.TB) *apm.Tracer {

// NewOTLPExporter returns a new OpenTelemetry Go exporter, configured
// to export to the target APM Server.
func NewOTLPExporter(tb testing.TB) *otlp.Exporter {
func NewOTLPExporter(tb testing.TB) *otlptrace.Exporter {
endpoint := serverURL.Host
if serverURL.Port() == "" {
switch serverURL.Scheme {
Expand All @@ -71,24 +71,24 @@ func NewOTLPExporter(tb testing.TB) *otlp.Exporter {
endpoint += ":443"
}
}
opts := []otlpgrpc.Option{
otlpgrpc.WithEndpoint(endpoint),
otlpgrpc.WithDialOption(grpc.WithBlock()),
opts := []otlptracegrpc.Option{
otlptracegrpc.WithEndpoint(endpoint),
otlptracegrpc.WithDialOption(grpc.WithBlock()),
}
if *secretToken != "" {
opts = append(opts, otlpgrpc.WithHeaders(map[string]string{
opts = append(opts, otlptracegrpc.WithHeaders(map[string]string{
"Authorization": "Bearer " + *secretToken,
}))
}
if serverURL.Scheme == "http" {
opts = append(opts, otlpgrpc.WithInsecure())
opts = append(opts, otlptracegrpc.WithInsecure())
} else {
tlsCredentials := credentials.NewTLS(&tls.Config{
InsecureSkipVerify: true,
})
opts = append(opts, otlpgrpc.WithTLSCredentials(tlsCredentials))
opts = append(opts, otlptracegrpc.WithTLSCredentials(tlsCredentials))
}
exporter, err := otlp.NewExporter(context.Background(), otlpgrpc.NewDriver(opts...))
exporter, err := otlptracegrpc.New(context.Background(), opts...)
if err != nil {
tb.Fatal(err)
}
Expand Down
19 changes: 11 additions & 8 deletions systemtest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ require (
github.com/tidwall/pretty v1.1.0 // indirect
go.elastic.co/apm v1.12.0
go.elastic.co/fastjson v1.1.0
go.opentelemetry.io/otel v0.19.0
go.opentelemetry.io/otel/exporters/otlp v0.19.0
go.opentelemetry.io/otel/metric v0.19.0
go.opentelemetry.io/otel/sdk v0.19.0
go.opentelemetry.io/otel/sdk/export/metric v0.19.0
go.opentelemetry.io/otel/sdk/metric v0.19.0
go.opentelemetry.io/otel/trace v0.19.0
go.opentelemetry.io/otel v1.0.0-RC3
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.23.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.23.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.0-RC3 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.0-RC3
go.opentelemetry.io/otel/metric v0.23.0
go.opentelemetry.io/otel/sdk v1.0.0-RC3 // indirect
go.opentelemetry.io/otel/sdk/export/metric v0.23.0 // indirect
go.opentelemetry.io/otel/sdk/metric v0.23.0 // indirect
go.opentelemetry.io/otel/trace v1.0.0-RC3 // indirect
go.uber.org/zap v1.15.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
golang.org/x/tools v0.1.5 // indirect
google.golang.org/grpc v1.36.0
google.golang.org/grpc v1.40.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gotest.tools v2.2.0+incompatible // indirect
howett.net/plist v0.0.0-20201203080718-1454fab16a06 // indirect
Expand Down
Loading

0 comments on commit f9fbab2

Please sign in to comment.