From d7b03a0eba27360740257a1c3c33e369b7a8fe00 Mon Sep 17 00:00:00 2001 From: Nikita Tkachenko Date: Fri, 3 May 2024 22:56:43 +0200 Subject: [PATCH] Fix BuildSpanAction serialization logic --- .../jenkins/plugins/datadog/traces/BuildSpanAction.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanAction.java b/src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanAction.java index ca179a11..b03cce94 100644 --- a/src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanAction.java +++ b/src/main/java/org/datadog/jenkins/plugins/datadog/traces/BuildSpanAction.java @@ -97,7 +97,6 @@ public ConverterV1() { @Override public void marshal(BuildSpanAction action, HierarchicalStreamWriter writer, MarshallingContext context) { writeField("spanContext", action.buildSpanContext, writer, context); - writeField("version", action.version.get(), writer, context); if (action.buildUrl != null) { writeField("buildUrl", action.buildUrl, writer, context); } @@ -106,8 +105,6 @@ public void marshal(BuildSpanAction action, HierarchicalStreamWriter writer, Mar @Override public BuildSpanAction unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { TraceSpan.TraceSpanContext spanContext = readField(reader, context, TraceSpan.TraceSpanContext.class); - int version = readField(reader, context, int.class); - String buildUrl = null; while (reader.hasMoreChildren()) { reader.moveDown(); @@ -118,7 +115,7 @@ public BuildSpanAction unmarshal(HierarchicalStreamReader reader, UnmarshallingC reader.moveUp(); } - return new BuildSpanAction(spanContext, null, version, buildUrl); + return new BuildSpanAction(spanContext, null, 0, buildUrl); } }