• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 = "otel_plugin",
33    srcs = [
34        "otel_client_call_tracer.cc",
35        "otel_plugin.cc",
36        "otel_server_call_tracer.cc",
37    ],
38    hdrs = [
39        "key_value_iterable.h",
40        "otel_client_call_tracer.h",
41        "otel_plugin.h",
42        "otel_server_call_tracer.h",
43        "//:include/grpcpp/ext/otel_plugin.h",
44    ],
45    external_deps = [
46        "absl/base:core_headers",
47        "absl/container:flat_hash_map",
48        "absl/container:flat_hash_set",
49        "absl/functional:any_invocable",
50        "absl/log:check",
51        "absl/status",
52        "absl/status:statusor",
53        "absl/strings",
54        "absl/strings:str_format",
55        "absl/time",
56        "absl/types:optional",
57        "absl/types:span",
58        "otel/api",
59    ],
60    language = "c++",
61    visibility = ["@grpc:otel_plugin"],
62    deps = [
63        "//:call_tracer",
64        "//:config",
65        "//:gpr",
66        "//:gpr_platform",
67        "//:grpc++",
68        "//:grpc_base",
69        "//:grpc_client_channel",
70        "//:grpc_public_hdrs",
71        "//:tcp_tracer",
72        "//src/core:arena",
73        "//src/core:arena_promise",
74        "//src/core:channel_args",
75        "//src/core:channel_fwd",
76        "//src/core:channel_stack_type",
77        "//src/core:context",
78        "//src/core:error",
79        "//src/core:experiments",
80        "//src/core:match",
81        "//src/core:metadata_batch",
82        "//src/core:metrics",
83        "//src/core:slice",
84        "//src/core:slice_buffer",
85    ],
86)
87