bugfix: add newline in stdout exporter#6848
Merged
jack-berg merged 4 commits intoopen-telemetry:mainfrom Nov 5, 2024
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6848 +/- ##
============================================
- Coverage 90.49% 90.49% -0.01%
- Complexity 6599 6600 +1
============================================
Files 731 731
Lines 19738 19742 +4
Branches 1938 1938
============================================
+ Hits 17862 17865 +3
Misses 1285 1285
- Partials 591 592 +1 ☔ View full report in Codecov by Sentry. |
zeitlinger
commented
Nov 4, 2024
| private static String toPattern(String expected) { | ||
| Map<String, String> replacePatterns = new HashMap<>(); | ||
| replacePatterns.put("timestamp", "[0-9]+(\\.[0-9]+)?"); | ||
| String timestampPattern = "[0-9]+(\\.[0-9]+)?"; |
Member
Author
There was a problem hiding this comment.
this is fixing a flaky test, because nanos are omitted if 0
Member
Author
|
@jack-berg can you take a look? |
jack-berg
reviewed
Nov 4, 2024
| } | ||
|
|
||
| /** Marshals into the {@link JsonGenerator} in proto JSON format and adds a newline. */ | ||
| public final void writeJsonWithNewline(JsonGenerator output) throws IOException { |
Member
There was a problem hiding this comment.
Should this code call output.writeRaw('\n') or should StreamJsonWriter? Seems like an implementation detail of StreamJsonWriter to me.
Member
Author
There was a problem hiding this comment.
I tried calling from StreamJsonWriter, but this method closes the generator, so it fails
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.
fixes #6836