RUM-4134 Remove moshi dependency from trace module#2003
Merged
mariusc83 merged 1 commit intoApr 23, 2024
Merged
Conversation
mariusc83
force-pushed
the
mconstantin/rum-4134/remove-moshi-dependency-from-trace-module
branch
from
April 19, 2024 15:19
ad803f7 to
26af20a
Compare
mariusc83
marked this pull request as ready for review
April 19, 2024 15:26
mariusc83
force-pushed
the
mconstantin/rum-4134/remove-moshi-dependency-from-trace-module
branch
from
April 19, 2024 15:34
26af20a to
76d7653
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## feature/otel-support #2003 +/- ##
========================================================
+ Coverage 63.17% 63.88% +0.71%
========================================================
Files 754 752 -2
Lines 28504 28368 -136
Branches 4679 4680 +1
========================================================
+ Hits 18006 18121 +115
+ Misses 9300 9043 -257
- Partials 1198 1204 +6
|
0xnm
previously approved these changes
Apr 22, 2024
| log.error("Skipping invalid Span Sampling Rule: {} - {}", rule, error); | ||
| public static SpanSamplingRules deserializeFile(String jsonFile) { | ||
| SpanSamplingRules result = EMPTY; | ||
| try (com.google.gson.stream.JsonReader reader = new JsonReader(new FileReader(jsonFile))) { |
Member
There was a problem hiding this comment.
it is already in the import
Suggested change
| try (com.google.gson.stream.JsonReader reader = new JsonReader(new FileReader(jsonFile))) { | |
| try (JsonReader reader = new JsonReader(new FileReader(jsonFile))) { |
Comment on lines
+15
to
+17
| lateinit var tempDir: File | ||
| override fun deserializeRules(jsonRules: String): SpanSamplingRules { |
Member
There was a problem hiding this comment.
Suggested change
| lateinit var tempDir: File | |
| override fun deserializeRules(jsonRules: String): SpanSamplingRules { | |
| lateinit var tempDir: File | |
| override fun deserializeRules(jsonRules: String): SpanSamplingRules { |
Comment on lines
+102
to
+111
| """[ | ||
| {"service": "usersvc", "name": "healthcheck", "sample_rate": $rate} | ||
| ]""" |
Member
There was a problem hiding this comment.
seems like formatting is a bit broken for raw strings in this file
Comment on lines
+115
to
+125
| val rules = TraceSamplingRules.deserialize( | ||
| """[ | ||
| {"service": "usersvc", "name": "healthcheck", "sample_rate": 0.5}, | ||
| {"service": "usersvc", "name": "healthcheck", "sample_rate": 200} | ||
| ]""" | ||
| ) | ||
| assertThat(rules.rules).hasSize(1) |
Member
There was a problem hiding this comment.
Suggested change
| val rules = TraceSamplingRules.deserialize( | |
| """[ | |
| {"service": "usersvc", "name": "healthcheck", "sample_rate": 0.5}, | |
| {"service": "usersvc", "name": "healthcheck", "sample_rate": 200} | |
| ]""" | |
| ) | |
| assertThat(rules.rules).hasSize(1) | |
| // When | |
| val rules = TraceSamplingRules.deserialize( | |
| """[ | |
| {"service": "usersvc", "name": "healthcheck", "sample_rate": 0.5}, | |
| {"service": "usersvc", "name": "healthcheck", "sample_rate": 200} | |
| ]""" | |
| ) | |
| // Then | |
| assertThat(rules.rules).hasSize(1) |
jonathanmos
previously approved these changes
Apr 22, 2024
| @@ -0,0 +1,163 @@ | |||
| package com.datadog.trace.common.sampling | |||
| @@ -0,0 +1,123 @@ | |||
| package com.datadog.trace.common.sampling | |||
mariusc83
force-pushed
the
mconstantin/rum-4134/remove-moshi-dependency-from-trace-module
branch
from
April 23, 2024 07:24
76d7653 to
478ba84
Compare
xgouchet
approved these changes
Apr 23, 2024
0xnm
approved these changes
Apr 23, 2024
mariusc83
deleted the
mconstantin/rum-4134/remove-moshi-dependency-from-trace-module
branch
April 23, 2024 08:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)