Skip to content

feat!: Use stackable-telemetry #927

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

Merged
merged 8 commits into from
Apr 8, 2025
22 changes: 11 additions & 11 deletions rust/operator-binary/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Arc;

use clap::{Parser, crate_description, crate_version};
use clap::Parser;
use crd::{APP_NAME, OPERATOR_NAME, ZookeeperCluster, ZookeeperZnode, v1alpha1};
use futures::{StreamExt, pin_mut};
use stackable_operator::{
Expand Down Expand Up @@ -38,7 +38,6 @@ mod znode_controller;

mod built_info {
include!(concat!(env!("OUT_DIR"), "/built.rs"));
pub const TARGET_PLATFORM: Option<&str> = option_env!("TARGET");
pub const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
}

Expand All @@ -55,9 +54,9 @@ async fn main() -> anyhow::Result<()> {
match opts.cmd {
Command::Crd => {
ZookeeperCluster::merged_crd(ZookeeperCluster::V1Alpha1)?
.print_yaml_schema(built_info::CARGO_PKG_VERSION, SerializeOptions::default())?;
.print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?;
ZookeeperZnode::merged_crd(ZookeeperZnode::V1Alpha1)?
.print_yaml_schema(built_info::CARGO_PKG_VERSION, SerializeOptions::default())?;
.print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?;
}
Command::Run(ProductOperatorRun {
product_config,
Expand All @@ -70,13 +69,14 @@ async fn main() -> anyhow::Result<()> {
APP_NAME,
tracing_target,
);
stackable_operator::utils::print_startup_string(
crate_description!(),
crate_version!(),
built_info::GIT_VERSION,
built_info::TARGET_PLATFORM.unwrap_or("unknown target"),
built_info::BUILT_TIME_UTC,
built_info::RUSTC_VERSION,
tracing::info!(
built_info.pkg_version = built_info::PKG_VERSION,
built_info.git_version = built_info::GIT_VERSION,
built_info.target = built_info::TARGET,
built_info.built_time_utc = built_info::BUILT_TIME_UTC,
built_info.rustc_version = built_info::RUSTC_VERSION,
"Starting {description}",
description = built_info::PKG_DESCRIPTION
);
let product_config = product_config.load(&[
"deploy/config-spec/properties.yaml",
Expand Down