From 43fc40c4dd175734045cfb7482a9d6725d6bb80e Mon Sep 17 00:00:00 2001 From: Kyle Sabo Date: Mon, 17 Jul 2023 13:54:58 -0700 Subject: [PATCH] Fix part A field count --- src/native/common_schema/etw_cs.rs | 2 +- src/native/common_schema/user_events_cs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native/common_schema/etw_cs.rs b/src/native/common_schema/etw_cs.rs index f990846..9561880 100644 --- a/src/native/common_schema/etw_cs.rs +++ b/src/native/common_schema/etw_cs.rs @@ -290,7 +290,7 @@ impl crate::native::EventWriter for CommonSchemaProvider { // let exts = json::extract_common_schema_parta_exts(attributes); eb.add_u16("__csver__", 0x0401, OutType::Signed, 0); - eb.add_struct("PartA", 2 /* + exts.len() as u8*/, 0); + eb.add_struct("PartA", 1 + if current_span != 0 { 1 } else { 0 } /* + exts.len() as u8*/, 0); { let time: String = chrono::DateTime::to_rfc3339(&chrono::DateTime::::from(timestamp)); diff --git a/src/native/common_schema/user_events_cs.rs b/src/native/common_schema/user_events_cs.rs index 0b8e756..dc35ddb 100644 --- a/src/native/common_schema/user_events_cs.rs +++ b/src/native/common_schema/user_events_cs.rs @@ -318,7 +318,7 @@ impl crate::native::EventWriter for CommonSchemaProvider { // let exts = json::extract_common_schema_parta_exts(attributes); eb.add_value("__csver__", 0x0401, FieldFormat::SignedInt, 0); - eb.add_struct("PartA", 2 /* + exts.len() as u8*/, 0); + eb.add_struct("PartA", 1 + if current_span != 0 { 1 } else { 0 } /* + exts.len() as u8*/, 0); { let time: String = chrono::DateTime::to_rfc3339(&chrono::DateTime::::from(timestamp));