1# Copyright 2023 gRPC authors. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package") 16 17licenses(["notice"]) 18 19grpc_package( 20 name = "test/cpp/ext/otel", 21 visibility = "tests", 22) 23 24grpc_cc_library( 25 name = "otel_test_library", 26 testonly = 1, 27 srcs = [ 28 "otel_test_library.cc", 29 ], 30 hdrs = [ 31 "otel_test_library.h", 32 ], 33 external_deps = [ 34 "gtest", 35 "otel/api", 36 "otel/sdk/src/metrics", 37 ], 38 language = "C++", 39 tags = [ 40 ], 41 deps = [ 42 "//:grpc++", 43 "//src/cpp/ext/otel:otel_plugin", 44 "//test/core/util:fake_stats_plugin", 45 "//test/core/util:grpc_test_util", 46 "//test/cpp/end2end:test_service_impl", 47 ], 48) 49 50grpc_cc_test( 51 name = "otel_plugin_test", 52 srcs = [ 53 "otel_plugin_test.cc", 54 ], 55 external_deps = [ 56 "gtest", 57 "otel/api", 58 "otel/sdk/src/metrics", 59 ], 60 language = "C++", 61 tags = [], 62 deps = [ 63 ":otel_test_library", 64 "//:grpc++", 65 "//src/cpp/ext/otel:otel_plugin", 66 "//test/core/util:grpc_test_util", 67 "//test/cpp/end2end:test_service_impl", 68 ], 69) 70