Skip to content

Commit

Permalink
chore(pact_matching): Update trace level instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Aug 13, 2024
1 parent ae7d2a9 commit 05c2719
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rust/pact_matching/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,7 @@ fn group_by<I, F, K>(items: I, f: F) -> HashMap<K, Vec<I::Item>>
m
}

#[instrument(level = "trace", ret, skip(expected, actual))]
pub(crate) async fn compare_bodies(
content_type: &ContentType,
expected: &(dyn HttpPart + Send + Sync),
Expand All @@ -1473,6 +1474,8 @@ pub(crate) async fn compare_bodies(
) -> BodyMatchResult {
let mut mismatches = vec![];

trace!(?content_type, "Comparing bodies");

#[cfg(feature = "plugins")]
{
match find_content_matcher(content_type) {
Expand Down Expand Up @@ -1579,6 +1582,7 @@ fn compare_bodies_core(
mismatches
}

#[instrument(level = "trace", ret, skip(expected, actual))]
async fn match_body_content(
content_type: &ContentType,
expected: &(dyn HttpPart + Send + Sync),
Expand Down Expand Up @@ -1793,7 +1797,7 @@ fn setup_plugin_config<'a>(
}

/// Matches the actual message contents to the expected one. This takes into account the content type of each.
#[allow(unused_variables)]
#[instrument(level = "trace")]
pub async fn match_message_contents(
expected: &MessageContents,
actual: &MessageContents,
Expand Down Expand Up @@ -1835,6 +1839,7 @@ pub async fn match_message_contents(
}

/// Matches the actual message metadata to the expected one.
#[instrument(level = "trace")]
pub fn match_message_metadata(
expected: &MessageContents,
actual: &MessageContents,
Expand Down

0 comments on commit 05c2719

Please sign in to comment.