Skip to content

Commit

Permalink
Remove remnants of internal OTLP types
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Jan 15, 2024
1 parent 126c49b commit 5ac0127
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 5,650 deletions.
26 changes: 0 additions & 26 deletions Makefile.Protobuf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ proto: proto-model \
proto-hotrod \
proto-zipkin \
proto-openmetrics \
proto-otel \
proto-api-v3

.PHONY: proto-model
Expand Down Expand Up @@ -121,31 +120,6 @@ proto-hotrod:
proto-zipkin:
$(call proto_compile, proto-gen/zipkin, idl/proto/zipkin.proto, -Iidl/proto)

# Target 'proto-prepare-otel' modifies OTEL proto to use proto-import path jaeger.proto.*
# The modification is needed because OTEL collector already uses opentelemetry.proto.*
# and two compiled protobuf types cannot have the same import path. The root cause is that the compiled OTLP
# in the collector is in private package, hence it cannot be used in Jaeger.
.PHONY: proto-prepare-otel
proto-prepare-otel:
$(call print_caption, Enriching OpenTelemetry Protos into $(PATCHED_OTEL_PROTO_DIR))

rm -rf $(PATCHED_OTEL_PROTO_DIR)
mkdir -p $(PATCHED_OTEL_PROTO_DIR)

@# TODO replace otel_proto_patch.sed below with otel/collector/proto_patch.sed to include gogo annotations.
@$(foreach file,$(OTEL_PROTO_FILES), \
$(call exec-command,\
echo $(file); \
mkdir -p $(shell dirname $(PATCHED_OTEL_PROTO_DIR)/$(file)); \
$(SED) -f otel_proto_patch.sed $(OTEL_PROTO_SRC_DIR)/$(file) > $(PATCHED_OTEL_PROTO_DIR)/$(file)))

# Target 'proto-otel' generates classes for OpenTelemetry OTLP format. We cannot reuse similar classes
# already generated by OTel Collector because those are private / internal.
.PHONY: proto-otel
proto-otel: proto-prepare-otel
$(foreach file,$(OTEL_PROTO_FILES), \
$(call proto_compile, proto-gen/otel, $(file), -I$(PATCHED_OTEL_PROTO_DIR), paths=source_relative))

# The API v3 service uses official OTEL type opentelemetry.proto.trace.v1.TracesData,
# which at runtime is mapped to a custom type in cmd/query/app/internal/api_v3/traces.go
# Unfortunately, gogoproto.customtype annotation cannot be applied to a method's return type,
Expand Down
19 changes: 0 additions & 19 deletions model/v2/customtype.go

This file was deleted.

45 changes: 0 additions & 45 deletions model/v2/jsonid.go

This file was deleted.

158 changes: 0 additions & 158 deletions model/v2/jsonid_test.go

This file was deleted.

53 changes: 0 additions & 53 deletions model/v2/marshal_test.go

This file was deleted.

14 changes: 0 additions & 14 deletions model/v2/package_test.go

This file was deleted.

Loading

0 comments on commit 5ac0127

Please sign in to comment.