Skip to content
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,15 @@ genproto_sub:
$(foreach file,$(OPENTELEMETRY_PROTO_FILES),$(call exec-command,sed 's+github.com/open-telemetry/opentelemetry-proto/gen/go/+go.opentelemetry.io/collector/internal/data/opentelemetry-proto-gen/+g' $(OPENTELEMETRY_PROTO_SRC_DIR)/$(file) > $(PROTO_INTERMEDIATE_DIR)/$(file)))

@echo Generate Go code from Logs .proto files in intermediate directory.
$(foreach file,$(LOGS_PROTO_FILES),$(call exec-command,docker run --rm -v $(PWD)/$(LOGS_PROTO_SRC_DIR):$(PWD)/$(LOGS_PROTO_SRC_DIR) -v $(PWD)/$(PROTO_INTERMEDIATE_DIR):$(PWD)/$(PROTO_INTERMEDIATE_DIR) -w $(PWD)/$(LOGS_PROTO_SRC_DIR) znly/protoc --gogofaster_out=plugins=grpc:./ -I./ -I$(PWD)/$(PROTO_INTERMEDIATE_DIR) $(file)))
$(foreach file,$(LOGS_PROTO_FILES),$(call exec-command,cd $(LOGS_PROTO_SRC_DIR) && protoc --gogofaster_out=plugins=grpc:./ -I./ -I$(PWD)/$(PROTO_INTERMEDIATE_DIR) $(file)))

@echo Move generated code to target directory.
mkdir -p $(PROTO_TARGET_GEN_DIR)
cp -R $(LOGS_PROTO_SRC_DIR)/$(PROTO_PACKAGE)/* $(PROTO_TARGET_GEN_DIR)/
rm -rf $(LOGS_PROTO_SRC_DIR)/go.opentelemetry.io

@echo Generate Go code from .proto files in intermediate directory.
$(foreach file,$(OPENTELEMETRY_PROTO_FILES),$(call exec-command,docker run --rm -v $(PWD)/$(PROTO_INTERMEDIATE_DIR):$(PWD)/$(PROTO_INTERMEDIATE_DIR) -w $(PWD)/$(PROTO_INTERMEDIATE_DIR) znly/protoc --gogofaster_out=plugins=grpc:./ -I./ $(file)))
$(foreach file,$(OPENTELEMETRY_PROTO_FILES),$(call exec-command,cd $(PROTO_INTERMEDIATE_DIR) && protoc --gogofaster_out=plugins=grpc:./ -I./ $(file)))

@echo Generate gRPC gateway code.
cd $(PROTO_INTERMEDIATE_DIR) && protoc --grpc-gateway_out=logtostderr=true,grpc_api_configuration=opentelemetry/proto/collector/trace/v1/trace_service_http.yaml:./ opentelemetry/proto/collector/trace/v1/trace_service.proto
Expand Down
4 changes: 2 additions & 2 deletions cmd/pdatagen/internal/metrics_structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ var metricDescriptor = &messageStruct{
originFieldName: "Type",
returnType: "MetricType",
rawType: "otlpmetrics.MetricDescriptor_Type",
defaultVal: "MetricTypeUnspecified",
testVal: "MetricTypeGaugeInt64",
defaultVal: "MetricTypeInvalid",
testVal: "MetricTypeInt64",
},
},
}
Expand Down
Loading