File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base
dd-trace-core/src/main/java/datadog/trace/common/writer Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -819,8 +819,7 @@ abstract class HttpServerTest<SERVER> extends WithHttpServer<SERVER> {
819819 if (isDataStreamsEnabled()) {
820820 StatsGroup first = TEST_DATA_STREAMS_WRITER . groups. find { it. parentHash == 0 }
821821 verifyAll(first) {
822- edgeTags. containsAll(DSM_EDGE_TAGS )
823- edgeTags. size() == DSM_EDGE_TAGS . size()
822+ tags == DSM_EDGE_TAGS
824823 }
825824 }
826825 }
Original file line number Diff line number Diff line change @@ -38,7 +38,14 @@ public void write(List<DDSpan> trace) {
3838 for (DDSpan span : trace ) {
3939 // This is needed to properly do all delayed processing to make this writer even
4040 // remotely realistic so the test actually test something
41- span .processTagsAndBaggage (MetadataConsumer .NO_OP );
41+ span .processTagsAndBaggage (metadata -> {
42+ // surface injected baggage metadata as span tags so they can be asserted
43+ metadata .getBaggage ().forEach ((k , v ) -> {
44+ if (!k .startsWith ("_dd." ) && span .getTag (k ) == null ) {
45+ span .setTag (k , v );
46+ }
47+ });
48+ });
4249 }
4350
4451 add (trace );
You can’t perform that action at this time.
0 commit comments