|
| 1 | +# Copyright 2019, OpenCensus 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 | + |
| 15 | +load("//opencensus:copts.bzl", "DEFAULT_COPTS", "TEST_COPTS") |
| 16 | + |
| 17 | +licenses(["notice"]) # Apache License 2.0 |
| 18 | + |
| 19 | +package(default_visibility = ["//visibility:private"]) |
| 20 | + |
| 21 | +# Libraries |
| 22 | +# ========================================================================= # |
| 23 | + |
| 24 | +cc_library( |
| 25 | + name = "ocagent_exporter", |
| 26 | + srcs = ["internal/ocagent_exporter.cc"], |
| 27 | + hdrs = ["ocagent_exporter.h"], |
| 28 | + copts = DEFAULT_COPTS, |
| 29 | + visibility = ["//visibility:public"], |
| 30 | + deps = [ |
| 31 | + "//opencensus/common:version", |
| 32 | + "//opencensus/common/internal:hostname", |
| 33 | + "//opencensus/common/internal/grpc:status", |
| 34 | + "//opencensus/common/internal/grpc:with_user_agent", |
| 35 | + "//opencensus/trace", |
| 36 | + "@com_github_grpc_grpc//:grpc++", |
| 37 | + "@com_google_absl//absl/base:core_headers", |
| 38 | + "@com_google_absl//absl/memory", |
| 39 | + "@com_google_absl//absl/strings", |
| 40 | + "@com_google_absl//absl/time", |
| 41 | + "@io_opencensus_proto//opencensus/proto/agent/trace/v1:trace_service_grpc_cc", |
| 42 | + "@io_opencensus_proto//opencensus/proto/agent/trace/v1:trace_service_proto_cc", |
| 43 | + ], |
| 44 | +) |
| 45 | + |
| 46 | +cc_test( |
| 47 | + name = "ocagent_exporter_test", |
| 48 | + srcs = ["internal/ocagent_exporter_test.cc"], |
| 49 | + copts = TEST_COPTS, |
| 50 | + deps = [ |
| 51 | + ":ocagent_exporter", |
| 52 | + "//opencensus/trace", |
| 53 | + "@com_google_absl//absl/time", |
| 54 | + "@com_google_googletest//:gtest_main", |
| 55 | + ], |
| 56 | +) |
0 commit comments