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

chore(qlog): Add meaningful qlog titles and descriptions. #2281

Merged
merged 4 commits into from
Dec 12, 2024
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: 3 additions & 3 deletions neqo-bin/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,9 @@ fn qlog_new(args: &Args, hostname: &str, cid: &ConnectionId) -> Res<NeqoQlog> {
NeqoQlog::enabled_with_file(
qlog_dir,
Role::Client,
Some("Example qlog".to_string()),
Some("Example qlog description".to_string()),
format!("{hostname}-{cid}"),
Some("Neqo client qlog".to_string()),
Some("Neqo client qlog".to_string()),
format!("client-{hostname}-{cid}"),
)
.map_err(Error::QlogError)
}
Expand Down
2 changes: 1 addition & 1 deletion neqo-common/src/qlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub fn new_trace(role: Role) -> qlog::TraceSeq {
flow: None,
},
title: Some(format!("neqo-{role} trace")),
description: Some("Example qlog trace description".to_string()),
description: Some(format!("neqo-{role} trace")),
configuration: Some(Configuration {
time_offset: Some(0.0),
original_uris: None,
Expand Down
2 changes: 1 addition & 1 deletion neqo-transport/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl Server {
Role::Server,
Some("Neqo server qlog".to_string()),
Some("Neqo server qlog".to_string()),
odcid,
format!("server-{odcid}"),
)
.unwrap_or_else(|e| {
qerror!("failed to create NeqoQlog: {}", e);
Expand Down
2 changes: 1 addition & 1 deletion test-fixture/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,6 @@ pub fn new_neqo_qlog() -> (NeqoQlog, SharedVec) {

pub const EXPECTED_LOG_HEADER: &str = concat!(
"\u{1e}",
r#"{"qlog_version":"0.3","qlog_format":"JSON-SEQ","trace":{"vantage_point":{"name":"neqo-Client","type":"client"},"title":"neqo-Client trace","description":"Example qlog trace description","configuration":{"time_offset":0.0},"common_fields":{"reference_time":0.0,"time_format":"relative"}}}"#,
r#"{"qlog_version":"0.3","qlog_format":"JSON-SEQ","trace":{"vantage_point":{"name":"neqo-Client","type":"client"},"title":"neqo-Client trace","description":"neqo-Client trace","configuration":{"time_offset":0.0},"common_fields":{"reference_time":0.0,"time_format":"relative"}}}"#,
"\n"
);
Loading