fix(otlp-transformer): do not throw when deserializing empty JSON response - #5551
Merged
pichlermarc merged 4 commits intoApr 14, 2025
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5551 +/- ##
=======================================
Coverage 94.95% 94.95%
=======================================
Files 309 309
Lines 7946 7952 +6
Branches 1608 1611 +3
=======================================
+ Hits 7545 7551 +6
Misses 401 401
🚀 New features to boost your workflow:
|
Member
Author
|
Actually I'm not sure if an empty response is a valid OTLP response or not. It might now be a spec compliant response after all since technically an empty string is not valid JSON. Related spec: https://opentelemetry.io/docs/specs/otlp/#full-success-1 |
pichlermarc
marked this pull request as ready for review
March 20, 2025 13:35
blumamir
approved these changes
Apr 10, 2025
JamieDanielson
approved these changes
Apr 10, 2025
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Apr 14, 2025
pichlermarc
added a commit
to dynatrace-oss-contrib/opentelemetry-js
that referenced
this pull request
Aug 26, 2025
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.
Which problem is this PR solving?
When receiving an empty response form the server, the de-serialization code would throw, which caused a log message to be written. This PR changes it so that empty responses from the server are treated as such.
Fixes #5548
Type of change
How Has This Been Tested?