Skip to content

Commit e7b140f

Browse files
authored
[exporterhelper] Switch request context encoding from map to KV list (#13216)
Resolves #13188 (review) This also required moving to gogoproto to reuse existing opentelemetry.proto.common.v1.KeyValue message. Benchmarks: ``` goos: darwin goarch: arm64 pkg: go.opentelemetry.io/collector/pdata/xpdata/request cpu: Apple M1 Max before: BenchmarkEncodeDecodeContext-10 519790 2278 ns/op 1376 B/op 22 allocs/op after: BenchmarkEncodeDecodeContext-10 747158 1600 ns/op 661 B/op 18 allocs/op ```
1 parent d77b601 commit e7b140f

File tree

13 files changed

+1800
-637
lines changed

13 files changed

+1800
-637
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,13 @@ genpdata:
252252

253253
INTERNAL_PROTO_SRC_DIRS := exporter/exporterhelper/internal/queue pdata/xpdata/request/internal
254254
INTERNAL_PROTO_FILES := $(foreach dir,$(INTERNAL_PROTO_SRC_DIRS),$(wildcard $(dir)/*.proto))
255-
INTERNAL_PROTOC := $(DOCKERCMD) run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${DOCKER_PROTOBUF} --proto_path=${PWD} -I/usr/include/github.com/gogo/protobuf -I${PWD}/$(PROTO_INTERMEDIATE_DIR) --go_out=${PWD}
255+
INTERNAL_PROTOC := $(DOCKERCMD) run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${DOCKER_PROTOBUF} --proto_path=${PWD} -I/usr/include/github.com/gogo/protobuf -I${PWD}/$(PROTO_INTERMEDIATE_DIR) --gogofaster_out=plugins=grpc,paths=source_relative:.
256256

257257
.PHONY: genproto_internal
258258
genproto_internal:
259259
@echo "Generating Go code for internal proto files"
260260
@echo "Found proto files: $(INTERNAL_PROTO_FILES)"
261-
$(foreach file,$(INTERNAL_PROTO_FILES),$(call exec-command,$(INTERNAL_PROTOC) --go_opt=paths=source_relative $(file)))
261+
$(foreach file,$(INTERNAL_PROTO_FILES),$(call exec-command,$(INTERNAL_PROTOC) $(file)))
262262

263263
ALL_MOD_PATHS := "" $(ALL_MODULES:.%=%)
264264

0 commit comments

Comments
 (0)