Skip to content

Commit

Permalink
Switch to using prometheus metrics instead of custom library
Browse files Browse the repository at this point in the history
Summary: We can use the prometheus metrics library instead. Remove partial metrics implementation.

Test Plan: Added test binary. I'll remove tha shortly.

Reviewers: michelle, vihang, #third_party_approvers

Reviewed By: vihang, #third_party_approvers

JIRA Issues: PP-3125

Signed-off-by: Zain Asgar <zasgar@pixielabs.ai>

Differential Revision: https://phab.corp.pixielabs.ai/D10149

GitOrigin-RevId: ea8e916
  • Loading branch information
zasgar authored and copybaranaut committed Nov 11, 2021
1 parent 1c1aed5 commit b701863
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 337 deletions.
4 changes: 4 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def _cc_deps():
_bazel_repo("rules_python")
_bazel_repo("com_github_google_re2")

# Remove the pull and push directory since they depends on civet and we don't
# want to pull in the dependency for now.
_bazel_repo("com_github_jupp0r_prometheus_cpp", patch_cmds = ["rm -rf pull push 3rdparty"])

_include_all_repo("com_github_gperftools_gperftools", patch_cmds = ["./autogen.sh"])
_include_all_repo("com_github_nats_io_natsc", patches = ["//bazel/external:natsc.patch"], patch_args = ["-p1"])
_include_all_repo("com_github_libuv_libuv", patches = ["//bazel/external:libuv.patch"], patch_args = ["-p1"])
Expand Down
5 changes: 5 additions & 0 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ REPOSITORY_LOCATIONS = dict(
strip_prefix = "opentelemetry-proto-0.10.0",
sha256 = "f1004a49f40d7acb43e86b1fd95f73e80c778acb163e309bba86f0cbd7fa8a71",
),
com_github_jupp0r_prometheus_cpp = dict(
urls = ["https://github.com/jupp0r/prometheus-cpp/archive/refs/tags/v0.13.0.tar.gz"],
strip_prefix = "prometheus-cpp-0.13.0",
sha256 = "5319b77d6dc73af34bc256e7b18a7e0da50c787ef6f9e32785d045428b6473cc",
),
)

# To modify one of the forked repos below:
Expand Down
43 changes: 0 additions & 43 deletions src/shared/stats/BUILD.bazel

This file was deleted.

82 changes: 0 additions & 82 deletions src/shared/stats/metrics.cc

This file was deleted.

116 changes: 0 additions & 116 deletions src/shared/stats/metrics.h

This file was deleted.

49 changes: 0 additions & 49 deletions src/shared/stats/metrics_test.cc

This file was deleted.

47 changes: 0 additions & 47 deletions src/shared/stats/tags.h

This file was deleted.

6 changes: 6 additions & 0 deletions third_party/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,9 @@ cmake(
lib_name = "libarchive",
lib_source = "@com_github_libarchive_libarchive//:all",
)

cc_binary(
name = "prom_test",
srcs = ["prom_test.cc"],
deps = ["@com_github_jupp0r_prometheus_cpp//core:core"],
)
Loading

0 comments on commit b701863

Please sign in to comment.