Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(prometheus_remote_write source, prometheus_scrape source): Split compilation features #18431

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,9 @@ sources-nats = ["dep:async-nats", "dep:nkeys"]
sources-nginx_metrics = ["dep:nom"]
sources-opentelemetry = ["dep:hex", "dep:opentelemetry-proto", "dep:prost-types", "sources-http_server", "sources-utils-http", "sources-vector"]
sources-postgresql_metrics = ["dep:postgres-openssl", "dep:tokio-postgres"]
sources-prometheus = ["dep:prometheus-parser", "sinks-prometheus", "sources-utils-http-client"]
sources-prometheus = ["sources-prometheus-scrape", "sources-prometheus-remote-write"]
sources-prometheus-scrape = ["dep:prometheus-parser", "sinks-prometheus", "sources-utils-http-client"]
sources-prometheus-remote-write = ["dep:prometheus-parser", "sinks-prometheus", "sources-utils-http-client"]
sources-redis= ["dep:redis"]
sources-socket = ["sources-utils-net", "tokio-util/net"]
sources-splunk_hec = ["dep:roaring"]
Expand Down
6 changes: 5 additions & 1 deletion src/sources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ pub mod nginx_metrics;
pub mod opentelemetry;
#[cfg(feature = "sources-postgresql_metrics")]
pub mod postgresql_metrics;
#[cfg(feature = "sources-prometheus")]
#[cfg(any(
feature = "sources-prometheus",
feature = "sources-prometheus-scrape",
feature = "sources-prometheus-remote-write"
))]
pub mod prometheus;
#[cfg(feature = "sources-redis")]
pub mod redis;
Expand Down
4 changes: 4 additions & 0 deletions src/sources/prometheus/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
pub(crate) mod parser;
#[cfg(feature = "sources-prometheus-remote-write")]
mod remote_write;
#[cfg(feature = "sources-prometheus-scrape")]
mod scrape;

#[cfg(feature = "sources-prometheus-remote-write")]
pub use remote_write::PrometheusRemoteWriteConfig;
#[cfg(feature = "sources-prometheus-scrape")]
pub use scrape::PrometheusScrapeConfig;