Skip to content
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

systemtest: update opentelemetry-go #6124

Merged
merged 2 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions systemtest/approvals/TestOTLPGRPCMetrics.approved.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@timestamp": "dynamic",
"agent": {
"name": "opentelemetry/go",
"version": "0.19.0"
"version": "1.0.0"
},
"ecs": {
"version": "dynamic"
Expand All @@ -13,7 +13,7 @@
"ingested": "dynamic"
},
"float64_counter": 1,
"int64_recorder": {
"int64_histogram": {
"counts": [
1,
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"@timestamp": "1970-01-01T00:02:03.000Z",
"agent": {
"name": "opentelemetry/go",
"version": "0.19.0"
"version": "1.0.0"
},
"ecs": {
"version": "dynamic"
},
"event": {
"ingested": "dynamic",
"outcome": "success"
"outcome": "unknown"
},
"labels": {
"resource_attribute_array": [
Expand Down Expand Up @@ -57,7 +57,6 @@
},
"id": "b3ee9be3b687a611",
"name": "operation_name",
"result": "Success",
"sampled": true,
"type": "custom"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@timestamp": "1970-01-01T00:02:03.000Z",
"agent": {
"name": "opentelemetry/go",
"version": "0.19.0"
"version": "1.0.0"
},
"data_stream.dataset": "apm",
"data_stream.namespace": "default",
Expand All @@ -15,7 +15,7 @@
"event": {
"agent_id_status": "missing",
"ingested": "dynamic",
"outcome": "success"
"outcome": "unknown"
},
"labels": {
"resource_attribute_array": [
Expand Down Expand Up @@ -61,7 +61,6 @@
},
"id": "b3ee9be3b687a611",
"name": "operation_name",
"result": "Success",
"sampled": true,
"type": "custom"
}
Expand All @@ -70,7 +69,7 @@
"@timestamp": "1970-01-01T00:02:03.001Z",
"agent": {
"name": "opentelemetry/go",
"version": "0.19.0"
"version": "1.0.0"
},
"data_stream.dataset": "apm.app",
"data_stream.namespace": "default",
Expand Down
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
20 changes: 12 additions & 8 deletions systemtest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,23 @@ 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
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 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.0
go.opentelemetry.io/otel/internal/metric v0.23.0 // indirect
go.opentelemetry.io/otel/metric v0.23.0
go.opentelemetry.io/otel/sdk v1.0.0 // 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 // 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