APMS-14883 Add option for Mongo span resource as JSON#4403
Conversation
|
Thank you for updating Change log entry section 👏 Visited at: 2025-04-24 22:03:48 UTC |
BenchmarksBenchmark execution time: 2025-04-28 21:32:10 Comparing candidate commit 2997d20 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 30 metrics, 2 unstable metrics. scenario:profiler - stack collector
|
Datadog ReportBranch report: ✅ 0 Failed, 21281 Passed, 1376 Skipped, 3m 34.28s Total Time |
|
Lets extract |
I tried and it adds 100+ files to this PR, so I'll do it in a follow up. |
Nvm, after the rebase I notice the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4403 +/- ##
==========================================
+ Coverage 97.74% 97.76% +0.01%
==========================================
Files 1412 1412
Lines 86256 86274 +18
Branches 4354 4343 -11
==========================================
+ Hits 84315 84347 +32
+ Misses 1941 1927 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Motivation:
A MongoDB command is expected to be serialized as JSON, but we were doing
Hash#to_sinstead. This causes issues in the Agent and Datadog App. There's no advantage to keep usingHash#to_s, but it's a breaking change to update this since it affects the resource name of themongo.cmdspan.Change log entry
Yes. Add MongoDB option to serialize Mongo command as a JSON (instead of Hash#to_s). The Datadog App expects the Mongo command to be a JSON, so all MongoDB users are highly encouraged to enable this option:
DD_TRACE_MONGO_JSON_COMMAND=1orc.tracing.instrument :mongo, json_command: true. This change will modify the resource name for the spanmongo.cmd, which can be a breaking change for monitors and dashboards that depend on this resource name.APMS-14883