diff --git a/BugsnagPerformance/Assets/BugsnagPerformance/Scripts/Models/SpanModel.cs b/BugsnagPerformance/Assets/BugsnagPerformance/Scripts/Models/SpanModel.cs index fb52fb9..e4b3281 100644 --- a/BugsnagPerformance/Assets/BugsnagPerformance/Scripts/Models/SpanModel.cs +++ b/BugsnagPerformance/Assets/BugsnagPerformance/Scripts/Models/SpanModel.cs @@ -111,6 +111,12 @@ private string GetNanoSeconds(DateTimeOffset time) var duration = time - _unixStart; return (duration.Ticks * 100).ToString(); } + + // This method tells Json.NET whether to serialize the droppedAttributesCount or not. + public bool ShouldSerializedroppedAttributesCount() + { + return droppedAttributesCount > 0; + } } } diff --git a/features/manual_spans.feature b/features/manual_spans.feature index 6b35fef..c00dd6b 100644 --- a/features/manual_spans.feature +++ b/features/manual_spans.feature @@ -18,7 +18,7 @@ Feature: Manual creation of spans * the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.endTimeUnixNano" matches the regex "^[0-9]+$" * the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "net.host.connection.type" equals "wifi" * the trace payload field "resourceSpans.0.scopeSpans.0.spans.0" string attribute "bugsnag.span.category" equals "custom" - * the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.droppedAttributesCount" equals 0 + * the trace payload field "resourceSpans.0.scopeSpans.0.spans.0.droppedAttributesCount" is null #Resource attributes * the trace payload field "resourceSpans.0.resource" string attribute "deployment.environment" is one of: