dd-trace-rb icon indicating copy to clipboard operation
dd-trace-rb copied to clipboard

Fix Span Event serialization of array attributes

Open marcotc opened this issue 8 months ago • 3 comments

What does this PR do? Addresses an issue with serializing array attributes for span events. The array should be wrapped in an object with the values key:

-array_value: [{...}, {...}]
+array_value: { values: [{...}, {...}] }

Tested by this new system-tests PR: https://github.com/DataDog/system-tests/pull/4398 The failed system-test failure in this PR, Test (graphql23, GRAPHQL_APPSEC), will be fixed this system-tests PR is merged.

Change log entry Yes. Fix Span Event serialization of array attributes

How to test the change? These are unit and system-tests for it. But firing up an agent and sending traces with span events work too, but it needs to be a pre-release version as of today (e.g. datadog/agent:7.65.0-rc.1-linux or higher).

marcotc avatar Mar 26 '25 23:03 marcotc

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.53%. Comparing base (7fbb42d) to head (ad11293).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4539      +/-   ##
==========================================
- Coverage   97.53%   97.53%   -0.01%     
==========================================
  Files        1483     1483              
  Lines       88509    88508       -1     
  Branches     4593     4593              
==========================================
- Hits        86330    86327       -3     
- Misses       2179     2181       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov-commenter avatar Mar 26 '25 23:03 codecov-commenter

Datadog Report

Branch report: fix-span-events-array Commit report: 773513d Test service: dd-trace-rb

:white_check_mark: 0 Failed, 20581 Passed, 1374 Skipped, 3m 17.06s Total Time

Benchmarks

Benchmark execution time: 2025-03-26 23:49:16

Comparing candidate commit 773513dbb1418a6ac5299732b801c02dc6b09f18 in PR branch fix-span-events-array with baseline commit 18a0a6d4f26216612ced52f1c9dd56aa014d1990 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

pr-commenter[bot] avatar Mar 26 '25 23:03 pr-commenter[bot]