Skip to content

Commit

Permalink
chore(prometheus_remote_write source, prometheus_scrape source): Spli…
Browse files Browse the repository at this point in the history
…t compilation features (vectordotdev#18431)

Split features into prometheus-scrape, prometheus-remote-write
  • Loading branch information
wbew authored Aug 30, 2023
1 parent 7a6365e commit c07c99d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
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;

0 comments on commit c07c99d

Please sign in to comment.