Debian Codegraph @

src/cpp/ext/gcp/BUILD

raw
1 # gRPC Bazel BUILD file.
2 #
3 # Copyright 2022 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
17 load(
18 "//bazel:grpc_build_system.bzl",
19 "grpc_cc_library",
20 )
21
22 licenses(["reciprocal"])
23
24 package(
25 default_visibility = ["//visibility:public"],
26 features = [
27 "layering_check",
28 ],
29 )
30
31 grpc_cc_library(
32 name = "observability",
33 srcs = [
34 "observability.cc",
35 ],
36 hdrs = [
37 "//:include/grpcpp/ext/gcp_observability.h",
38 ],
39 external_deps = [
40 "absl/status",
41 "absl/status:statusor",
42 "absl/types:optional",
43 "googleapis_trace_grpc_service",
44 "googleapis_monitoring_grpc_service",
45 "opencensus-stats",
46 "opencensus-trace",
47 "opencensus-trace-stackdriver_exporter",
48 "opencensus-stats-stackdriver_exporter",
49 ],
50 language = "c++",
51 tags = ["nofixdeps"],
52 visibility = ["//:__subpackages__"],
53 deps = [
54 ":observability_config",
55 "//:gpr",
56 "//:grpc++_public_hdrs",
57 "//:grpc_opencensus_plugin",
58 "//:grpc_public_hdrs",
59 ],
60 )
61
62 grpc_cc_library(
63 name = "observability_config",
64 srcs = [
65 "observability_config.cc",
66 ],
67 hdrs = [
68 "observability_config.h",
69 ],
70 external_deps = [
71 "absl/status",
72 "absl/status:statusor",
73 "absl/strings",
74 "absl/types:optional",
75 ],
76 language = "c++",
77 visibility = ["//test:__subpackages__"],
78 deps = [
79 "//:gpr",
80 "//:grpc_base",
81 "//:grpc_public_hdrs",
82 "//src/core:env",
83 "//src/core:error",
84 "//src/core:json",
85 "//src/core:json_args",
86 "//src/core:json_object_loader",
87 "//src/core:slice_refcount",
88 "//src/core:status_helper",
89 "//src/core:validation_errors",
90 ],
91 )