Skip to content
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

Add trace-level logging for Metadata API operations #2538

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pcholakov
Copy link
Contributor

Trivial change to aid in understanding distributed test runs.

@pcholakov pcholakov requested a review from muhamadazmy January 23, 2025 14:29
Copy link

github-actions bot commented Jan 23, 2025

Test Results

  7 files  ±0    7 suites  ±0   2m 48s ⏱️ - 1m 30s
 45 tests  - 2   44 ✅  - 2  1 💤 ±0  0 ❌ ±0 
174 runs   - 8  171 ✅  - 8  3 💤 ±0  0 ❌ ±0 

Results for commit fbaf6df. ± Comparison against base commit 7377bf3.

This pull request removes 2 tests.
dev.restate.sdktesting.tests.AwaitTimeout ‑ timeout(Client)
dev.restate.sdktesting.tests.RawHandler ‑ rawHandler(Client)

♻️ This comment has been updated with latest results.

@pcholakov pcholakov marked this pull request as ready for review January 23, 2025 18:38
@@ -84,7 +85,7 @@ async fn delete_key(
}

// todo(azmy): implement both PreconditionHeader and VersionHeader
// as extractors after updating axium to version > 0.8
// as extractors after updating axum to version > 0.8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// as extractors after updating axum to version > 0.8
// as extractors after updating axum to version > 0.8

key,
version,
precondition,
String::from_utf8_lossy(&value),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if the value should be printed in the trace logs. it's probably not an issue during testing but in general this can be big and also binary. Maybe drop the value from the logs and just print the len of it. This can save us a .clone() as well of the value.

Ok(value) => trace!(
"Get key: {:?} -> value: {} @{}",
key,
String::from_utf8_lossy(&value.value),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thought over having the value in the logs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants