Link prometheus client for bazel grpc build (#908)

RFC=[0014](https://github.com/googlecartographer/rfcs/blob/master/text/0014-monitoring.md)
master
gaschler 2018-02-19 11:44:23 +01:00 committed by Wally B. Feed
parent 880b5c973b
commit 8e27db0f0e
3 changed files with 16 additions and 1 deletions

View File

@ -27,3 +27,9 @@ boost_deps()
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()
load("@com_github_jupp0r_prometheus_cpp//:repositories.bzl", "load_prometheus_client_model", "load_civetweb")
load_prometheus_client_model()
load_civetweb()

View File

@ -217,6 +217,15 @@ def cartographer_repositories():
],
)
_maybe(native.http_archive,
name = "com_github_jupp0r_prometheus_cpp",
sha256 = "701789ff0cc3a5ea7ba78d31b2d18265969f1c7d669f83800fffd8f39c4fa1bb",
strip_prefix = "prometheus-cpp-743722db96465aa867bf569eb455ad82dab9f819",
urls = [
"https://github.com/jupp0r/prometheus-cpp/archive/743722db96465aa867bf569eb455ad82dab9f819.tar.gz",
],
)
# TODO(rodrigoq): remove these binds once grpc#14140 has been merged, as well
# as removing `use_external` in cartographer_grpc/BUILD.bazel.
# https://github.com/grpc/grpc/pull/14140
@ -229,7 +238,6 @@ def cartographer_repositories():
actual = "@com_github_grpc_grpc//:grpc++_codegen_proto",
)
def _maybe(repo_rule, name, **kwargs):
if name not in native.existing_rules():
repo_rule(name=name, **kwargs)

View File

@ -68,6 +68,7 @@ cc_library(
":cc_protos",
"//cartographer",
"@com_github_grpc_grpc//:grpc++",
"@com_github_jupp0r_prometheus_cpp//:prometheus_cpp",
"@com_google_glog//:glog",
"@com_google_protobuf//:cc_wkt_protos",
],