xref: /aosp_15_r20/external/grpc-grpc/src/cpp/ext/csm/BUILD (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1# gRPC Bazel BUILD file.
2#
3# Copyright 2023 gRPC authors.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17load(
18    "//bazel:grpc_build_system.bzl",
19    "grpc_cc_library",
20)
21
22licenses(["reciprocal"])
23
24package(
25    default_visibility = ["//visibility:public"],
26    features = [
27        "layering_check",
28    ],
29)
30
31grpc_cc_library(
32    name = "csm_observability",
33    srcs = [
34        "csm_observability.cc",
35        "metadata_exchange.cc",
36    ],
37    hdrs = [
38        "csm_observability.h",
39        "metadata_exchange.h",
40        "//:include/grpcpp/ext/csm_observability.h",
41    ],
42    external_deps = [
43        "absl/functional:any_invocable",
44        "absl/status:statusor",
45        "absl/strings",
46        "absl/types:optional",
47        "absl/types:variant",
48        "google_cloud_cpp:opentelemetry",
49        "otel/api",
50        "otel/sdk/src/metrics",
51        "otel/sdk:headers",
52        "upb_base_lib",
53        "upb_mem_lib",
54    ],
55    language = "c++",
56    visibility = ["//:__subpackages__"],
57    deps = [
58        "//:call_tracer",
59        "//:gpr",
60        "//:gpr_platform",
61        "//:grpc_base",
62        "//:protobuf_struct_upb",
63        "//:uri_parser",
64        "//src/core:channel_args",
65        "//src/core:env",
66        "//src/core:error",
67        "//src/core:json_args",
68        "//src/core:json_object_loader",
69        "//src/core:json_reader",
70        "//src/core:load_file",
71        "//src/core:metadata_batch",
72        "//src/core:slice",
73        "//src/core:xds_enabled_server",
74        "//src/cpp/ext/otel:otel_plugin",
75    ],
76)
77