blob: 180a760ff67261a9937bf0cf1e078e4228ceb6cf [file] [log] [blame]
Yash Tibrewald2f37b82023-07-17 16:30:471# 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 = "otel_plugin",
33 srcs = [
Yijie Mac54c69d2024-03-24 02:34:2634 "otel_client_call_tracer.cc",
Yash Tibrewald2f37b82023-07-17 16:30:4735 "otel_plugin.cc",
36 "otel_server_call_tracer.cc",
37 ],
38 hdrs = [
Yash Tibrewal0dd8a052023-09-01 19:04:1939 "key_value_iterable.h",
Yijie Mac54c69d2024-03-24 02:34:2640 "otel_client_call_tracer.h",
Yash Tibrewald2f37b82023-07-17 16:30:4741 "otel_plugin.h",
42 "otel_server_call_tracer.h",
Yash Tibrewalc12a5642023-12-28 17:42:5043 "//:include/grpcpp/ext/otel_plugin.h",
Yash Tibrewald2f37b82023-07-17 16:30:4744 ],
45 external_deps = [
46 "absl/base:core_headers",
Yijie Mad3772622024-04-05 15:11:5947 "absl/container:flat_hash_map",
Yash Tibrewal9ea30fa2023-07-27 21:05:1948 "absl/container:flat_hash_set",
Yash Tibrewald4ca41d2023-09-08 00:41:2649 "absl/functional:any_invocable",
Tanvi Jagtapb72d3182024-05-03 06:33:4850 "absl/log:check",
Yash Tibrewald2f37b82023-07-17 16:30:4751 "absl/status",
52 "absl/status:statusor",
53 "absl/strings",
54 "absl/strings:str_format",
55 "absl/time",
Yash Tibrewal0dd8a052023-09-01 19:04:1956 "absl/types:span",
Yash Tibrewald2f37b82023-07-17 16:30:4757 "otel/api",
58 ],
Yash Tibrewal12278ba2025-03-28 08:21:5959 tags = [
60 # TODO(b/332369798): Remove after fixing bug
61 "grpc:otel-namespace-calamity",
62 ],
Craig Tiller536094c2025-03-31 16:52:5763 visibility = ["//bazel:otel_plugin"],
Yash Tibrewald2f37b82023-07-17 16:30:4764 deps = [
Mark D. Roth02135232024-03-04 19:04:2465 "//:call_tracer",
Yash Tibrewald2f37b82023-07-17 16:30:4766 "//:config",
Yash Tibrewal3e0ccd42025-06-04 23:37:1967 "//:exec_ctx",
Yash Tibrewald2f37b82023-07-17 16:30:4768 "//:gpr",
69 "//:gpr_platform",
Yash Tibrewald491fc52023-09-22 18:40:0370 "//:grpc++",
Yash Tibrewald2f37b82023-07-17 16:30:4771 "//:grpc_base",
Yash Tibrewal860167a2023-08-01 23:37:3172 "//:grpc_client_channel",
Yash Tibrewal0dd8a052023-09-01 19:04:1973 "//:grpc_public_hdrs",
Yash Tibrewald2f37b82023-07-17 16:30:4774 "//src/core:arena",
75 "//src/core:arena_promise",
76 "//src/core:channel_args",
77 "//src/core:channel_fwd",
78 "//src/core:channel_stack_type",
79 "//src/core:context",
Mark D. Roth0bf60a42025-04-02 19:37:1480 "//src/core:down_cast",
Yash Tibrewald2f37b82023-07-17 16:30:4781 "//src/core:error",
Yash Tibrewal708b5c02025-05-14 20:55:3782 "//src/core:event_engine_utils",
Mark D. Roth952d6272024-07-09 19:52:4283 "//src/core:experiments",
Yijie Mad3772622024-04-05 15:11:5984 "//src/core:match",
Craig Tiller27940782024-01-10 19:17:5885 "//src/core:metadata_batch",
Yijie Mac54c69d2024-03-24 02:34:2686 "//src/core:metrics",
Yash Tibrewald2f37b82023-07-17 16:30:4787 "//src/core:slice",
88 "//src/core:slice_buffer",
Yash Tibrewal90d33ff2025-01-28 04:49:3489 "//src/core:sync",
Yash Tibrewal11682092025-05-07 23:11:3790 "//src/core:tcp_tracer",
Yash Tibrewald2f37b82023-07-17 16:30:4791 ],
92)