forked from rabbitmq/rabbitmq-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move shovel prometheus to its own plugin
- Loading branch information
Showing
29 changed files
with
1,454 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
load("@rules_erlang//:eunit2.bzl", "eunit") | ||
load("@rules_erlang//:xref2.bzl", "xref") | ||
load("@rules_erlang//:dialyze.bzl", "dialyze", "plt") | ||
load( | ||
"//:rabbitmq.bzl", | ||
"RABBITMQ_DIALYZER_OPTS", | ||
"assert_suites", | ||
"broker_for_integration_suites", | ||
"rabbitmq_app", | ||
"rabbitmq_integration_suite", | ||
) | ||
load( | ||
":app.bzl", | ||
"all_beam_files", | ||
"all_srcs", | ||
"all_test_beam_files", | ||
"test_suite_beam_files", | ||
) | ||
|
||
# gazelle:erlang_always_generate_test_beam_files | ||
|
||
APP_ENV = """[ | ||
]""" | ||
|
||
all_srcs(name = "all_srcs") | ||
|
||
all_beam_files(name = "all_beam_files") | ||
|
||
all_test_beam_files(name = "all_test_beam_files") | ||
|
||
test_suite_beam_files(name = "test_suite_beam_files") | ||
|
||
# gazelle:erlang_app_extra_app crypto | ||
|
||
# gazelle:erlang_app_dep rabbit | ||
# gazelle:erlang_app_dep rabbitmq_prometheus | ||
|
||
# gazelle:erlang_app_dep_exclude prometheus | ||
|
||
rabbitmq_app( | ||
name = "erlang_app", | ||
srcs = [":all_srcs"], | ||
hdrs = [":public_hdrs"], | ||
app_description = "Exposes rabbitmq_federation metrics to Prometheus", | ||
app_env = APP_ENV, | ||
app_module = "rabbitmq_federation_prometheus", | ||
app_name = "rabbitmq_federation_prometheus", | ||
app_version = module_version(), | ||
beam_files = [":beam_files"], | ||
extra_apps = [ | ||
"crypto", | ||
"rabbit_common", | ||
], | ||
license_files = [":license_files"], | ||
priv = [":priv"], | ||
deps = [ | ||
"//deps/rabbit:erlang_app", | ||
"//deps/rabbitmq_federation:erlang_app", | ||
"//deps/rabbitmq_prometheus:erlang_app", | ||
], | ||
) | ||
|
||
alias( | ||
name = "rabbitmq_federation_prometheus", | ||
actual = ":erlang_app", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
xref( | ||
name = "xref", | ||
target = ":erlang_app", | ||
) | ||
|
||
plt( | ||
name = "deps_plt", | ||
for_target = ":erlang_app", | ||
ignore_warnings = True, | ||
libs = ["//deps/rabbitmq_cli:elixir"], # keep | ||
plt = "//:base_plt", | ||
deps = ["//deps/rabbitmq_cli:erlang_app"], # keep | ||
) | ||
|
||
dialyze( | ||
name = "dialyze", | ||
dialyzer_opts = RABBITMQ_DIALYZER_OPTS, | ||
plt = ":deps_plt", | ||
target = ":erlang_app", | ||
) | ||
|
||
broker_for_integration_suites() | ||
|
||
rabbitmq_integration_suite( | ||
name = "prometheus_rabbitmq_federation_collector_SUITE", | ||
size = "small", | ||
additional_beam = [ | ||
], | ||
) | ||
|
||
assert_suites() | ||
|
||
eunit( | ||
name = "eunit", | ||
target = ":test_erlang_app", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../CODE_OF_CONDUCT.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This package is licensed under the MPL 2.0. For the MPL 2.0, please see LICENSE-MPL-RabbitMQ. |
Oops, something went wrong.