Compare commits

..

3 commits

Author SHA1 Message Date
6de14bb200
tracing: extract request info into tags
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2024-11-26 17:55:44 +01:00
3e859b5d8c
WIP: Add otel tracing 2024-11-26 17:55:44 +01:00
9cac938fb5
WIP: Initial dropshot server
Some checks failed
ci/woodpecker/pr/ci Pipeline failed
2024-11-26 17:50:16 +01:00
2 changed files with 9 additions and 9 deletions

View file

@ -36,7 +36,6 @@ struct Cli {}
#[derive(Serialize, JsonSchema)]
struct VersionInfo {
name: String,
version: String,
}
/// Fetch version info.
@ -58,8 +57,7 @@ async fn api_version(
rqctx: RequestContext<Arc<()>>,
) -> Result<HttpResponseOk<VersionInfo>, HttpError> {
let ver = VersionInfo {
name: env!("CARGO_PKG_NAME").to_string(),
version: env!("CARGO_PKG_VERSION").to_string(),
name: String::from("patagia-controller"),
};
tracing::info!("Someone made a request to /version");

View file

@ -1,16 +1,18 @@
set shell := ["/usr/bin/env", "bash", "-euo", "pipefail", "-c"]
export OTEL_SERVICE_NAME := "my-program"
[private]
default:
@just --choose
# Run controller
run-controller $RUST_LOG="debug":
cargo run --package patagia-controller
# Run
run $RUST_LOG="debug":
nix run
# Run controller local development
dev-controller:
watchexec --clear --restart --stop-signal INT --debounce 300ms -- just run-controller
# Run local development
dev:
watchexec --clear --restart --stop-signal INT --debounce 300ms -- just run
# Run all tests
check: