RUMM-478 Skip sanitization of log attributes created by Tracing #158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What and why?
📦 The SDK performs sanitization for
Log
attributes created by the user. This includes list of reserved attributes, that get removed when given by the user. This PR addsdd.trace_id
anddd.span_id
to that list.How?
The reason why it was not done in #117 is that this includes additional refactoring. It is the subject of this PR.
The
LogOutput
was not differentiating if the attribute comes from the user, or is set internally by theLoggingForTracingAdapter
:This is now changed by introducing
LogAttributes
type:The
.userAttributes
are considered and.internalAttributes
are skipped for sanitization.Benchmarks
I tested it with benchmarks - no impact, but in theory it should be even more performant, as more logic is now moved to
LogEncoder
, which runs on the background thread.I also include benchmark baselines for my iPhone X deleted in #63, as a reference point for future changes.
Review checklist