-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/otlp] Refactor http error handling (#9893)
**Description:** This PR slightly refactors the otlp receiver's HTTP error handling. The result is a few less calls to `status.FromError`, increased accuracy in the grpc code included in the body of the response, and centralizing http<->grpc mapping in the `internal/errors` package. This PR intentionally changes how we map from HTTP status code to grpc `Status.code`. I don't consider this to be a breaking change, or even worthy of a changelog, since the specification states that `"The clients are not expected to alter their behavior based on Status.code field but MAY record it for troubleshooting purposes."` Honestly, I'd be ok if we chose to stop including the `Status.code` entirely as it leads to more confusion in the code and payload in my opinion. **Link to tracking Issue:** Closes #9864 **Testing:** Added new tests
- Loading branch information
1 parent
2ff9795
commit b8690b6
Showing
3 changed files
with
106 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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