@@ -784,8 +784,8 @@ TEST_SPAN("injecting W3C tracestate header") {
784784 {" x-datadog-parent-id" , " 1" },
785785 {" x-datadog-origin" , " France" },
786786 },
787- // The "s:-1" comes from the 0% sample rate.
788- " dd=s:-1;p:$parent_id;o:France" },
787+ // The "s:-1" and "t.ksr:0.000000" comes from the 0% sample rate.
788+ " dd=s:-1;p:$parent_id;o:France;t.ksr:0.000000 " },
789789
790790 {__LINE__,
791791 " trace tags" ,
@@ -794,8 +794,8 @@ TEST_SPAN("injecting W3C tracestate header") {
794794 {" x-datadog-parent-id" , " 1" },
795795 {" x-datadog-tags" , " _dd.p.foo=x,_dd.p.bar=y,ignored=wrong_prefix" },
796796 },
797- // The "s:-1" comes from the 0% sample rate.
798- " dd=s:-1;p:$parent_id;t.foo:x;t.bar:y" },
797+ // The "s:-1" and "t.ksr:0.000000" comes from the 0% sample rate.
798+ " dd=s:-1;p:$parent_id;t.foo:x;t.bar:y;t.ksr:0.000000 " },
799799
800800 {__LINE__,
801801 " extra fields" ,
@@ -815,15 +815,18 @@ TEST_SPAN("injecting W3C tracestate header") {
815815 // The "s:0" comes from the sampling decision in `traceparent_drop`.
816816 " dd=s:0;p:$parent_id;o:France;t.foo:x;t.bar:y;foo:bar;boing:boing" },
817817
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 ______." },
818+ {
819+ __LINE__,
820+ " replace invalid characters in origin" ,
821+ {
822+ {" x-datadog-trace-id" , " 1" },
823+ {" x-datadog-parent-id" , " 1" },
824+ {" x-datadog-origin" , " France, is a country=nation; so is 台北." },
825+ },
826+ // The "s:-1" comes from the 0% sample rate.
827+ " dd=s:-1;p:$parent_id;o:France_ is a country~nation_ so is "
828+ " ______.;t.ksr:0.000000" ,
829+ },
827830
828831 {__LINE__,
829832 " replace invalid characters in trace tag key" ,
@@ -833,7 +836,7 @@ TEST_SPAN("injecting W3C tracestate header") {
833836 {" x-datadog-tags" , " _dd.p.a;d台北x =foo,_dd.p.ok=bar" },
834837 },
835838 // The "s:-1" comes from the 0% sample rate.
836- " dd=s:-1;p:$parent_id;t.a_d______x_:foo;t.ok:bar" },
839+ " dd=s:-1;p:$parent_id;t.a_d______x_:foo;t.ok:bar;t.ksr:0.000000 " },
837840
838841 {__LINE__,
839842 " replace invalid characters in trace tag value" ,
@@ -843,7 +846,8 @@ TEST_SPAN("injecting W3C tracestate header") {
843846 {" x-datadog-tags" , " _dd.p.wacky=hello fr~d; how are คุณ?" },
844847 },
845848 // The "s:-1" comes from the 0% sample rate.
846- " dd=s:-1;p:$parent_id;t.wacky:hello fr_d_ how are _________?" },
849+ " dd=s:-1;p:$parent_id;t.wacky:hello fr_d_ how are "
850+ " _________?;t.ksr:0.000000" },
847851
848852 {__LINE__,
849853 " replace equal signs with tildes in trace tag value" ,
@@ -853,7 +857,7 @@ TEST_SPAN("injecting W3C tracestate header") {
853857 {" x-datadog-tags" , " _dd.p.base64_thingy=d2Fra2EhIHdhaw==" },
854858 },
855859 // The "s:-1" comes from the 0% sample rate.
856- " dd=s:-1;p:$parent_id;t.base64_thingy:d2Fra2EhIHdhaw~~" },
860+ " dd=s:-1;p:$parent_id;t.base64_thingy:d2Fra2EhIHdhaw~~;t.ksr:0.000000 " },
857861
858862 {__LINE__,
859863 " oversized origin truncates it and subsequent fields" ,
0 commit comments