Skip to content

Conversation

@denrase
Copy link
Collaborator

@denrase denrase commented Jan 11, 2022

📜 Description

Fixes #679

💡 Motivation and Context

  • The internal property _extra in the SentryTracer is exposed via data property and both are of type Map< string, string>
  • The latter is used when intializing SentryTransactions extra property, which is of type Map<string, dynamic>
  • By changing to Map<string, dynamic> we support the correct type and more complex hierarchies can be serialized further downstream.
  • Serializing complex objects should work as long as every call of jsonEncode is provided jsonSerializationFallback implementation, which calls toString() on non-null objects.

💚 How did you test it?

  • Added unit test.
  • Checked that all calls of jsonEncode are provided with jsonSerializationFallback.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

@denrase denrase self-assigned this Jan 11, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2022

Codecov Report

Merging #693 (a3eb8a4) into main (1f32c29) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #693   +/-   ##
=======================================
  Coverage   90.65%   90.65%           
=======================================
  Files          97       97           
  Lines        3145     3145           
=======================================
  Hits         2851     2851           
  Misses        294      294           
Impacted Files Coverage Δ
dart/lib/src/sentry_tracer.dart 92.10% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f32c29...a3eb8a4. Read the comment docs.

@denrase denrase requested a review from marandaneto January 11, 2022 10:39
@denrase denrase marked this pull request as ready for review January 11, 2022 10:39
@denrase denrase requested a review from brustolin as a code owner January 11, 2022 10:39
@denrase denrase changed the title Fix: Use correct data/extras type in tracer Fix: Use correct data/extra type in tracer Jan 11, 2022
@marandaneto marandaneto merged commit a2322b7 into main Jan 11, 2022
@marandaneto marandaneto deleted the fix/use-correct-extras-type-in-tracer branch January 11, 2022 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto Navigation Transaction: Non-String arguments throws Exception

4 participants