Skip to content

Commit 08b07c9

Browse files
[8.19] (backport #19487) test: replace gogoprotobuf reflect hack with proto pkg (#19491)
* test: replace gogoprotobuf reflect hack with proto pkg (#19487) replace goto/protobuf reflection hack with explicit types in proto/otlp upstream package. (cherry picked from commit 17a7a58) # Conflicts: # NOTICE-fips.txt # NOTICE.txt # go.mod # go.sum # internal/beater/server_test.go * lint: run go mod tidy --------- Co-authored-by: kruskall <[email protected]>
1 parent cc51658 commit 08b07c9

File tree

5 files changed

+110
-107
lines changed

5 files changed

+110
-107
lines changed

NOTICE-fips.txt

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,51 +2650,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26502650
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26512651

26522652

2653-
--------------------------------------------------------------------------------
2654-
Dependency : github.com/gogo/protobuf
2655-
Version: v1.3.2
2656-
Licence type (autodetected): BSD-3-Clause
2657-
--------------------------------------------------------------------------------
2658-
2659-
Contents of probable licence file $GOMODCACHE/github.com/gogo/[email protected]/LICENSE:
2660-
2661-
Copyright (c) 2013, The GoGo Authors. All rights reserved.
2662-
2663-
Protocol Buffers for Go with Gadgets
2664-
2665-
Go support for Protocol Buffers - Google's data interchange format
2666-
2667-
Copyright 2010 The Go Authors. All rights reserved.
2668-
https://github.com/golang/protobuf
2669-
2670-
Redistribution and use in source and binary forms, with or without
2671-
modification, are permitted provided that the following conditions are
2672-
met:
2673-
2674-
* Redistributions of source code must retain the above copyright
2675-
notice, this list of conditions and the following disclaimer.
2676-
* Redistributions in binary form must reproduce the above
2677-
copyright notice, this list of conditions and the following disclaimer
2678-
in the documentation and/or other materials provided with the
2679-
distribution.
2680-
* Neither the name of Google Inc. nor the names of its
2681-
contributors may be used to endorse or promote products derived from
2682-
this software without specific prior written permission.
2683-
2684-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2685-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2686-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2687-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2688-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2689-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2690-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2691-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2692-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2693-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2694-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2695-
2696-
2697-
26982653
--------------------------------------------------------------------------------
26992654
Dependency : github.com/gorilla/mux
27002655
Version: v1.8.1
@@ -11566,6 +11521,51 @@ Apache License
1156611521

1156711522

1156811523

11524+
--------------------------------------------------------------------------------
11525+
Dependency : github.com/gogo/protobuf
11526+
Version: v1.3.2
11527+
Licence type (autodetected): BSD-3-Clause
11528+
--------------------------------------------------------------------------------
11529+
11530+
Contents of probable licence file $GOMODCACHE/github.com/gogo/[email protected]/LICENSE:
11531+
11532+
Copyright (c) 2013, The GoGo Authors. All rights reserved.
11533+
11534+
Protocol Buffers for Go with Gadgets
11535+
11536+
Go support for Protocol Buffers - Google's data interchange format
11537+
11538+
Copyright 2010 The Go Authors. All rights reserved.
11539+
https://github.com/golang/protobuf
11540+
11541+
Redistribution and use in source and binary forms, with or without
11542+
modification, are permitted provided that the following conditions are
11543+
met:
11544+
11545+
* Redistributions of source code must retain the above copyright
11546+
notice, this list of conditions and the following disclaimer.
11547+
* Redistributions in binary form must reproduce the above
11548+
copyright notice, this list of conditions and the following disclaimer
11549+
in the documentation and/or other materials provided with the
11550+
distribution.
11551+
* Neither the name of Google Inc. nor the names of its
11552+
contributors may be used to endorse or promote products derived from
11553+
this software without specific prior written permission.
11554+
11555+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11556+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11557+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11558+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11559+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11560+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11561+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11562+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11563+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11564+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11565+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11566+
11567+
11568+
1156911569
--------------------------------------------------------------------------------
1157011570
Dependency : github.com/gohugoio/hashstructure
1157111571
Version: v0.5.0
@@ -16920,11 +16920,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1692016920

1692116921
--------------------------------------------------------------------------------
1692216922
Dependency : google.golang.org/genproto/googleapis/rpc
16923-
Version: v0.0.0-20250811230008-5f3141c8851a
16923+
Version: v0.0.0-20250825161204-c5933d9347a5
1692416924
Licence type (autodetected): Apache-2.0
1692516925
--------------------------------------------------------------------------------
1692616926

16927-
Contents of probable licence file $GOMODCACHE/google.golang.org/genproto/googleapis/[email protected]20250811230008-5f3141c8851a/LICENSE:
16927+
Contents of probable licence file $GOMODCACHE/google.golang.org/genproto/googleapis/[email protected]20250825161204-c5933d9347a5/LICENSE:
1692816928

1692916929

1693016930
Apache License

NOTICE.txt

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2650,51 +2650,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26502650
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26512651

26522652

2653-
--------------------------------------------------------------------------------
2654-
Dependency : github.com/gogo/protobuf
2655-
Version: v1.3.2
2656-
Licence type (autodetected): BSD-3-Clause
2657-
--------------------------------------------------------------------------------
2658-
2659-
Contents of probable licence file $GOMODCACHE/github.com/gogo/[email protected]/LICENSE:
2660-
2661-
Copyright (c) 2013, The GoGo Authors. All rights reserved.
2662-
2663-
Protocol Buffers for Go with Gadgets
2664-
2665-
Go support for Protocol Buffers - Google's data interchange format
2666-
2667-
Copyright 2010 The Go Authors. All rights reserved.
2668-
https://github.com/golang/protobuf
2669-
2670-
Redistribution and use in source and binary forms, with or without
2671-
modification, are permitted provided that the following conditions are
2672-
met:
2673-
2674-
* Redistributions of source code must retain the above copyright
2675-
notice, this list of conditions and the following disclaimer.
2676-
* Redistributions in binary form must reproduce the above
2677-
copyright notice, this list of conditions and the following disclaimer
2678-
in the documentation and/or other materials provided with the
2679-
distribution.
2680-
* Neither the name of Google Inc. nor the names of its
2681-
contributors may be used to endorse or promote products derived from
2682-
this software without specific prior written permission.
2683-
2684-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2685-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2686-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2687-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2688-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2689-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2690-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2691-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2692-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2693-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2694-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2695-
2696-
2697-
26982653
--------------------------------------------------------------------------------
26992654
Dependency : github.com/gorilla/mux
27002655
Version: v1.8.1
@@ -11596,6 +11551,51 @@ Apache License
1159611551

1159711552

1159811553

11554+
--------------------------------------------------------------------------------
11555+
Dependency : github.com/gogo/protobuf
11556+
Version: v1.3.2
11557+
Licence type (autodetected): BSD-3-Clause
11558+
--------------------------------------------------------------------------------
11559+
11560+
Contents of probable licence file $GOMODCACHE/github.com/gogo/[email protected]/LICENSE:
11561+
11562+
Copyright (c) 2013, The GoGo Authors. All rights reserved.
11563+
11564+
Protocol Buffers for Go with Gadgets
11565+
11566+
Go support for Protocol Buffers - Google's data interchange format
11567+
11568+
Copyright 2010 The Go Authors. All rights reserved.
11569+
https://github.com/golang/protobuf
11570+
11571+
Redistribution and use in source and binary forms, with or without
11572+
modification, are permitted provided that the following conditions are
11573+
met:
11574+
11575+
* Redistributions of source code must retain the above copyright
11576+
notice, this list of conditions and the following disclaimer.
11577+
* Redistributions in binary form must reproduce the above
11578+
copyright notice, this list of conditions and the following disclaimer
11579+
in the documentation and/or other materials provided with the
11580+
distribution.
11581+
* Neither the name of Google Inc. nor the names of its
11582+
contributors may be used to endorse or promote products derived from
11583+
this software without specific prior written permission.
11584+
11585+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11586+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11587+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
11588+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
11589+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
11590+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
11591+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11592+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11593+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
11594+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
11595+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11596+
11597+
11598+
1159911599
--------------------------------------------------------------------------------
1160011600
Dependency : github.com/gohugoio/hashstructure
1160111601
Version: v0.5.0
@@ -19009,11 +19009,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1900919009

1901019010
--------------------------------------------------------------------------------
1901119011
Dependency : google.golang.org/genproto/googleapis/rpc
19012-
Version: v0.0.0-20250811230008-5f3141c8851a
19012+
Version: v0.0.0-20250825161204-c5933d9347a5
1901319013
Licence type (autodetected): Apache-2.0
1901419014
--------------------------------------------------------------------------------
1901519015

19016-
Contents of probable licence file $GOMODCACHE/google.golang.org/genproto/googleapis/[email protected]20250811230008-5f3141c8851a/LICENSE:
19016+
Contents of probable licence file $GOMODCACHE/google.golang.org/genproto/googleapis/[email protected]20250825161204-c5933d9347a5/LICENSE:
1901719017

1901819018

1901919019
Apache License

go.mod

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ require (
2222
github.com/go-sourcemap/sourcemap v2.1.4+incompatible
2323
github.com/gofrs/flock v0.13.0
2424
github.com/gofrs/uuid/v5 v5.4.0
25-
github.com/gogo/protobuf v1.3.2
2625
github.com/google/go-cmp v0.7.0
2726
github.com/gorilla/mux v1.8.1
2827
github.com/jaegertracing/jaeger-idl v0.6.0
@@ -48,6 +47,7 @@ require (
4847
go.opentelemetry.io/otel/sdk v1.38.0
4948
go.opentelemetry.io/otel/sdk/metric v1.38.0
5049
go.opentelemetry.io/otel/trace v1.38.0
50+
go.opentelemetry.io/proto/otlp v1.7.1
5151
go.uber.org/zap v1.27.0
5252
go.uber.org/zap/exp v0.3.0
5353
golang.org/x/net v0.46.0
@@ -131,6 +131,7 @@ require (
131131
github.com/go-ole/go-ole v1.2.6 // indirect
132132
github.com/gobwas/glob v0.2.3 // indirect
133133
github.com/gogo/googleapis v1.4.1 // indirect
134+
github.com/gogo/protobuf v1.3.2 // indirect
134135
github.com/gohugoio/hashstructure v0.5.0 // indirect
135136
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
136137
github.com/golang/protobuf v1.5.4 // indirect
@@ -143,6 +144,7 @@ require (
143144
github.com/goreleaser/chglog v0.6.2 // indirect
144145
github.com/goreleaser/fileglob v1.3.0 // indirect
145146
github.com/goreleaser/nfpm/v2 v2.41.2 // indirect
147+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 // indirect
146148
github.com/h2non/filetype v1.1.3 // indirect
147149
github.com/hashicorp/errwrap v1.1.0 // indirect
148150
github.com/hashicorp/go-hclog v1.6.3 // indirect
@@ -253,7 +255,8 @@ require (
253255
golang.org/x/text v0.30.0 // indirect
254256
golang.org/x/tools v0.38.0 // indirect
255257
golang.org/x/tools/go/vcs v0.1.0-deprecated // indirect
256-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect
258+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
259+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
257260
gopkg.in/ini.v1 v1.67.0 // indirect
258261
gopkg.in/warnings.v0 v0.1.2 // indirect
259262
gopkg.in/yaml.v2 v2.4.0 // indirect

go.sum

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg
359359
github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
360360
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
361361
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
362+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2 h1:8Tjv8EJ+pM1xP8mK6egEbD1OgnVTyacbefKhmbLhIhU=
363+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2/go.mod h1:pkJQ2tZHJ0aFOVEEot6oZmaVEZcRme73eIFmhiVuRWs=
362364
github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg=
363365
github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY=
364366
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@@ -720,6 +722,8 @@ go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6
720722
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
721723
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
722724
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
725+
go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4=
726+
go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE=
723727
go.opentelemetry.io/proto/slim/otlp v1.8.0 h1:afcLwp2XOeCbGrjufT1qWyruFt+6C9g5SOuymrSPUXQ=
724728
go.opentelemetry.io/proto/slim/otlp v1.8.0/go.mod h1:Yaa5fjYm1SMCq0hG0x/87wV1MP9H5xDuG/1+AhvBcsI=
725729
go.opentelemetry.io/proto/slim/otlp/collector/profiles/v1development v0.1.0 h1:Uc+elixz922LHx5colXGi1ORbsW8DTIGM+gg+D9V7HE=
@@ -888,8 +892,10 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T
888892
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
889893
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
890894
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
891-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a h1:tPE/Kp+x9dMSwUm/uM0JKK0IfdiJkwAbSMSeZBXXJXc=
892-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a/go.mod h1:gw1tLEfykwDz2ET4a12jcXt4couGAm7IwsVaTy0Sflo=
895+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY=
896+
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE=
897+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE=
898+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc=
893899
google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A=
894900
google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c=
895901
google.golang.org/grpc/examples v0.0.0-20231016154744-cb430bed4d27 h1:EB/3dtnYKOItaNPpOI/HmOCGbVZUiXcstRfiuxN+cFg=

internal/beater/server_test.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,17 @@ import (
3030
"net/url"
3131
"os"
3232
"path/filepath"
33-
"reflect"
3433
"runtime"
3534
"strings"
3635
"testing"
3736
"time"
3837

39-
"github.com/gogo/protobuf/proto"
4038
"github.com/jaegertracing/jaeger-idl/proto-gen/api_v2"
4139
"github.com/stretchr/testify/assert"
4240
"github.com/stretchr/testify/require"
4341
sdkmetric "go.opentelemetry.io/otel/sdk/metric"
4442
"go.opentelemetry.io/otel/sdk/metric/metricdata"
43+
coltracepb "go.opentelemetry.io/proto/otlp/collector/trace/v1"
4544
"go.uber.org/zap/zapcore"
4645
"go.uber.org/zap/zaptest/observer"
4746
"google.golang.org/grpc"
@@ -310,13 +309,8 @@ func TestServerOTLPGRPC(t *testing.T) {
310309
baseURL, err := url.Parse(srv.URL)
311310
require.NoError(t, err)
312311
invokeExport := func(ctx context.Context, conn *grpc.ClientConn) error {
313-
// We can't use go.opentelemetry.io/otel, as it has its own generated protobuf packages
314-
// which which conflict with opentelemetry-collector's. Instead, use the types registered
315-
// by the opentelemetry-collector packages.
316-
requestType := proto.MessageType("opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest")
317-
responseType := proto.MessageType("opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse")
318-
request := reflect.New(requestType.Elem()).Interface()
319-
response := reflect.New(responseType.Elem()).Interface()
312+
request := &coltracepb.ExportTraceServiceRequest{}
313+
response := &coltracepb.ExportTraceServiceResponse{}
320314
return conn.Invoke(ctx, "/opentelemetry.proto.collector.trace.v1.TraceService/Export", request, response)
321315
}
322316

0 commit comments

Comments
 (0)