feat(observability): Add grafana dashboard, observability changes (#1770)

Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
evan slack
2026-02-11 02:55:08 -05:00
committed by GitHub
parent ecceb8fd1c
commit 9824171995
10 changed files with 1184 additions and 14 deletions
+2 -2
View File
@@ -62,8 +62,8 @@ pub const DEFAULT_CONSOLE_ENABLE: bool = true;
/// Default OBS configuration endpoint
/// Environment variable: DEFAULT_OBS_ENDPOINT
/// Command line argument: --obs-endpoint
/// Example: DEFAULT_OBS_ENDPOINT="http://localost:4317"
/// Example: --obs-endpoint http://localost:4317
/// Example: DEFAULT_OBS_ENDPOINT="http://localost:4318"
/// Example: --obs-endpoint http://localost:4318
pub const DEFAULT_OBS_ENDPOINT: &str = "";
/// Default TLS key for rustfs
+2 -2
View File
@@ -13,7 +13,7 @@
# limitations under the License.
[observability]
endpoint = "http://localhost:4317" # Default is "http://localhost:4317" if not specified
endpoint = "http://localhost:4318" # Default is "http://localhost:4318" if not specified
use_stdout = false # Output with stdout, true output, false no output
sample_ratio = 1
meter_interval = 30
@@ -21,4 +21,4 @@ service_name = "rustfs"
service_version = "0.1.0"
environments = "develop"
logger_level = "debug"
local_logging_enabled = true # Default is false if not specified
local_logging_enabled = true # Default is false if not specified
+1 -1
View File
@@ -19,7 +19,7 @@ use tracing::{Level, error, info, instrument};
#[tokio::main]
async fn main() {
let obs_conf = Some("http://localhost:4317".to_string());
let obs_conf = Some("http://localhost:4318".to_string());
let _guard = init_obs(obs_conf).await;
let span = tracing::span!(Level::INFO, "main");
let _enter = span.enter();
+1 -1
View File
@@ -185,7 +185,7 @@ impl AppConfig {
/// ```no_run
/// use rustfs_obs::AppConfig;
///
/// let config = AppConfig::new_with_endpoint(Some("http://localhost:4317".to_string()));
/// let config = AppConfig::new_with_endpoint(Some("http://localhost:4318".to_string()));
/// ```
pub fn new_with_endpoint(endpoint: Option<String>) -> Self {
Self {