Skip to content
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
6 changes: 5 additions & 1 deletion crates/api/src/http_logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ use tower_http::trace::{MakeSpan, OnFailure, OnResponse};
use tracing::{Span, field::Empty};
use tracing_opentelemetry::OpenTelemetrySpanExt;

const PATHS_TO_EXCLUDE_FROM_LOGGING_AND_TRACING: [&str; 2] = ["/api/v1/health", "/api/v1/metrics"];
const PATHS_TO_EXCLUDE_FROM_LOGGING_AND_TRACING: [&str; 3] = [
"/api/v1/health/live",
"/api/v1/health/ready",
"/api/v1/metrics",
];

/// Metadata for the request
/// Used for logging and tracing
Expand Down
16 changes: 14 additions & 2 deletions scripts/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ if [[ "$os" == "Linux" ]]; then
;;
esac

echo "Building binaries"

# cargo-sonic builds a CPU-dispatched fat binary: a small launcher plus
# per-target-CPU payloads in an adjacent <bin>.bundle/ directory.
# NOTE: --release and --profile are mutually exclusive in modern cargo, so
Expand All @@ -49,12 +51,20 @@ if [[ "$os" == "Linux" ]]; then
--locked \
--profile "$profile"

cargo build \
echo "Building nittei-migrate binary"

cargo sonic \
--target-cpus="$target_cpus" \
--loader=embedded \
--parallelism="$parallelism" \
build \
--package nittei \
--bin nittei-migrate \
--locked \
--profile "$profile"

echo "Copying binaries to $out_dir"

# Final launchers live at exactly: target/sonic/<triple>/<profile>/<bin-name>
# Bundle dirs live alongside them as: target/sonic/<triple>/<profile>/<bin-name>.bundle/
# Pin mindepth/maxdepth to avoid picking up intermediate per-payload artifacts.
Expand All @@ -64,7 +74,9 @@ if [[ "$os" == "Linux" ]]; then
find "$target_dir/sonic" -mindepth 3 -maxdepth 3 -type d -name '*.bundle' \
-exec cp -a {} "$out_dir/" \;

cp "$target_dir/$profile/nittei-migrate" "$out_dir/nittei-migrate"
find "$target_dir/sonic" -mindepth 3 -maxdepth 3 -type f -name 'nittei-migrate' \
-exec cp {} "$out_dir/" \;

else
# cargo-sonic only supports Linux x86_64/aarch64 (memfd_create + execveat).
# On other platforms (e.g. macOS for local dev), fall back to a plain build.
Expand Down
Loading