Skip to content

Commit

Permalink
Merge branch 'main' into dieri/sqs-trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel authored Feb 18, 2025
2 parents c3f2b25 + 1ef482e commit 41901c4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ use tikv_jemallocator::Jemalloc;
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;

#[cfg(feature = "enterprise")]
use windmill_common::METRICS_ADDR;

#[cfg(feature = "parquet")]
use windmill_common::global_settings::OBJECT_STORE_CACHE_CONFIG_SETTING;

Expand Down Expand Up @@ -902,19 +899,23 @@ Windmill Community Edition {GIT_VERSION}

let metrics_f = async {
let enabled = METRICS_ENABLED.load(std::sync::atomic::Ordering::Relaxed);
#[cfg(not(feature = "enterprise"))]

#[cfg(not(all(feature = "enterprise", feature = "prometheus")))]
if enabled {
tracing::error!("Metrics are only available in the EE, ignoring...");
}

#[cfg(all(feature = "enterprise", feature = "prometheus"))]
windmill_common::serve_metrics(
*METRICS_ADDR,
if let Err(e) = windmill_common::serve_metrics(
*windmill_common::METRICS_ADDR,
_killpill_phase2_rx,
num_workers > 0,
enabled,
)
.await;
.await
{
tracing::error!("Error serving metrics: {e:#}");
}

Ok(()) as anyhow::Result<()>
};
Expand Down

0 comments on commit 41901c4

Please sign in to comment.