@@ -499,7 +499,9 @@ TEST_SPAN("injection") {
499499 REQUIRE (writer.items .empty () == false );
500500
501501 // Consume the span that MUST be kept for service liveness.
502- { apm_disabled_tracer.create_span (); }
502+ {
503+ apm_disabled_tracer.create_span ();
504+ }
503505
504506 auto span = apm_disabled_tracer.create_span ();
505507
@@ -784,8 +786,8 @@ TEST_SPAN("injecting W3C tracestate header") {
784786 {" x-datadog-parent-id" , " 1" },
785787 {" x-datadog-origin" , " France" },
786788 },
787- // The "s:-1" comes from the 0% sample rate.
788- " dd=s:-1;p:$parent_id;o:France" },
789+ // The "s:-1" and "t.ksr:0.000000" comes from the 0% sample rate.
790+ " dd=s:-1;p:$parent_id;o:France;t.ksr:0.000000 " },
789791
790792 {__LINE__,
791793 " trace tags" ,
@@ -794,8 +796,8 @@ TEST_SPAN("injecting W3C tracestate header") {
794796 {" x-datadog-parent-id" , " 1" },
795797 {" x-datadog-tags" , " _dd.p.foo=x,_dd.p.bar=y,ignored=wrong_prefix" },
796798 },
797- // The "s:-1" comes from the 0% sample rate.
798- " dd=s:-1;p:$parent_id;t.foo:x;t.bar:y" },
799+ // The "s:-1" and "t.ksr:0.000000" comes from the 0% sample rate.
800+ " dd=s:-1;p:$parent_id;t.foo:x;t.bar:y;t.ksr:0.000000 " },
799801
800802 {__LINE__,
801803 " extra fields" ,
@@ -815,15 +817,18 @@ TEST_SPAN("injecting W3C tracestate header") {
815817 // The "s:0" comes from the sampling decision in `traceparent_drop`.
816818 " dd=s:0;p:$parent_id;o:France;t.foo:x;t.bar:y;foo:bar;boing:boing" },
817819
818- {__LINE__,
819- " replace invalid characters in origin" ,
820- {
821- {" x-datadog-trace-id" , " 1" },
822- {" x-datadog-parent-id" , " 1" },
823- {" x-datadog-origin" , " France, is a country=nation; so is 台北." },
824- },
825- // The "s:-1" comes from the 0% sample rate.
826- " dd=s:-1;p:$parent_id;o:France_ is a country~nation_ so is ______." },
820+ {
821+ __LINE__,
822+ " replace invalid characters in origin" ,
823+ {
824+ {" x-datadog-trace-id" , " 1" },
825+ {" x-datadog-parent-id" , " 1" },
826+ {" x-datadog-origin" , " France, is a country=nation; so is 台北." },
827+ },
828+ // The "s:-1" comes from the 0% sample rate.
829+ " dd=s:-1;p:$parent_id;o:France_ is a country~nation_ so is "
830+ " ______.;t.ksr:0.000000" ,
831+ },
827832
828833 {__LINE__,
829834 " replace invalid characters in trace tag key" ,
@@ -833,7 +838,7 @@ TEST_SPAN("injecting W3C tracestate header") {
833838 {" x-datadog-tags" , " _dd.p.a;d台北x =foo,_dd.p.ok=bar" },
834839 },
835840 // The "s:-1" comes from the 0% sample rate.
836- " dd=s:-1;p:$parent_id;t.a_d______x_:foo;t.ok:bar" },
841+ " dd=s:-1;p:$parent_id;t.a_d______x_:foo;t.ok:bar;t.ksr:0.000000 " },
837842
838843 {__LINE__,
839844 " replace invalid characters in trace tag value" ,
@@ -843,7 +848,8 @@ TEST_SPAN("injecting W3C tracestate header") {
843848 {" x-datadog-tags" , " _dd.p.wacky=hello fr~d; how are คุณ?" },
844849 },
845850 // The "s:-1" comes from the 0% sample rate.
846- " dd=s:-1;p:$parent_id;t.wacky:hello fr_d_ how are _________?" },
851+ " dd=s:-1;p:$parent_id;t.wacky:hello fr_d_ how are "
852+ " _________?;t.ksr:0.000000" },
847853
848854 {__LINE__,
849855 " replace equal signs with tildes in trace tag value" ,
@@ -853,7 +859,7 @@ TEST_SPAN("injecting W3C tracestate header") {
853859 {" x-datadog-tags" , " _dd.p.base64_thingy=d2Fra2EhIHdhaw==" },
854860 },
855861 // The "s:-1" comes from the 0% sample rate.
856- " dd=s:-1;p:$parent_id;t.base64_thingy:d2Fra2EhIHdhaw~~" },
862+ " dd=s:-1;p:$parent_id;t.base64_thingy:d2Fra2EhIHdhaw~~;t.ksr:0.000000 " },
857863
858864 {__LINE__,
859865 " oversized origin truncates it and subsequent fields" ,
0 commit comments