From 801ebba8ef6eea8473717fb1cd9bb425c6b55dce Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Mon, 11 Jul 2022 18:51:15 -0700 Subject: [PATCH] Enable bazel build for metrics proto files (#1489) * enable bazel build for metrics proto * error --- bazel/opentelemetry_proto.BUILD | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/bazel/opentelemetry_proto.BUILD b/bazel/opentelemetry_proto.BUILD index 35319270da..eb5981f186 100644 --- a/bazel/opentelemetry_proto.BUILD +++ b/bazel/opentelemetry_proto.BUILD @@ -121,3 +121,43 @@ cc_grpc_library( grpc_only = True, deps = [":logs_service_proto_cc"], ) + +proto_library( + name = "metrics_proto", + srcs = [ + "opentelemetry/proto/metrics/v1/metrics.proto", + ], + deps = [ + ":common_proto", + ":resource_proto", + ], +) + +cc_proto_library( + name = "metrics_proto_cc", + deps = [":metrics_proto"], +) + +proto_library( + name = "metrics_service_proto", + srcs = [ + "opentelemetry/proto/collector/metrics/v1/metrics_service.proto", + ], + deps = [ + ":metrics_proto", + ], +) + +cc_proto_library( + name = "metrics_service_proto_cc", + deps = [":metrics_service_proto"], +) + +cc_grpc_library( + name = "metrics_service_grpc_cc", + srcs = [":metrics_service_proto"], + generate_mocks = True, + grpc_only = True, + deps = [":metrics_service_proto_cc"], +) +